am 20071e50: am e3d37a7b: Enable support RGBX_8888 for omap3

* commit '20071e5028adb6d7ced81843d33e4d0baa0768ed':
  Enable support RGBX_8888 for omap3
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 3461e38..0d71bbd 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -40,7 +40,7 @@
 
 #define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0])))
 
-enum { MAX_SYS_FILES = 8 };
+enum { MAX_SYS_FILES = 10 };
 
 const char* k_traceTagsProperty = "debug.atrace.tags.enableflags";
 const char* k_traceAppCmdlineProperty = "debug.atrace.app_cmdlines";
@@ -100,6 +100,12 @@
         { REQ,      "/sys/kernel/debug/tracing/events/power/cpu_idle/enable" },
     } },
     { "disk",       "Disk I/O",         0, {
+        { REQ,      "/sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_enter/enable" },
+        { REQ,      "/sys/kernel/debug/tracing/events/f2fs/f2fs_sync_file_exit/enable" },
+        { REQ,      "/sys/kernel/debug/tracing/events/f2fs/f2fs_write_begin/enable" },
+        { REQ,      "/sys/kernel/debug/tracing/events/f2fs/f2fs_write_end/enable" },
+        { REQ,      "/sys/kernel/debug/tracing/events/ext4/ext4_da_write_begin/enable" },
+        { REQ,      "/sys/kernel/debug/tracing/events/ext4/ext4_da_write_end/enable" },
         { REQ,      "/sys/kernel/debug/tracing/events/ext4/ext4_sync_file_enter/enable" },
         { REQ,      "/sys/kernel/debug/tracing/events/ext4/ext4_sync_file_exit/enable" },
         { REQ,      "/sys/kernel/debug/tracing/events/block/block_rq_issue/enable" },
diff --git a/cmds/bugreport/bugreport.c b/cmds/bugreport/bugreport.c
index 4a0b511..11e9057 100644
--- a/cmds/bugreport/bugreport.c
+++ b/cmds/bugreport/bugreport.c
@@ -29,7 +29,7 @@
     property_set("ctl.start", "dumpstate");
 
     /* socket will not be available until service starts */
-    for (i = 0; i < 10; i++) {
+    for (i = 0; i < 20; i++) {
         s = socket_local_client("dumpstate",
                              ANDROID_SOCKET_NAMESPACE_RESERVED,
                              SOCK_STREAM);
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 220af47..7fb5b12 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -174,9 +174,7 @@
     dump_file("LAST PANIC CONSOLE", "/data/dontpanic/apanic_console");
     dump_file("LAST PANIC THREADS", "/data/dontpanic/apanic_threads");
 
-    run_command("SYSTEM SETTINGS", 20, SU_PATH, "root", "sqlite3",
-            "/data/data/com.android.providers.settings/databases/settings.db",
-            "pragma user_version; select * from system; select * from secure; select * from global;", NULL);
+    for_each_userid(do_dump_settings, NULL);
 
     /* The following have a tendency to get wedged when wifi drivers/fw goes belly-up. */
     run_command("NETWORK INTERFACES", 10, SU_PATH, "root", "netcfg", NULL);
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 67bbd7e..d820495 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -26,6 +26,7 @@
 
 typedef void (for_each_pid_func)(int, const char *);
 typedef void (for_each_tid_func)(int, int, const char *);
+typedef void (for_each_userid_func)(int);
 
 /* prints the contents of a file */
 int dump_file(const char *title, const char* path);
@@ -51,6 +52,9 @@
 /* for each thread in the system, run the specified function */
 void for_each_tid(for_each_tid_func func, const char *header);
 
+/* for each user id in the system, run the specified function */
+void for_each_userid(for_each_userid_func func, const char *header);
+
 /* Displays a blocked processes in-kernel wait channel */
 void show_wchan(int pid, int tid, const char *name);
 
@@ -60,6 +64,9 @@
 /* Gets the dmesg output for the kernel */
 void do_dmesg();
 
+/* Dumps settings for a given user id */
+void do_dump_settings(int userid);
+
 /* Play a sound via Stagefright */
 void play_sound(const char* path);
 
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index ef5072a..6b119c3 100644
--- a/cmds/dumpstate/utils.c
+++ b/cmds/dumpstate/utils.c
@@ -51,6 +51,29 @@
         NULL,
 };
 
+void for_each_userid(void (*func)(int), const char *header) {
+    DIR *d;
+    struct dirent *de;
+
+    if (header) printf("\n------ %s ------\n", header);
+    func(0);
+
+    if (!(d = opendir("/data/system/users"))) {
+        printf("Failed to open /data/system/users (%s)\n", strerror(errno));
+        return;
+    }
+
+    while ((de = readdir(d))) {
+        int userid;
+        if (de->d_type != DT_DIR || !(userid = atoi(de->d_name))) {
+            continue;
+        }
+        func(userid);
+    }
+
+    closedir(d);
+}
+
 static void __for_each_pid(void (*helper)(int, const char *, void *), const char *header, void *arg) {
     DIR *d;
     struct dirent *de;
@@ -175,6 +198,22 @@
     return;
 }
 
+void do_dump_settings(int userid) {
+    char title[255];
+    char dbpath[255];
+    char sql[255];
+    sprintf(title, "SYSTEM SETTINGS (user %d)", userid);
+    if (userid == 0) {
+        strcpy(dbpath, "/data/data/com.android.providers.settings/databases/settings.db");
+        strcpy(sql, "pragma user_version; select * from system; select * from secure; select * from global;");
+    } else {
+        sprintf(dbpath, "/data/system/users/%d/settings.db", userid);
+        strcpy(sql, "pragma user_version; select * from system; select * from secure;");
+    }
+    run_command(title, 20, SU_PATH, "root", "sqlite3", dbpath, sql, NULL);
+    return;
+}
+
 void do_dmesg() {
     printf("------ KERNEL LOG (dmesg) ------\n");
     /* Get size of kernel buffer */
diff --git a/cmds/flatland/Android.mk b/cmds/flatland/Android.mk
index d9478fe..c295167 100644
--- a/cmds/flatland/Android.mk
+++ b/cmds/flatland/Android.mk
@@ -13,7 +13,9 @@
 LOCAL_MODULE_TAGS := tests
 
 LOCAL_MODULE_PATH := $(local_target_dir)
-
+LOCAL_MULTILIB := both
+LOCAL_MODULE_STEM_32 := flatland
+LOCAL_MODULE_STEM_64 := flatland64
 LOCAL_SHARED_LIBRARIES := \
     libEGL      \
     libGLESv2   \
diff --git a/cmds/flatland/GLHelper.cpp b/cmds/flatland/GLHelper.cpp
index 05d082b..4b5aba9 100644
--- a/cmds/flatland/GLHelper.cpp
+++ b/cmds/flatland/GLHelper.cpp
@@ -201,14 +201,16 @@
 
 bool GLHelper::createNamedSurfaceTexture(GLuint name, uint32_t w, uint32_t h,
         sp<GLConsumer>* glConsumer, EGLSurface* surface) {
-    sp<BufferQueue> bq = new BufferQueue(mGraphicBufferAlloc);
-    sp<GLConsumer> glc = new GLConsumer(bq, name,
+    sp<IGraphicBufferProducer> producer;
+    sp<IGraphicBufferConsumer> consumer;
+    BufferQueue::createBufferQueue(&producer, &consumer, mGraphicBufferAlloc);
+    sp<GLConsumer> glc = new GLConsumer(consumer, name,
             GL_TEXTURE_EXTERNAL_OES, false);
     glc->setDefaultBufferSize(w, h);
     glc->setDefaultMaxBufferCount(3);
     glc->setConsumerUsageBits(GRALLOC_USAGE_HW_COMPOSER);
 
-    sp<ANativeWindow> anw = new Surface(bq);
+    sp<ANativeWindow> anw = new Surface(producer);
     EGLSurface s = eglCreateWindowSurface(mDisplay, mConfig, anw.get(), NULL);
     if (s == EGL_NO_SURFACE) {
         fprintf(stderr, "eglCreateWindowSurface error: %#x\n", eglGetError());
diff --git a/cmds/flatland/Main.cpp b/cmds/flatland/Main.cpp
index c0e5b3d..866203f 100644
--- a/cmds/flatland/Main.cpp
+++ b/cmds/flatland/Main.cpp
@@ -73,7 +73,7 @@
         },
     },
 
-    { "3:2 Single Static Window",
+    { "4:3 Single Static Window",
         2048, 1536, { 1536 },
         {
             {   // Window
@@ -117,7 +117,7 @@
         },
     },
 
-    { "3:2 App -> Home Transition",
+    { "4:3 App -> Home Transition",
         2048, 1536, { 1536 },
         {
             {   // Wallpaper
@@ -173,7 +173,7 @@
         },
     },
 
-    { "3:2 SurfaceView -> Home Transition",
+    { "4:3 SurfaceView -> Home Transition",
         2048, 1536, { 1536 },
         {
             {   // Wallpaper
diff --git a/cmds/screenshot/Android.mk b/cmds/screenshot/Android.mk
deleted file mode 100644
index 1ee7807..0000000
--- a/cmds/screenshot/Android.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := screenshot.c
-
-LOCAL_MODULE := screenshot
-
-LOCAL_SHARED_LIBRARIES := libcutils libz liblog
-LOCAL_STATIC_LIBRARIES := libpng
-LOCAL_C_INCLUDES += external/zlib external/libpng
-
-include $(BUILD_EXECUTABLE)
diff --git a/cmds/screenshot/screenshot.c b/cmds/screenshot/screenshot.c
deleted file mode 100644
index be1ecd4..0000000
--- a/cmds/screenshot/screenshot.c
+++ /dev/null
@@ -1,171 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include <linux/fb.h>
-
-#include <zlib.h>
-#include <png.h>
-
-#include "private/android_filesystem_config.h"
-
-#define LOG_TAG "screenshot"
-#include <utils/Log.h>
-
-void take_screenshot(FILE *fb_in, FILE *fb_out) {
-    int fb;
-    char imgbuf[0x10000];
-    struct fb_var_screeninfo vinfo;
-    png_structp png;
-    png_infop info;
-    unsigned int r,c,rowlen;
-    unsigned int bytespp,offset;
-
-    fb = fileno(fb_in);
-    if(fb < 0) {
-        ALOGE("failed to open framebuffer\n");
-        return;
-    }
-    fb_in = fdopen(fb, "r");
-
-    if(ioctl(fb, FBIOGET_VSCREENINFO, &vinfo) < 0) {
-        ALOGE("failed to get framebuffer info\n");
-        return;
-    }
-    fcntl(fb, F_SETFD, FD_CLOEXEC);
-
-    png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-    if (png == NULL) {
-        ALOGE("failed png_create_write_struct\n");
-        fclose(fb_in);
-        return;
-    }
-
-    png_init_io(png, fb_out);
-    info = png_create_info_struct(png);
-    if (info == NULL) {
-        ALOGE("failed png_create_info_struct\n");
-        png_destroy_write_struct(&png, NULL);
-        fclose(fb_in);
-        return;
-    }
-    if (setjmp(png_jmpbuf(png))) {
-        ALOGE("failed png setjmp\n");
-        png_destroy_write_struct(&png, NULL);
-        fclose(fb_in);
-        return;
-    }
-
-    bytespp = vinfo.bits_per_pixel / 8;
-    png_set_IHDR(png, info,
-        vinfo.xres, vinfo.yres, vinfo.bits_per_pixel / 4, 
-        PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
-        PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-    png_write_info(png, info);
-
-    rowlen=vinfo.xres * bytespp;
-    if (rowlen > sizeof(imgbuf)) {
-        ALOGE("crazy rowlen: %d\n", rowlen);
-        png_destroy_write_struct(&png, NULL);
-        fclose(fb_in);
-        return;
-    }
-
-    offset = vinfo.xoffset * bytespp + vinfo.xres * vinfo.yoffset * bytespp;
-    fseek(fb_in, offset, SEEK_SET);
-
-    for(r=0; r<vinfo.yres; r++) {
-        int len = fread(imgbuf, 1, rowlen, fb_in);
-        if (len <= 0) break;
-        png_write_row(png, (png_bytep)imgbuf);
-    }
-
-    png_write_end(png, info);
-    fclose(fb_in);
-    png_destroy_write_struct(&png, NULL);
-}
-
-void fork_sound(const char* path) {
-    pid_t pid = fork();
-    if (pid == 0) {
-        execl("/system/bin/stagefright", "stagefright", "-o", "-a", path, NULL);
-    }
-}
-
-void usage() {
-    fprintf(stderr,
-            "usage: screenshot [-s soundfile] filename.png\n"
-            "   -s: play a sound effect to signal success\n"
-            "   -i: autoincrement to avoid overwriting filename.png\n"
-    );
-}
-
-int main(int argc, char**argv) {
-    FILE *png = NULL;
-    FILE *fb_in = NULL;
-    char outfile[PATH_MAX] = "";
-
-    char * soundfile = NULL;
-    int do_increment = 0;
-
-    int c;
-    while ((c = getopt(argc, argv, "s:i")) != -1) {
-        switch (c) {
-            case 's': soundfile = optarg; break;
-            case 'i': do_increment = 1; break;
-            case '?':
-            case 'h':
-                usage(); exit(1);
-        }
-    }
-    argc -= optind;
-    argv += optind;
-
-    if (argc < 1) {
-        usage(); exit(1);
-    }
-
-    strlcpy(outfile, argv[0], PATH_MAX);
-    if (do_increment) {
-        struct stat st;
-        char base[PATH_MAX] = "";
-        int i = 0;
-        while (stat(outfile, &st) == 0) {
-            if (!base[0]) {
-                char *p = strrchr(outfile, '.');
-                if (p) *p = '\0';
-                strcpy(base, outfile);
-            }
-            snprintf(outfile, PATH_MAX, "%s-%d.png", base, ++i);
-        }
-    }
-
-    fb_in = fopen("/dev/graphics/fb0", "r");
-    if (!fb_in) {
-        fprintf(stderr, "error: could not read framebuffer\n");
-        exit(1);
-    }
-
-    /* switch to non-root user and group */
-    gid_t groups[] = { AID_LOG, AID_SDCARD_RW };
-    setgroups(sizeof(groups)/sizeof(groups[0]), groups);
-    setuid(AID_SHELL);
-
-    png = fopen(outfile, "w");
-    if (!png) {
-        fprintf(stderr, "error: writing file %s: %s\n",
-                outfile, strerror(errno));
-        exit(1);
-    }
-
-    take_screenshot(fb_in, png);
-
-    if (soundfile) {
-        fork_sound(soundfile);
-    }
-
-    exit(0);
-}
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 79ce6ed..3200012 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -32,6 +32,9 @@
     { AID_MEDIA, "media.player" },
     { AID_MEDIA, "media.camera" },
     { AID_MEDIA, "media.audio_policy" },
+    { AID_MEDIA, "media.sound_trigger_hw" },
+    { AID_AUDIO, "audio" },
+    { AID_INPUT, "input" },
     { AID_DRM,   "drm.drmManager" },
     { AID_NFC,   "nfc" },
     { AID_BLUETOOTH, "bluetooth" },
@@ -48,6 +51,7 @@
     { AID_MEDIA, "common_time.clock" },
     { AID_MEDIA, "common_time.config" },
     { AID_KEYSTORE, "android.security.keystore" },
+    { AID_RADIO, "telecomm" },
 };
 
 uint32_t svcmgr_handle;
diff --git a/data/etc/android.software.managed_profiles.xml b/data/etc/android.software.managed_profiles.xml
new file mode 100644
index 0000000..532a543
--- /dev/null
+++ b/data/etc/android.software.managed_profiles.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- This is the standard feature indicating that the device supports managed profiles. -->
+<permissions>
+    <feature name="android.software.managed_profiles" />
+</permissions>
diff --git a/data/etc/android.software.voice_recognizers.xml b/data/etc/android.software.voice_recognizers.xml
new file mode 100644
index 0000000..7e72177
--- /dev/null
+++ b/data/etc/android.software.voice_recognizers.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<permissions>
+    <feature name="android.software.voice_recognizers" />
+</permissions>
diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml
index 4d81fb6..f18e4b1 100644
--- a/data/etc/handheld_core_hardware.xml
+++ b/data/etc/handheld_core_hardware.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,6 +36,7 @@
 
     <!-- basic system services -->
     <feature name="android.software.app_widgets" />
+    <feature name="android.software.voice_recognizers" />
     <feature name="android.software.backup" />
     <feature name="android.software.home_screen" />
     <feature name="android.software.input_methods" />
@@ -44,9 +45,12 @@
     <!-- Feature to specify if the device supports adding device admins. -->
     <feature name="android.software.device_admin" />
 
+    <!-- Feature to specify if the device support managed profiles. -->
+    <feature name="android.software.managed_profiles" />
+
     <!-- devices with GPS must include android.hardware.location.gps.xml -->
     <!-- devices with an autofocus camera and/or flash must include either
-         android.hardware.camera.autofocus.xml or 
+         android.hardware.camera.autofocus.xml or
          android.hardware.camera.autofocus-flash.xml -->
     <!-- devices with a front facing camera must include
          android.hardware.camera.front.xml -->
diff --git a/data/etc/tablet_core_hardware.xml b/data/etc/tablet_core_hardware.xml
index 2a74b0f..4db2e57 100644
--- a/data/etc/tablet_core_hardware.xml
+++ b/data/etc/tablet_core_hardware.xml
@@ -4,9 +4,9 @@
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
-  
+
           http://www.apache.org/licenses/LICENSE-2.0
-  
+
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,6 +37,7 @@
 
     <!-- basic system services -->
     <feature name="android.software.app_widgets" />
+    <feature name="android.software.voice_recognizers" />
     <feature name="android.software.backup" />
     <feature name="android.software.home_screen" />
     <feature name="android.software.input_methods" />
@@ -45,10 +46,13 @@
     <!-- Feature to specify if the device supports adding device admins. -->
     <feature name="android.software.device_admin" />
 
+    <!-- Feature to specify if the device support managed profiles. -->
+    <feature name="android.software.managed_profiles" />
+
     <!-- devices with GPS must include android.hardware.location.gps.xml -->
     <!-- devices with a rear-facing camera must include one of these as appropriate:
-         android.hardware.camera.xml or 
-         android.hardware.camera.autofocus.xml or 
+         android.hardware.camera.xml or
+         android.hardware.camera.autofocus.xml or
          android.hardware.camera.autofocus-flash.xml -->
     <!-- devices with a front facing camera must include
          android.hardware.camera.front.xml -->
diff --git a/include/android/keycodes.h b/include/android/keycodes.h
index b6a5f4c..da7302d 100644
--- a/include/android/keycodes.h
+++ b/include/android/keycodes.h
@@ -268,6 +268,12 @@
     AKEYCODE_MEDIA_AUDIO_TRACK = 222,
     AKEYCODE_SLEEP           = 223,
     AKEYCODE_WAKEUP          = 224,
+    AKEYCODE_PAIRING         = 225,
+    AKEYCODE_MEDIA_TOP_MENU  = 226,
+    AKEYCODE_11              = 227,
+    AKEYCODE_12              = 228,
+    AKEYCODE_LAST_CHANNEL    = 229,
+    AKEYCODE_TV_DATA_SERVICE = 230
 
     // NOTE: If you add a new keycode here you must also add it to several other files.
     //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
diff --git a/include/android/sensor.h b/include/android/sensor.h
index b71bccb..878f8ff 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -164,7 +164,9 @@
             uint64_t        step_counter;
         } u64;
     };
-    int32_t reserved1[4];
+
+    uint32_t flags;
+    int32_t reserved1[3];
 } ASensorEvent;
 
 struct ASensorManager;
diff --git a/include/batteryservice/BatteryService.h b/include/batteryservice/BatteryService.h
index 829061a..6211cf4 100644
--- a/include/batteryservice/BatteryService.h
+++ b/include/batteryservice/BatteryService.h
@@ -18,6 +18,7 @@
 #define ANDROID_BATTERYSERVICE_H
 
 #include <binder/Parcel.h>
+#include <sys/types.h>
 #include <utils/Errors.h>
 #include <utils/String8.h>
 
@@ -43,6 +44,15 @@
     BATTERY_HEALTH_COLD = 7, // equals BatteryManager.BATTERY_HEALTH_COLD constant
 };
 
+// must be kept in sync with definitions in BatteryProperty.java
+enum {
+    BATTERY_PROP_CHARGE_COUNTER = 1, // equals BatteryProperty.CHARGE_COUNTER constant
+    BATTERY_PROP_CURRENT_NOW = 2, // equals BatteryProperty.CURRENT_NOW constant
+    BATTERY_PROP_CURRENT_AVG = 3, // equals BatteryProperty.CURRENT_AVG constant
+    BATTERY_PROP_CAPACITY = 4, // equals BatteryProperty.CAPACITY constant
+    BATTERY_PROP_ENERGY_COUNTER = 5, // equals BatteryProperty.ENERGY_COUNTER constant
+};
+
 struct BatteryProperties {
     bool chargerAcOnline;
     bool chargerUsbOnline;
@@ -52,8 +62,6 @@
     bool batteryPresent;
     int batteryLevel;
     int batteryVoltage;
-    int batteryCurrentNow;
-    int batteryChargeCounter;
     int batteryTemperature;
     String8 batteryTechnology;
 
@@ -61,6 +69,13 @@
     status_t readFromParcel(Parcel* parcel);
 };
 
+struct BatteryProperty {
+    int64_t valueInt64;
+
+    status_t writeToParcel(Parcel* parcel) const;
+    status_t readFromParcel(Parcel* parcel);
+};
+
 }; // namespace android
 
 #endif // ANDROID_BATTERYSERVICE_H
diff --git a/include/batteryservice/IBatteryPropertiesRegistrar.h b/include/batteryservice/IBatteryPropertiesRegistrar.h
index 8d28b1d..eca075d 100644
--- a/include/batteryservice/IBatteryPropertiesRegistrar.h
+++ b/include/batteryservice/IBatteryPropertiesRegistrar.h
@@ -26,6 +26,7 @@
 enum {
     REGISTER_LISTENER = IBinder::FIRST_CALL_TRANSACTION,
     UNREGISTER_LISTENER,
+    GET_PROPERTY,
 };
 
 class IBatteryPropertiesRegistrar : public IInterface {
@@ -34,6 +35,7 @@
 
     virtual void registerListener(const sp<IBatteryPropertiesListener>& listener) = 0;
     virtual void unregisterListener(const sp<IBatteryPropertiesListener>& listener) = 0;
+    virtual status_t getProperty(int id, struct BatteryProperty *val) = 0;
 };
 
 class BnBatteryPropertiesRegistrar : public BnInterface<IBatteryPropertiesRegistrar> {
diff --git a/include/binder/IBatteryStats.h b/include/binder/IBatteryStats.h
new file mode 100644
index 0000000..f4a8aa3
--- /dev/null
+++ b/include/binder/IBatteryStats.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_IBATTERYSTATS_H
+#define ANDROID_IBATTERYSTATS_H
+
+#include <binder/IInterface.h>
+
+namespace android {
+
+// ----------------------------------------------------------------------
+
+class IBatteryStats : public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(BatteryStats);
+
+    virtual void noteStartSensor(int uid, int sensor) = 0;
+    virtual void noteStopSensor(int uid, int sensor) = 0;
+
+    enum {
+        NOTE_START_SENSOR_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
+        NOTE_STOP_SENSOR_TRANSACTION,
+    };
+};
+
+// ----------------------------------------------------------------------
+
+class BnBatteryStats : public BnInterface<IBatteryStats>
+{
+public:
+    virtual status_t    onTransact( uint32_t code,
+                                    const Parcel& data,
+                                    Parcel* reply,
+                                    uint32_t flags = 0);
+};
+
+// ----------------------------------------------------------------------
+
+}; // namespace android
+
+#endif // ANDROID_IBATTERYSTATS_H
diff --git a/include/binder/IBinder.h b/include/binder/IBinder.h
index 8b84951..43b6543 100644
--- a/include/binder/IBinder.h
+++ b/include/binder/IBinder.h
@@ -81,14 +81,6 @@
                                         Parcel* reply,
                                         uint32_t flags = 0) = 0;
 
-    /**
-     * This method allows you to add data that is transported through
-     * IPC along with your IBinder pointer.  When implementing a Binder
-     * object, override it to write your desired data in to @a outData.
-     * You can then call getConstantData() on your IBinder to retrieve
-     * that data, from any process.  You MUST return the number of bytes
-     * written in to the parcel (including padding).
-     */
     class DeathRecipient : public virtual RefBase
     {
     public:
diff --git a/include/binder/MemoryDealer.h b/include/binder/MemoryDealer.h
index 170f20d..aa415d5 100644
--- a/include/binder/MemoryDealer.h
+++ b/include/binder/MemoryDealer.h
@@ -34,7 +34,8 @@
 class MemoryDealer : public RefBase
 {
 public:
-    MemoryDealer(size_t size, const char* name = 0);
+    MemoryDealer(size_t size, const char* name = 0,
+            uint32_t flags = 0 /* or bits such as MemoryHeapBase::READ_ONLY */ );
 
     virtual sp<IMemory> allocate(size_t size);
     virtual void        deallocate(size_t offset);
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index ce630bd..548fbf8 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -129,6 +129,11 @@
     // will be closed once the parcel is destroyed.
     status_t            writeDupFileDescriptor(int fd);
 
+    // Writes a raw fd and optional comm channel fd to the parcel as a ParcelFileDescriptor.
+    // A dup's of the fds are made, which will be closed once the parcel is destroyed.
+    // Null values are passed as -1.
+    status_t            writeParcelFileDescriptor(int fd, int commChannel = -1);
+
     // Writes a blob to the parcel.
     // If the blob is small, then it is stored in-place, otherwise it is
     // transferred by way of an anonymous shared memory region.
@@ -188,6 +193,11 @@
     // in the parcel, which you do not own -- use dup() to get your own copy.
     int                 readFileDescriptor() const;
 
+    // Reads a ParcelFileDescriptor from the parcel.  Returns the raw fd as
+    // the result, and the optional comm channel fd in outCommChannel.
+    // Null values are returned as -1.
+    int                 readParcelFileDescriptor(int& outCommChannel) const;
+
     // Reads a blob from the parcel.
     // The caller should call release() on the blob after reading its contents.
     status_t            readBlob(size_t len, ReadableBlob* outBlob) const;
diff --git a/include/gui/BufferItem.h b/include/gui/BufferItem.h
new file mode 100644
index 0000000..5effd10
--- /dev/null
+++ b/include/gui/BufferItem.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_BUFFERITEM_H
+#define ANDROID_GUI_BUFFERITEM_H
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include <gui/IGraphicBufferConsumer.h>
+
+#include <ui/Rect.h>
+
+#include <utils/Flattenable.h>
+#include <utils/StrongPointer.h>
+
+namespace android {
+
+class Fence;
+class GraphicBuffer;
+
+class BufferItem : public Flattenable<BufferItem> {
+    friend class Flattenable<BufferItem>;
+    size_t getPodSize() const;
+    size_t getFlattenedSize() const;
+    size_t getFdCount() const;
+    status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
+    status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
+
+    public:
+    // The default value of mBuf, used to indicate this doesn't correspond to a slot.
+    enum { INVALID_BUFFER_SLOT = -1 };
+    BufferItem();
+    operator IGraphicBufferConsumer::BufferItem() const;
+
+    static const char* scalingModeName(uint32_t scalingMode);
+
+    // mGraphicBuffer points to the buffer allocated for this slot, or is NULL
+    // if the buffer in this slot has been acquired in the past (see
+    // BufferSlot.mAcquireCalled).
+    sp<GraphicBuffer> mGraphicBuffer;
+
+    // mFence is a fence that will signal when the buffer is idle.
+    sp<Fence> mFence;
+
+    // mCrop is the current crop rectangle for this buffer slot.
+    Rect mCrop;
+
+    // mTransform is the current transform flags for this buffer slot.
+    // refer to NATIVE_WINDOW_TRANSFORM_* in <window.h>
+    uint32_t mTransform;
+
+    // mScalingMode is the current scaling mode for this buffer slot.
+    // refer to NATIVE_WINDOW_SCALING_* in <window.h>
+    uint32_t mScalingMode;
+
+    // mTimestamp is the current timestamp for this buffer slot. This gets
+    // to set by queueBuffer each time this slot is queued. This value
+    // is guaranteed to be monotonically increasing for each newly
+    // acquired buffer.
+    int64_t mTimestamp;
+
+    // mIsAutoTimestamp indicates whether mTimestamp was generated
+    // automatically when the buffer was queued.
+    bool mIsAutoTimestamp;
+
+    // mFrameNumber is the number of the queued frame for this slot.
+    uint64_t mFrameNumber;
+
+    // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT).
+    int mSlot;
+
+    // mIsDroppable whether this buffer was queued with the
+    // property that it can be replaced by a new buffer for the purpose of
+    // making sure dequeueBuffer() won't block.
+    // i.e.: was the BufferQueue in "mDequeueBufferCannotBlock" when this buffer
+    // was queued.
+    bool mIsDroppable;
+
+    // Indicates whether this buffer has been seen by a consumer yet
+    bool mAcquireCalled;
+
+    // Indicates this buffer must be transformed by the inverse transform of the screen
+    // it is displayed onto. This is applied after mTransform.
+    bool mTransformToDisplayInverse;
+};
+
+} // namespace android
+
+#endif
diff --git a/include/gui/BufferItemConsumer.h b/include/gui/BufferItemConsumer.h
index 52edf17..5494ff1 100644
--- a/include/gui/BufferItemConsumer.h
+++ b/include/gui/BufferItemConsumer.h
@@ -44,6 +44,7 @@
 
     typedef BufferQueue::BufferItem BufferItem;
 
+    enum { DEFAULT_MAX_BUFFERS = -1 };
     enum { INVALID_BUFFER_SLOT = BufferQueue::INVALID_BUFFER_SLOT };
     enum { NO_BUFFER_AVAILABLE = BufferQueue::NO_BUFFER_AVAILABLE };
 
@@ -53,8 +54,8 @@
     // access at the same time.
     // controlledByApp tells whether this consumer is controlled by the
     // application.
-    BufferItemConsumer(const sp<BufferQueue>& bq, uint32_t consumerUsage,
-            int bufferCount = BufferQueue::MIN_UNDEQUEUED_BUFFERS,
+    BufferItemConsumer(const sp<IGraphicBufferConsumer>& consumer,
+            uint32_t consumerUsage, int bufferCount = DEFAULT_MAX_BUFFERS,
             bool controlledByApp = false);
 
     virtual ~BufferItemConsumer();
diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h
index 408956b..3297b10 100644
--- a/include/gui/BufferQueue.h
+++ b/include/gui/BufferQueue.h
@@ -17,35 +17,29 @@
 #ifndef ANDROID_GUI_BUFFERQUEUE_H
 #define ANDROID_GUI_BUFFERQUEUE_H
 
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-#include <binder/IBinder.h>
-
-#include <gui/IConsumerListener.h>
-#include <gui/IGraphicBufferAlloc.h>
-#include <gui/IGraphicBufferProducer.h>
+#include <gui/BufferQueueDefs.h>
 #include <gui/IGraphicBufferConsumer.h>
+#include <gui/IGraphicBufferProducer.h>
+#include <gui/IConsumerListener.h>
 
-#include <ui/Fence.h>
-#include <ui/GraphicBuffer.h>
-
-#include <utils/String8.h>
-#include <utils/Vector.h>
-#include <utils/threads.h>
+// These are only required to keep other parts of the framework with incomplete
+// dependencies building successfully
+#include <gui/IGraphicBufferAlloc.h>
 
 namespace android {
-// ----------------------------------------------------------------------------
 
-class BufferQueue : public BnGraphicBufferProducer,
-                    public BnGraphicBufferConsumer,
-                    private IBinder::DeathRecipient {
+class BufferQueue {
 public:
-    enum { MIN_UNDEQUEUED_BUFFERS = 2 };
-    enum { NUM_BUFFER_SLOTS = 32 };
-    enum { NO_CONNECTED_API = 0 };
-    enum { INVALID_BUFFER_SLOT = -1 };
-    enum { STALE_BUFFER_SLOT = 1, NO_BUFFER_AVAILABLE, PRESENT_LATER };
+    // BufferQueue will keep track of at most this value of buffers.
+    // Attempts at runtime to increase the number of buffers past this will fail.
+    enum { NUM_BUFFER_SLOTS = BufferQueueDefs::NUM_BUFFER_SLOTS };
+    // Used as a placeholder slot# when the value isn't pointing to an existing buffer.
+    enum { INVALID_BUFFER_SLOT = IGraphicBufferConsumer::BufferItem::INVALID_BUFFER_SLOT };
+    // Alias to <IGraphicBufferConsumer.h> -- please scope from there in future code!
+    enum {
+        NO_BUFFER_AVAILABLE = IGraphicBufferConsumer::NO_BUFFER_AVAILABLE,
+        PRESENT_LATER = IGraphicBufferConsumer::PRESENT_LATER,
+    };
 
     // When in async mode we reserve two slots in order to guarantee that the
     // producer and consumer can run asynchronously.
@@ -53,6 +47,7 @@
 
     // for backward source compatibility
     typedef ::android::ConsumerListener ConsumerListener;
+    typedef IGraphicBufferConsumer::BufferItem BufferItem;
 
     // ProxyConsumerListener is a ConsumerListener implementation that keeps a weak
     // reference to the actual consumer object.  It forwards all calls to that
@@ -69,503 +64,22 @@
         virtual ~ProxyConsumerListener();
         virtual void onFrameAvailable();
         virtual void onBuffersReleased();
+        virtual void onSidebandStreamChanged();
     private:
         // mConsumerListener is a weak reference to the IConsumerListener.  This is
         // the raison d'etre of ProxyConsumerListener.
         wp<ConsumerListener> mConsumerListener;
     };
 
-
     // BufferQueue manages a pool of gralloc memory slots to be used by
     // producers and consumers. allocator is used to allocate all the
     // needed gralloc buffers.
-    BufferQueue(const sp<IGraphicBufferAlloc>& allocator = NULL);
-    virtual ~BufferQueue();
-
-    /*
-     * IBinder::DeathRecipient interface
-     */
-
-    virtual void binderDied(const wp<IBinder>& who);
-
-    /*
-     * IGraphicBufferProducer interface
-     */
-
-    // Query native window attributes.  The "what" values are enumerated in
-    // window.h (e.g. NATIVE_WINDOW_FORMAT).
-    virtual int query(int what, int* value);
-
-    // setBufferCount updates the number of available buffer slots.  If this
-    // method succeeds, buffer slots will be both unallocated and owned by
-    // the BufferQueue object (i.e. they are not owned by the producer or
-    // consumer).
-    //
-    // This will fail if the producer has dequeued any buffers, or if
-    // bufferCount is invalid.  bufferCount must generally be a value
-    // between the minimum undequeued buffer count and NUM_BUFFER_SLOTS
-    // (inclusive).  It may also be set to zero (the default) to indicate
-    // that the producer does not wish to set a value.  The minimum value
-    // can be obtained by calling query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS,
-    // ...).
-    //
-    // This may only be called by the producer.  The consumer will be told
-    // to discard buffers through the onBuffersReleased callback.
-    virtual status_t setBufferCount(int bufferCount);
-
-    // requestBuffer returns the GraphicBuffer for slot N.
-    //
-    // In normal operation, this is called the first time slot N is returned
-    // by dequeueBuffer.  It must be called again if dequeueBuffer returns
-    // flags indicating that previously-returned buffers are no longer valid.
-    virtual status_t requestBuffer(int slot, sp<GraphicBuffer>* buf);
-
-    // dequeueBuffer gets the next buffer slot index for the producer to use.
-    // If a buffer slot is available then that slot index is written to the
-    // location pointed to by the buf argument and a status of OK is returned.
-    // If no slot is available then a status of -EBUSY is returned and buf is
-    // unmodified.
-    //
-    // The fence parameter will be updated to hold the fence associated with
-    // the buffer. The contents of the buffer must not be overwritten until the
-    // fence signals. If the fence is Fence::NO_FENCE, the buffer may be
-    // written immediately.
-    //
-    // The width and height parameters must be no greater than the minimum of
-    // GL_MAX_VIEWPORT_DIMS and GL_MAX_TEXTURE_SIZE (see: glGetIntegerv).
-    // An error due to invalid dimensions might not be reported until
-    // updateTexImage() is called.  If width and height are both zero, the
-    // default values specified by setDefaultBufferSize() are used instead.
-    //
-    // The pixel formats are enumerated in graphics.h, e.g.
-    // HAL_PIXEL_FORMAT_RGBA_8888.  If the format is 0, the default format
-    // will be used.
-    //
-    // The usage argument specifies gralloc buffer usage flags.  The values
-    // are enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER.  These
-    // will be merged with the usage flags specified by setConsumerUsageBits.
-    //
-    // The return value may be a negative error value or a non-negative
-    // collection of flags.  If the flags are set, the return values are
-    // valid, but additional actions must be performed.
-    //
-    // If IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION is set, the
-    // producer must discard cached GraphicBuffer references for the slot
-    // returned in buf.
-    // If IGraphicBufferProducer::RELEASE_ALL_BUFFERS is set, the producer
-    // must discard cached GraphicBuffer references for all slots.
-    //
-    // In both cases, the producer will need to call requestBuffer to get a
-    // GraphicBuffer handle for the returned slot.
-    virtual status_t dequeueBuffer(int *buf, sp<Fence>* fence, bool async,
-            uint32_t width, uint32_t height, uint32_t format, uint32_t usage);
-
-    // queueBuffer returns a filled buffer to the BufferQueue.
-    //
-    // Additional data is provided in the QueueBufferInput struct.  Notably,
-    // a timestamp must be provided for the buffer. The timestamp is in
-    // nanoseconds, and must be monotonically increasing. Its other semantics
-    // (zero point, etc) are producer-specific and should be documented by the
-    // producer.
-    //
-    // The caller may provide a fence that signals when all rendering
-    // operations have completed.  Alternatively, NO_FENCE may be used,
-    // indicating that the buffer is ready immediately.
-    //
-    // Some values are returned in the output struct: the current settings
-    // for default width and height, the current transform hint, and the
-    // number of queued buffers.
-    virtual status_t queueBuffer(int buf,
-            const QueueBufferInput& input, QueueBufferOutput* output);
-
-    // cancelBuffer returns a dequeued buffer to the BufferQueue, but doesn't
-    // queue it for use by the consumer.
-    //
-    // The buffer will not be overwritten until the fence signals.  The fence
-    // will usually be the one obtained from dequeueBuffer.
-    virtual void cancelBuffer(int buf, const sp<Fence>& fence);
-
-    // connect attempts to connect a producer API to the BufferQueue.  This
-    // must be called before any other IGraphicBufferProducer methods are
-    // called except for getAllocator.  A consumer must already be connected.
-    //
-    // This method will fail if connect was previously called on the
-    // BufferQueue and no corresponding disconnect call was made (i.e. if
-    // it's still connected to a producer).
-    //
-    // APIs are enumerated in window.h (e.g. NATIVE_WINDOW_API_CPU).
-    virtual status_t connect(const sp<IBinder>& token,
-            int api, bool producerControlledByApp, QueueBufferOutput* output);
-
-    // disconnect attempts to disconnect a producer API from the BufferQueue.
-    // Calling this method will cause any subsequent calls to other
-    // IGraphicBufferProducer methods to fail except for getAllocator and connect.
-    // Successfully calling connect after this will allow the other methods to
-    // succeed again.
-    //
-    // This method will fail if the the BufferQueue is not currently
-    // connected to the specified producer API.
-    virtual status_t disconnect(int api);
-
-    /*
-     * IGraphicBufferConsumer interface
-     */
-
-    // acquireBuffer attempts to acquire ownership of the next pending buffer in
-    // the BufferQueue.  If no buffer is pending then it returns -EINVAL.  If a
-    // buffer is successfully acquired, the information about the buffer is
-    // returned in BufferItem.  If the buffer returned had previously been
-    // acquired then the BufferItem::mGraphicBuffer field of buffer is set to
-    // NULL and it is assumed that the consumer still holds a reference to the
-    // buffer.
-    //
-    // If presentWhen is nonzero, it indicates the time when the buffer will
-    // be displayed on screen.  If the buffer's timestamp is farther in the
-    // future, the buffer won't be acquired, and PRESENT_LATER will be
-    // returned.  The presentation time is in nanoseconds, and the time base
-    // is CLOCK_MONOTONIC.
-    virtual status_t acquireBuffer(BufferItem *buffer, nsecs_t presentWhen);
-
-    // releaseBuffer releases a buffer slot from the consumer back to the
-    // BufferQueue.  This may be done while the buffer's contents are still
-    // being accessed.  The fence will signal when the buffer is no longer
-    // in use. frameNumber is used to indentify the exact buffer returned.
-    //
-    // If releaseBuffer returns STALE_BUFFER_SLOT, then the consumer must free
-    // any references to the just-released buffer that it might have, as if it
-    // had received a onBuffersReleased() call with a mask set for the released
-    // buffer.
-    //
-    // Note that the dependencies on EGL will be removed once we switch to using
-    // the Android HW Sync HAL.
-    virtual status_t releaseBuffer(int buf, uint64_t frameNumber,
-            EGLDisplay display, EGLSyncKHR fence,
-            const sp<Fence>& releaseFence);
-
-    // consumerConnect connects a consumer to the BufferQueue.  Only one
-    // consumer may be connected, and when that consumer disconnects the
-    // BufferQueue is placed into the "abandoned" state, causing most
-    // interactions with the BufferQueue by the producer to fail.
-    // controlledByApp indicates whether the consumer is controlled by
-    // the application.
-    //
-    // consumer may not be NULL.
-    virtual status_t consumerConnect(const sp<IConsumerListener>& consumer, bool controlledByApp);
-
-    // consumerDisconnect disconnects a consumer from the BufferQueue. All
-    // buffers will be freed and the BufferQueue is placed in the "abandoned"
-    // state, causing most interactions with the BufferQueue by the producer to
-    // fail.
-    virtual status_t consumerDisconnect();
-
-    // getReleasedBuffers sets the value pointed to by slotMask to a bit mask
-    // indicating which buffer slots have been released by the BufferQueue
-    // but have not yet been released by the consumer.
-    //
-    // This should be called from the onBuffersReleased() callback.
-    virtual status_t getReleasedBuffers(uint32_t* slotMask);
-
-    // setDefaultBufferSize is used to set the size of buffers returned by
-    // dequeueBuffer when a width and height of zero is requested.  Default
-    // is 1x1.
-    virtual status_t setDefaultBufferSize(uint32_t w, uint32_t h);
-
-    // setDefaultMaxBufferCount sets the default value for the maximum buffer
-    // count (the initial default is 2). If the producer has requested a
-    // buffer count using setBufferCount, the default buffer count will only
-    // take effect if the producer sets the count back to zero.
-    //
-    // The count must be between 2 and NUM_BUFFER_SLOTS, inclusive.
-    virtual status_t setDefaultMaxBufferCount(int bufferCount);
-
-    // disableAsyncBuffer disables the extra buffer used in async mode
-    // (when both producer and consumer have set their "isControlledByApp"
-    // flag) and has dequeueBuffer() return WOULD_BLOCK instead.
-    //
-    // This can only be called before consumerConnect().
-    virtual status_t disableAsyncBuffer();
-
-    // setMaxAcquiredBufferCount sets the maximum number of buffers that can
-    // be acquired by the consumer at one time (default 1).  This call will
-    // fail if a producer is connected to the BufferQueue.
-    virtual status_t setMaxAcquiredBufferCount(int maxAcquiredBuffers);
-
-    // setConsumerName sets the name used in logging
-    virtual void setConsumerName(const String8& name);
-
-    // setDefaultBufferFormat allows the BufferQueue to create
-    // GraphicBuffers of a defaultFormat if no format is specified
-    // in dequeueBuffer.  Formats are enumerated in graphics.h; the
-    // initial default is HAL_PIXEL_FORMAT_RGBA_8888.
-    virtual status_t setDefaultBufferFormat(uint32_t defaultFormat);
-
-    // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer.
-    // These are merged with the bits passed to dequeueBuffer.  The values are
-    // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0.
-    virtual status_t setConsumerUsageBits(uint32_t usage);
-
-    // setTransformHint bakes in rotation to buffers so overlays can be used.
-    // The values are enumerated in window.h, e.g.
-    // NATIVE_WINDOW_TRANSFORM_ROT_90.  The default is 0 (no transform).
-    virtual status_t setTransformHint(uint32_t hint);
-
-    // dump our state in a String
-    virtual void dump(String8& result, const char* prefix) const;
-
+    static void createBufferQueue(sp<IGraphicBufferProducer>* outProducer,
+            sp<IGraphicBufferConsumer>* outConsumer,
+            const sp<IGraphicBufferAlloc>& allocator = NULL);
 
 private:
-    // freeBufferLocked frees the GraphicBuffer and sync resources for the
-    // given slot.
-    void freeBufferLocked(int index);
-
-    // freeAllBuffersLocked frees the GraphicBuffer and sync resources for
-    // all slots.
-    void freeAllBuffersLocked();
-
-    // setDefaultMaxBufferCountLocked sets the maximum number of buffer slots
-    // that will be used if the producer does not override the buffer slot
-    // count.  The count must be between 2 and NUM_BUFFER_SLOTS, inclusive.
-    // The initial default is 2.
-    status_t setDefaultMaxBufferCountLocked(int count);
-
-    // getMinUndequeuedBufferCount returns the minimum number of buffers
-    // that must remain in a state other than DEQUEUED.
-    // The async parameter tells whether we're in asynchronous mode.
-    int getMinUndequeuedBufferCount(bool async) const;
-
-    // getMinBufferCountLocked returns the minimum number of buffers allowed
-    // given the current BufferQueue state.
-    // The async parameter tells whether we're in asynchronous mode.
-    int getMinMaxBufferCountLocked(bool async) const;
-
-    // getMaxBufferCountLocked returns the maximum number of buffers that can
-    // be allocated at once.  This value depends upon the following member
-    // variables:
-    //
-    //      mDequeueBufferCannotBlock
-    //      mMaxAcquiredBufferCount
-    //      mDefaultMaxBufferCount
-    //      mOverrideMaxBufferCount
-    //      async parameter
-    //
-    // Any time one of these member variables is changed while a producer is
-    // connected, mDequeueCondition must be broadcast.
-    int getMaxBufferCountLocked(bool async) const;
-
-    // stillTracking returns true iff the buffer item is still being tracked
-    // in one of the slots.
-    bool stillTracking(const BufferItem *item) const;
-
-    struct BufferSlot {
-
-        BufferSlot()
-        : mEglDisplay(EGL_NO_DISPLAY),
-          mBufferState(BufferSlot::FREE),
-          mRequestBufferCalled(false),
-          mFrameNumber(0),
-          mEglFence(EGL_NO_SYNC_KHR),
-          mAcquireCalled(false),
-          mNeedsCleanupOnRelease(false) {
-        }
-
-        // mGraphicBuffer points to the buffer allocated for this slot or is NULL
-        // if no buffer has been allocated.
-        sp<GraphicBuffer> mGraphicBuffer;
-
-        // mEglDisplay is the EGLDisplay used to create EGLSyncKHR objects.
-        EGLDisplay mEglDisplay;
-
-        // BufferState represents the different states in which a buffer slot
-        // can be.  All slots are initially FREE.
-        enum BufferState {
-            // FREE indicates that the buffer is available to be dequeued
-            // by the producer.  The buffer may be in use by the consumer for
-            // a finite time, so the buffer must not be modified until the
-            // associated fence is signaled.
-            //
-            // The slot is "owned" by BufferQueue.  It transitions to DEQUEUED
-            // when dequeueBuffer is called.
-            FREE = 0,
-
-            // DEQUEUED indicates that the buffer has been dequeued by the
-            // producer, but has not yet been queued or canceled.  The
-            // producer may modify the buffer's contents as soon as the
-            // associated ready fence is signaled.
-            //
-            // The slot is "owned" by the producer.  It can transition to
-            // QUEUED (via queueBuffer) or back to FREE (via cancelBuffer).
-            DEQUEUED = 1,
-
-            // QUEUED indicates that the buffer has been filled by the
-            // producer and queued for use by the consumer.  The buffer
-            // contents may continue to be modified for a finite time, so
-            // the contents must not be accessed until the associated fence
-            // is signaled.
-            //
-            // The slot is "owned" by BufferQueue.  It can transition to
-            // ACQUIRED (via acquireBuffer) or to FREE (if another buffer is
-            // queued in asynchronous mode).
-            QUEUED = 2,
-
-            // ACQUIRED indicates that the buffer has been acquired by the
-            // consumer.  As with QUEUED, the contents must not be accessed
-            // by the consumer until the fence is signaled.
-            //
-            // The slot is "owned" by the consumer.  It transitions to FREE
-            // when releaseBuffer is called.
-            ACQUIRED = 3
-        };
-
-        // mBufferState is the current state of this buffer slot.
-        BufferState mBufferState;
-
-        // mRequestBufferCalled is used for validating that the producer did
-        // call requestBuffer() when told to do so. Technically this is not
-        // needed but useful for debugging and catching producer bugs.
-        bool mRequestBufferCalled;
-
-        // mFrameNumber is the number of the queued frame for this slot.  This
-        // is used to dequeue buffers in LRU order (useful because buffers
-        // may be released before their release fence is signaled).
-        uint64_t mFrameNumber;
-
-        // mEglFence is the EGL sync object that must signal before the buffer
-        // associated with this buffer slot may be dequeued. It is initialized
-        // to EGL_NO_SYNC_KHR when the buffer is created and may be set to a
-        // new sync object in releaseBuffer.  (This is deprecated in favor of
-        // mFence, below.)
-        EGLSyncKHR mEglFence;
-
-        // mFence is a fence which will signal when work initiated by the
-        // previous owner of the buffer is finished. When the buffer is FREE,
-        // the fence indicates when the consumer has finished reading
-        // from the buffer, or when the producer has finished writing if it
-        // called cancelBuffer after queueing some writes. When the buffer is
-        // QUEUED, it indicates when the producer has finished filling the
-        // buffer. When the buffer is DEQUEUED or ACQUIRED, the fence has been
-        // passed to the consumer or producer along with ownership of the
-        // buffer, and mFence is set to NO_FENCE.
-        sp<Fence> mFence;
-
-        // Indicates whether this buffer has been seen by a consumer yet
-        bool mAcquireCalled;
-
-        // Indicates whether this buffer needs to be cleaned up by the
-        // consumer.  This is set when a buffer in ACQUIRED state is freed.
-        // It causes releaseBuffer to return STALE_BUFFER_SLOT.
-        bool mNeedsCleanupOnRelease;
-    };
-
-    // mSlots is the array of buffer slots that must be mirrored on the
-    // producer side. This allows buffer ownership to be transferred between
-    // the producer and consumer without sending a GraphicBuffer over binder.
-    // The entire array is initialized to NULL at construction time, and
-    // buffers are allocated for a slot when requestBuffer is called with
-    // that slot's index.
-    BufferSlot mSlots[NUM_BUFFER_SLOTS];
-
-    // mDefaultWidth holds the default width of allocated buffers. It is used
-    // in dequeueBuffer() if a width and height of zero is specified.
-    uint32_t mDefaultWidth;
-
-    // mDefaultHeight holds the default height of allocated buffers. It is used
-    // in dequeueBuffer() if a width and height of zero is specified.
-    uint32_t mDefaultHeight;
-
-    // mMaxAcquiredBufferCount is the number of buffers that the consumer may
-    // acquire at one time.  It defaults to 1 and can be changed by the
-    // consumer via the setMaxAcquiredBufferCount method, but this may only be
-    // done when no producer is connected to the BufferQueue.
-    //
-    // This value is used to derive the value returned for the
-    // MIN_UNDEQUEUED_BUFFERS query by the producer.
-    int mMaxAcquiredBufferCount;
-
-    // mDefaultMaxBufferCount is the default limit on the number of buffers
-    // that will be allocated at one time.  This default limit is set by the
-    // consumer.  The limit (as opposed to the default limit) may be
-    // overridden by the producer.
-    int mDefaultMaxBufferCount;
-
-    // mOverrideMaxBufferCount is the limit on the number of buffers that will
-    // be allocated at one time. This value is set by the image producer by
-    // calling setBufferCount. The default is zero, which means the producer
-    // doesn't care about the number of buffers in the pool. In that case
-    // mDefaultMaxBufferCount is used as the limit.
-    int mOverrideMaxBufferCount;
-
-    // mGraphicBufferAlloc is the connection to SurfaceFlinger that is used to
-    // allocate new GraphicBuffer objects.
-    sp<IGraphicBufferAlloc> mGraphicBufferAlloc;
-
-    // mConsumerListener is used to notify the connected consumer of
-    // asynchronous events that it may wish to react to.  It is initially set
-    // to NULL and is written by consumerConnect and consumerDisconnect.
-    sp<IConsumerListener> mConsumerListener;
-
-    // mConsumerControlledByApp whether the connected consumer is controlled by the
-    // application.
-    bool mConsumerControlledByApp;
-
-    // mDequeueBufferCannotBlock whether dequeueBuffer() isn't allowed to block.
-    // this flag is set during connect() when both consumer and producer are controlled
-    // by the application.
-    bool mDequeueBufferCannotBlock;
-
-    // mUseAsyncBuffer whether an extra buffer is used in async mode to prevent
-    // dequeueBuffer() from ever blocking.
-    bool mUseAsyncBuffer;
-
-    // mConnectedApi indicates the producer API that is currently connected
-    // to this BufferQueue.  It defaults to NO_CONNECTED_API (= 0), and gets
-    // updated by the connect and disconnect methods.
-    int mConnectedApi;
-
-    // mDequeueCondition condition used for dequeueBuffer in synchronous mode
-    mutable Condition mDequeueCondition;
-
-    // mQueue is a FIFO of queued buffers used in synchronous mode
-    typedef Vector<BufferItem> Fifo;
-    Fifo mQueue;
-
-    // mAbandoned indicates that the BufferQueue will no longer be used to
-    // consume image buffers pushed to it using the IGraphicBufferProducer
-    // interface.  It is initialized to false, and set to true in the
-    // consumerDisconnect method.  A BufferQueue that has been abandoned will
-    // return the NO_INIT error from all IGraphicBufferProducer methods
-    // capable of returning an error.
-    bool mAbandoned;
-
-    // mConsumerName is a string used to identify the BufferQueue in log
-    // messages.  It is set by the setConsumerName method.
-    String8 mConsumerName;
-
-    // mMutex is the mutex used to prevent concurrent access to the member
-    // variables of BufferQueue objects. It must be locked whenever the
-    // member variables are accessed.
-    mutable Mutex mMutex;
-
-    // mFrameCounter is the free running counter, incremented on every
-    // successful queueBuffer call, and buffer allocation.
-    uint64_t mFrameCounter;
-
-    // mBufferHasBeenQueued is true once a buffer has been queued.  It is
-    // reset when something causes all buffers to be freed (e.g. changing the
-    // buffer count).
-    bool mBufferHasBeenQueued;
-
-    // mDefaultBufferFormat can be set so it will override
-    // the buffer format when it isn't specified in dequeueBuffer
-    uint32_t mDefaultBufferFormat;
-
-    // mConsumerUsageBits contains flags the consumer wants for GraphicBuffers
-    uint32_t mConsumerUsageBits;
-
-    // mTransformHint is used to optimize for screen rotations
-    uint32_t mTransformHint;
-
-    // mConnectedProducerToken is used to set a binder death notification on the producer
-    sp<IBinder> mConnectedProducerToken;
+    BufferQueue(); // Create through createBufferQueue
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/gui/BufferQueueConsumer.h b/include/gui/BufferQueueConsumer.h
new file mode 100644
index 0000000..1912ed0
--- /dev/null
+++ b/include/gui/BufferQueueConsumer.h
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_BUFFERQUEUECONSUMER_H
+#define ANDROID_GUI_BUFFERQUEUECONSUMER_H
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include <gui/BufferQueueDefs.h>
+#include <gui/IGraphicBufferConsumer.h>
+
+namespace android {
+
+class BufferQueueCore;
+
+class BufferQueueConsumer : public BnGraphicBufferConsumer {
+
+public:
+    BufferQueueConsumer(const sp<BufferQueueCore>& core);
+    virtual ~BufferQueueConsumer();
+
+    // acquireBuffer attempts to acquire ownership of the next pending buffer in
+    // the BufferQueue. If no buffer is pending then it returns
+    // NO_BUFFER_AVAILABLE. If a buffer is successfully acquired, the
+    // information about the buffer is returned in BufferItem.  If the buffer
+    // returned had previously been acquired then the BufferItem::mGraphicBuffer
+    // field of buffer is set to NULL and it is assumed that the consumer still
+    // holds a reference to the buffer.
+    //
+    // If expectedPresent is nonzero, it indicates the time when the buffer
+    // will be displayed on screen. If the buffer's timestamp is farther in the
+    // future, the buffer won't be acquired, and PRESENT_LATER will be
+    // returned.  The presentation time is in nanoseconds, and the time base
+    // is CLOCK_MONOTONIC.
+    virtual status_t acquireBuffer(BufferItem* outBuffer,
+            nsecs_t expectedPresent);
+
+    // See IGraphicBufferConsumer::detachBuffer
+    virtual status_t detachBuffer(int slot);
+
+    // See IGraphicBufferConsumer::attachBuffer
+    virtual status_t attachBuffer(int* slot, const sp<GraphicBuffer>& buffer);
+
+    // releaseBuffer releases a buffer slot from the consumer back to the
+    // BufferQueue.  This may be done while the buffer's contents are still
+    // being accessed.  The fence will signal when the buffer is no longer
+    // in use. frameNumber is used to indentify the exact buffer returned.
+    //
+    // If releaseBuffer returns STALE_BUFFER_SLOT, then the consumer must free
+    // any references to the just-released buffer that it might have, as if it
+    // had received a onBuffersReleased() call with a mask set for the released
+    // buffer.
+    //
+    // Note that the dependencies on EGL will be removed once we switch to using
+    // the Android HW Sync HAL.
+    virtual status_t releaseBuffer(int slot, uint64_t frameNumber,
+            const sp<Fence>& releaseFence, EGLDisplay display,
+            EGLSyncKHR fence);
+
+    // connect connects a consumer to the BufferQueue.  Only one
+    // consumer may be connected, and when that consumer disconnects the
+    // BufferQueue is placed into the "abandoned" state, causing most
+    // interactions with the BufferQueue by the producer to fail.
+    // controlledByApp indicates whether the consumer is controlled by
+    // the application.
+    //
+    // consumerListener may not be NULL.
+    virtual status_t connect(const sp<IConsumerListener>& consumerListener,
+            bool controlledByApp);
+
+    // disconnect disconnects a consumer from the BufferQueue. All
+    // buffers will be freed and the BufferQueue is placed in the "abandoned"
+    // state, causing most interactions with the BufferQueue by the producer to
+    // fail.
+    virtual status_t disconnect();
+
+    // getReleasedBuffers sets the value pointed to by outSlotMask to a bit mask
+    // indicating which buffer slots have been released by the BufferQueue
+    // but have not yet been released by the consumer.
+    //
+    // This should be called from the onBuffersReleased() callback.
+    virtual status_t getReleasedBuffers(uint64_t* outSlotMask);
+
+    // setDefaultBufferSize is used to set the size of buffers returned by
+    // dequeueBuffer when a width and height of zero is requested.  Default
+    // is 1x1.
+    virtual status_t setDefaultBufferSize(uint32_t width, uint32_t height);
+
+    // setDefaultMaxBufferCount sets the default value for the maximum buffer
+    // count (the initial default is 2). If the producer has requested a
+    // buffer count using setBufferCount, the default buffer count will only
+    // take effect if the producer sets the count back to zero.
+    //
+    // The count must be between 2 and NUM_BUFFER_SLOTS, inclusive.
+    virtual status_t setDefaultMaxBufferCount(int bufferCount);
+
+    // disableAsyncBuffer disables the extra buffer used in async mode
+    // (when both producer and consumer have set their "isControlledByApp"
+    // flag) and has dequeueBuffer() return WOULD_BLOCK instead.
+    //
+    // This can only be called before connect().
+    virtual status_t disableAsyncBuffer();
+
+    // setMaxAcquiredBufferCount sets the maximum number of buffers that can
+    // be acquired by the consumer at one time (default 1).  This call will
+    // fail if a producer is connected to the BufferQueue.
+    virtual status_t setMaxAcquiredBufferCount(int maxAcquiredBuffers);
+
+    // setConsumerName sets the name used in logging
+    virtual void setConsumerName(const String8& name);
+
+    // setDefaultBufferFormat allows the BufferQueue to create
+    // GraphicBuffers of a defaultFormat if no format is specified
+    // in dequeueBuffer.  Formats are enumerated in graphics.h; the
+    // initial default is HAL_PIXEL_FORMAT_RGBA_8888.
+    virtual status_t setDefaultBufferFormat(uint32_t defaultFormat);
+
+    // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer.
+    // These are merged with the bits passed to dequeueBuffer.  The values are
+    // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0.
+    virtual status_t setConsumerUsageBits(uint32_t usage);
+
+    // setTransformHint bakes in rotation to buffers so overlays can be used.
+    // The values are enumerated in window.h, e.g.
+    // NATIVE_WINDOW_TRANSFORM_ROT_90.  The default is 0 (no transform).
+    virtual status_t setTransformHint(uint32_t hint);
+
+    // Retrieve the sideband buffer stream, if any.
+    virtual sp<NativeHandle> getSidebandStream() const;
+
+    // dump our state in a String
+    virtual void dump(String8& result, const char* prefix) const;
+
+    // Functions required for backwards compatibility.
+    // These will be modified/renamed in IGraphicBufferConsumer and will be
+    // removed from this class at that time. See b/13306289.
+
+    virtual status_t releaseBuffer(int buf, uint64_t frameNumber,
+            EGLDisplay display, EGLSyncKHR fence,
+            const sp<Fence>& releaseFence) {
+        return releaseBuffer(buf, frameNumber, releaseFence, display, fence);
+    }
+
+    virtual status_t consumerConnect(const sp<IConsumerListener>& consumer,
+            bool controlledByApp) {
+        return connect(consumer, controlledByApp);
+    }
+
+    virtual status_t consumerDisconnect() { return disconnect(); }
+
+    // End functions required for backwards compatibility
+
+private:
+    sp<BufferQueueCore> mCore;
+
+    // This references mCore->mSlots. Lock mCore->mMutex while accessing.
+    BufferQueueDefs::SlotsType& mSlots;
+
+    // This is a cached copy of the name stored in the BufferQueueCore.
+    // It's updated during setConsumerName.
+    String8 mConsumerName;
+
+}; // class BufferQueueConsumer
+
+} // namespace android
+
+#endif
diff --git a/include/gui/BufferQueueCore.h b/include/gui/BufferQueueCore.h
new file mode 100644
index 0000000..cfcb7a5
--- /dev/null
+++ b/include/gui/BufferQueueCore.h
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_BUFFERQUEUECORE_H
+#define ANDROID_GUI_BUFFERQUEUECORE_H
+
+#include <gui/BufferQueueDefs.h>
+#include <gui/BufferSlot.h>
+
+#include <utils/Condition.h>
+#include <utils/Mutex.h>
+#include <utils/NativeHandle.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+#include <utils/StrongPointer.h>
+#include <utils/Trace.h>
+#include <utils/Vector.h>
+
+#define BQ_LOGV(x, ...) ALOGV("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define BQ_LOGD(x, ...) ALOGD("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define BQ_LOGI(x, ...) ALOGI("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define BQ_LOGW(x, ...) ALOGW("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+#define BQ_LOGE(x, ...) ALOGE("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
+
+#define ATRACE_BUFFER_INDEX(index)                                   \
+    if (ATRACE_ENABLED()) {                                          \
+        char ___traceBuf[1024];                                      \
+        snprintf(___traceBuf, 1024, "%s: %d",                        \
+                mCore->mConsumerName.string(), (index));             \
+        android::ScopedTrace ___bufTracer(ATRACE_TAG, ___traceBuf);  \
+    }
+
+namespace android {
+
+class BufferItem;
+class IConsumerListener;
+class IGraphicBufferAlloc;
+class IProducerListener;
+
+class BufferQueueCore : public virtual RefBase {
+
+    friend class BufferQueueProducer;
+    friend class BufferQueueConsumer;
+
+public:
+    // Used as a placeholder slot number when the value isn't pointing to an
+    // existing buffer.
+    enum { INVALID_BUFFER_SLOT = -1 }; // TODO: Extract from IGBC::BufferItem
+
+    // We reserve two slots in order to guarantee that the producer and
+    // consumer can run asynchronously.
+    enum { MAX_MAX_ACQUIRED_BUFFERS = BufferQueueDefs::NUM_BUFFER_SLOTS - 2 };
+
+    // The default API number used to indicate that no producer is connected
+    enum { NO_CONNECTED_API = 0 };
+
+    typedef Vector<BufferItem> Fifo;
+
+    // BufferQueueCore manages a pool of gralloc memory slots to be used by
+    // producers and consumers. allocator is used to allocate all the needed
+    // gralloc buffers.
+    BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator = NULL);
+    virtual ~BufferQueueCore();
+
+private:
+    // Dump our state in a string
+    void dump(String8& result, const char* prefix) const;
+
+    // getMinUndequeuedBufferCountLocked returns the minimum number of buffers
+    // that must remain in a state other than DEQUEUED. The async parameter
+    // tells whether we're in asynchronous mode.
+    int getMinUndequeuedBufferCountLocked(bool async) const;
+
+    // getMinMaxBufferCountLocked returns the minimum number of buffers allowed
+    // given the current BufferQueue state. The async parameter tells whether
+    // we're in asynchonous mode.
+    int getMinMaxBufferCountLocked(bool async) const;
+
+    // getMaxBufferCountLocked returns the maximum number of buffers that can be
+    // allocated at once. This value depends on the following member variables:
+    //
+    //     mDequeueBufferCannotBlock
+    //     mMaxAcquiredBufferCount
+    //     mDefaultMaxBufferCount
+    //     mOverrideMaxBufferCount
+    //     async parameter
+    //
+    // Any time one of these member variables is changed while a producer is
+    // connected, mDequeueCondition must be broadcast.
+    int getMaxBufferCountLocked(bool async) const;
+
+    // setDefaultMaxBufferCountLocked sets the maximum number of buffer slots
+    // that will be used if the producer does not override the buffer slot
+    // count. The count must be between 2 and NUM_BUFFER_SLOTS, inclusive. The
+    // initial default is 2.
+    status_t setDefaultMaxBufferCountLocked(int count);
+
+    // freeBufferLocked frees the GraphicBuffer and sync resources for the
+    // given slot.
+    void freeBufferLocked(int slot);
+
+    // freeAllBuffersLocked frees the GraphicBuffer and sync resources for
+    // all slots.
+    void freeAllBuffersLocked();
+
+    // stillTracking returns true iff the buffer item is still being tracked
+    // in one of the slots.
+    bool stillTracking(const BufferItem* item) const;
+
+    // mAllocator is the connection to SurfaceFlinger that is used to allocate
+    // new GraphicBuffer objects.
+    sp<IGraphicBufferAlloc> mAllocator;
+
+    // mMutex is the mutex used to prevent concurrent access to the member
+    // variables of BufferQueueCore objects. It must be locked whenever any
+    // member variable is accessed.
+    mutable Mutex mMutex;
+
+    // mIsAbandoned indicates that the BufferQueue will no longer be used to
+    // consume image buffers pushed to it using the IGraphicBufferProducer
+    // interface. It is initialized to false, and set to true in the
+    // consumerDisconnect method. A BufferQueue that is abandoned will return
+    // the NO_INIT error from all IGraphicBufferProducer methods capable of
+    // returning an error.
+    bool mIsAbandoned;
+
+    // mConsumerControlledByApp indicates whether the connected consumer is
+    // controlled by the application.
+    bool mConsumerControlledByApp;
+
+    // mConsumerName is a string used to identify the BufferQueue in log
+    // messages. It is set by the IGraphicBufferConsumer::setConsumerName
+    // method.
+    String8 mConsumerName;
+
+    // mConsumerListener is used to notify the connected consumer of
+    // asynchronous events that it may wish to react to. It is initially
+    // set to NULL and is written by consumerConnect and consumerDisconnect.
+    sp<IConsumerListener> mConsumerListener;
+
+    // mConsumerUsageBits contains flags that the consumer wants for
+    // GraphicBuffers.
+    uint32_t mConsumerUsageBits;
+
+    // mConnectedApi indicates the producer API that is currently connected
+    // to this BufferQueue. It defaults to NO_CONNECTED_API, and gets updated
+    // by the connect and disconnect methods.
+    int mConnectedApi;
+
+    // mConnectedProducerToken is used to set a binder death notification on
+    // the producer.
+    sp<IProducerListener> mConnectedProducerListener;
+
+    // mSlots is an array of buffer slots that must be mirrored on the producer
+    // side. This allows buffer ownership to be transferred between the producer
+    // and consumer without sending a GraphicBuffer over Binder. The entire
+    // array is initialized to NULL at construction time, and buffers are
+    // allocated for a slot when requestBuffer is called with that slot's index.
+    BufferQueueDefs::SlotsType mSlots;
+
+    // mQueue is a FIFO of queued buffers used in synchronous mode.
+    Fifo mQueue;
+
+    // mOverrideMaxBufferCount is the limit on the number of buffers that will
+    // be allocated at one time. This value is set by the producer by calling
+    // setBufferCount. The default is 0, which means that the producer doesn't
+    // care about the number of buffers in the pool. In that case,
+    // mDefaultMaxBufferCount is used as the limit.
+    int mOverrideMaxBufferCount;
+
+    // mDequeueCondition is a condition variable used for dequeueBuffer in
+    // synchronous mode.
+    mutable Condition mDequeueCondition;
+
+    // mUseAsyncBuffer indicates whether an extra buffer is used in async mode
+    // to prevent dequeueBuffer from blocking.
+    bool mUseAsyncBuffer;
+
+    // mDequeueBufferCannotBlock indicates whether dequeueBuffer is allowed to
+    // block. This flag is set during connect when both the producer and
+    // consumer are controlled by the application.
+    bool mDequeueBufferCannotBlock;
+
+    // mDefaultBufferFormat can be set so it will override the buffer format
+    // when it isn't specified in dequeueBuffer.
+    uint32_t mDefaultBufferFormat;
+
+    // mDefaultWidth holds the default width of allocated buffers. It is used
+    // in dequeueBuffer if a width and height of 0 are specified.
+    int mDefaultWidth;
+
+    // mDefaultHeight holds the default height of allocated buffers. It is used
+    // in dequeueBuffer if a width and height of 0 are specified.
+    int mDefaultHeight;
+
+    // mDefaultMaxBufferCount is the default limit on the number of buffers that
+    // will be allocated at one time. This default limit is set by the consumer.
+    // The limit (as opposed to the default limit) may be overriden by the
+    // producer.
+    int mDefaultMaxBufferCount;
+
+    // mMaxAcquiredBufferCount is the number of buffers that the consumer may
+    // acquire at one time. It defaults to 1, and can be changed by the consumer
+    // via setMaxAcquiredBufferCount, but this may only be done while no
+    // producer is connected to the BufferQueue. This value is used to derive
+    // the value returned for the MIN_UNDEQUEUED_BUFFERS query to the producer.
+    int mMaxAcquiredBufferCount;
+
+    // mBufferHasBeenQueued is true once a buffer has been queued. It is reset
+    // when something causes all buffers to be freed (e.g., changing the buffer
+    // count).
+    bool mBufferHasBeenQueued;
+
+    // mFrameCounter is the free running counter, incremented on every
+    // successful queueBuffer call and buffer allocation.
+    uint64_t mFrameCounter;
+
+    // mTransformHint is used to optimize for screen rotations.
+    uint32_t mTransformHint;
+
+    // mSidebandStream is a handle to the sideband buffer stream, if any
+    sp<NativeHandle> mSidebandStream;
+
+}; // class BufferQueueCore
+
+} // namespace android
+
+#endif
diff --git a/include/gui/BufferQueueDefs.h b/include/gui/BufferQueueDefs.h
new file mode 100644
index 0000000..83e9580
--- /dev/null
+++ b/include/gui/BufferQueueDefs.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_BUFFERQUEUECOREDEFS_H
+#define ANDROID_GUI_BUFFERQUEUECOREDEFS_H
+
+#include <gui/BufferSlot.h>
+
+namespace android {
+    class BufferQueueCore;
+
+    namespace BufferQueueDefs {
+        // BufferQueue will keep track of at most this value of buffers.
+        // Attempts at runtime to increase the number of buffers past this
+        // will fail.
+        enum { NUM_BUFFER_SLOTS = 64 };
+
+        typedef BufferSlot SlotsType[NUM_BUFFER_SLOTS];
+    } // namespace BufferQueueDefs
+} // namespace android
+
+#endif
diff --git a/include/gui/BufferQueueProducer.h b/include/gui/BufferQueueProducer.h
new file mode 100644
index 0000000..9df3633
--- /dev/null
+++ b/include/gui/BufferQueueProducer.h
@@ -0,0 +1,198 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_BUFFERQUEUEPRODUCER_H
+#define ANDROID_GUI_BUFFERQUEUEPRODUCER_H
+
+#include <gui/BufferQueueDefs.h>
+#include <gui/IGraphicBufferProducer.h>
+
+namespace android {
+
+class BufferSlot;
+
+class BufferQueueProducer : public BnGraphicBufferProducer,
+                            private IBinder::DeathRecipient {
+public:
+    friend class BufferQueue; // Needed to access binderDied
+
+    BufferQueueProducer(const sp<BufferQueueCore>& core);
+    virtual ~BufferQueueProducer();
+
+    // requestBuffer returns the GraphicBuffer for slot N.
+    //
+    // In normal operation, this is called the first time slot N is returned
+    // by dequeueBuffer.  It must be called again if dequeueBuffer returns
+    // flags indicating that previously-returned buffers are no longer valid.
+    virtual status_t requestBuffer(int slot, sp<GraphicBuffer>* buf);
+
+    // setBufferCount updates the number of available buffer slots.  If this
+    // method succeeds, buffer slots will be both unallocated and owned by
+    // the BufferQueue object (i.e. they are not owned by the producer or
+    // consumer).
+    //
+    // This will fail if the producer has dequeued any buffers, or if
+    // bufferCount is invalid.  bufferCount must generally be a value
+    // between the minimum undequeued buffer count (exclusive) and NUM_BUFFER_SLOTS
+    // (inclusive).  It may also be set to zero (the default) to indicate
+    // that the producer does not wish to set a value.  The minimum value
+    // can be obtained by calling query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS,
+    // ...).
+    //
+    // This may only be called by the producer.  The consumer will be told
+    // to discard buffers through the onBuffersReleased callback.
+    virtual status_t setBufferCount(int bufferCount);
+
+    // dequeueBuffer gets the next buffer slot index for the producer to use.
+    // If a buffer slot is available then that slot index is written to the
+    // location pointed to by the buf argument and a status of OK is returned.
+    // If no slot is available then a status of -EBUSY is returned and buf is
+    // unmodified.
+    //
+    // The outFence parameter will be updated to hold the fence associated with
+    // the buffer. The contents of the buffer must not be overwritten until the
+    // fence signals. If the fence is Fence::NO_FENCE, the buffer may be
+    // written immediately.
+    //
+    // The width and height parameters must be no greater than the minimum of
+    // GL_MAX_VIEWPORT_DIMS and GL_MAX_TEXTURE_SIZE (see: glGetIntegerv).
+    // An error due to invalid dimensions might not be reported until
+    // updateTexImage() is called.  If width and height are both zero, the
+    // default values specified by setDefaultBufferSize() are used instead.
+    //
+    // The pixel formats are enumerated in graphics.h, e.g.
+    // HAL_PIXEL_FORMAT_RGBA_8888.  If the format is 0, the default format
+    // will be used.
+    //
+    // The usage argument specifies gralloc buffer usage flags.  The values
+    // are enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER.  These
+    // will be merged with the usage flags specified by setConsumerUsageBits.
+    //
+    // The return value may be a negative error value or a non-negative
+    // collection of flags.  If the flags are set, the return values are
+    // valid, but additional actions must be performed.
+    //
+    // If IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION is set, the
+    // producer must discard cached GraphicBuffer references for the slot
+    // returned in buf.
+    // If IGraphicBufferProducer::RELEASE_ALL_BUFFERS is set, the producer
+    // must discard cached GraphicBuffer references for all slots.
+    //
+    // In both cases, the producer will need to call requestBuffer to get a
+    // GraphicBuffer handle for the returned slot.
+    virtual status_t dequeueBuffer(int *outSlot, sp<Fence>* outFence, bool async,
+            uint32_t width, uint32_t height, uint32_t format, uint32_t usage);
+
+    // See IGraphicBufferProducer::detachBuffer
+    virtual status_t detachBuffer(int slot);
+
+    // See IGraphicBufferProducer::detachNextBuffer
+    virtual status_t detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+            sp<Fence>* outFence);
+
+    // See IGraphicBufferProducer::attachBuffer
+    virtual status_t attachBuffer(int* outSlot, const sp<GraphicBuffer>& buffer);
+
+    // queueBuffer returns a filled buffer to the BufferQueue.
+    //
+    // Additional data is provided in the QueueBufferInput struct.  Notably,
+    // a timestamp must be provided for the buffer. The timestamp is in
+    // nanoseconds, and must be monotonically increasing. Its other semantics
+    // (zero point, etc) are producer-specific and should be documented by the
+    // producer.
+    //
+    // The caller may provide a fence that signals when all rendering
+    // operations have completed.  Alternatively, NO_FENCE may be used,
+    // indicating that the buffer is ready immediately.
+    //
+    // Some values are returned in the output struct: the current settings
+    // for default width and height, the current transform hint, and the
+    // number of queued buffers.
+    virtual status_t queueBuffer(int slot,
+            const QueueBufferInput& input, QueueBufferOutput* output);
+
+    // cancelBuffer returns a dequeued buffer to the BufferQueue, but doesn't
+    // queue it for use by the consumer.
+    //
+    // The buffer will not be overwritten until the fence signals.  The fence
+    // will usually be the one obtained from dequeueBuffer.
+    virtual void cancelBuffer(int slot, const sp<Fence>& fence);
+
+    // Query native window attributes.  The "what" values are enumerated in
+    // window.h (e.g. NATIVE_WINDOW_FORMAT).
+    virtual int query(int what, int* outValue);
+
+    // connect attempts to connect a producer API to the BufferQueue.  This
+    // must be called before any other IGraphicBufferProducer methods are
+    // called except for getAllocator.  A consumer must already be connected.
+    //
+    // This method will fail if connect was previously called on the
+    // BufferQueue and no corresponding disconnect call was made (i.e. if
+    // it's still connected to a producer).
+    //
+    // APIs are enumerated in window.h (e.g. NATIVE_WINDOW_API_CPU).
+    virtual status_t connect(const sp<IProducerListener>& listener,
+            int api, bool producerControlledByApp, QueueBufferOutput* output);
+
+    // disconnect attempts to disconnect a producer API from the BufferQueue.
+    // Calling this method will cause any subsequent calls to other
+    // IGraphicBufferProducer methods to fail except for getAllocator and connect.
+    // Successfully calling connect after this will allow the other methods to
+    // succeed again.
+    //
+    // This method will fail if the the BufferQueue is not currently
+    // connected to the specified producer API.
+    virtual status_t disconnect(int api);
+
+    // Attaches a sideband buffer stream to the IGraphicBufferProducer.
+    //
+    // A sideband stream is a device-specific mechanism for passing buffers
+    // from the producer to the consumer without using dequeueBuffer/
+    // queueBuffer. If a sideband stream is present, the consumer can choose
+    // whether to acquire buffers from the sideband stream or from the queued
+    // buffers.
+    //
+    // Passing NULL or a different stream handle will detach the previous
+    // handle if any.
+    virtual status_t setSidebandStream(const sp<NativeHandle>& stream);
+
+private:
+    // This is required by the IBinder::DeathRecipient interface
+    virtual void binderDied(const wp<IBinder>& who);
+
+    // waitForFreeSlotThenRelock finds the oldest slot in the FREE state. It may
+    // block if there are no available slots and we are not in non-blocking
+    // mode (producer and consumer controlled by the application). If it blocks,
+    // it will release mCore->mMutex while blocked so that other operations on
+    // the BufferQueue may succeed.
+    status_t waitForFreeSlotThenRelock(const char* caller, bool async,
+            int* found, status_t* returnFlags) const;
+
+    sp<BufferQueueCore> mCore;
+
+    // This references mCore->mSlots. Lock mCore->mMutex while accessing.
+    BufferQueueDefs::SlotsType& mSlots;
+
+    // This is a cached copy of the name stored in the BufferQueueCore.
+    // It's updated during connect and dequeueBuffer (which should catch
+    // most updates).
+    String8 mConsumerName;
+
+}; // class BufferQueueProducer
+
+} // namespace android
+
+#endif
diff --git a/include/gui/BufferSlot.h b/include/gui/BufferSlot.h
new file mode 100644
index 0000000..6085e11
--- /dev/null
+++ b/include/gui/BufferSlot.h
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_BUFFERSLOT_H
+#define ANDROID_GUI_BUFFERSLOT_H
+
+#include <ui/Fence.h>
+#include <ui/GraphicBuffer.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
+#include <utils/StrongPointer.h>
+
+namespace android {
+
+class Fence;
+
+struct BufferSlot {
+
+    BufferSlot()
+    : mEglDisplay(EGL_NO_DISPLAY),
+      mBufferState(BufferSlot::FREE),
+      mRequestBufferCalled(false),
+      mFrameNumber(0),
+      mEglFence(EGL_NO_SYNC_KHR),
+      mAcquireCalled(false),
+      mNeedsCleanupOnRelease(false),
+      mAttachedByConsumer(false) {
+    }
+
+    // mGraphicBuffer points to the buffer allocated for this slot or is NULL
+    // if no buffer has been allocated.
+    sp<GraphicBuffer> mGraphicBuffer;
+
+    // mEglDisplay is the EGLDisplay used to create EGLSyncKHR objects.
+    EGLDisplay mEglDisplay;
+
+    // BufferState represents the different states in which a buffer slot
+    // can be.  All slots are initially FREE.
+    enum BufferState {
+        // FREE indicates that the buffer is available to be dequeued
+        // by the producer.  The buffer may be in use by the consumer for
+        // a finite time, so the buffer must not be modified until the
+        // associated fence is signaled.
+        //
+        // The slot is "owned" by BufferQueue.  It transitions to DEQUEUED
+        // when dequeueBuffer is called.
+        FREE = 0,
+
+        // DEQUEUED indicates that the buffer has been dequeued by the
+        // producer, but has not yet been queued or canceled.  The
+        // producer may modify the buffer's contents as soon as the
+        // associated ready fence is signaled.
+        //
+        // The slot is "owned" by the producer.  It can transition to
+        // QUEUED (via queueBuffer) or back to FREE (via cancelBuffer).
+        DEQUEUED = 1,
+
+        // QUEUED indicates that the buffer has been filled by the
+        // producer and queued for use by the consumer.  The buffer
+        // contents may continue to be modified for a finite time, so
+        // the contents must not be accessed until the associated fence
+        // is signaled.
+        //
+        // The slot is "owned" by BufferQueue.  It can transition to
+        // ACQUIRED (via acquireBuffer) or to FREE (if another buffer is
+        // queued in asynchronous mode).
+        QUEUED = 2,
+
+        // ACQUIRED indicates that the buffer has been acquired by the
+        // consumer.  As with QUEUED, the contents must not be accessed
+        // by the consumer until the fence is signaled.
+        //
+        // The slot is "owned" by the consumer.  It transitions to FREE
+        // when releaseBuffer is called.
+        ACQUIRED = 3
+    };
+
+    static const char* bufferStateName(BufferState state);
+
+    // mBufferState is the current state of this buffer slot.
+    BufferState mBufferState;
+
+    // mRequestBufferCalled is used for validating that the producer did
+    // call requestBuffer() when told to do so. Technically this is not
+    // needed but useful for debugging and catching producer bugs.
+    bool mRequestBufferCalled;
+
+    // mFrameNumber is the number of the queued frame for this slot.  This
+    // is used to dequeue buffers in LRU order (useful because buffers
+    // may be released before their release fence is signaled).
+    uint64_t mFrameNumber;
+
+    // mEglFence is the EGL sync object that must signal before the buffer
+    // associated with this buffer slot may be dequeued. It is initialized
+    // to EGL_NO_SYNC_KHR when the buffer is created and may be set to a
+    // new sync object in releaseBuffer.  (This is deprecated in favor of
+    // mFence, below.)
+    EGLSyncKHR mEglFence;
+
+    // mFence is a fence which will signal when work initiated by the
+    // previous owner of the buffer is finished. When the buffer is FREE,
+    // the fence indicates when the consumer has finished reading
+    // from the buffer, or when the producer has finished writing if it
+    // called cancelBuffer after queueing some writes. When the buffer is
+    // QUEUED, it indicates when the producer has finished filling the
+    // buffer. When the buffer is DEQUEUED or ACQUIRED, the fence has been
+    // passed to the consumer or producer along with ownership of the
+    // buffer, and mFence is set to NO_FENCE.
+    sp<Fence> mFence;
+
+    // Indicates whether this buffer has been seen by a consumer yet
+    bool mAcquireCalled;
+
+    // Indicates whether this buffer needs to be cleaned up by the
+    // consumer.  This is set when a buffer in ACQUIRED state is freed.
+    // It causes releaseBuffer to return STALE_BUFFER_SLOT.
+    bool mNeedsCleanupOnRelease;
+
+    // Indicates whether the buffer was attached on the consumer side.
+    // If so, it needs to set the BUFFER_NEEDS_REALLOCATION flag when dequeued
+    // to prevent the producer from using a stale cached buffer.
+    bool mAttachedByConsumer;
+};
+
+} // namespace android
+
+#endif
diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h
index fb21185..100bb26 100644
--- a/include/gui/ConsumerBase.h
+++ b/include/gui/ConsumerBase.h
@@ -101,11 +101,14 @@
 
     // Implementation of the IConsumerListener interface.  These
     // calls are used to notify the ConsumerBase of asynchronous events in the
-    // BufferQueue.  These methods should not need to be overridden by derived
-    // classes, but if they are overridden the ConsumerBase implementation
-    // must be called from the derived class.
+    // BufferQueue.  The onFrameAvailable and onBuffersReleased methods should
+    // not need to be overridden by derived classes, but if they are overridden
+    // the ConsumerBase implementation must be called from the derived class.
+    // The ConsumerBase version of onSidebandStreamChanged does nothing and can
+    // be overriden by derived classes if they want the notification.
     virtual void onFrameAvailable();
     virtual void onBuffersReleased();
+    virtual void onSidebandStreamChanged();
 
     // freeBufferLocked frees up the given buffer slot.  If the slot has been
     // initialized this will release the reference to the GraphicBuffer in that
diff --git a/include/gui/IConsumerListener.h b/include/gui/IConsumerListener.h
index ac2f9bb..260099e 100644
--- a/include/gui/IConsumerListener.h
+++ b/include/gui/IConsumerListener.h
@@ -57,6 +57,12 @@
     // This is called without any lock held and can be called concurrently
     // by multiple threads.
     virtual void onBuffersReleased() = 0; /* Asynchronous */
+
+    // onSidebandStreamChanged is called to notify the buffer consumer that the
+    // BufferQueue's sideband buffer stream has changed. This is called when a
+    // stream is first attached and when it is either detached or replaced by a
+    // different stream.
+    virtual void onSidebandStreamChanged() = 0; /* Asynchronous */
 };
 
 
diff --git a/include/gui/IGraphicBufferConsumer.h b/include/gui/IGraphicBufferConsumer.h
index 0e35f13..15f51fe 100644
--- a/include/gui/IGraphicBufferConsumer.h
+++ b/include/gui/IGraphicBufferConsumer.h
@@ -27,12 +27,16 @@
 #include <binder/IInterface.h>
 #include <ui/Rect.h>
 
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+
 namespace android {
 // ----------------------------------------------------------------------------
 
-class IConsumerListener;
-class GraphicBuffer;
 class Fence;
+class GraphicBuffer;
+class IConsumerListener;
+class NativeHandle;
 
 class IGraphicBufferConsumer : public IInterface {
 
@@ -48,6 +52,7 @@
         status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
 
     public:
+        // The default value of mBuf, used to indicate this doesn't correspond to a slot.
         enum { INVALID_BUFFER_SLOT = -1 };
         BufferItem();
 
@@ -63,13 +68,17 @@
         Rect mCrop;
 
         // mTransform is the current transform flags for this buffer slot.
+        // refer to NATIVE_WINDOW_TRANSFORM_* in <window.h>
         uint32_t mTransform;
 
         // mScalingMode is the current scaling mode for this buffer slot.
+        // refer to NATIVE_WINDOW_SCALING_* in <window.h>
         uint32_t mScalingMode;
 
         // mTimestamp is the current timestamp for this buffer slot. This gets
-        // to set by queueBuffer each time this slot is queued.
+        // to set by queueBuffer each time this slot is queued. This value
+        // is guaranteed to be monotonically increasing for each newly
+        // acquired buffer.
         int64_t mTimestamp;
 
         // mIsAutoTimestamp indicates whether mTimestamp was generated
@@ -79,7 +88,7 @@
         // mFrameNumber is the number of the queued frame for this slot.
         uint64_t mFrameNumber;
 
-        // mBuf is the slot index of this buffer
+        // mBuf is the slot index of this buffer (default INVALID_BUFFER_SLOT).
         int mBuf;
 
         // mIsDroppable whether this buffer was queued with the
@@ -97,21 +106,72 @@
         bool mTransformToDisplayInverse;
     };
 
+    enum {
+        // Returned by releaseBuffer, after which the consumer must
+        // free any references to the just-released buffer that it might have.
+        STALE_BUFFER_SLOT = 1,
+        // Returned by dequeueBuffer if there are no pending buffers available.
+        NO_BUFFER_AVAILABLE,
+        // Returned by dequeueBuffer if it's too early for the buffer to be acquired.
+        PRESENT_LATER,
+    };
 
     // acquireBuffer attempts to acquire ownership of the next pending buffer in
-    // the BufferQueue.  If no buffer is pending then it returns -EINVAL.  If a
-    // buffer is successfully acquired, the information about the buffer is
-    // returned in BufferItem.  If the buffer returned had previously been
+    // the BufferQueue.  If no buffer is pending then it returns
+    // NO_BUFFER_AVAILABLE.  If a buffer is successfully acquired, the
+    // information about the buffer is returned in BufferItem.
+    //
+    // If the buffer returned had previously been
     // acquired then the BufferItem::mGraphicBuffer field of buffer is set to
     // NULL and it is assumed that the consumer still holds a reference to the
     // buffer.
     //
-    // If presentWhen is nonzero, it indicates the time when the buffer will
+    // If presentWhen is non-zero, it indicates the time when the buffer will
     // be displayed on screen.  If the buffer's timestamp is farther in the
     // future, the buffer won't be acquired, and PRESENT_LATER will be
     // returned.  The presentation time is in nanoseconds, and the time base
     // is CLOCK_MONOTONIC.
-    virtual status_t acquireBuffer(BufferItem *buffer, nsecs_t presentWhen) = 0;
+    //
+    // Return of NO_ERROR means the operation completed as normal.
+    //
+    // Return of a positive value means the operation could not be completed
+    //    at this time, but the user should try again later:
+    // * NO_BUFFER_AVAILABLE - no buffer is pending (nothing queued by producer)
+    // * PRESENT_LATER - the buffer's timestamp is farther in the future
+    //
+    // Return of a negative value means an error has occurred:
+    // * INVALID_OPERATION - too many buffers have been acquired
+    virtual status_t acquireBuffer(BufferItem* buffer, nsecs_t presentWhen) = 0;
+
+    // detachBuffer attempts to remove all ownership of the buffer in the given
+    // slot from the buffer queue. If this call succeeds, the slot will be
+    // freed, and there will be no way to obtain the buffer from this interface.
+    // The freed slot will remain unallocated until either it is selected to
+    // hold a freshly allocated buffer in dequeueBuffer or a buffer is attached
+    // to the slot. The buffer must have already been acquired.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - the given slot number is invalid, either because it is
+    //               out of the range [0, NUM_BUFFER_SLOTS) or because the slot
+    //               it refers to is not currently acquired.
+    virtual status_t detachBuffer(int slot) = 0;
+
+    // attachBuffer attempts to transfer ownership of a buffer to the buffer
+    // queue. If this call succeeds, it will be as if this buffer was acquired
+    // from the returned slot number. As such, this call will fail if attaching
+    // this buffer would cause too many buffers to be simultaneously acquired.
+    //
+    // If the buffer is successfully attached, its frameNumber is initialized
+    // to 0. This must be passed into the releaseBuffer call or else the buffer
+    // will be deallocated as stale.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - outSlot or buffer were NULL
+    // * INVALID_OPERATION - cannot attach the buffer because it would cause too
+    //                       many buffers to be acquired.
+    // * NO_MEMORY - no free slots available
+    virtual status_t attachBuffer(int *outSlot,
+            const sp<GraphicBuffer>& buffer) = 0;
 
     // releaseBuffer releases a buffer slot from the consumer back to the
     // BufferQueue.  This may be done while the buffer's contents are still
@@ -125,6 +185,18 @@
     //
     // Note that the dependencies on EGL will be removed once we switch to using
     // the Android HW Sync HAL.
+    //
+    // Return of NO_ERROR means the operation completed as normal.
+    //
+    // Return of a positive value means the operation could not be completed
+    //    at this time, but the user should try again later:
+    // * STALE_BUFFER_SLOT - see above (second paragraph)
+    //
+    // Return of a negative value means an error has occurred:
+    // * BAD_VALUE - one of the following could've happened:
+    //               * the buffer slot was invalid
+    //               * the fence was NULL
+    //               * the buffer slot specified is not in the acquired state
     virtual status_t releaseBuffer(int buf, uint64_t frameNumber,
             EGLDisplay display, EGLSyncKHR fence,
             const sp<Fence>& releaseFence) = 0;
@@ -137,24 +209,38 @@
     // the application.
     //
     // consumer may not be NULL.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned
+    // * BAD_VALUE - a NULL consumer was provided
     virtual status_t consumerConnect(const sp<IConsumerListener>& consumer, bool controlledByApp) = 0;
 
     // consumerDisconnect disconnects a consumer from the BufferQueue. All
     // buffers will be freed and the BufferQueue is placed in the "abandoned"
     // state, causing most interactions with the BufferQueue by the producer to
     // fail.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - no consumer is currently connected
     virtual status_t consumerDisconnect() = 0;
 
-    // getReleasedBuffers sets the value pointed to by slotMask to a bit mask
-    // indicating which buffer slots have been released by the BufferQueue
-    // but have not yet been released by the consumer.
+    // getReleasedBuffers sets the value pointed to by slotMask to a bit set.
+    // Each bit index with a 1 corresponds to a released buffer slot with that
+    // index value.  In particular, a released buffer is one that has
+    // been released by the BufferQueue but have not yet been released by the consumer.
     //
     // This should be called from the onBuffersReleased() callback.
-    virtual status_t getReleasedBuffers(uint32_t* slotMask) = 0;
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    virtual status_t getReleasedBuffers(uint64_t* slotMask) = 0;
 
     // setDefaultBufferSize is used to set the size of buffers returned by
     // dequeueBuffer when a width and height of zero is requested.  Default
     // is 1x1.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - either w or h was zero
     virtual status_t setDefaultBufferSize(uint32_t w, uint32_t h) = 0;
 
     // setDefaultMaxBufferCount sets the default value for the maximum buffer
@@ -163,6 +249,9 @@
     // take effect if the producer sets the count back to zero.
     //
     // The count must be between 2 and NUM_BUFFER_SLOTS, inclusive.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - bufferCount was out of range (see above).
     virtual status_t setDefaultMaxBufferCount(int bufferCount) = 0;
 
     // disableAsyncBuffer disables the extra buffer used in async mode
@@ -170,11 +259,20 @@
     // flag) and has dequeueBuffer() return WOULD_BLOCK instead.
     //
     // This can only be called before consumerConnect().
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * INVALID_OPERATION - attempting to call this after consumerConnect.
     virtual status_t disableAsyncBuffer() = 0;
 
     // setMaxAcquiredBufferCount sets the maximum number of buffers that can
     // be acquired by the consumer at one time (default 1).  This call will
     // fail if a producer is connected to the BufferQueue.
+    //
+    // maxAcquiredBuffers must be (inclusive) between 1 and MAX_MAX_ACQUIRED_BUFFERS.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - maxAcquiredBuffers was out of range (see above).
+    // * INVALID_OPERATION - attempting to call this after a producer connected.
     virtual status_t setMaxAcquiredBufferCount(int maxAcquiredBuffers) = 0;
 
     // setConsumerName sets the name used in logging
@@ -184,18 +282,27 @@
     // GraphicBuffers of a defaultFormat if no format is specified
     // in dequeueBuffer.  Formats are enumerated in graphics.h; the
     // initial default is HAL_PIXEL_FORMAT_RGBA_8888.
+    //
+    // Return of a value other than NO_ERROR means an unknown error has occurred.
     virtual status_t setDefaultBufferFormat(uint32_t defaultFormat) = 0;
 
     // setConsumerUsageBits will turn on additional usage bits for dequeueBuffer.
     // These are merged with the bits passed to dequeueBuffer.  The values are
     // enumerated in gralloc.h, e.g. GRALLOC_USAGE_HW_RENDER; the default is 0.
+    //
+    // Return of a value other than NO_ERROR means an unknown error has occurred.
     virtual status_t setConsumerUsageBits(uint32_t usage) = 0;
 
     // setTransformHint bakes in rotation to buffers so overlays can be used.
     // The values are enumerated in window.h, e.g.
     // NATIVE_WINDOW_TRANSFORM_ROT_90.  The default is 0 (no transform).
+    //
+    // Return of a value other than NO_ERROR means an unknown error has occurred.
     virtual status_t setTransformHint(uint32_t hint) = 0;
 
+    // Retrieve the sideband buffer stream, if any.
+    virtual sp<NativeHandle> getSidebandStream() const = 0;
+
     // dump state into a string
     virtual void dump(String8& result, const char* prefix) const = 0;
 
diff --git a/include/gui/IGraphicBufferProducer.h b/include/gui/IGraphicBufferProducer.h
index 342ba08..d9e116b 100644
--- a/include/gui/IGraphicBufferProducer.h
+++ b/include/gui/IGraphicBufferProducer.h
@@ -32,6 +32,8 @@
 namespace android {
 // ----------------------------------------------------------------------------
 
+class IProducerListener;
+class NativeHandle;
 class Surface;
 
 /*
@@ -54,7 +56,11 @@
     DECLARE_META_INTERFACE(GraphicBufferProducer);
 
     enum {
+        // A flag returned by dequeueBuffer when the client needs to call
+        // requestBuffer immediately thereafter.
         BUFFER_NEEDS_REALLOCATION = 0x1,
+        // A flag returned by dequeueBuffer when all mirrored slots should be
+        // released by the client. This flag should always be processed first.
         RELEASE_ALL_BUFFERS       = 0x2,
     };
 
@@ -63,51 +69,210 @@
     // buffer to the given slot index, and the client is expected to mirror the
     // slot->buffer mapping so that it's not necessary to transfer a
     // GraphicBuffer for every dequeue operation.
+    //
+    // The slot must be in the range of [0, NUM_BUFFER_SLOTS).
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - one of the two conditions occurred:
+    //              * slot was out of range (see above)
+    //              * buffer specified by the slot is not dequeued
     virtual status_t requestBuffer(int slot, sp<GraphicBuffer>* buf) = 0;
 
     // setBufferCount sets the number of buffer slots available. Calling this
     // will also cause all buffer slots to be emptied. The caller should empty
     // its mirrored copy of the buffer slots when calling this method.
+    //
+    // This function should not be called when there are any dequeued buffer
+    // slots, doing so will result in a BAD_VALUE error returned.
+    //
+    // The buffer count should be at most NUM_BUFFER_SLOTS (inclusive), but at least
+    // the minimum undequeued buffer count (exclusive). The minimum value
+    // can be obtained by calling query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS).
+    // In particular the range is (minUndequeudBuffers, NUM_BUFFER_SLOTS].
+    //
+    // The buffer count may also be set to 0 (the default), to indicate that
+    // the producer does not wish to set a value.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - one of the below conditions occurred:
+    //              * bufferCount was out of range (see above)
+    //              * client has one or more buffers dequeued
     virtual status_t setBufferCount(int bufferCount) = 0;
 
     // dequeueBuffer requests a new buffer slot for the client to use. Ownership
     // of the slot is transfered to the client, meaning that the server will not
-    // use the contents of the buffer associated with that slot. The slot index
-    // returned may or may not contain a buffer. If the slot is empty the client
-    // should call requestBuffer to assign a new buffer to that slot. The client
-    // is expected to either call cancelBuffer on the dequeued slot or to fill
-    // in the contents of its associated buffer contents and call queueBuffer.
-    // If dequeueBuffer return BUFFER_NEEDS_REALLOCATION, the client is
+    // use the contents of the buffer associated with that slot.
+    //
+    // The slot index returned may or may not contain a buffer (client-side).
+    // If the slot is empty the client should call requestBuffer to assign a new
+    // buffer to that slot.
+    //
+    // Once the client is done filling this buffer, it is expected to transfer
+    // buffer ownership back to the server with either cancelBuffer on
+    // the dequeued slot or to fill in the contents of its associated buffer
+    // contents and call queueBuffer.
+    //
+    // If dequeueBuffer returns the BUFFER_NEEDS_REALLOCATION flag, the client is
     // expected to call requestBuffer immediately.
     //
+    // If dequeueBuffer returns the RELEASE_ALL_BUFFERS flag, the client is
+    // expected to release all of the mirrored slot->buffer mappings.
+    //
     // The fence parameter will be updated to hold the fence associated with
     // the buffer. The contents of the buffer must not be overwritten until the
-    // fence signals. If the fence is NULL, the buffer may be written
+    // fence signals. If the fence is Fence::NO_FENCE, the buffer may be written
     // immediately.
     //
-    // The async parameter sets whether we're in asynchrnous mode for this
-    // deququeBuffer() call.
-    virtual status_t dequeueBuffer(int *slot, sp<Fence>* fence, bool async,
+    // The async parameter sets whether we're in asynchronous mode for this
+    // dequeueBuffer() call.
+    //
+    // The width and height parameters must be no greater than the minimum of
+    // GL_MAX_VIEWPORT_DIMS and GL_MAX_TEXTURE_SIZE (see: glGetIntegerv).
+    // An error due to invalid dimensions might not be reported until
+    // updateTexImage() is called.  If width and height are both zero, the
+    // default values specified by setDefaultBufferSize() are used instead.
+    //
+    // The pixel formats are enumerated in <graphics.h>, e.g.
+    // HAL_PIXEL_FORMAT_RGBA_8888.  If the format is 0, the default format
+    // will be used.
+    //
+    // The usage argument specifies gralloc buffer usage flags.  The values
+    // are enumerated in <gralloc.h>, e.g. GRALLOC_USAGE_HW_RENDER.  These
+    // will be merged with the usage flags specified by
+    // IGraphicBufferConsumer::setConsumerUsageBits.
+    //
+    // This call will block until a buffer is available to be dequeued. If
+    // both the producer and consumer are controlled by the app, then this call
+    // can never block and will return WOULD_BLOCK if no buffer is available.
+    //
+    // A non-negative value with flags set (see above) will be returned upon
+    // success.
+    //
+    // Return of a negative means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - both in async mode and buffer count was less than the
+    //               max numbers of buffers that can be allocated at once.
+    // * INVALID_OPERATION - cannot attach the buffer because it would cause
+    //                       too many buffers to be dequeued, either because
+    //                       the producer already has a single buffer dequeued
+    //                       and did not set a buffer count, or because a
+    //                       buffer count was set and this call would cause
+    //                       it to be exceeded.
+    // * WOULD_BLOCK - no buffer is currently available, and blocking is disabled
+    //                 since both the producer/consumer are controlled by app
+    // * NO_MEMORY - out of memory, cannot allocate the graphics buffer.
+    //
+    // All other negative values are an unknown error returned downstream
+    // from the graphics allocator (typically errno).
+    virtual status_t dequeueBuffer(int* slot, sp<Fence>* fence, bool async,
             uint32_t w, uint32_t h, uint32_t format, uint32_t usage) = 0;
 
+    // detachBuffer attempts to remove all ownership of the buffer in the given
+    // slot from the buffer queue. If this call succeeds, the slot will be
+    // freed, and there will be no way to obtain the buffer from this interface.
+    // The freed slot will remain unallocated until either it is selected to
+    // hold a freshly allocated buffer in dequeueBuffer or a buffer is attached
+    // to the slot. The buffer must have already been dequeued, and the caller
+    // must already possesses the sp<GraphicBuffer> (i.e., must have called
+    // requestBuffer).
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - the given slot number is invalid, either because it is
+    //               out of the range [0, NUM_BUFFER_SLOTS), or because the slot
+    //               it refers to is not currently dequeued and requested.
+    virtual status_t detachBuffer(int slot) = 0;
+
+    // detachNextBuffer is equivalent to calling dequeueBuffer, requestBuffer,
+    // and detachBuffer in sequence, except for two things:
+    //
+    // 1) It is unnecessary to know the dimensions, format, or usage of the
+    //    next buffer.
+    // 2) It will not block, since if it cannot find an appropriate buffer to
+    //    return, it will return an error instead.
+    //
+    // Only slots that are free but still contain a GraphicBuffer will be
+    // considered, and the oldest of those will be returned. outBuffer is
+    // equivalent to outBuffer from the requestBuffer call, and outFence is
+    // equivalent to fence from the dequeueBuffer call.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - either outBuffer or outFence were NULL.
+    // * NO_MEMORY - no slots were found that were both free and contained a
+    //               GraphicBuffer.
+    virtual status_t detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+            sp<Fence>* outFence) = 0;
+
+    // attachBuffer attempts to transfer ownership of a buffer to the buffer
+    // queue. If this call succeeds, it will be as if this buffer was dequeued
+    // from the returned slot number. As such, this call will fail if attaching
+    // this buffer would cause too many buffers to be simultaneously dequeued.
+    //
+    // If attachBuffer returns the RELEASE_ALL_BUFFERS flag, the caller is
+    // expected to release all of the mirrored slot->buffer mappings.
+    //
+    // A non-negative value with flags set (see above) will be returned upon
+    // success.
+    //
+    // Return of a negative value means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - outSlot or buffer were NULL or invalid combination of
+    //               async mode and buffer count override.
+    // * INVALID_OPERATION - cannot attach the buffer because it would cause
+    //                       too many buffers to be dequeued, either because
+    //                       the producer already has a single buffer dequeued
+    //                       and did not set a buffer count, or because a
+    //                       buffer count was set and this call would cause
+    //                       it to be exceeded.
+    // * WOULD_BLOCK - no buffer slot is currently available, and blocking is
+    //                 disabled since both the producer/consumer are
+    //                 controlled by the app.
+    virtual status_t attachBuffer(int* outSlot,
+            const sp<GraphicBuffer>& buffer) = 0;
+
     // queueBuffer indicates that the client has finished filling in the
     // contents of the buffer associated with slot and transfers ownership of
-    // that slot back to the server. It is not valid to call queueBuffer on a
-    // slot that is not owned by the client or one for which a buffer associated
-    // via requestBuffer. In addition, a timestamp must be provided by the
-    // client for this buffer. The timestamp is measured in nanoseconds, and
-    // must be monotonically increasing. Its other properties (zero point, etc)
+    // that slot back to the server.
+    //
+    // It is not valid to call queueBuffer on a slot that is not owned
+    // by the client or one for which a buffer associated via requestBuffer
+    // (an attempt to do so will fail with a return value of BAD_VALUE).
+    //
+    // In addition, the input must be described by the client (as documented
+    // below). Any other properties (zero point, etc)
     // are client-dependent, and should be documented by the client.
     //
-    // The async parameter sets whether we're queuing a buffer in asynchronous mode.
+    // The slot must be in the range of [0, NUM_BUFFER_SLOTS).
     //
-    // outWidth, outHeight and outTransform are filled with the default width
-    // and height of the window and current transform applied to buffers,
-    // respectively.
+    // Upon success, the output will be filled with meaningful values
+    // (refer to the documentation below).
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - one of the below conditions occurred:
+    //              * fence was NULL
+    //              * scaling mode was unknown
+    //              * both in async mode and buffer count was less than the
+    //                max numbers of buffers that can be allocated at once
+    //              * slot index was out of range (see above).
+    //              * the slot was not in the dequeued state
+    //              * the slot was enqueued without requesting a buffer
+    //              * crop rect is out of bounds of the buffer dimensions
 
     struct QueueBufferInput : public Flattenable<QueueBufferInput> {
         friend class Flattenable<QueueBufferInput>;
         inline QueueBufferInput(const Parcel& parcel);
+        // timestamp - a monotonically increasing value in nanoseconds
+        // isAutoTimestamp - if the timestamp was synthesized at queue time
+        // crop - a crop rectangle that's used as a hint to the consumer
+        // scalingMode - a set of flags from NATIVE_WINDOW_SCALING_* in <window.h>
+        // transform - a set of flags from NATIVE_WINDOW_TRANSFORM_* in <window.h>
+        // async - if the buffer is queued in asynchronous mode
+        // fence - a fence that the consumer must wait on before reading the buffer,
+        //         set this to Fence::NO_FENCE if the buffer is ready immediately
         inline QueueBufferInput(int64_t timestamp, bool isAutoTimestamp,
                 const Rect& crop, int scalingMode, uint32_t transform, bool async,
                 const sp<Fence>& fence)
@@ -143,8 +308,13 @@
     };
 
     // QueueBufferOutput must be a POD structure
-    struct QueueBufferOutput {
+    struct __attribute__ ((__packed__)) QueueBufferOutput {
         inline QueueBufferOutput() { }
+        // outWidth - filled with default width applied to the buffer
+        // outHeight - filled with default height applied to the buffer
+        // outTransformHint - filled with default transform applied to the buffer
+        // outNumPendingBuffers - num buffers queued that haven't yet been acquired
+        //                        (counting the currently queued buffer)
         inline void deflate(uint32_t* outWidth,
                 uint32_t* outHeight,
                 uint32_t* outTransformHint,
@@ -174,25 +344,57 @@
     // cancelBuffer indicates that the client does not wish to fill in the
     // buffer associated with slot and transfers ownership of the slot back to
     // the server.
+    //
+    // The buffer is not queued for use by the consumer.
+    //
+    // The buffer will not be overwritten until the fence signals.  The fence
+    // will usually be the one obtained from dequeueBuffer.
     virtual void cancelBuffer(int slot, const sp<Fence>& fence) = 0;
 
     // query retrieves some information for this surface
-    // 'what' tokens allowed are that of android_natives.h
+    // 'what' tokens allowed are that of NATIVE_WINDOW_* in <window.h>
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - the buffer queue has been abandoned.
+    // * BAD_VALUE - what was out of range
     virtual int query(int what, int* value) = 0;
 
     // connect attempts to connect a client API to the IGraphicBufferProducer.
     // This must be called before any other IGraphicBufferProducer methods are
-    // called except for getAllocator.
+    // called except for getAllocator. A consumer must be already connected.
     //
     // This method will fail if the connect was previously called on the
     // IGraphicBufferProducer and no corresponding disconnect call was made.
     //
-    // outWidth, outHeight and outTransform are filled with the default width
-    // and height of the window and current transform applied to buffers,
-    // respectively. The token needs to be any binder object that lives in the
-    // producer process -- it is solely used for obtaining a death notification
-    // when the producer is killed.
-    virtual status_t connect(const sp<IBinder>& token,
+    // The listener is an optional binder callback object that can be used if
+    // the producer wants to be notified when the consumer releases a buffer
+    // back to the BufferQueue. It is also used to detect the death of the
+    // producer. If only the latter functionality is desired, there is a
+    // DummyProducerListener class in IProducerListener.h that can be used.
+    //
+    // The api should be one of the NATIVE_WINDOW_API_* values in <window.h>
+    //
+    // The producerControlledByApp should be set to true if the producer is hosted
+    // by an untrusted process (typically app_process-forked processes). If both
+    // the producer and the consumer are app-controlled then all buffer queues
+    // will operate in async mode regardless of the async flag.
+    //
+    // Upon success, the output will be filled with meaningful data
+    // (refer to QueueBufferOutput documentation above).
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * NO_INIT - one of the following occurred:
+    //             * the buffer queue was abandoned
+    //             * no consumer has yet connected
+    // * BAD_VALUE - one of the following has occurred:
+    //             * the producer is already connected
+    //             * api was out of range (see above).
+    //             * output was NULL.
+    // * DEAD_OBJECT - the token is hosted by an already-dead process
+    //
+    // Additional negative errors may be returned by the internals, they
+    // should be treated as opaque fatal unrecoverable errors.
+    virtual status_t connect(const sp<IProducerListener>& listener,
             int api, bool producerControlledByApp, QueueBufferOutput* output) = 0;
 
     // disconnect attempts to disconnect a client API from the
@@ -203,7 +405,30 @@
     //
     // This method will fail if the the IGraphicBufferProducer is not currently
     // connected to the specified client API.
+    //
+    // The api should be one of the NATIVE_WINDOW_API_* values in <window.h>
+    //
+    // Disconnecting from an abandoned IGraphicBufferProducer is legal and
+    // is considered a no-op.
+    //
+    // Return of a value other than NO_ERROR means an error has occurred:
+    // * BAD_VALUE - one of the following has occurred:
+    //             * the api specified does not match the one that was connected
+    //             * api was out of range (see above).
+    // * DEAD_OBJECT - the token is hosted by an already-dead process
     virtual status_t disconnect(int api) = 0;
+
+    // Attaches a sideband buffer stream to the IGraphicBufferProducer.
+    //
+    // A sideband stream is a device-specific mechanism for passing buffers
+    // from the producer to the consumer without using dequeueBuffer/
+    // queueBuffer. If a sideband stream is present, the consumer can choose
+    // whether to acquire buffers from the sideband stream or from the queued
+    // buffers.
+    //
+    // Passing NULL or a different stream handle will detach the previous
+    // handle if any.
+    virtual status_t setSidebandStream(const sp<NativeHandle>& stream) = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/gui/IProducerListener.h b/include/gui/IProducerListener.h
new file mode 100644
index 0000000..3848a6c
--- /dev/null
+++ b/include/gui/IProducerListener.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_IPRODUCERLISTENER_H
+#define ANDROID_GUI_IPRODUCERLISTENER_H
+
+#include <binder/IInterface.h>
+
+#include <utils/RefBase.h>
+
+namespace android {
+
+// ProducerListener is the interface through which the BufferQueue notifies the
+// producer of events that the producer may wish to react to. Because the
+// producer will generally have a mutex that is locked during calls from the
+// producer to the BufferQueue, these calls from the BufferQueue to the
+// producer *MUST* be called only when the BufferQueue mutex is NOT locked.
+
+class ProducerListener : public virtual RefBase
+{
+public:
+    ProducerListener() {}
+    virtual ~ProducerListener() {}
+
+    // onBufferReleased is called from IGraphicBufferConsumer::releaseBuffer to
+    // notify the producer that a new buffer is free and ready to be dequeued.
+    //
+    // This is called without any lock held and can be called concurrently by
+    // multiple threads.
+    virtual void onBufferReleased() = 0; // Asynchronous
+};
+
+class IProducerListener : public ProducerListener, public IInterface
+{
+public:
+    DECLARE_META_INTERFACE(ProducerListener)
+};
+
+class BnProducerListener : public BnInterface<IProducerListener>
+{
+public:
+    virtual status_t onTransact(uint32_t code, const Parcel& data,
+            Parcel* reply, uint32_t flags = 0);
+};
+
+class DummyProducerListener : public BnProducerListener
+{
+public:
+    virtual void onBufferReleased() {}
+};
+
+} // namespace android
+
+#endif
diff --git a/include/gui/ISensorEventConnection.h b/include/gui/ISensorEventConnection.h
index f64c6b8..b296797 100644
--- a/include/gui/ISensorEventConnection.h
+++ b/include/gui/ISensorEventConnection.h
@@ -40,6 +40,7 @@
                                    nsecs_t maxBatchReportLatencyNs, int reservedFlags) = 0;
     virtual status_t setEventRate(int handle, nsecs_t ns) = 0;
     virtual status_t flush() = 0;
+    virtual void decreaseWakeLockRefCount() = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index 5c3c99c..1581084 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -22,9 +22,12 @@
 
 #include <utils/RefBase.h>
 #include <utils/Errors.h>
+#include <utils/Timers.h>
+#include <utils/Vector.h>
 
 #include <binder/IInterface.h>
 
+#include <ui/FrameStats.h>
 #include <ui/PixelFormat.h>
 
 #include <gui/IGraphicBufferAlloc.h>
@@ -38,6 +41,7 @@
 class DisplayInfo;
 class IDisplayEventConnection;
 class IMemoryHeap;
+class Rect;
 
 /*
  * This class defines the Binder IPC interface for accessing various
@@ -110,17 +114,39 @@
      */
     virtual void unblank(const sp<IBinder>& display) = 0;
 
-    /* returns information about a display
+    /* returns information for each configuration of the given display
      * intended to be used to get information about built-in displays */
-    virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) = 0;
+    virtual status_t getDisplayConfigs(const sp<IBinder>& display,
+            Vector<DisplayInfo>* configs) = 0;
+
+    /* indicates which of the configurations returned by getDisplayInfo is
+     * currently active */
+    virtual int getActiveConfig(const sp<IBinder>& display) = 0;
+
+    /* specifies which configuration (of those returned by getDisplayInfo)
+     * should be used */
+    virtual status_t setActiveConfig(const sp<IBinder>& display, int id) = 0;
 
     /* Capture the specified screen. requires READ_FRAME_BUFFER permission
      * This function will fail if there is a secure window on screen.
      */
     virtual status_t captureScreen(const sp<IBinder>& display,
             const sp<IGraphicBufferProducer>& producer,
-            uint32_t reqWidth, uint32_t reqHeight,
-            uint32_t minLayerZ, uint32_t maxLayerZ) = 0;
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            uint32_t minLayerZ, uint32_t maxLayerZ,
+            bool useIdentityTransform) = 0;
+
+    /* Clears the frame statistics for animations.
+     *
+     * Requires the ACCESS_SURFACE_FLINGER permission.
+     */
+    virtual status_t clearAnimationFrameStats() = 0;
+
+    /* Gets the frame statistics for animations.
+     *
+     * Requires the ACCESS_SURFACE_FLINGER permission.
+     */
+    virtual status_t getAnimationFrameStats(FrameStats* outStats) const = 0;
 };
 
 // ----------------------------------------------------------------------------
@@ -141,9 +167,13 @@
         AUTHENTICATE_SURFACE,
         BLANK,
         UNBLANK,
-        GET_DISPLAY_INFO,
+        GET_DISPLAY_CONFIGS,
+        GET_ACTIVE_CONFIG,
+        SET_ACTIVE_CONFIG,
         CONNECT_DISPLAY,
         CAPTURE_SCREEN,
+        CLEAR_ANIMATION_FRAME_STATS,
+        GET_ANIMATION_FRAME_STATS
     };
 
     virtual status_t onTransact(uint32_t code, const Parcel& data,
diff --git a/include/gui/ISurfaceComposerClient.h b/include/gui/ISurfaceComposerClient.h
index cb9816f..58c1f6a 100644
--- a/include/gui/ISurfaceComposerClient.h
+++ b/include/gui/ISurfaceComposerClient.h
@@ -25,6 +25,7 @@
 
 #include <binder/IInterface.h>
 
+#include <ui/FrameStats.h>
 #include <ui/PixelFormat.h>
 
 namespace android {
@@ -65,6 +66,16 @@
      * Requires ACCESS_SURFACE_FLINGER permission
      */
     virtual status_t destroySurface(const sp<IBinder>& handle) = 0;
+
+    /*
+     * Requires ACCESS_SURFACE_FLINGER permission
+     */
+    virtual status_t clearLayerFrameStats(const sp<IBinder>& handle) const = 0;
+
+    /*
+     * Requires ACCESS_SURFACE_FLINGER permission
+     */
+    virtual status_t getLayerFrameStats(const sp<IBinder>& handle, FrameStats* outStats) const = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/gui/Sensor.h b/include/gui/Sensor.h
index 033b262..c1c98b9 100644
--- a/include/gui/Sensor.h
+++ b/include/gui/Sensor.h
@@ -71,6 +71,8 @@
     int32_t getFifoMaxEventCount() const;
     const String8& getStringType() const;
     const String8& getRequiredPermission() const;
+    int32_t getMaxDelay() const;
+    bool isWakeUpSensor() const;
 
     // LightFlattenable protocol
     inline bool isFixedSize() const { return false; }
@@ -93,6 +95,8 @@
     int32_t mFifoMaxEventCount;
     String8 mStringType;
     String8 mRequiredPermission;
+    int32_t mMaxDelay;
+    bool    mWakeUpSensor;
     static void flattenString8(void*& buffer, size_t& size, const String8& string8);
     static bool unflattenString8(void const*& buffer, size_t& size, String8& outputString8);
 };
diff --git a/include/gui/SensorEventQueue.h b/include/gui/SensorEventQueue.h
index 0bfc7a0..4e8a2d2 100644
--- a/include/gui/SensorEventQueue.h
+++ b/include/gui/SensorEventQueue.h
@@ -27,7 +27,7 @@
 #include <gui/BitTube.h>
 
 // ----------------------------------------------------------------------------
-
+#define WAKE_UP_SENSOR_EVENT_NEEDS_ACK (1 << 31)
 struct ALooper;
 struct ASensorEvent;
 
@@ -75,7 +75,8 @@
                           int reservedFlags) const;
     status_t disableSensor(int32_t handle) const;
     status_t flush() const;
-
+    // Send an ack for every wake_up sensor event that is set to WAKE_UP_SENSOR_EVENT_NEEDS_ACK.
+    void sendAck(const ASensorEvent* events, int count);
 private:
     sp<Looper> getLooper() const;
     sp<ISensorEventConnection> mSensorEventConnection;
diff --git a/include/gui/StreamSplitter.h b/include/gui/StreamSplitter.h
new file mode 100644
index 0000000..f927953
--- /dev/null
+++ b/include/gui/StreamSplitter.h
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GUI_STREAMSPLITTER_H
+#define ANDROID_GUI_STREAMSPLITTER_H
+
+#include <gui/IConsumerListener.h>
+#include <gui/IProducerListener.h>
+
+#include <utils/Condition.h>
+#include <utils/KeyedVector.h>
+#include <utils/Mutex.h>
+#include <utils/StrongPointer.h>
+
+namespace android {
+
+class GraphicBuffer;
+class IGraphicBufferConsumer;
+class IGraphicBufferProducer;
+
+// StreamSplitter is an autonomous class that manages one input BufferQueue
+// and multiple output BufferQueues. By using the buffer attach and detach logic
+// in BufferQueue, it is able to present the illusion of a single split
+// BufferQueue, where each buffer queued to the input is available to be
+// acquired by each of the outputs, and is able to be dequeued by the input
+// again only once all of the outputs have released it.
+class StreamSplitter : public BnConsumerListener {
+public:
+    // createSplitter creates a new splitter, outSplitter, using inputQueue as
+    // the input BufferQueue. Output BufferQueues must be added using addOutput
+    // before queueing any buffers to the input.
+    //
+    // A return value other than NO_ERROR means that an error has occurred and
+    // outSplitter has not been modified. BAD_VALUE is returned if inputQueue or
+    // outSplitter is NULL. See IGraphicBufferConsumer::consumerConnect for
+    // explanations of other error codes.
+    static status_t createSplitter(const sp<IGraphicBufferConsumer>& inputQueue,
+            sp<StreamSplitter>* outSplitter);
+
+    // addOutput adds an output BufferQueue to the splitter. The splitter
+    // connects to outputQueue as a CPU producer, and any buffers queued
+    // to the input will be queued to each output. It is assumed that all of the
+    // outputs are added before any buffers are queued on the input. If any
+    // output is abandoned by its consumer, the splitter will abandon its input
+    // queue (see onAbandoned).
+    //
+    // A return value other than NO_ERROR means that an error has occurred and
+    // outputQueue has not been added to the splitter. BAD_VALUE is returned if
+    // outputQueue is NULL. See IGraphicBufferProducer::connect for explanations
+    // of other error codes.
+    status_t addOutput(const sp<IGraphicBufferProducer>& outputQueue);
+
+    // setName sets the consumer name of the input queue
+    void setName(const String8& name);
+
+private:
+    // From IConsumerListener
+    //
+    // During this callback, we store some tracking information, detach the
+    // buffer from the input, and attach it to each of the outputs. This call
+    // can block if there are too many outstanding buffers. If it blocks, it
+    // will resume when onBufferReleasedByOutput releases a buffer back to the
+    // input.
+    virtual void onFrameAvailable();
+
+    // From IConsumerListener
+    // We don't care about released buffers because we detach each buffer as
+    // soon as we acquire it. See the comment for onBufferReleased below for
+    // some clarifying notes about the name.
+    virtual void onBuffersReleased() {}
+
+    // From IConsumerListener
+    // We don't care about sideband streams, since we won't be splitting them
+    virtual void onSidebandStreamChanged() {}
+
+    // This is the implementation of the onBufferReleased callback from
+    // IProducerListener. It gets called from an OutputListener (see below), and
+    // 'from' is which producer interface from which the callback was received.
+    //
+    // During this callback, we detach the buffer from the output queue that
+    // generated the callback, update our state tracking to see if this is the
+    // last output releasing the buffer, and if so, release it to the input.
+    // If we release the buffer to the input, we allow a blocked
+    // onFrameAvailable call to proceed.
+    void onBufferReleasedByOutput(const sp<IGraphicBufferProducer>& from);
+
+    // When this is called, the splitter disconnects from (i.e., abandons) its
+    // input queue and signals any waiting onFrameAvailable calls to wake up.
+    // It still processes callbacks from other outputs, but only detaches their
+    // buffers so they can continue operating until they run out of buffers to
+    // acquire. This must be called with mMutex locked.
+    void onAbandonedLocked();
+
+    // This is a thin wrapper class that lets us determine which BufferQueue
+    // the IProducerListener::onBufferReleased callback is associated with. We
+    // create one of these per output BufferQueue, and then pass the producer
+    // into onBufferReleasedByOutput above.
+    class OutputListener : public BnProducerListener,
+                           public IBinder::DeathRecipient {
+    public:
+        OutputListener(const sp<StreamSplitter>& splitter,
+                const sp<IGraphicBufferProducer>& output);
+        virtual ~OutputListener();
+
+        // From IProducerListener
+        virtual void onBufferReleased();
+
+        // From IBinder::DeathRecipient
+        virtual void binderDied(const wp<IBinder>& who);
+
+    private:
+        sp<StreamSplitter> mSplitter;
+        sp<IGraphicBufferProducer> mOutput;
+    };
+
+    class BufferTracker : public LightRefBase<BufferTracker> {
+    public:
+        BufferTracker(const sp<GraphicBuffer>& buffer);
+
+        const sp<GraphicBuffer>& getBuffer() const { return mBuffer; }
+        const sp<Fence>& getMergedFence() const { return mMergedFence; }
+
+        void mergeFence(const sp<Fence>& with);
+
+        // Returns the new value
+        // Only called while mMutex is held
+        size_t incrementReleaseCountLocked() { return ++mReleaseCount; }
+
+    private:
+        // Only destroy through LightRefBase
+        friend LightRefBase<BufferTracker>;
+        ~BufferTracker();
+
+        // Disallow copying
+        BufferTracker(const BufferTracker& other);
+        BufferTracker& operator=(const BufferTracker& other);
+
+        sp<GraphicBuffer> mBuffer; // One instance that holds this native handle
+        sp<Fence> mMergedFence;
+        size_t mReleaseCount;
+    };
+
+    // Only called from createSplitter
+    StreamSplitter(const sp<IGraphicBufferConsumer>& inputQueue);
+
+    // Must be accessed through RefBase
+    virtual ~StreamSplitter();
+
+    static const int MAX_OUTSTANDING_BUFFERS = 2;
+
+    // mIsAbandoned is set to true when an output dies. Once the StreamSplitter
+    // has been abandoned, it will continue to detach buffers from other
+    // outputs, but it will disconnect from the input and not attempt to
+    // communicate with it further.
+    bool mIsAbandoned;
+
+    Mutex mMutex;
+    Condition mReleaseCondition;
+    int mOutstandingBuffers;
+    sp<IGraphicBufferConsumer> mInput;
+    Vector<sp<IGraphicBufferProducer> > mOutputs;
+
+    // Map of GraphicBuffer IDs (GraphicBuffer::getId()) to buffer tracking
+    // objects (which are mostly for counting how many outputs have released the
+    // buffer, but also contain merged release fences).
+    KeyedVector<uint64_t, sp<BufferTracker> > mBuffers;
+};
+
+} // namespace android
+
+#endif
diff --git a/include/gui/Surface.h b/include/gui/Surface.h
index 6f8a97c..d8e9756 100644
--- a/include/gui/Surface.h
+++ b/include/gui/Surface.h
@@ -78,6 +78,19 @@
         return surface != NULL && surface->getIGraphicBufferProducer() != NULL;
     }
 
+    /* Attaches a sideband buffer stream to the Surface's IGraphicBufferProducer.
+     *
+     * A sideband stream is a device-specific mechanism for passing buffers
+     * from the producer to the consumer without using dequeueBuffer/
+     * queueBuffer. If a sideband stream is present, the consumer can choose
+     * whether to acquire buffers from the sideband stream or from the queued
+     * buffers.
+     *
+     * Passing NULL or a different stream handle will detach the previous
+     * handle if any.
+     */
+    void setSidebandStream(const sp<NativeHandle>& stream);
+
 protected:
     virtual ~Surface();
 
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index e982bcd..e666329 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -28,6 +28,7 @@
 #include <utils/SortedVector.h>
 #include <utils/threads.h>
 
+#include <ui/FrameStats.h>
 #include <ui/PixelFormat.h>
 
 #include <gui/CpuConsumer.h>
@@ -65,8 +66,21 @@
     status_t linkToComposerDeath(const sp<IBinder::DeathRecipient>& recipient,
             void* cookie = NULL, uint32_t flags = 0);
 
-    // Get information about a display
-    static status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info);
+    // Get a list of supported configurations for a given display
+    static status_t getDisplayConfigs(const sp<IBinder>& display,
+            Vector<DisplayInfo>* configs);
+
+    // Get the DisplayInfo for the currently-active configuration
+    static status_t getDisplayInfo(const sp<IBinder>& display,
+            DisplayInfo* info);
+
+    // Get the index of the current active configuration (relative to the list
+    // returned by getDisplayInfo)
+    static int getActiveConfig(const sp<IBinder>& display);
+
+    // Set a new active configuration using an index relative to the list
+    // returned by getDisplayInfo
+    static status_t setActiveConfig(const sp<IBinder>& display, int id);
 
     /* triggers screen off and waits for it to complete */
     static void blankDisplay(const sp<IBinder>& display);
@@ -125,6 +139,12 @@
     status_t    setLayerStack(const sp<IBinder>& id, uint32_t layerStack);
     status_t    destroySurface(const sp<IBinder>& id);
 
+    status_t clearLayerFrameStats(const sp<IBinder>& token) const;
+    status_t getLayerFrameStats(const sp<IBinder>& token, FrameStats* outStats) const;
+
+    static status_t clearAnimationFrameStats();
+    static status_t getAnimationFrameStats(FrameStats* outStats);
+
     static void setDisplaySurface(const sp<IBinder>& token,
             const sp<IGraphicBufferProducer>& bufferProducer);
     static void setDisplayLayerStack(const sp<IBinder>& token,
@@ -160,15 +180,18 @@
 class ScreenshotClient
 {
 public:
+    // if cropping isn't required, callers may pass in a default Rect, e.g.:
+    //   capture(display, producer, Rect(), reqWidth, ...);
     static status_t capture(
             const sp<IBinder>& display,
             const sp<IGraphicBufferProducer>& producer,
-            uint32_t reqWidth, uint32_t reqHeight,
-            uint32_t minLayerZ, uint32_t maxLayerZ);
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            uint32_t minLayerZ, uint32_t maxLayerZ,
+            bool useIdentityTransform);
 
 private:
     mutable sp<CpuConsumer> mCpuConsumer;
-    mutable sp<BufferQueue> mBufferQueue;
+    mutable sp<IGraphicBufferProducer> mProducer;
     CpuConsumer::LockedBuffer mBuffer;
     bool mHaveBuffer;
 
@@ -176,13 +199,18 @@
     ScreenshotClient();
     ~ScreenshotClient();
 
-    // frees the previous screenshot and capture a new one
-    status_t update(const sp<IBinder>& display);
+    // frees the previous screenshot and captures a new one
+    // if cropping isn't required, callers may pass in a default Rect, e.g.:
+    //   update(display, Rect(), useIdentityTransform);
     status_t update(const sp<IBinder>& display,
-            uint32_t reqWidth, uint32_t reqHeight);
+            Rect sourceCrop, bool useIdentityTransform);
     status_t update(const sp<IBinder>& display,
-            uint32_t reqWidth, uint32_t reqHeight,
-            uint32_t minLayerZ, uint32_t maxLayerZ);
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            bool useIdentityTransform);
+    status_t update(const sp<IBinder>& display,
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            uint32_t minLayerZ, uint32_t maxLayerZ,
+            bool useIdentityTransform);
 
     sp<CpuConsumer> getCpuConsumer() const;
 
diff --git a/include/gui/SurfaceControl.h b/include/gui/SurfaceControl.h
index f27754c..84fb9f9 100644
--- a/include/gui/SurfaceControl.h
+++ b/include/gui/SurfaceControl.h
@@ -24,6 +24,7 @@
 #include <utils/RefBase.h>
 #include <utils/threads.h>
 
+#include <ui/FrameStats.h>
 #include <ui/PixelFormat.h>
 #include <ui/Region.h>
 
@@ -52,10 +53,10 @@
 
     static bool isSameSurface(
             const sp<SurfaceControl>& lhs, const sp<SurfaceControl>& rhs);
-        
+
     // release surface data from java
     void        clear();
-    
+
     status_t    setLayerStack(int32_t layerStack);
     status_t    setLayer(int32_t layer);
     status_t    setPosition(float x, float y);
@@ -73,6 +74,9 @@
 
     sp<Surface> getSurface() const;
 
+    status_t clearLayerFrameStats() const;
+    status_t getLayerFrameStats(FrameStats* outStats) const;
+
 private:
     // can't be copied
     SurfaceControl& operator = (SurfaceControl& rhs);
@@ -90,7 +94,7 @@
 
     status_t validate() const;
     void destroy();
-    
+
     sp<SurfaceComposerClient>   mClient;
     sp<IBinder>                 mHandle;
     sp<IGraphicBufferProducer>  mGraphicBufferProducer;
diff --git a/include/input/IInputFlinger.h b/include/input/IInputFlinger.h
new file mode 100644
index 0000000..79ff12a
--- /dev/null
+++ b/include/input/IInputFlinger.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBINPUT_IINPUT_FLINGER_H
+#define _LIBINPUT_IINPUT_FLINGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <binder/IInterface.h>
+
+namespace android {
+
+/*
+ * This class defines the Binder IPC interface for accessing various
+ * InputFlinger features.
+ */
+class IInputFlinger : public IInterface {
+public:
+    DECLARE_META_INTERFACE(InputFlinger);
+
+    virtual status_t doSomething() = 0;
+};
+
+
+/**
+ * Binder implementation.
+ */
+class BnInputFlinger : public BnInterface<IInputFlinger> {
+public:
+    enum {
+        DO_SOMETHING_TRANSACTION = IBinder::FIRST_CALL_TRANSACTION,
+    };
+
+    virtual status_t onTransact(uint32_t code, const Parcel& data,
+            Parcel* reply, uint32_t flags = 0);
+};
+
+} // namespace android
+
+#endif // _LIBINPUT_IINPUT_FLINGER_H
diff --git a/include/input/Input.h b/include/input/Input.h
index 793b414..96b6885 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -71,7 +71,7 @@
      * Constants for LEDs. Hidden from the API since we don't actually expose a way to interact
      * with LEDs to developers
      *
-     * NOTE: If you add LEDs here, you must also add them to KeycodeLabels.h
+     * NOTE: If you add LEDs here, you must also add them to InputEventLabels.h
      */
 
     ALED_NUM_LOCK = 0x00,
@@ -146,18 +146,12 @@
  */
 enum {
     /* These flags originate in RawEvents and are generally set in the key map.
-     * NOTE: If you edit these flags, also edit labels in KeycodeLabels.h. */
+     * NOTE: If you want a flag to be able to set in a keylayout file, then you must add it to
+     * InputEventLabels.h as well. */
 
     POLICY_FLAG_WAKE = 0x00000001,
-    POLICY_FLAG_WAKE_DROPPED = 0x00000002,
-    POLICY_FLAG_SHIFT = 0x00000004,
-    POLICY_FLAG_CAPS_LOCK = 0x00000008,
-    POLICY_FLAG_ALT = 0x00000010,
-    POLICY_FLAG_ALT_GR = 0x00000020,
-    POLICY_FLAG_MENU = 0x00000040,
-    POLICY_FLAG_LAUNCHER = 0x00000080,
-    POLICY_FLAG_VIRTUAL = 0x00000100,
-    POLICY_FLAG_FUNCTION = 0x00000200,
+    POLICY_FLAG_VIRTUAL = 0x00000002,
+    POLICY_FLAG_FUNCTION = 0x00000004,
 
     POLICY_FLAG_RAW_MASK = 0x0000ffff,
 
@@ -192,7 +186,7 @@
  * Pointer coordinate data.
  */
 struct PointerCoords {
-    enum { MAX_AXES = 14 }; // 14 so that sizeof(PointerCoords) == 64
+    enum { MAX_AXES = 30 }; // 30 so that sizeof(PointerCoords) == 128
 
     // Bitfield of axes that are present in this structure.
     uint64_t bits __attribute__((aligned(8)));
@@ -312,13 +306,8 @@
 
     inline nsecs_t getEventTime() const { return mEventTime; }
 
-    // Return true if this event may have a default action implementation.
-    static bool hasDefaultAction(int32_t keyCode);
-    bool hasDefaultAction() const;
-
-    // Return true if this event represents a system key.
-    static bool isSystemKey(int32_t keyCode);
-    bool isSystemKey() const;
+    static const char* getLabel(int32_t keyCode);
+    static int32_t getKeyCodeFromLabel(const char* label);
     
     void initialize(
             int32_t deviceId,
@@ -578,6 +567,9 @@
             return mSamplePointerCoords.array();
     }
 
+    static const char* getLabel(int32_t axis);
+    static int32_t getAxisFromLabel(const char* label);
+
 protected:
     int32_t mAction;
     int32_t mFlags;
diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h
new file mode 100644
index 0000000..51f7661
--- /dev/null
+++ b/include/input/InputEventLabels.h
@@ -0,0 +1,403 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LIBINPUT_INPUT_EVENT_LABELS_H
+#define _LIBINPUT_INPUT_EVENT_LABELS_H
+
+#include <input/Input.h>
+#include <android/keycodes.h>
+
+#define DEFINE_KEYCODE(key) { #key, AKEYCODE_##key }
+#define DEFINE_AXIS(axis) { #axis, AMOTION_EVENT_AXIS_##axis }
+#define DEFINE_LED(led) { #led, ALED_##led }
+#define DEFINE_FLAG(flag) { #flag, POLICY_FLAG_##flag }
+
+namespace android {
+
+template<typename T, size_t N>
+size_t size(T (&)[N]) { return N; }
+
+struct InputEventLabel {
+    const char *literal;
+    int value;
+};
+
+
+static const InputEventLabel KEYCODES[] = {
+    // NOTE: If you add a new keycode here you must also add it to several other files.
+    //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
+    DEFINE_KEYCODE(UNKNOWN),
+    DEFINE_KEYCODE(SOFT_LEFT),
+    DEFINE_KEYCODE(SOFT_RIGHT),
+    DEFINE_KEYCODE(HOME),
+    DEFINE_KEYCODE(BACK),
+    DEFINE_KEYCODE(CALL),
+    DEFINE_KEYCODE(ENDCALL),
+    DEFINE_KEYCODE(0),
+    DEFINE_KEYCODE(1),
+    DEFINE_KEYCODE(2),
+    DEFINE_KEYCODE(3),
+    DEFINE_KEYCODE(4),
+    DEFINE_KEYCODE(5),
+    DEFINE_KEYCODE(6),
+    DEFINE_KEYCODE(7),
+    DEFINE_KEYCODE(8),
+    DEFINE_KEYCODE(9),
+    DEFINE_KEYCODE(STAR),
+    DEFINE_KEYCODE(POUND),
+    DEFINE_KEYCODE(DPAD_UP),
+    DEFINE_KEYCODE(DPAD_DOWN),
+    DEFINE_KEYCODE(DPAD_LEFT),
+    DEFINE_KEYCODE(DPAD_RIGHT),
+    DEFINE_KEYCODE(DPAD_CENTER),
+    DEFINE_KEYCODE(VOLUME_UP),
+    DEFINE_KEYCODE(VOLUME_DOWN),
+    DEFINE_KEYCODE(POWER),
+    DEFINE_KEYCODE(CAMERA),
+    DEFINE_KEYCODE(CLEAR),
+    DEFINE_KEYCODE(A),
+    DEFINE_KEYCODE(B),
+    DEFINE_KEYCODE(C),
+    DEFINE_KEYCODE(D),
+    DEFINE_KEYCODE(E),
+    DEFINE_KEYCODE(F),
+    DEFINE_KEYCODE(G),
+    DEFINE_KEYCODE(H),
+    DEFINE_KEYCODE(I),
+    DEFINE_KEYCODE(J),
+    DEFINE_KEYCODE(K),
+    DEFINE_KEYCODE(L),
+    DEFINE_KEYCODE(M),
+    DEFINE_KEYCODE(N),
+    DEFINE_KEYCODE(O),
+    DEFINE_KEYCODE(P),
+    DEFINE_KEYCODE(Q),
+    DEFINE_KEYCODE(R),
+    DEFINE_KEYCODE(S),
+    DEFINE_KEYCODE(T),
+    DEFINE_KEYCODE(U),
+    DEFINE_KEYCODE(V),
+    DEFINE_KEYCODE(W),
+    DEFINE_KEYCODE(X),
+    DEFINE_KEYCODE(Y),
+    DEFINE_KEYCODE(Z),
+    DEFINE_KEYCODE(COMMA),
+    DEFINE_KEYCODE(PERIOD),
+    DEFINE_KEYCODE(ALT_LEFT),
+    DEFINE_KEYCODE(ALT_RIGHT),
+    DEFINE_KEYCODE(SHIFT_LEFT),
+    DEFINE_KEYCODE(SHIFT_RIGHT),
+    DEFINE_KEYCODE(TAB),
+    DEFINE_KEYCODE(SPACE),
+    DEFINE_KEYCODE(SYM),
+    DEFINE_KEYCODE(EXPLORER),
+    DEFINE_KEYCODE(ENVELOPE),
+    DEFINE_KEYCODE(ENTER),
+    DEFINE_KEYCODE(DEL),
+    DEFINE_KEYCODE(GRAVE),
+    DEFINE_KEYCODE(MINUS),
+    DEFINE_KEYCODE(EQUALS),
+    DEFINE_KEYCODE(LEFT_BRACKET),
+    DEFINE_KEYCODE(RIGHT_BRACKET),
+    DEFINE_KEYCODE(BACKSLASH),
+    DEFINE_KEYCODE(SEMICOLON),
+    DEFINE_KEYCODE(APOSTROPHE),
+    DEFINE_KEYCODE(SLASH),
+    DEFINE_KEYCODE(AT),
+    DEFINE_KEYCODE(NUM),
+    DEFINE_KEYCODE(HEADSETHOOK),
+    DEFINE_KEYCODE(FOCUS),   // *Camera* focus
+    DEFINE_KEYCODE(PLUS),
+    DEFINE_KEYCODE(MENU),
+    DEFINE_KEYCODE(NOTIFICATION),
+    DEFINE_KEYCODE(SEARCH),
+    DEFINE_KEYCODE(MEDIA_PLAY_PAUSE),
+    DEFINE_KEYCODE(MEDIA_STOP),
+    DEFINE_KEYCODE(MEDIA_NEXT),
+    DEFINE_KEYCODE(MEDIA_PREVIOUS),
+    DEFINE_KEYCODE(MEDIA_REWIND),
+    DEFINE_KEYCODE(MEDIA_FAST_FORWARD),
+    DEFINE_KEYCODE(MUTE),
+    DEFINE_KEYCODE(PAGE_UP),
+    DEFINE_KEYCODE(PAGE_DOWN),
+    DEFINE_KEYCODE(PICTSYMBOLS),
+    DEFINE_KEYCODE(SWITCH_CHARSET),
+    DEFINE_KEYCODE(BUTTON_A),
+    DEFINE_KEYCODE(BUTTON_B),
+    DEFINE_KEYCODE(BUTTON_C),
+    DEFINE_KEYCODE(BUTTON_X),
+    DEFINE_KEYCODE(BUTTON_Y),
+    DEFINE_KEYCODE(BUTTON_Z),
+    DEFINE_KEYCODE(BUTTON_L1),
+    DEFINE_KEYCODE(BUTTON_R1),
+    DEFINE_KEYCODE(BUTTON_L2),
+    DEFINE_KEYCODE(BUTTON_R2),
+    DEFINE_KEYCODE(BUTTON_THUMBL),
+    DEFINE_KEYCODE(BUTTON_THUMBR),
+    DEFINE_KEYCODE(BUTTON_START),
+    DEFINE_KEYCODE(BUTTON_SELECT),
+    DEFINE_KEYCODE(BUTTON_MODE),
+    DEFINE_KEYCODE(ESCAPE),
+    DEFINE_KEYCODE(FORWARD_DEL),
+    DEFINE_KEYCODE(CTRL_LEFT),
+    DEFINE_KEYCODE(CTRL_RIGHT),
+    DEFINE_KEYCODE(CAPS_LOCK),
+    DEFINE_KEYCODE(SCROLL_LOCK),
+    DEFINE_KEYCODE(META_LEFT),
+    DEFINE_KEYCODE(META_RIGHT),
+    DEFINE_KEYCODE(FUNCTION),
+    DEFINE_KEYCODE(SYSRQ),
+    DEFINE_KEYCODE(BREAK),
+    DEFINE_KEYCODE(MOVE_HOME),
+    DEFINE_KEYCODE(MOVE_END),
+    DEFINE_KEYCODE(INSERT),
+    DEFINE_KEYCODE(FORWARD),
+    DEFINE_KEYCODE(MEDIA_PLAY),
+    DEFINE_KEYCODE(MEDIA_PAUSE),
+    DEFINE_KEYCODE(MEDIA_CLOSE),
+    DEFINE_KEYCODE(MEDIA_EJECT),
+    DEFINE_KEYCODE(MEDIA_RECORD),
+    DEFINE_KEYCODE(F1),
+    DEFINE_KEYCODE(F2),
+    DEFINE_KEYCODE(F3),
+    DEFINE_KEYCODE(F4),
+    DEFINE_KEYCODE(F5),
+    DEFINE_KEYCODE(F6),
+    DEFINE_KEYCODE(F7),
+    DEFINE_KEYCODE(F8),
+    DEFINE_KEYCODE(F9),
+    DEFINE_KEYCODE(F10),
+    DEFINE_KEYCODE(F11),
+    DEFINE_KEYCODE(F12),
+    DEFINE_KEYCODE(NUM_LOCK),
+    DEFINE_KEYCODE(NUMPAD_0),
+    DEFINE_KEYCODE(NUMPAD_1),
+    DEFINE_KEYCODE(NUMPAD_2),
+    DEFINE_KEYCODE(NUMPAD_3),
+    DEFINE_KEYCODE(NUMPAD_4),
+    DEFINE_KEYCODE(NUMPAD_5),
+    DEFINE_KEYCODE(NUMPAD_6),
+    DEFINE_KEYCODE(NUMPAD_7),
+    DEFINE_KEYCODE(NUMPAD_8),
+    DEFINE_KEYCODE(NUMPAD_9),
+    DEFINE_KEYCODE(NUMPAD_DIVIDE),
+    DEFINE_KEYCODE(NUMPAD_MULTIPLY),
+    DEFINE_KEYCODE(NUMPAD_SUBTRACT),
+    DEFINE_KEYCODE(NUMPAD_ADD),
+    DEFINE_KEYCODE(NUMPAD_DOT),
+    DEFINE_KEYCODE(NUMPAD_COMMA),
+    DEFINE_KEYCODE(NUMPAD_ENTER),
+    DEFINE_KEYCODE(NUMPAD_EQUALS),
+    DEFINE_KEYCODE(NUMPAD_LEFT_PAREN),
+    DEFINE_KEYCODE(NUMPAD_RIGHT_PAREN),
+    DEFINE_KEYCODE(VOLUME_MUTE),
+    DEFINE_KEYCODE(INFO),
+    DEFINE_KEYCODE(CHANNEL_UP),
+    DEFINE_KEYCODE(CHANNEL_DOWN),
+    DEFINE_KEYCODE(ZOOM_IN),
+    DEFINE_KEYCODE(ZOOM_OUT),
+    DEFINE_KEYCODE(TV),
+    DEFINE_KEYCODE(WINDOW),
+    DEFINE_KEYCODE(GUIDE),
+    DEFINE_KEYCODE(DVR),
+    DEFINE_KEYCODE(BOOKMARK),
+    DEFINE_KEYCODE(CAPTIONS),
+    DEFINE_KEYCODE(SETTINGS),
+    DEFINE_KEYCODE(TV_POWER),
+    DEFINE_KEYCODE(TV_INPUT),
+    DEFINE_KEYCODE(STB_POWER),
+    DEFINE_KEYCODE(STB_INPUT),
+    DEFINE_KEYCODE(AVR_POWER),
+    DEFINE_KEYCODE(AVR_INPUT),
+    DEFINE_KEYCODE(PROG_RED),
+    DEFINE_KEYCODE(PROG_GREEN),
+    DEFINE_KEYCODE(PROG_YELLOW),
+    DEFINE_KEYCODE(PROG_BLUE),
+    DEFINE_KEYCODE(APP_SWITCH),
+    DEFINE_KEYCODE(BUTTON_1),
+    DEFINE_KEYCODE(BUTTON_2),
+    DEFINE_KEYCODE(BUTTON_3),
+    DEFINE_KEYCODE(BUTTON_4),
+    DEFINE_KEYCODE(BUTTON_5),
+    DEFINE_KEYCODE(BUTTON_6),
+    DEFINE_KEYCODE(BUTTON_7),
+    DEFINE_KEYCODE(BUTTON_8),
+    DEFINE_KEYCODE(BUTTON_9),
+    DEFINE_KEYCODE(BUTTON_10),
+    DEFINE_KEYCODE(BUTTON_11),
+    DEFINE_KEYCODE(BUTTON_12),
+    DEFINE_KEYCODE(BUTTON_13),
+    DEFINE_KEYCODE(BUTTON_14),
+    DEFINE_KEYCODE(BUTTON_15),
+    DEFINE_KEYCODE(BUTTON_16),
+    DEFINE_KEYCODE(LANGUAGE_SWITCH),
+    DEFINE_KEYCODE(MANNER_MODE),
+    DEFINE_KEYCODE(3D_MODE),
+    DEFINE_KEYCODE(CONTACTS),
+    DEFINE_KEYCODE(CALENDAR),
+    DEFINE_KEYCODE(MUSIC),
+    DEFINE_KEYCODE(CALCULATOR),
+    DEFINE_KEYCODE(ZENKAKU_HANKAKU),
+    DEFINE_KEYCODE(EISU),
+    DEFINE_KEYCODE(MUHENKAN),
+    DEFINE_KEYCODE(HENKAN),
+    DEFINE_KEYCODE(KATAKANA_HIRAGANA),
+    DEFINE_KEYCODE(YEN),
+    DEFINE_KEYCODE(RO),
+    DEFINE_KEYCODE(KANA),
+    DEFINE_KEYCODE(ASSIST),
+    DEFINE_KEYCODE(BRIGHTNESS_DOWN),
+    DEFINE_KEYCODE(BRIGHTNESS_UP),
+    DEFINE_KEYCODE(MEDIA_AUDIO_TRACK),
+    DEFINE_KEYCODE(SLEEP),
+    DEFINE_KEYCODE(WAKEUP),
+    DEFINE_KEYCODE(PAIRING),
+    DEFINE_KEYCODE(MEDIA_TOP_MENU),
+    DEFINE_KEYCODE(11),
+    DEFINE_KEYCODE(12),
+    DEFINE_KEYCODE(LAST_CHANNEL),
+    DEFINE_KEYCODE(TV_DATA_SERVICE),
+
+    { NULL, 0 }
+};
+
+static const InputEventLabel AXES[] = {
+    DEFINE_AXIS(X),
+    DEFINE_AXIS(Y),
+    DEFINE_AXIS(PRESSURE),
+    DEFINE_AXIS(SIZE),
+    DEFINE_AXIS(TOUCH_MAJOR),
+    DEFINE_AXIS(TOUCH_MINOR),
+    DEFINE_AXIS(TOOL_MAJOR),
+    DEFINE_AXIS(TOOL_MINOR),
+    DEFINE_AXIS(ORIENTATION),
+    DEFINE_AXIS(VSCROLL),
+    DEFINE_AXIS(HSCROLL),
+    DEFINE_AXIS(Z),
+    DEFINE_AXIS(RX),
+    DEFINE_AXIS(RY),
+    DEFINE_AXIS(RZ),
+    DEFINE_AXIS(HAT_X),
+    DEFINE_AXIS(HAT_Y),
+    DEFINE_AXIS(LTRIGGER),
+    DEFINE_AXIS(RTRIGGER),
+    DEFINE_AXIS(THROTTLE),
+    DEFINE_AXIS(RUDDER),
+    DEFINE_AXIS(WHEEL),
+    DEFINE_AXIS(GAS),
+    DEFINE_AXIS(BRAKE),
+    DEFINE_AXIS(DISTANCE),
+    DEFINE_AXIS(TILT),
+    DEFINE_AXIS(GENERIC_1),
+    DEFINE_AXIS(GENERIC_2),
+    DEFINE_AXIS(GENERIC_3),
+    DEFINE_AXIS(GENERIC_4),
+    DEFINE_AXIS(GENERIC_5),
+    DEFINE_AXIS(GENERIC_6),
+    DEFINE_AXIS(GENERIC_7),
+    DEFINE_AXIS(GENERIC_8),
+    DEFINE_AXIS(GENERIC_9),
+    DEFINE_AXIS(GENERIC_10),
+    DEFINE_AXIS(GENERIC_11),
+    DEFINE_AXIS(GENERIC_12),
+    DEFINE_AXIS(GENERIC_13),
+    DEFINE_AXIS(GENERIC_14),
+    DEFINE_AXIS(GENERIC_15),
+    DEFINE_AXIS(GENERIC_16),
+
+    // NOTE: If you add a new axis here you must also add it to several other files.
+    //       Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
+    { NULL, 0 }
+};
+
+static const InputEventLabel LEDS[] = {
+    DEFINE_LED(NUM_LOCK),
+    DEFINE_LED(CAPS_LOCK),
+    DEFINE_LED(SCROLL_LOCK),
+    DEFINE_LED(COMPOSE),
+    DEFINE_LED(KANA),
+    DEFINE_LED(SLEEP),
+    DEFINE_LED(SUSPEND),
+    DEFINE_LED(MUTE),
+    DEFINE_LED(MISC),
+    DEFINE_LED(MAIL),
+    DEFINE_LED(CHARGING),
+    DEFINE_LED(CONTROLLER_1),
+    DEFINE_LED(CONTROLLER_2),
+    DEFINE_LED(CONTROLLER_3),
+    DEFINE_LED(CONTROLLER_4),
+
+    // NOTE: If you add new LEDs here, you must also add them to Input.h
+    { NULL, 0 }
+};
+
+static const InputEventLabel FLAGS[] = {
+    DEFINE_FLAG(VIRTUAL),
+    DEFINE_FLAG(FUNCTION),
+
+    { NULL, 0 }
+};
+
+static int lookupValueByLabel(const char* literal, const InputEventLabel *list) {
+    while (list->literal) {
+        if (strcmp(literal, list->literal) == 0) {
+            return list->value;
+        }
+        list++;
+    }
+    return list->value;
+}
+
+static const char* lookupLabelByValue(int value, const InputEventLabel* list) {
+    while (list->literal) {
+        if (list->value == value) {
+            return list->literal;
+        }
+        list++;
+    }
+    return NULL;
+}
+
+static int32_t getKeyCodeByLabel(const char* label) {
+    return int32_t(lookupValueByLabel(label, KEYCODES));
+}
+
+static const char* getLabelByKeyCode(int32_t keyCode) {
+    if (keyCode >= 0 && keyCode < size(KEYCODES)) {
+        return KEYCODES[keyCode].literal;
+    }
+    return NULL;
+}
+
+static uint32_t getKeyFlagByLabel(const char* label) {
+    return uint32_t(lookupValueByLabel(label, FLAGS));
+}
+
+static int32_t getAxisByLabel(const char* label) {
+    return int32_t(lookupValueByLabel(label, AXES));
+}
+
+static const char* getAxisLabel(int32_t axisId) {
+    return lookupLabelByValue(axisId, AXES);
+}
+
+static int32_t getLedByLabel(const char* label) {
+    return int32_t(lookupValueByLabel(label, LEDS));
+}
+
+
+} // namespace android
+#endif // _LIBINPUT_INPUT_EVENT_LABELS_H
diff --git a/include/input/Keyboard.h b/include/input/Keyboard.h
index 25b2f07..519bb22 100644
--- a/include/input/Keyboard.h
+++ b/include/input/Keyboard.h
@@ -19,6 +19,7 @@
 
 #include <input/Input.h>
 #include <input/InputDevice.h>
+#include <input/InputEventLabels.h>
 #include <utils/Errors.h>
 #include <utils/String8.h>
 #include <utils/PropertyMap.h>
@@ -82,36 +83,6 @@
         const PropertyMap* deviceConfiguration, const KeyMap* keyMap);
 
 /**
- * Gets a key code by its short form label, eg. "HOME".
- * Returns 0 if unknown.
- */
-extern int32_t getKeyCodeByLabel(const char* label);
-
-/**
- * Gets a key flag by its short form label, eg. "WAKE".
- * Returns 0 if unknown.
- */
-extern uint32_t getKeyFlagByLabel(const char* label);
-
-/**
- * Gets an axis by its short form label, eg. "X".
- * Returns -1 if unknown.
- */
-extern int32_t getAxisByLabel(const char* label);
-
-/**
- * Gets an axis label by its id.
- * Returns NULL if unknown.
- */
-extern const char* getAxisLabel(int32_t axisId);
-
-/**
- * Gets an LED by its short form label, eg. "CAPS_LOCK".
- * Returns -1 if unknown.
- */
-extern int32_t getLedByLabel(const char* label);
-
-/**
  * Updates a meta state field when a key is pressed or released.
  */
 extern int32_t updateMetaState(int32_t keyCode, bool down, int32_t oldMetaState);
diff --git a/include/input/KeycodeLabels.h b/include/input/KeycodeLabels.h
deleted file mode 100644
index a8d63da..0000000
--- a/include/input/KeycodeLabels.h
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _LIBINPUT_KEYCODE_LABELS_H
-#define _LIBINPUT_KEYCODE_LABELS_H
-
-#include <android/keycodes.h>
-
-struct KeycodeLabel {
-    const char *literal;
-    int value;
-};
-
-static const KeycodeLabel KEYCODES[] = {
-    { "SOFT_LEFT", 1 },
-    { "SOFT_RIGHT", 2 },
-    { "HOME", 3 },
-    { "BACK", 4 },
-    { "CALL", 5 },
-    { "ENDCALL", 6 },
-    { "0", 7 },
-    { "1", 8 },
-    { "2", 9 },
-    { "3", 10 },
-    { "4", 11 },
-    { "5", 12 },
-    { "6", 13 },
-    { "7", 14 },
-    { "8", 15 },
-    { "9", 16 },
-    { "STAR", 17 },
-    { "POUND", 18 },
-    { "DPAD_UP", 19 },
-    { "DPAD_DOWN", 20 },
-    { "DPAD_LEFT", 21 },
-    { "DPAD_RIGHT", 22 },
-    { "DPAD_CENTER", 23 },
-    { "VOLUME_UP", 24 },
-    { "VOLUME_DOWN", 25 },
-    { "POWER", 26 },
-    { "CAMERA", 27 },
-    { "CLEAR", 28 },
-    { "A", 29 },
-    { "B", 30 },
-    { "C", 31 },
-    { "D", 32 },
-    { "E", 33 },
-    { "F", 34 },
-    { "G", 35 },
-    { "H", 36 },
-    { "I", 37 },
-    { "J", 38 },
-    { "K", 39 },
-    { "L", 40 },
-    { "M", 41 },
-    { "N", 42 },
-    { "O", 43 },
-    { "P", 44 },
-    { "Q", 45 },
-    { "R", 46 },
-    { "S", 47 },
-    { "T", 48 },
-    { "U", 49 },
-    { "V", 50 },
-    { "W", 51 },
-    { "X", 52 },
-    { "Y", 53 },
-    { "Z", 54 },
-    { "COMMA", 55 },
-    { "PERIOD", 56 },
-    { "ALT_LEFT", 57 },
-    { "ALT_RIGHT", 58 },
-    { "SHIFT_LEFT", 59 },
-    { "SHIFT_RIGHT", 60 },
-    { "TAB", 61 },
-    { "SPACE", 62 },
-    { "SYM", 63 },
-    { "EXPLORER", 64 },
-    { "ENVELOPE", 65 },
-    { "ENTER", 66 },
-    { "DEL", 67 },
-    { "GRAVE", 68 },
-    { "MINUS", 69 },
-    { "EQUALS", 70 },
-    { "LEFT_BRACKET", 71 },
-    { "RIGHT_BRACKET", 72 },
-    { "BACKSLASH", 73 },
-    { "SEMICOLON", 74 },
-    { "APOSTROPHE", 75 },
-    { "SLASH", 76 },
-    { "AT", 77 },
-    { "NUM", 78 },
-    { "HEADSETHOOK", 79 },
-    { "FOCUS", 80 },
-    { "PLUS", 81 },
-    { "MENU", 82 },
-    { "NOTIFICATION", 83 },
-    { "SEARCH", 84 },
-    { "MEDIA_PLAY_PAUSE", 85 },
-    { "MEDIA_STOP", 86 },
-    { "MEDIA_NEXT", 87 },
-    { "MEDIA_PREVIOUS", 88 },
-    { "MEDIA_REWIND", 89 },
-    { "MEDIA_FAST_FORWARD", 90 },
-    { "MUTE", 91 },
-    { "PAGE_UP", 92 },
-    { "PAGE_DOWN", 93 },
-    { "PICTSYMBOLS", 94 },
-    { "SWITCH_CHARSET", 95 },
-    { "BUTTON_A", 96 },
-    { "BUTTON_B", 97 },
-    { "BUTTON_C", 98 },
-    { "BUTTON_X", 99 },
-    { "BUTTON_Y", 100 },
-    { "BUTTON_Z", 101 },
-    { "BUTTON_L1", 102 },
-    { "BUTTON_R1", 103 },
-    { "BUTTON_L2", 104 },
-    { "BUTTON_R2", 105 },
-    { "BUTTON_THUMBL", 106 },
-    { "BUTTON_THUMBR", 107 },
-    { "BUTTON_START", 108 },
-    { "BUTTON_SELECT", 109 },
-    { "BUTTON_MODE", 110 },
-    { "ESCAPE", 111 },
-    { "FORWARD_DEL", 112 },
-    { "CTRL_LEFT", 113 },
-    { "CTRL_RIGHT", 114 },
-    { "CAPS_LOCK", 115 },
-    { "SCROLL_LOCK", 116 },
-    { "META_LEFT", 117 },
-    { "META_RIGHT", 118 },
-    { "FUNCTION", 119 },
-    { "SYSRQ", 120 },
-    { "BREAK", 121 },
-    { "MOVE_HOME", 122 },
-    { "MOVE_END", 123 },
-    { "INSERT", 124 },
-    { "FORWARD", 125 },
-    { "MEDIA_PLAY", 126 },
-    { "MEDIA_PAUSE", 127 },
-    { "MEDIA_CLOSE", 128 },
-    { "MEDIA_EJECT", 129 },
-    { "MEDIA_RECORD", 130 },
-    { "F1", 131 },
-    { "F2", 132 },
-    { "F3", 133 },
-    { "F4", 134 },
-    { "F5", 135 },
-    { "F6", 136 },
-    { "F7", 137 },
-    { "F8", 138 },
-    { "F9", 139 },
-    { "F10", 140 },
-    { "F11", 141 },
-    { "F12", 142 },
-    { "NUM_LOCK", 143 },
-    { "NUMPAD_0", 144 },
-    { "NUMPAD_1", 145 },
-    { "NUMPAD_2", 146 },
-    { "NUMPAD_3", 147 },
-    { "NUMPAD_4", 148 },
-    { "NUMPAD_5", 149 },
-    { "NUMPAD_6", 150 },
-    { "NUMPAD_7", 151 },
-    { "NUMPAD_8", 152 },
-    { "NUMPAD_9", 153 },
-    { "NUMPAD_DIVIDE", 154 },
-    { "NUMPAD_MULTIPLY", 155 },
-    { "NUMPAD_SUBTRACT", 156 },
-    { "NUMPAD_ADD", 157 },
-    { "NUMPAD_DOT", 158 },
-    { "NUMPAD_COMMA", 159 },
-    { "NUMPAD_ENTER", 160 },
-    { "NUMPAD_EQUALS", 161 },
-    { "NUMPAD_LEFT_PAREN", 162 },
-    { "NUMPAD_RIGHT_PAREN", 163 },
-    { "VOLUME_MUTE", 164 },
-    { "INFO", 165 },
-    { "CHANNEL_UP", 166 },
-    { "CHANNEL_DOWN", 167 },
-    { "ZOOM_IN", 168 },
-    { "ZOOM_OUT", 169 },
-    { "TV", 170 },
-    { "WINDOW", 171 },
-    { "GUIDE", 172 },
-    { "DVR", 173 },
-    { "BOOKMARK", 174 },
-    { "CAPTIONS", 175 },
-    { "SETTINGS", 176 },
-    { "TV_POWER", 177 },
-    { "TV_INPUT", 178 },
-    { "STB_POWER", 179 },
-    { "STB_INPUT", 180 },
-    { "AVR_POWER", 181 },
-    { "AVR_INPUT", 182 },
-    { "PROG_RED", 183 },
-    { "PROG_GREEN", 184 },
-    { "PROG_YELLOW", 185 },
-    { "PROG_BLUE", 186 },
-    { "APP_SWITCH", 187 },
-    { "BUTTON_1", 188 },
-    { "BUTTON_2", 189 },
-    { "BUTTON_3", 190 },
-    { "BUTTON_4", 191 },
-    { "BUTTON_5", 192 },
-    { "BUTTON_6", 193 },
-    { "BUTTON_7", 194 },
-    { "BUTTON_8", 195 },
-    { "BUTTON_9", 196 },
-    { "BUTTON_10", 197 },
-    { "BUTTON_11", 198 },
-    { "BUTTON_12", 199 },
-    { "BUTTON_13", 200 },
-    { "BUTTON_14", 201 },
-    { "BUTTON_15", 202 },
-    { "BUTTON_16", 203 },
-    { "LANGUAGE_SWITCH", 204 },
-    { "MANNER_MODE", 205 },
-    { "3D_MODE", 206 },
-    { "CONTACTS", 207 },
-    { "CALENDAR", 208 },
-    { "MUSIC", 209 },
-    { "CALCULATOR", 210 },
-    { "ZENKAKU_HANKAKU", 211 },
-    { "EISU", 212 },
-    { "MUHENKAN", 213 },
-    { "HENKAN", 214 },
-    { "KATAKANA_HIRAGANA", 215 },
-    { "YEN", 216 },
-    { "RO", 217 },
-    { "KANA", 218 },
-    { "ASSIST", 219 },
-    { "BRIGHTNESS_DOWN", 220 },
-    { "BRIGHTNESS_UP", 221 },
-    { "MEDIA_AUDIO_TRACK", 222 },
-    { "SLEEP", 223 },
-    { "WAKEUP", 224 },
-
-    // NOTE: If you add a new keycode here you must also add it to several other files.
-    //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
-
-    { NULL, 0 }
-};
-
-// NOTE: If you edit these flags, also edit policy flags in Input.h.
-static const KeycodeLabel FLAGS[] = {
-    { "WAKE", 0x00000001 },
-    { "WAKE_DROPPED", 0x00000002 },
-    { "SHIFT", 0x00000004 },
-    { "CAPS_LOCK", 0x00000008 },
-    { "ALT", 0x00000010 },
-    { "ALT_GR", 0x00000020 },
-    { "MENU", 0x00000040 },
-    { "LAUNCHER", 0x00000080 },
-    { "VIRTUAL", 0x00000100 },
-    { "FUNCTION", 0x00000200 },
-    { NULL, 0 }
-};
-
-static const KeycodeLabel AXES[] = {
-    { "X", 0 },
-    { "Y", 1 },
-    { "PRESSURE", 2 },
-    { "SIZE", 3 },
-    { "TOUCH_MAJOR", 4 },
-    { "TOUCH_MINOR", 5 },
-    { "TOOL_MAJOR", 6 },
-    { "TOOL_MINOR", 7 },
-    { "ORIENTATION", 8 },
-    { "VSCROLL", 9 },
-    { "HSCROLL", 10 },
-    { "Z", 11 },
-    { "RX", 12 },
-    { "RY", 13 },
-    { "RZ", 14 },
-    { "HAT_X", 15 },
-    { "HAT_Y", 16 },
-    { "LTRIGGER", 17 },
-    { "RTRIGGER", 18 },
-    { "THROTTLE", 19 },
-    { "RUDDER", 20 },
-    { "WHEEL", 21 },
-    { "GAS", 22 },
-    { "BRAKE", 23 },
-    { "DISTANCE", 24 },
-    { "TILT", 25 },
-    { "GENERIC_1", 32 },
-    { "GENERIC_2", 33 },
-    { "GENERIC_3", 34 },
-    { "GENERIC_4", 35 },
-    { "GENERIC_5", 36 },
-    { "GENERIC_6", 37 },
-    { "GENERIC_7", 38 },
-    { "GENERIC_8", 39 },
-    { "GENERIC_9", 40 },
-    { "GENERIC_10", 41 },
-    { "GENERIC_11", 42 },
-    { "GENERIC_12", 43 },
-    { "GENERIC_13", 44 },
-    { "GENERIC_14", 45 },
-    { "GENERIC_15", 46 },
-    { "GENERIC_16", 47 },
-
-    // NOTE: If you add a new axis here you must also add it to several other files.
-    //       Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
-
-    { NULL, -1 }
-};
-
-static const KeycodeLabel LEDS[] = {
-    { "NUM_LOCK", 0x00 },
-    { "CAPS_LOCK", 0x01 },
-    { "SCROLL_LOCK", 0x02 },
-    { "COMPOSE", 0x03 },
-    { "KANA", 0x04 },
-    { "SLEEP", 0x05 },
-    { "SUSPEND", 0x06 },
-    { "MUTE", 0x07 },
-    { "MISC", 0x08 },
-    { "MAIL", 0x09 },
-    { "CHARGING", 0x0a },
-    { "CONTROLLER_1", 0x10 },
-    { "CONTROLLER_2", 0x11 },
-    { "CONTROLLER_3", 0x12 },
-    { "CONTROLLER_4", 0x13 },
-
-    // NOTE: If you add new LEDs here, you must also add them to Input.h
-
-    { NULL, -1 }
-};
-
-#endif // _LIBINPUT_KEYCODE_LABELS_H
diff --git a/include/media/hardware/HDCPAPI.h b/include/media/hardware/HDCPAPI.h
index d4abb3f..3a53e9f 100644
--- a/include/media/hardware/HDCPAPI.h
+++ b/include/media/hardware/HDCPAPI.h
@@ -88,6 +88,11 @@
     // Request to shutdown the active HDCP session.
     virtual status_t shutdownAsync() = 0;
 
+    // Returns the capability bitmask of this HDCP session.
+    virtual uint32_t getCaps() {
+        return HDCP_CAPS_ENCRYPT;
+    }
+
     // ENCRYPTION only:
     // Encrypt data according to the HDCP spec. "size" bytes of data are
     // available at "inData" (virtual address), "size" may not be a multiple
diff --git a/include/media/openmax/OMX_AudioExt.h b/include/media/openmax/OMX_AudioExt.h
index aa6e6d0..dc6457b 100644
--- a/include/media/openmax/OMX_AudioExt.h
+++ b/include/media/openmax/OMX_AudioExt.h
@@ -43,6 +43,7 @@
 typedef enum OMX_AUDIO_CODINGEXTTYPE {
     OMX_AUDIO_CodingAndroidUnused = OMX_AUDIO_CodingKhronosExtensions + 0x00100000,
     OMX_AUDIO_CodingAndroidAC3,         /**< AC3 encoded data */
+    OMX_AUDIO_CodingAndroidOPUS,        /**< OPUS encoded data */
 } OMX_AUDIO_CODINGEXTTYPE;
 
 typedef struct OMX_AUDIO_PARAM_ANDROID_AC3TYPE {
@@ -54,6 +55,20 @@
                                         variable or unknown sampling rate. */
 } OMX_AUDIO_PARAM_ANDROID_AC3TYPE;
 
+typedef struct OMX_AUDIO_PARAM_ANDROID_OPUSTYPE {
+    OMX_U32 nSize;            /**< size of the structure in bytes */
+    OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
+    OMX_U32 nPortIndex;       /**< port that this structure applies to */
+    OMX_U32 nChannels;        /**< Number of channels */
+    OMX_U32 nBitRate;         /**< Bit rate of the encoded data data.  Use 0 for variable
+                                   rate or unknown bit rates. Encoding is set to the
+                                   bitrate closest to specified  value (in bps) */
+    OMX_U32 nSampleRate;      /**< Sampling rate of the source data.  Use 0 for
+                                   variable or unknown sampling rate. */
+    OMX_U32 nAudioBandWidth;  /**< Audio band width (in Hz) to which an encoder should
+                                   limit the audio signal. Use 0 to let encoder decide */
+} OMX_AUDIO_PARAM_ANDROID_OPUSTYPE;
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
diff --git a/include/media/openmax/OMX_IndexExt.h b/include/media/openmax/OMX_IndexExt.h
index c47a885..7070809 100644
--- a/include/media/openmax/OMX_IndexExt.h
+++ b/include/media/openmax/OMX_IndexExt.h
@@ -58,6 +58,7 @@
     /* Audio parameters and configurations */
     OMX_IndexExtAudioStartUnused = OMX_IndexKhronosExtensions + 0x00400000,
     OMX_IndexParamAudioAndroidAc3,                  /**< reference: OMX_AUDIO_PARAM_ANDROID_AC3TYPE */
+    OMX_IndexParamAudioAndroidOpus,                 /**< reference: OMX_AUDIO_PARAM_ANDROID_OPUSTYPE */
 
     /* Image parameters and configurations */
     OMX_IndexExtImageStartUnused = OMX_IndexKhronosExtensions + 0x00500000,
@@ -70,6 +71,9 @@
     OMX_IndexParamVideoVp8,                         /**< reference: OMX_VIDEO_PARAM_VP8TYPE */
     OMX_IndexConfigVideoVp8ReferenceFrame,          /**< reference: OMX_VIDEO_VP8REFERENCEFRAMETYPE */
     OMX_IndexConfigVideoVp8ReferenceFrameType,      /**< reference: OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE */
+    OMX_IndexParamVideoAndroidVp8Encoder,           /**< reference: OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE */
+    OMX_IndexParamVideoHevc,                        /**< reference: OMX_VIDEO_PARAM_HEVCTYPE */
+    OMX_IndexParamSliceSegments,                    /**< reference: OMX_VIDEO_SLICESEGMENTSTYPE */
 
     /* Image & Video common configurations */
     OMX_IndexExtCommonStartUnused = OMX_IndexKhronosExtensions + 0x00700000,
diff --git a/include/media/openmax/OMX_Types.h b/include/media/openmax/OMX_Types.h
index 9dec372..71e346a 100644
--- a/include/media/openmax/OMX_Types.h
+++ b/include/media/openmax/OMX_Types.h
@@ -211,7 +211,25 @@
     OMX_TRUE = !OMX_FALSE,
     OMX_BOOL_MAX = 0x7FFFFFFF
 } OMX_BOOL; 
- 
+
+/*
+ * Temporary Android 64 bit modification
+ *
+ * #define OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
+ * overrides all OMX pointer types to be uint32_t.
+ *
+ * After this change, OMX codecs will work in 32 bit only, so 64 bit processes
+ * must communicate to a remote 32 bit process for OMX to work.
+ */
+
+#ifdef OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
+
+typedef uint32_t OMX_PTR;
+typedef OMX_PTR OMX_STRING;
+typedef OMX_PTR OMX_BYTE;
+
+#else /* OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS */
+
 /** The OMX_PTR type is intended to be used to pass pointers between the OMX
     applications and the OMX Core and components.  This is a 32 bit pointer and
     is aligned on a 32 bit boundary.
@@ -232,6 +250,8 @@
  */
 typedef unsigned char* OMX_BYTE;
 
+#endif /* OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS */
+
 /** OMX_UUIDTYPE is a very long unique identifier to uniquely identify
     at runtime.  This identifier should be generated by a component in a way
     that guarantees that every instance of the identifier running on the system
@@ -312,7 +332,7 @@
 /** Define the public interface for the OMX Handle.  The core will not use
     this value internally, but the application should only use this value.
  */
-typedef void* OMX_HANDLETYPE;
+typedef OMX_PTR OMX_HANDLETYPE;
 
 typedef struct OMX_MARKTYPE
 {
@@ -328,11 +348,11 @@
 /** OMX_NATIVE_DEVICETYPE is used to map a OMX video port to the
  *  platform & operating specific object used to reference the display 
  *  or can be used by a audio port for native audio rendering */
-typedef void* OMX_NATIVE_DEVICETYPE;
+typedef OMX_PTR OMX_NATIVE_DEVICETYPE;
 
 /** OMX_NATIVE_WINDOWTYPE is used to map a OMX video port to the
  *  platform & operating specific object used to reference the window */
-typedef void* OMX_NATIVE_WINDOWTYPE;
+typedef OMX_PTR OMX_NATIVE_WINDOWTYPE;
 
 /** The OMX_VERSIONTYPE union is used to specify the version for
     a structure or component.  For a component, the version is entirely
diff --git a/include/media/openmax/OMX_Video.h b/include/media/openmax/OMX_Video.h
index 4441a7a..21dc5a6 100644
--- a/include/media/openmax/OMX_Video.h
+++ b/include/media/openmax/OMX_Video.h
@@ -87,6 +87,7 @@
     OMX_VIDEO_CodingMJPEG,      /**< Motion JPEG */
     OMX_VIDEO_CodingVP8,        /**< Google VP8, formerly known as On2 VP8 */
     OMX_VIDEO_CodingVP9,        /**< Google VP9 */
+    OMX_VIDEO_CodingHEVC,       /**< ITU H.265/HEVC */
     OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ 
     OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     OMX_VIDEO_CodingMax = 0x7FFFFFFF
diff --git a/include/media/openmax/OMX_VideoExt.h b/include/media/openmax/OMX_VideoExt.h
index fa24168..3c97e14 100644
--- a/include/media/openmax/OMX_VideoExt.h
+++ b/include/media/openmax/OMX_VideoExt.h
@@ -108,6 +108,100 @@
     OMX_BOOL bIsGoldenOrAlternateFrame;
 } OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE;
 
+/** Maximum number of VP8 temporal layers */
+#define OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS 3
+
+/** VP8 temporal layer patterns */
+typedef enum OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE {
+    OMX_VIDEO_VPXTemporalLayerPatternNone = 0,
+    OMX_VIDEO_VPXTemporalLayerPatternWebRTC = 1,
+    OMX_VIDEO_VPXTemporalLayerPatternMax = 0x7FFFFFFF
+} OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE;
+
+/**
+ * Android specific VP8 encoder params
+ *
+ * STRUCT MEMBERS:
+ *  nSize                      : Size of the structure in bytes
+ *  nVersion                   : OMX specification version information
+ *  nPortIndex                 : Port that this structure applies to
+ *  nKeyFrameInterval          : Key frame interval in frames
+ *  eTemporalPattern           : Type of temporal layer pattern
+ *  nTemporalLayerCount        : Number of temporal coding layers
+ *  nTemporalLayerBitrateRatio : Bitrate ratio allocation between temporal
+ *                               streams in percentage
+ *  nMinQuantizer              : Minimum (best quality) quantizer
+ *  nMaxQuantizer              : Maximum (worst quality) quantizer
+ */
+typedef struct OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE {
+    OMX_U32 nSize;
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+    OMX_U32 nKeyFrameInterval;
+    OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE eTemporalPattern;
+    OMX_U32 nTemporalLayerCount;
+    OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS];
+    OMX_U32 nMinQuantizer;
+    OMX_U32 nMaxQuantizer;
+} OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE;
+
+/** HEVC Profile enum type */
+typedef enum OMX_VIDEO_HEVCPROFILETYPE {
+    OMX_VIDEO_HEVCProfileUnknown = 0x0,
+    OMX_VIDEO_HEVCProfileMain    = 0x1,
+    OMX_VIDEO_HEVCProfileMain10  = 0x2,
+    OMX_VIDEO_HEVCProfileMax     = 0x7FFFFFFF
+} OMX_VIDEO_HEVCPROFILETYPE;
+
+/** HEVC Level enum type */
+typedef enum OMX_VIDEO_HEVCLEVELTYPE {
+    OMX_VIDEO_HEVCLevelUnknown    = 0x0,
+    OMX_VIDEO_HEVCMainTierLevel1  = 0x1,
+    OMX_VIDEO_HEVCHighTierLevel1  = 0x2,
+    OMX_VIDEO_HEVCMainTierLevel2  = 0x4,
+    OMX_VIDEO_HEVCHighTierLevel2  = 0x8,
+    OMX_VIDEO_HEVCMainTierLevel21 = 0x10,
+    OMX_VIDEO_HEVCHighTierLevel21 = 0x20,
+    OMX_VIDEO_HEVCMainTierLevel3  = 0x40,
+    OMX_VIDEO_HEVCHighTierLevel3  = 0x80,
+    OMX_VIDEO_HEVCMainTierLevel31 = 0x100,
+    OMX_VIDEO_HEVCHighTierLevel31 = 0x200,
+    OMX_VIDEO_HEVCMainTierLevel4  = 0x400,
+    OMX_VIDEO_HEVCHighTierLevel4  = 0x800,
+    OMX_VIDEO_HEVCMainTierLevel41 = 0x1000,
+    OMX_VIDEO_HEVCHighTierLevel41 = 0x2000,
+    OMX_VIDEO_HEVCMainTierLevel5  = 0x4000,
+    OMX_VIDEO_HEVCHighTierLevel5  = 0x8000,
+    OMX_VIDEO_HEVCMainTierLevel51 = 0x10000,
+    OMX_VIDEO_HEVCHighTierLevel51 = 0x20000,
+    OMX_VIDEO_HEVCMainTierLevel52 = 0x40000,
+    OMX_VIDEO_HEVCHighTierLevel52 = 0x80000,
+    OMX_VIDEO_HEVCMainTierLevel6  = 0x100000,
+    OMX_VIDEO_HEVCHighTierLevel6  = 0x200000,
+    OMX_VIDEO_HEVCMainTierLevel61 = 0x400000,
+    OMX_VIDEO_HEVCHighTierLevel61 = 0x800000,
+    OMX_VIDEO_HEVCMainTierLevel62 = 0x1000000,
+    OMX_VIDEO_HEVCHighTierLevel62 = 0x2000000,
+    OMX_VIDEO_HEVCHighTiermax     = 0x7FFFFFFF
+} OMX_VIDEO_HEVCLEVELTYPE;
+
+/** Structure for controlling HEVC video encoding and decoding */
+typedef struct OMX_VIDEO_PARAM_HEVCTYPE {
+    OMX_U32 nSize;
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+    OMX_VIDEO_HEVCPROFILETYPE eProfile;
+    OMX_VIDEO_HEVCLEVELTYPE eLevel;
+} OMX_VIDEO_PARAM_HEVCTYPE;
+
+/** Structure to define if dependent slice segments should be used */
+typedef struct OMX_VIDEO_SLICESEGMENTSTYPE {
+    OMX_U32 nSize;
+    OMX_VERSIONTYPE nVersion;
+    OMX_U32 nPortIndex;
+    OMX_BOOL bDepedentSegments;
+    OMX_BOOL bEnableLoopFilterAcrossSlices;
+} OMX_VIDEO_SLICESEGMENTSTYPE;
 
 #ifdef __cplusplus
 }
diff --git a/include/powermanager/IPowerManager.h b/include/powermanager/IPowerManager.h
index d85003f..511797a 100644
--- a/include/powermanager/IPowerManager.h
+++ b/include/powermanager/IPowerManager.h
@@ -19,6 +19,7 @@
 
 #include <utils/Errors.h>
 #include <binder/IInterface.h>
+#include <hardware/power.h>
 
 namespace android {
 
@@ -36,6 +37,7 @@
             const String16& packageName, int uid) = 0;
     virtual status_t releaseWakeLock(const sp<IBinder>& lock, int flags) = 0;
     virtual status_t updateWakeLockUids(const sp<IBinder>& lock, int len, const int *uids) = 0;
+    virtual status_t powerHint(int hintId, int data) = 0;
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/powermanager/PowerManager.h b/include/powermanager/PowerManager.h
index 4590174..cbddc11 100644
--- a/include/powermanager/PowerManager.h
+++ b/include/powermanager/PowerManager.h
@@ -24,6 +24,14 @@
     POWERMANAGER_PARTIAL_WAKE_LOCK = 1, // equals PowerManager.PARTIAL_WAKE_LOCK constant
 };
 
+enum {
+    USER_ACTIVITY_EVENT_OTHER = 0,
+    USER_ACTIVITY_EVENT_BUTTON = 1,
+    USER_ACTIVITY_EVENT_TOUCH = 2,
+
+    USER_ACTIVITY_EVENT_LAST = USER_ACTIVITY_EVENT_TOUCH, // Last valid event code.
+};
+
 }; // namespace android
 
 #endif // ANDROID_POWERMANAGER_H
diff --git a/include/ui/DisplayInfo.h b/include/ui/DisplayInfo.h
index 2853e06..3b5cd6d 100644
--- a/include/ui/DisplayInfo.h
+++ b/include/ui/DisplayInfo.h
@@ -33,7 +33,6 @@
     float density;
     uint8_t orientation;
     bool secure;
-    uint8_t reserved[2];
 };
 
 /* Display orientations as defined in Surface.java and ISurfaceComposer.h. */
diff --git a/include/ui/FrameStats.h b/include/ui/FrameStats.h
new file mode 100644
index 0000000..5fdf94d
--- /dev/null
+++ b/include/ui/FrameStats.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_UI_FRAME_STATS_H
+#define ANDROID_UI_FRAME_STATS_H
+
+#include <utils/Flattenable.h>
+#include <utils/Timers.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+class FrameStats : public LightFlattenable<FrameStats> {
+public:
+
+    /*
+     * Approximate refresh time, in nanoseconds.
+     */
+    nsecs_t refreshPeriodNano;
+
+   /*
+    * The times in nanoseconds for when the frame contents were posted by the producer (e.g.
+    * the application). They are either explicitly set or defaulted to the time when
+    * Surface::queueBuffer() was called.
+    */
+    Vector<nsecs_t> desiredPresentTimesNano;
+
+   /*
+    * The times in milliseconds for when the frame contents were presented on the screen.
+    */
+    Vector<nsecs_t> actualPresentTimesNano;
+
+   /*
+    * The times in nanoseconds for when the frame contents were ready to be presented. Note that
+    * a frame can be posted and still it contents being rendered asynchronously in GL. In such a
+    * case these are the times when the frame contents were completely rendered (i.e. their fences
+    * signaled).
+    */
+    Vector<nsecs_t> frameReadyTimesNano;
+
+    // LightFlattenable
+    bool isFixedSize() const;
+    size_t getFlattenedSize() const;
+    status_t flatten(void* buffer, size_t size) const;
+    status_t unflatten(void const* buffer, size_t size);
+};
+
+}; // namespace android
+
+#endif // ANDROID_UI_FRAME_STATS_H
diff --git a/include/ui/FramebufferNativeWindow.h b/include/ui/FramebufferNativeWindow.h
index 5ec738f..5cd8101 100644
--- a/include/ui/FramebufferNativeWindow.h
+++ b/include/ui/FramebufferNativeWindow.h
@@ -17,6 +17,8 @@
 #ifndef ANDROID_FRAMEBUFFER_NATIVE_WINDOW_H
 #define ANDROID_FRAMEBUFFER_NATIVE_WINDOW_H
 
+#warning "FramebufferNativeWindow is deprecated"
+
 #include <stdint.h>
 #include <sys/types.h>
 
diff --git a/include/ui/GraphicBuffer.h b/include/ui/GraphicBuffer.h
index b973c40..ddc4635 100644
--- a/include/ui/GraphicBuffer.h
+++ b/include/ui/GraphicBuffer.h
@@ -88,7 +88,8 @@
     uint32_t getUsage() const           { return usage; }
     PixelFormat getPixelFormat() const  { return format; }
     Rect getBounds() const              { return Rect(width, height); }
-    
+    uint64_t getId() const              { return mId; }
+
     status_t reallocate(uint32_t w, uint32_t h, PixelFormat f, uint32_t usage);
 
     status_t lock(uint32_t usage, void** vaddr);
@@ -151,6 +152,8 @@
     // If we're wrapping another buffer then this reference will make sure it
     // doesn't get freed.
     sp<ANativeWindowBuffer> mWrappedBuffer;
+
+    uint64_t mId;
 };
 
 }; // namespace android
diff --git a/include/ui/PixelFormat.h b/include/ui/PixelFormat.h
index 627cfb6..7e46945 100644
--- a/include/ui/PixelFormat.h
+++ b/include/ui/PixelFormat.h
@@ -56,13 +56,15 @@
 
     // real pixel formats supported for rendering -----------------------------
 
-    PIXEL_FORMAT_RGBA_8888   = HAL_PIXEL_FORMAT_RGBA_8888,  // 4x8-bit RGBA
-    PIXEL_FORMAT_RGBX_8888   = HAL_PIXEL_FORMAT_RGBX_8888,  // 4x8-bit RGB0
-    PIXEL_FORMAT_RGB_888     = HAL_PIXEL_FORMAT_RGB_888,    // 3x8-bit RGB
-    PIXEL_FORMAT_RGB_565     = HAL_PIXEL_FORMAT_RGB_565,    // 16-bit RGB
-    PIXEL_FORMAT_BGRA_8888   = HAL_PIXEL_FORMAT_BGRA_8888,  // 4x8-bit BGRA
-    PIXEL_FORMAT_RGBA_5551   = 6,                           // 16-bit ARGB
-    PIXEL_FORMAT_RGBA_4444   = 7,                           // 16-bit ARGB
+    PIXEL_FORMAT_RGBA_8888   = HAL_PIXEL_FORMAT_RGBA_8888,   // 4x8-bit RGBA
+    PIXEL_FORMAT_RGBX_8888   = HAL_PIXEL_FORMAT_RGBX_8888,   // 4x8-bit RGB0
+    PIXEL_FORMAT_RGB_888     = HAL_PIXEL_FORMAT_RGB_888,     // 3x8-bit RGB
+    PIXEL_FORMAT_RGB_565     = HAL_PIXEL_FORMAT_RGB_565,     // 16-bit RGB
+    PIXEL_FORMAT_BGRA_8888   = HAL_PIXEL_FORMAT_BGRA_8888,   // 4x8-bit BGRA
+    PIXEL_FORMAT_RGBA_5551   = 6,                            // 16-bit ARGB
+    PIXEL_FORMAT_RGBA_4444   = 7,                            // 16-bit ARGB
+    PIXEL_FORMAT_sRGB_A_8888 = HAL_PIXEL_FORMAT_sRGB_A_8888, // 4x8-bit sRGB + A
+    PIXEL_FORMAT_sRGB_X_8888 = HAL_PIXEL_FORMAT_sRGB_X_8888, // 4x8-bit sRGB, no A
 };
 
 typedef int32_t PixelFormat;
diff --git a/include/ui/Region.h b/include/ui/Region.h
index d906dbb..0d1c68c 100644
--- a/include/ui/Region.h
+++ b/include/ui/Region.h
@@ -50,6 +50,9 @@
     inline  Rect        getBounds() const   { return mStorage[mStorage.size() - 1]; }
     inline  Rect        bounds() const      { return getBounds(); }
 
+            bool        contains(const Point& point) const;
+            bool        contains(int x, int y) const;
+
             // the region becomes its bounds
             Region&     makeBoundsSelf();
     
diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk
index 6781407..79decfe 100644
--- a/libs/binder/Android.mk
+++ b/libs/binder/Android.mk
@@ -21,6 +21,7 @@
     Debug.cpp \
     IAppOpsCallback.cpp \
     IAppOpsService.cpp \
+    IBatteryStats.cpp \
     IInterface.cpp \
     IMemory.cpp \
     IPCThreadState.cpp \
diff --git a/libs/binder/IBatteryStats.cpp b/libs/binder/IBatteryStats.cpp
new file mode 100644
index 0000000..5702151
--- /dev/null
+++ b/libs/binder/IBatteryStats.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <binder/IBatteryStats.h>
+
+#include <utils/Log.h>
+#include <binder/Parcel.h>
+#include <utils/String8.h>
+
+#include <private/binder/Static.h>
+
+namespace android {
+
+// ----------------------------------------------------------------------
+
+class BpBatteryStats : public BpInterface<IBatteryStats>
+{
+public:
+    BpBatteryStats(const sp<IBinder>& impl)
+        : BpInterface<IBatteryStats>(impl)
+    {
+    }
+
+    virtual void noteStartSensor(int uid, int sensor) {
+        Parcel data, reply;
+        data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
+        data.writeInt32(uid);
+        data.writeInt32(sensor);
+        remote()->transact(NOTE_START_SENSOR_TRANSACTION, data, &reply);
+    }
+
+    virtual void noteStopSensor(int uid, int sensor) {
+        Parcel data, reply;
+        data.writeInterfaceToken(IBatteryStats::getInterfaceDescriptor());
+        data.writeInt32(uid);
+        data.writeInt32(sensor);
+        remote()->transact(NOTE_STOP_SENSOR_TRANSACTION, data, &reply);
+    }
+};
+
+IMPLEMENT_META_INTERFACE(BatteryStats, "com.android.internal.app.IBatteryStats");
+
+// ----------------------------------------------------------------------
+
+status_t BnBatteryStats::onTransact(
+    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
+{
+    switch(code) {
+        case NOTE_START_SENSOR_TRANSACTION: {
+            CHECK_INTERFACE(IBatteryStats, data, reply);
+            int uid = data.readInt32();
+            int sensor = data.readInt32();
+            noteStartSensor(uid, sensor);
+            reply->writeNoException();
+            return NO_ERROR;
+        } break;
+        case NOTE_STOP_SENSOR_TRANSACTION: {
+            CHECK_INTERFACE(IBatteryStats, data, reply);
+            int uid = data.readInt32();
+            int sensor = data.readInt32();
+            noteStopSensor(uid, sensor);
+            reply->writeNoException();
+            return NO_ERROR;
+        } break;
+        default:
+            return BBinder::onTransact(code, data, reply, flags);
+    }
+}
+
+}; // namespace android
diff --git a/libs/binder/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp
index a14c100..8739625 100644
--- a/libs/binder/MemoryDealer.cpp
+++ b/libs/binder/MemoryDealer.cpp
@@ -225,8 +225,8 @@
 
 // ----------------------------------------------------------------------------
 
-MemoryDealer::MemoryDealer(size_t size, const char* name)
-    : mHeap(new MemoryHeapBase(size, 0, name)),
+MemoryDealer::MemoryDealer(size_t size, const char* name, uint32_t flags)
+    : mHeap(new MemoryHeapBase(size, flags, name)),
     mAllocator(new SimpleBestFitAllocator(size))
 {    
 }
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 729cf21..f0d8732 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -781,6 +781,32 @@
     return err;
 }
 
+// WARNING: This method must stay in sync with
+// Parcelable.Creator<ParcelFileDescriptor> CREATOR
+// in frameworks/base/core/java/android/os/ParcelFileDescriptor.java
+status_t Parcel::writeParcelFileDescriptor(int fd, int commChannel) {
+    status_t status;
+
+    if (fd < 0) {
+        status = writeInt32(0); // ParcelFileDescriptor is null
+        if (status) return status;
+    } else {
+        status = writeInt32(1); // ParcelFileDescriptor is not null
+        if (status) return status;
+        status = writeDupFileDescriptor(fd);
+        if (status) return status;
+        if (commChannel < 0) {
+            status = writeInt32(0); // commChannel is null
+            if (status) return status;
+        } else {
+            status = writeInt32(1); // commChannel is not null
+            if (status) return status;
+            status = writeDupFileDescriptor(commChannel);
+        }
+    }
+    return status;
+}
+
 status_t Parcel::writeBlob(size_t len, WritableBlob* outBlob)
 {
     status_t status;
@@ -1198,6 +1224,23 @@
     return BAD_TYPE;
 }
 
+// WARNING: This method must stay in sync with writeToParcel()
+// in frameworks/base/core/java/android/os/ParcelFileDescriptor.java
+int Parcel::readParcelFileDescriptor(int& outCommChannel) const {
+    int fd;
+    outCommChannel = -1;
+
+    if (readInt32() == 0) {
+        fd = -1;
+    } else {
+        fd = readFileDescriptor();
+        if (fd >= 0 && readInt32() != 0) {
+            outCommChannel = readFileDescriptor();
+        }
+    }
+    return fd;
+}
+
 status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
 {
     int32_t useAshmem;
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk
index c14c950..ca94aa3 100644
--- a/libs/gui/Android.mk
+++ b/libs/gui/Android.mk
@@ -5,8 +5,13 @@
 	IGraphicBufferConsumer.cpp \
 	IConsumerListener.cpp \
 	BitTube.cpp \
+	BufferItem.cpp \
 	BufferItemConsumer.cpp \
 	BufferQueue.cpp \
+	BufferQueueConsumer.cpp \
+	BufferQueueCore.cpp \
+	BufferQueueProducer.cpp \
+	BufferSlot.cpp \
 	ConsumerBase.cpp \
 	CpuConsumer.cpp \
 	DisplayEventReceiver.cpp \
@@ -16,6 +21,7 @@
 	IDisplayEventConnection.cpp \
 	IGraphicBufferAlloc.cpp \
 	IGraphicBufferProducer.cpp \
+	IProducerListener.cpp \
 	ISensorEventConnection.cpp \
 	ISensorServer.cpp \
 	ISurfaceComposer.cpp \
@@ -24,6 +30,7 @@
 	Sensor.cpp \
 	SensorEventQueue.cpp \
 	SensorManager.cpp \
+	StreamSplitter.cpp \
 	Surface.cpp \
 	SurfaceControl.cpp \
 	SurfaceComposerClient.cpp \
diff --git a/libs/gui/BufferItem.cpp b/libs/gui/BufferItem.cpp
new file mode 100644
index 0000000..d3fa43e
--- /dev/null
+++ b/libs/gui/BufferItem.cpp
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <gui/BufferItem.h>
+
+#include <ui/Fence.h>
+#include <ui/GraphicBuffer.h>
+
+#include <system/window.h>
+
+namespace android {
+
+BufferItem::BufferItem() :
+    mTransform(0),
+    mScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
+    mTimestamp(0),
+    mIsAutoTimestamp(false),
+    mFrameNumber(0),
+    mSlot(INVALID_BUFFER_SLOT),
+    mIsDroppable(false),
+    mAcquireCalled(false),
+    mTransformToDisplayInverse(false) {
+    mCrop.makeInvalid();
+}
+
+BufferItem::operator IGraphicBufferConsumer::BufferItem() const {
+    IGraphicBufferConsumer::BufferItem bufferItem;
+    bufferItem.mGraphicBuffer = mGraphicBuffer;
+    bufferItem.mFence = mFence;
+    bufferItem.mCrop = mCrop;
+    bufferItem.mTransform = mTransform;
+    bufferItem.mScalingMode = mScalingMode;
+    bufferItem.mTimestamp = mTimestamp;
+    bufferItem.mIsAutoTimestamp = mIsAutoTimestamp;
+    bufferItem.mFrameNumber = mFrameNumber;
+    bufferItem.mBuf = mSlot;
+    bufferItem.mIsDroppable = mIsDroppable;
+    bufferItem.mAcquireCalled = mAcquireCalled;
+    bufferItem.mTransformToDisplayInverse = mTransformToDisplayInverse;
+    return bufferItem;
+}
+
+size_t BufferItem::getPodSize() const {
+    size_t c =  sizeof(mCrop) +
+            sizeof(mTransform) +
+            sizeof(mScalingMode) +
+            sizeof(mTimestamp) +
+            sizeof(mIsAutoTimestamp) +
+            sizeof(mFrameNumber) +
+            sizeof(mSlot) +
+            sizeof(mIsDroppable) +
+            sizeof(mAcquireCalled) +
+            sizeof(mTransformToDisplayInverse);
+    return c;
+}
+
+size_t BufferItem::getFlattenedSize() const {
+    size_t c = 0;
+    if (mGraphicBuffer != 0) {
+        c += mGraphicBuffer->getFlattenedSize();
+        FlattenableUtils::align<4>(c);
+    }
+    if (mFence != 0) {
+        c += mFence->getFlattenedSize();
+        FlattenableUtils::align<4>(c);
+    }
+    return sizeof(int32_t) + c + getPodSize();
+}
+
+size_t BufferItem::getFdCount() const {
+    size_t c = 0;
+    if (mGraphicBuffer != 0) {
+        c += mGraphicBuffer->getFdCount();
+    }
+    if (mFence != 0) {
+        c += mFence->getFdCount();
+    }
+    return c;
+}
+
+status_t BufferItem::flatten(
+        void*& buffer, size_t& size, int*& fds, size_t& count) const {
+
+    // make sure we have enough space
+    if (count < BufferItem::getFlattenedSize()) {
+        return NO_MEMORY;
+    }
+
+    // content flags are stored first
+    uint32_t& flags = *static_cast<uint32_t*>(buffer);
+
+    // advance the pointer
+    FlattenableUtils::advance(buffer, size, sizeof(uint32_t));
+
+    flags = 0;
+    if (mGraphicBuffer != 0) {
+        status_t err = mGraphicBuffer->flatten(buffer, size, fds, count);
+        if (err) return err;
+        size -= FlattenableUtils::align<4>(buffer);
+        flags |= 1;
+    }
+    if (mFence != 0) {
+        status_t err = mFence->flatten(buffer, size, fds, count);
+        if (err) return err;
+        size -= FlattenableUtils::align<4>(buffer);
+        flags |= 2;
+    }
+
+    // check we have enough space (in case flattening the fence/graphicbuffer lied to us)
+    if (size < getPodSize()) {
+        return NO_MEMORY;
+    }
+
+    FlattenableUtils::write(buffer, size, mCrop);
+    FlattenableUtils::write(buffer, size, mTransform);
+    FlattenableUtils::write(buffer, size, mScalingMode);
+    FlattenableUtils::write(buffer, size, mTimestamp);
+    FlattenableUtils::write(buffer, size, mIsAutoTimestamp);
+    FlattenableUtils::write(buffer, size, mFrameNumber);
+    FlattenableUtils::write(buffer, size, mSlot);
+    FlattenableUtils::write(buffer, size, mIsDroppable);
+    FlattenableUtils::write(buffer, size, mAcquireCalled);
+    FlattenableUtils::write(buffer, size, mTransformToDisplayInverse);
+
+    return NO_ERROR;
+}
+
+status_t BufferItem::unflatten(
+        void const*& buffer, size_t& size, int const*& fds, size_t& count) {
+
+    if (size < sizeof(uint32_t))
+        return NO_MEMORY;
+
+    uint32_t flags = 0;
+    FlattenableUtils::read(buffer, size, flags);
+
+    if (flags & 1) {
+        mGraphicBuffer = new GraphicBuffer();
+        status_t err = mGraphicBuffer->unflatten(buffer, size, fds, count);
+        if (err) return err;
+        size -= FlattenableUtils::align<4>(buffer);
+    }
+
+    if (flags & 2) {
+        mFence = new Fence();
+        status_t err = mFence->unflatten(buffer, size, fds, count);
+        if (err) return err;
+        size -= FlattenableUtils::align<4>(buffer);
+    }
+
+    // check we have enough space
+    if (size < getPodSize()) {
+        return NO_MEMORY;
+    }
+
+    FlattenableUtils::read(buffer, size, mCrop);
+    FlattenableUtils::read(buffer, size, mTransform);
+    FlattenableUtils::read(buffer, size, mScalingMode);
+    FlattenableUtils::read(buffer, size, mTimestamp);
+    FlattenableUtils::read(buffer, size, mIsAutoTimestamp);
+    FlattenableUtils::read(buffer, size, mFrameNumber);
+    FlattenableUtils::read(buffer, size, mSlot);
+    FlattenableUtils::read(buffer, size, mIsDroppable);
+    FlattenableUtils::read(buffer, size, mAcquireCalled);
+    FlattenableUtils::read(buffer, size, mTransformToDisplayInverse);
+
+    return NO_ERROR;
+}
+
+const char* BufferItem::scalingModeName(uint32_t scalingMode) {
+    switch (scalingMode) {
+        case NATIVE_WINDOW_SCALING_MODE_FREEZE: return "FREEZE";
+        case NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW: return "SCALE_TO_WINDOW";
+        case NATIVE_WINDOW_SCALING_MODE_SCALE_CROP: return "SCALE_CROP";
+        default: return "Unknown";
+    }
+}
+
+} // namespace android
diff --git a/libs/gui/BufferItemConsumer.cpp b/libs/gui/BufferItemConsumer.cpp
index 350887a..fe50c55 100644
--- a/libs/gui/BufferItemConsumer.cpp
+++ b/libs/gui/BufferItemConsumer.cpp
@@ -29,12 +29,19 @@
 
 namespace android {
 
-BufferItemConsumer::BufferItemConsumer(const sp<BufferQueue>& bq,
-        uint32_t consumerUsage, int bufferCount, bool controlledByApp) :
-    ConsumerBase(bq, controlledByApp)
+BufferItemConsumer::BufferItemConsumer(
+        const sp<IGraphicBufferConsumer>& consumer, uint32_t consumerUsage,
+        int bufferCount, bool controlledByApp) :
+    ConsumerBase(consumer, controlledByApp)
 {
-    mConsumer->setConsumerUsageBits(consumerUsage);
-    mConsumer->setMaxAcquiredBufferCount(bufferCount);
+    status_t err = mConsumer->setConsumerUsageBits(consumerUsage);
+    LOG_ALWAYS_FATAL_IF(err != OK,
+            "Failed to set consumer usage bits to %#x", consumerUsage);
+    if (bufferCount != DEFAULT_MAX_BUFFERS) {
+        err = mConsumer->setMaxAcquiredBufferCount(bufferCount);
+        LOG_ALWAYS_FATAL_IF(err != OK,
+                "Failed to set max acquired buffer count to %d", bufferCount);
+    }
 }
 
 BufferItemConsumer::~BufferItemConsumer() {
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index 2aecb67..c49a886 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -18,1208 +18,13 @@
 #define ATRACE_TAG ATRACE_TAG_GRAPHICS
 //#define LOG_NDEBUG 0
 
-#define GL_GLEXT_PROTOTYPES
-#define EGL_EGLEXT_PROTOTYPES
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
 #include <gui/BufferQueue.h>
-#include <gui/IConsumerListener.h>
-#include <gui/ISurfaceComposer.h>
-#include <private/gui/ComposerService.h>
-
-#include <utils/Log.h>
-#include <utils/Trace.h>
-#include <utils/CallStack.h>
-
-// Macros for including the BufferQueue name in log messages
-#define ST_LOGV(x, ...) ALOGV("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
-#define ST_LOGD(x, ...) ALOGD("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
-#define ST_LOGI(x, ...) ALOGI("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
-#define ST_LOGW(x, ...) ALOGW("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
-#define ST_LOGE(x, ...) ALOGE("[%s] "x, mConsumerName.string(), ##__VA_ARGS__)
-
-#define ATRACE_BUFFER_INDEX(index)                                            \
-    if (ATRACE_ENABLED()) {                                                   \
-        char ___traceBuf[1024];                                               \
-        snprintf(___traceBuf, 1024, "%s: %d", mConsumerName.string(),         \
-                (index));                                                     \
-        android::ScopedTrace ___bufTracer(ATRACE_TAG, ___traceBuf);           \
-    }
+#include <gui/BufferQueueConsumer.h>
+#include <gui/BufferQueueCore.h>
+#include <gui/BufferQueueProducer.h>
 
 namespace android {
 
-// Get an ID that's unique within this process.
-static int32_t createProcessUniqueId() {
-    static volatile int32_t globalCounter = 0;
-    return android_atomic_inc(&globalCounter);
-}
-
-static const char* scalingModeName(int scalingMode) {
-    switch (scalingMode) {
-        case NATIVE_WINDOW_SCALING_MODE_FREEZE: return "FREEZE";
-        case NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW: return "SCALE_TO_WINDOW";
-        case NATIVE_WINDOW_SCALING_MODE_SCALE_CROP: return "SCALE_CROP";
-        default: return "Unknown";
-    }
-}
-
-BufferQueue::BufferQueue(const sp<IGraphicBufferAlloc>& allocator) :
-    mDefaultWidth(1),
-    mDefaultHeight(1),
-    mMaxAcquiredBufferCount(1),
-    mDefaultMaxBufferCount(2),
-    mOverrideMaxBufferCount(0),
-    mConsumerControlledByApp(false),
-    mDequeueBufferCannotBlock(false),
-    mUseAsyncBuffer(true),
-    mConnectedApi(NO_CONNECTED_API),
-    mAbandoned(false),
-    mFrameCounter(0),
-    mBufferHasBeenQueued(false),
-    mDefaultBufferFormat(PIXEL_FORMAT_RGBA_8888),
-    mConsumerUsageBits(0),
-    mTransformHint(0)
-{
-    // Choose a name using the PID and a process-unique ID.
-    mConsumerName = String8::format("unnamed-%d-%d", getpid(), createProcessUniqueId());
-
-    ST_LOGV("BufferQueue");
-    if (allocator == NULL) {
-        sp<ISurfaceComposer> composer(ComposerService::getComposerService());
-        mGraphicBufferAlloc = composer->createGraphicBufferAlloc();
-        if (mGraphicBufferAlloc == 0) {
-            ST_LOGE("createGraphicBufferAlloc() failed in BufferQueue()");
-        }
-    } else {
-        mGraphicBufferAlloc = allocator;
-    }
-}
-
-BufferQueue::~BufferQueue() {
-    ST_LOGV("~BufferQueue");
-}
-
-status_t BufferQueue::setDefaultMaxBufferCountLocked(int count) {
-    const int minBufferCount = mUseAsyncBuffer ? 2 : 1;
-    if (count < minBufferCount || count > NUM_BUFFER_SLOTS)
-        return BAD_VALUE;
-
-    mDefaultMaxBufferCount = count;
-    mDequeueCondition.broadcast();
-
-    return NO_ERROR;
-}
-
-void BufferQueue::setConsumerName(const String8& name) {
-    Mutex::Autolock lock(mMutex);
-    mConsumerName = name;
-}
-
-status_t BufferQueue::setDefaultBufferFormat(uint32_t defaultFormat) {
-    Mutex::Autolock lock(mMutex);
-    mDefaultBufferFormat = defaultFormat;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::setConsumerUsageBits(uint32_t usage) {
-    Mutex::Autolock lock(mMutex);
-    mConsumerUsageBits = usage;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::setTransformHint(uint32_t hint) {
-    ST_LOGV("setTransformHint: %02x", hint);
-    Mutex::Autolock lock(mMutex);
-    mTransformHint = hint;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::setBufferCount(int bufferCount) {
-    ST_LOGV("setBufferCount: count=%d", bufferCount);
-
-    sp<IConsumerListener> listener;
-    {
-        Mutex::Autolock lock(mMutex);
-
-        if (mAbandoned) {
-            ST_LOGE("setBufferCount: BufferQueue has been abandoned!");
-            return NO_INIT;
-        }
-        if (bufferCount > NUM_BUFFER_SLOTS) {
-            ST_LOGE("setBufferCount: bufferCount too large (max %d)",
-                    NUM_BUFFER_SLOTS);
-            return BAD_VALUE;
-        }
-
-        // Error out if the user has dequeued buffers
-        for (int i=0 ; i<NUM_BUFFER_SLOTS; i++) {
-            if (mSlots[i].mBufferState == BufferSlot::DEQUEUED) {
-                ST_LOGE("setBufferCount: client owns some buffers");
-                return -EINVAL;
-            }
-        }
-
-        if (bufferCount == 0) {
-            mOverrideMaxBufferCount = 0;
-            mDequeueCondition.broadcast();
-            return NO_ERROR;
-        }
-
-        // fine to assume async to false before we're setting the buffer count
-        const int minBufferSlots = getMinMaxBufferCountLocked(false);
-        if (bufferCount < minBufferSlots) {
-            ST_LOGE("setBufferCount: requested buffer count (%d) is less than "
-                    "minimum (%d)", bufferCount, minBufferSlots);
-            return BAD_VALUE;
-        }
-
-        // here we're guaranteed that the client doesn't have dequeued buffers
-        // and will release all of its buffer references.  We don't clear the
-        // queue, however, so currently queued buffers still get displayed.
-        freeAllBuffersLocked();
-        mOverrideMaxBufferCount = bufferCount;
-        mDequeueCondition.broadcast();
-        listener = mConsumerListener;
-    } // scope for lock
-
-    if (listener != NULL) {
-        listener->onBuffersReleased();
-    }
-
-    return NO_ERROR;
-}
-
-int BufferQueue::query(int what, int* outValue)
-{
-    ATRACE_CALL();
-    Mutex::Autolock lock(mMutex);
-
-    if (mAbandoned) {
-        ST_LOGE("query: BufferQueue has been abandoned!");
-        return NO_INIT;
-    }
-
-    int value;
-    switch (what) {
-    case NATIVE_WINDOW_WIDTH:
-        value = mDefaultWidth;
-        break;
-    case NATIVE_WINDOW_HEIGHT:
-        value = mDefaultHeight;
-        break;
-    case NATIVE_WINDOW_FORMAT:
-        value = mDefaultBufferFormat;
-        break;
-    case NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS:
-        value = getMinUndequeuedBufferCount(false);
-        break;
-    case NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND:
-        value = (mQueue.size() >= 2);
-        break;
-    case NATIVE_WINDOW_CONSUMER_USAGE_BITS:
-        value = mConsumerUsageBits;
-        break;
-    default:
-        return BAD_VALUE;
-    }
-    outValue[0] = value;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
-    ATRACE_CALL();
-    ST_LOGV("requestBuffer: slot=%d", slot);
-    Mutex::Autolock lock(mMutex);
-    if (mAbandoned) {
-        ST_LOGE("requestBuffer: BufferQueue has been abandoned!");
-        return NO_INIT;
-    }
-    if (slot < 0 || slot >= NUM_BUFFER_SLOTS) {
-        ST_LOGE("requestBuffer: slot index out of range [0, %d]: %d",
-                NUM_BUFFER_SLOTS, slot);
-        return BAD_VALUE;
-    } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) {
-        ST_LOGE("requestBuffer: slot %d is not owned by the client (state=%d)",
-                slot, mSlots[slot].mBufferState);
-        return BAD_VALUE;
-    }
-    mSlots[slot].mRequestBufferCalled = true;
-    *buf = mSlots[slot].mGraphicBuffer;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::dequeueBuffer(int *outBuf, sp<Fence>* outFence, bool async,
-        uint32_t w, uint32_t h, uint32_t format, uint32_t usage) {
-    ATRACE_CALL();
-    ST_LOGV("dequeueBuffer: w=%d h=%d fmt=%#x usage=%#x", w, h, format, usage);
-
-    if ((w && !h) || (!w && h)) {
-        ST_LOGE("dequeueBuffer: invalid size: w=%u, h=%u", w, h);
-        return BAD_VALUE;
-    }
-
-    status_t returnFlags(OK);
-    EGLDisplay dpy = EGL_NO_DISPLAY;
-    EGLSyncKHR eglFence = EGL_NO_SYNC_KHR;
-
-    { // Scope for the lock
-        Mutex::Autolock lock(mMutex);
-
-        if (format == 0) {
-            format = mDefaultBufferFormat;
-        }
-        // turn on usage bits the consumer requested
-        usage |= mConsumerUsageBits;
-
-        int found = -1;
-        bool tryAgain = true;
-        while (tryAgain) {
-            if (mAbandoned) {
-                ST_LOGE("dequeueBuffer: BufferQueue has been abandoned!");
-                return NO_INIT;
-            }
-
-            const int maxBufferCount = getMaxBufferCountLocked(async);
-            if (async && mOverrideMaxBufferCount) {
-                // FIXME: some drivers are manually setting the buffer-count (which they
-                // shouldn't), so we do this extra test here to handle that case.
-                // This is TEMPORARY, until we get this fixed.
-                if (mOverrideMaxBufferCount < maxBufferCount) {
-                    ST_LOGE("dequeueBuffer: async mode is invalid with buffercount override");
-                    return BAD_VALUE;
-                }
-            }
-
-            // Free up any buffers that are in slots beyond the max buffer
-            // count.
-            for (int i = maxBufferCount; i < NUM_BUFFER_SLOTS; i++) {
-                assert(mSlots[i].mBufferState == BufferSlot::FREE);
-                if (mSlots[i].mGraphicBuffer != NULL) {
-                    freeBufferLocked(i);
-                    returnFlags |= IGraphicBufferProducer::RELEASE_ALL_BUFFERS;
-                }
-            }
-
-            // look for a free buffer to give to the client
-            found = INVALID_BUFFER_SLOT;
-            int dequeuedCount = 0;
-            int acquiredCount = 0;
-            for (int i = 0; i < maxBufferCount; i++) {
-                const int state = mSlots[i].mBufferState;
-                switch (state) {
-                    case BufferSlot::DEQUEUED:
-                        dequeuedCount++;
-                        break;
-                    case BufferSlot::ACQUIRED:
-                        acquiredCount++;
-                        break;
-                    case BufferSlot::FREE:
-                        /* We return the oldest of the free buffers to avoid
-                         * stalling the producer if possible.  This is because
-                         * the consumer may still have pending reads of the
-                         * buffers in flight.
-                         */
-                        if ((found < 0) ||
-                                mSlots[i].mFrameNumber < mSlots[found].mFrameNumber) {
-                            found = i;
-                        }
-                        break;
-                }
-            }
-
-            // clients are not allowed to dequeue more than one buffer
-            // if they didn't set a buffer count.
-            if (!mOverrideMaxBufferCount && dequeuedCount) {
-                ST_LOGE("dequeueBuffer: can't dequeue multiple buffers without "
-                        "setting the buffer count");
-                return -EINVAL;
-            }
-
-            // See whether a buffer has been queued since the last
-            // setBufferCount so we know whether to perform the min undequeued
-            // buffers check below.
-            if (mBufferHasBeenQueued) {
-                // make sure the client is not trying to dequeue more buffers
-                // than allowed.
-                const int newUndequeuedCount = maxBufferCount - (dequeuedCount+1);
-                const int minUndequeuedCount = getMinUndequeuedBufferCount(async);
-                if (newUndequeuedCount < minUndequeuedCount) {
-                    ST_LOGE("dequeueBuffer: min undequeued buffer count (%d) "
-                            "exceeded (dequeued=%d undequeudCount=%d)",
-                            minUndequeuedCount, dequeuedCount,
-                            newUndequeuedCount);
-                    return -EBUSY;
-                }
-            }
-
-            // If no buffer is found, wait for a buffer to be released or for
-            // the max buffer count to change.
-            tryAgain = found == INVALID_BUFFER_SLOT;
-            if (tryAgain) {
-                // return an error if we're in "cannot block" mode (producer and consumer
-                // are controlled by the application) -- however, the consumer is allowed
-                // to acquire briefly an extra buffer (which could cause us to have to wait here)
-                // and that's okay because we know the wait will be brief (it happens
-                // if we dequeue a buffer while the consumer has acquired one but not released
-                // the old one yet -- for e.g.: see GLConsumer::updateTexImage()).
-                if (mDequeueBufferCannotBlock && (acquiredCount <= mMaxAcquiredBufferCount)) {
-                    ST_LOGE("dequeueBuffer: would block! returning an error instead.");
-                    return WOULD_BLOCK;
-                }
-                mDequeueCondition.wait(mMutex);
-            }
-        }
-
-
-        if (found == INVALID_BUFFER_SLOT) {
-            // This should not happen.
-            ST_LOGE("dequeueBuffer: no available buffer slots");
-            return -EBUSY;
-        }
-
-        const int buf = found;
-        *outBuf = found;
-
-        ATRACE_BUFFER_INDEX(buf);
-
-        const bool useDefaultSize = !w && !h;
-        if (useDefaultSize) {
-            // use the default size
-            w = mDefaultWidth;
-            h = mDefaultHeight;
-        }
-
-        mSlots[buf].mBufferState = BufferSlot::DEQUEUED;
-
-        const sp<GraphicBuffer>& buffer(mSlots[buf].mGraphicBuffer);
-        if ((buffer == NULL) ||
-            (uint32_t(buffer->width)  != w) ||
-            (uint32_t(buffer->height) != h) ||
-            (uint32_t(buffer->format) != format) ||
-            ((uint32_t(buffer->usage) & usage) != usage))
-        {
-            mSlots[buf].mAcquireCalled = false;
-            mSlots[buf].mGraphicBuffer = NULL;
-            mSlots[buf].mRequestBufferCalled = false;
-            mSlots[buf].mEglFence = EGL_NO_SYNC_KHR;
-            mSlots[buf].mFence = Fence::NO_FENCE;
-            mSlots[buf].mEglDisplay = EGL_NO_DISPLAY;
-
-            returnFlags |= IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION;
-        }
-
-
-        if (CC_UNLIKELY(mSlots[buf].mFence == NULL)) {
-            ST_LOGE("dequeueBuffer: about to return a NULL fence from mSlot. "
-                    "buf=%d, w=%d, h=%d, format=%d",
-                    buf, buffer->width, buffer->height, buffer->format);
-        }
-
-        dpy = mSlots[buf].mEglDisplay;
-        eglFence = mSlots[buf].mEglFence;
-        *outFence = mSlots[buf].mFence;
-        mSlots[buf].mEglFence = EGL_NO_SYNC_KHR;
-        mSlots[buf].mFence = Fence::NO_FENCE;
-    }  // end lock scope
-
-    if (returnFlags & IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION) {
-        status_t error;
-        sp<GraphicBuffer> graphicBuffer(
-                mGraphicBufferAlloc->createGraphicBuffer(w, h, format, usage, &error));
-        if (graphicBuffer == 0) {
-            ST_LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
-            return error;
-        }
-
-        { // Scope for the lock
-            Mutex::Autolock lock(mMutex);
-
-            if (mAbandoned) {
-                ST_LOGE("dequeueBuffer: BufferQueue has been abandoned!");
-                return NO_INIT;
-            }
-
-            mSlots[*outBuf].mFrameNumber = ~0;
-            mSlots[*outBuf].mGraphicBuffer = graphicBuffer;
-        }
-    }
-
-    if (eglFence != EGL_NO_SYNC_KHR) {
-        EGLint result = eglClientWaitSyncKHR(dpy, eglFence, 0, 1000000000);
-        // If something goes wrong, log the error, but return the buffer without
-        // synchronizing access to it.  It's too late at this point to abort the
-        // dequeue operation.
-        if (result == EGL_FALSE) {
-            ST_LOGE("dequeueBuffer: error waiting for fence: %#x", eglGetError());
-        } else if (result == EGL_TIMEOUT_EXPIRED_KHR) {
-            ST_LOGE("dequeueBuffer: timeout waiting for fence");
-        }
-        eglDestroySyncKHR(dpy, eglFence);
-    }
-
-    ST_LOGV("dequeueBuffer: returning slot=%d/%llu buf=%p flags=%#x", *outBuf,
-            mSlots[*outBuf].mFrameNumber,
-            mSlots[*outBuf].mGraphicBuffer->handle, returnFlags);
-
-    return returnFlags;
-}
-
-status_t BufferQueue::queueBuffer(int buf,
-        const QueueBufferInput& input, QueueBufferOutput* output) {
-    ATRACE_CALL();
-    ATRACE_BUFFER_INDEX(buf);
-
-    Rect crop;
-    uint32_t transform;
-    int scalingMode;
-    int64_t timestamp;
-    bool isAutoTimestamp;
-    bool async;
-    sp<Fence> fence;
-
-    input.deflate(&timestamp, &isAutoTimestamp, &crop, &scalingMode, &transform,
-            &async, &fence);
-
-    if (fence == NULL) {
-        ST_LOGE("queueBuffer: fence is NULL");
-        return BAD_VALUE;
-    }
-
-    switch (scalingMode) {
-        case NATIVE_WINDOW_SCALING_MODE_FREEZE:
-        case NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW:
-        case NATIVE_WINDOW_SCALING_MODE_SCALE_CROP:
-        case NATIVE_WINDOW_SCALING_MODE_NO_SCALE_CROP:
-            break;
-        default:
-            ST_LOGE("unknown scaling mode: %d", scalingMode);
-            return -EINVAL;
-    }
-
-    sp<IConsumerListener> listener;
-
-    { // scope for the lock
-        Mutex::Autolock lock(mMutex);
-
-        if (mAbandoned) {
-            ST_LOGE("queueBuffer: BufferQueue has been abandoned!");
-            return NO_INIT;
-        }
-
-        const int maxBufferCount = getMaxBufferCountLocked(async);
-        if (async && mOverrideMaxBufferCount) {
-            // FIXME: some drivers are manually setting the buffer-count (which they
-            // shouldn't), so we do this extra test here to handle that case.
-            // This is TEMPORARY, until we get this fixed.
-            if (mOverrideMaxBufferCount < maxBufferCount) {
-                ST_LOGE("queueBuffer: async mode is invalid with buffercount override");
-                return BAD_VALUE;
-            }
-        }
-        if (buf < 0 || buf >= maxBufferCount) {
-            ST_LOGE("queueBuffer: slot index out of range [0, %d]: %d",
-                    maxBufferCount, buf);
-            return -EINVAL;
-        } else if (mSlots[buf].mBufferState != BufferSlot::DEQUEUED) {
-            ST_LOGE("queueBuffer: slot %d is not owned by the client "
-                    "(state=%d)", buf, mSlots[buf].mBufferState);
-            return -EINVAL;
-        } else if (!mSlots[buf].mRequestBufferCalled) {
-            ST_LOGE("queueBuffer: slot %d was enqueued without requesting a "
-                    "buffer", buf);
-            return -EINVAL;
-        }
-
-        ST_LOGV("queueBuffer: slot=%d/%llu time=%#llx crop=[%d,%d,%d,%d] "
-                "tr=%#x scale=%s",
-                buf, mFrameCounter + 1, timestamp,
-                crop.left, crop.top, crop.right, crop.bottom,
-                transform, scalingModeName(scalingMode));
-
-        const sp<GraphicBuffer>& graphicBuffer(mSlots[buf].mGraphicBuffer);
-        Rect bufferRect(graphicBuffer->getWidth(), graphicBuffer->getHeight());
-        Rect croppedCrop;
-        crop.intersect(bufferRect, &croppedCrop);
-        if (croppedCrop != crop) {
-            ST_LOGE("queueBuffer: crop rect is not contained within the "
-                    "buffer in slot %d", buf);
-            return -EINVAL;
-        }
-
-        mSlots[buf].mFence = fence;
-        mSlots[buf].mBufferState = BufferSlot::QUEUED;
-        mFrameCounter++;
-        mSlots[buf].mFrameNumber = mFrameCounter;
-
-        BufferItem item;
-        item.mAcquireCalled = mSlots[buf].mAcquireCalled;
-        item.mGraphicBuffer = mSlots[buf].mGraphicBuffer;
-        item.mCrop = crop;
-        item.mTransform = transform & ~NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY;
-        item.mTransformToDisplayInverse = bool(transform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY);
-        item.mScalingMode = scalingMode;
-        item.mTimestamp = timestamp;
-        item.mIsAutoTimestamp = isAutoTimestamp;
-        item.mFrameNumber = mFrameCounter;
-        item.mBuf = buf;
-        item.mFence = fence;
-        item.mIsDroppable = mDequeueBufferCannotBlock || async;
-
-        if (mQueue.empty()) {
-            // when the queue is empty, we can ignore "mDequeueBufferCannotBlock", and
-            // simply queue this buffer.
-            mQueue.push_back(item);
-            listener = mConsumerListener;
-        } else {
-            // when the queue is not empty, we need to look at the front buffer
-            // state and see if we need to replace it.
-            Fifo::iterator front(mQueue.begin());
-            if (front->mIsDroppable) {
-                // buffer slot currently queued is marked free if still tracked
-                if (stillTracking(front)) {
-                    mSlots[front->mBuf].mBufferState = BufferSlot::FREE;
-                    // reset the frame number of the freed buffer so that it is the first in
-                    // line to be dequeued again.
-                    mSlots[front->mBuf].mFrameNumber = 0;
-                }
-                // and we record the new buffer in the queued list
-                *front = item;
-            } else {
-                mQueue.push_back(item);
-                listener = mConsumerListener;
-            }
-        }
-
-        mBufferHasBeenQueued = true;
-        mDequeueCondition.broadcast();
-
-        output->inflate(mDefaultWidth, mDefaultHeight, mTransformHint,
-                mQueue.size());
-
-        ATRACE_INT(mConsumerName.string(), mQueue.size());
-    } // scope for the lock
-
-    // call back without lock held
-    if (listener != 0) {
-        listener->onFrameAvailable();
-    }
-    return NO_ERROR;
-}
-
-void BufferQueue::cancelBuffer(int buf, const sp<Fence>& fence) {
-    ATRACE_CALL();
-    ST_LOGV("cancelBuffer: slot=%d", buf);
-    Mutex::Autolock lock(mMutex);
-
-    if (mAbandoned) {
-        ST_LOGW("cancelBuffer: BufferQueue has been abandoned!");
-        return;
-    }
-
-    if (buf < 0 || buf >= NUM_BUFFER_SLOTS) {
-        ST_LOGE("cancelBuffer: slot index out of range [0, %d]: %d",
-                NUM_BUFFER_SLOTS, buf);
-        return;
-    } else if (mSlots[buf].mBufferState != BufferSlot::DEQUEUED) {
-        ST_LOGE("cancelBuffer: slot %d is not owned by the client (state=%d)",
-                buf, mSlots[buf].mBufferState);
-        return;
-    } else if (fence == NULL) {
-        ST_LOGE("cancelBuffer: fence is NULL");
-        return;
-    }
-    mSlots[buf].mBufferState = BufferSlot::FREE;
-    mSlots[buf].mFrameNumber = 0;
-    mSlots[buf].mFence = fence;
-    mDequeueCondition.broadcast();
-}
-
-
-status_t BufferQueue::connect(const sp<IBinder>& token,
-        int api, bool producerControlledByApp, QueueBufferOutput* output) {
-    ATRACE_CALL();
-    ST_LOGV("connect: api=%d producerControlledByApp=%s", api,
-            producerControlledByApp ? "true" : "false");
-    Mutex::Autolock lock(mMutex);
-
-retry:
-    if (mAbandoned) {
-        ST_LOGE("connect: BufferQueue has been abandoned!");
-        return NO_INIT;
-    }
-
-    if (mConsumerListener == NULL) {
-        ST_LOGE("connect: BufferQueue has no consumer!");
-        return NO_INIT;
-    }
-
-    if (mConnectedApi != NO_CONNECTED_API) {
-        ST_LOGE("connect: already connected (cur=%d, req=%d)",
-                mConnectedApi, api);
-        return -EINVAL;
-    }
-
-    // If we disconnect and reconnect quickly, we can be in a state where our slots are
-    // empty but we have many buffers in the queue.  This can cause us to run out of
-    // memory if we outrun the consumer.  Wait here if it looks like we have too many
-    // buffers queued up.
-    int maxBufferCount = getMaxBufferCountLocked(false);    // worst-case, i.e. largest value
-    if (mQueue.size() > (size_t) maxBufferCount) {
-        // TODO: make this bound tighter?
-        ST_LOGV("queue size is %d, waiting", mQueue.size());
-        mDequeueCondition.wait(mMutex);
-        goto retry;
-    }
-
-    int err = NO_ERROR;
-    switch (api) {
-        case NATIVE_WINDOW_API_EGL:
-        case NATIVE_WINDOW_API_CPU:
-        case NATIVE_WINDOW_API_MEDIA:
-        case NATIVE_WINDOW_API_CAMERA:
-            mConnectedApi = api;
-            output->inflate(mDefaultWidth, mDefaultHeight, mTransformHint, mQueue.size());
-
-            // set-up a death notification so that we can disconnect
-            // automatically when/if the remote producer dies.
-            if (token != NULL && token->remoteBinder() != NULL) {
-                status_t err = token->linkToDeath(static_cast<IBinder::DeathRecipient*>(this));
-                if (err == NO_ERROR) {
-                    mConnectedProducerToken = token;
-                } else {
-                    ALOGE("linkToDeath failed: %s (%d)", strerror(-err), err);
-                }
-            }
-            break;
-        default:
-            err = -EINVAL;
-            break;
-    }
-
-    mBufferHasBeenQueued = false;
-    mDequeueBufferCannotBlock = mConsumerControlledByApp && producerControlledByApp;
-
-    return err;
-}
-
-void BufferQueue::binderDied(const wp<IBinder>& who) {
-    // If we're here, it means that a producer we were connected to died.
-    // We're GUARANTEED that we still are connected to it because it has no other way
-    // to get disconnected -- or -- we wouldn't be here because we're removing this
-    // callback upon disconnect. Therefore, it's okay to read mConnectedApi without
-    // synchronization here.
-    int api = mConnectedApi;
-    this->disconnect(api);
-}
-
-status_t BufferQueue::disconnect(int api) {
-    ATRACE_CALL();
-    ST_LOGV("disconnect: api=%d", api);
-
-    int err = NO_ERROR;
-    sp<IConsumerListener> listener;
-
-    { // Scope for the lock
-        Mutex::Autolock lock(mMutex);
-
-        if (mAbandoned) {
-            // it is not really an error to disconnect after the surface
-            // has been abandoned, it should just be a no-op.
-            return NO_ERROR;
-        }
-
-        switch (api) {
-            case NATIVE_WINDOW_API_EGL:
-            case NATIVE_WINDOW_API_CPU:
-            case NATIVE_WINDOW_API_MEDIA:
-            case NATIVE_WINDOW_API_CAMERA:
-                if (mConnectedApi == api) {
-                    freeAllBuffersLocked();
-                    // remove our death notification callback if we have one
-                    sp<IBinder> token = mConnectedProducerToken;
-                    if (token != NULL) {
-                        // this can fail if we're here because of the death notification
-                        // either way, we just ignore.
-                        token->unlinkToDeath(static_cast<IBinder::DeathRecipient*>(this));
-                    }
-                    mConnectedProducerToken = NULL;
-                    mConnectedApi = NO_CONNECTED_API;
-                    mDequeueCondition.broadcast();
-                    listener = mConsumerListener;
-                } else {
-                    ST_LOGE("disconnect: connected to another api (cur=%d, req=%d)",
-                            mConnectedApi, api);
-                    err = -EINVAL;
-                }
-                break;
-            default:
-                ST_LOGE("disconnect: unknown API %d", api);
-                err = -EINVAL;
-                break;
-        }
-    }
-
-    if (listener != NULL) {
-        listener->onBuffersReleased();
-    }
-
-    return err;
-}
-
-void BufferQueue::dump(String8& result, const char* prefix) const {
-    Mutex::Autolock _l(mMutex);
-
-    String8 fifo;
-    int fifoSize = 0;
-    Fifo::const_iterator i(mQueue.begin());
-    while (i != mQueue.end()) {
-        fifo.appendFormat("%02d:%p crop=[%d,%d,%d,%d], "
-                "xform=0x%02x, time=%#llx, scale=%s\n",
-                i->mBuf, i->mGraphicBuffer.get(),
-                i->mCrop.left, i->mCrop.top, i->mCrop.right,
-                i->mCrop.bottom, i->mTransform, i->mTimestamp,
-                scalingModeName(i->mScalingMode)
-                );
-        i++;
-        fifoSize++;
-    }
-
-
-    result.appendFormat(
-            "%s-BufferQueue mMaxAcquiredBufferCount=%d, mDequeueBufferCannotBlock=%d, default-size=[%dx%d], "
-            "default-format=%d, transform-hint=%02x, FIFO(%d)={%s}\n",
-            prefix, mMaxAcquiredBufferCount, mDequeueBufferCannotBlock, mDefaultWidth,
-            mDefaultHeight, mDefaultBufferFormat, mTransformHint,
-            fifoSize, fifo.string());
-
-    struct {
-        const char * operator()(int state) const {
-            switch (state) {
-                case BufferSlot::DEQUEUED: return "DEQUEUED";
-                case BufferSlot::QUEUED: return "QUEUED";
-                case BufferSlot::FREE: return "FREE";
-                case BufferSlot::ACQUIRED: return "ACQUIRED";
-                default: return "Unknown";
-            }
-        }
-    } stateName;
-
-    // just trim the free buffers to not spam the dump
-    int maxBufferCount = 0;
-    for (int i=NUM_BUFFER_SLOTS-1 ; i>=0 ; i--) {
-        const BufferSlot& slot(mSlots[i]);
-        if ((slot.mBufferState != BufferSlot::FREE) || (slot.mGraphicBuffer != NULL)) {
-            maxBufferCount = i+1;
-            break;
-        }
-    }
-
-    for (int i=0 ; i<maxBufferCount ; i++) {
-        const BufferSlot& slot(mSlots[i]);
-        const sp<GraphicBuffer>& buf(slot.mGraphicBuffer);
-        result.appendFormat(
-            "%s%s[%02d:%p] state=%-8s",
-                prefix, (slot.mBufferState == BufferSlot::ACQUIRED)?">":" ", i, buf.get(),
-                stateName(slot.mBufferState)
-        );
-
-        if (buf != NULL) {
-            result.appendFormat(
-                    ", %p [%4ux%4u:%4u,%3X]",
-                    buf->handle, buf->width, buf->height, buf->stride,
-                    buf->format);
-        }
-        result.append("\n");
-    }
-}
-
-void BufferQueue::freeBufferLocked(int slot) {
-    ST_LOGV("freeBufferLocked: slot=%d", slot);
-    mSlots[slot].mGraphicBuffer = 0;
-    if (mSlots[slot].mBufferState == BufferSlot::ACQUIRED) {
-        mSlots[slot].mNeedsCleanupOnRelease = true;
-    }
-    mSlots[slot].mBufferState = BufferSlot::FREE;
-    mSlots[slot].mFrameNumber = 0;
-    mSlots[slot].mAcquireCalled = false;
-
-    // destroy fence as BufferQueue now takes ownership
-    if (mSlots[slot].mEglFence != EGL_NO_SYNC_KHR) {
-        eglDestroySyncKHR(mSlots[slot].mEglDisplay, mSlots[slot].mEglFence);
-        mSlots[slot].mEglFence = EGL_NO_SYNC_KHR;
-    }
-    mSlots[slot].mFence = Fence::NO_FENCE;
-}
-
-void BufferQueue::freeAllBuffersLocked() {
-    mBufferHasBeenQueued = false;
-    for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
-        freeBufferLocked(i);
-    }
-}
-
-status_t BufferQueue::acquireBuffer(BufferItem *buffer, nsecs_t expectedPresent) {
-    ATRACE_CALL();
-    Mutex::Autolock _l(mMutex);
-
-    // Check that the consumer doesn't currently have the maximum number of
-    // buffers acquired.  We allow the max buffer count to be exceeded by one
-    // buffer, so that the consumer can successfully set up the newly acquired
-    // buffer before releasing the old one.
-    int numAcquiredBuffers = 0;
-    for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
-        if (mSlots[i].mBufferState == BufferSlot::ACQUIRED) {
-            numAcquiredBuffers++;
-        }
-    }
-    if (numAcquiredBuffers >= mMaxAcquiredBufferCount+1) {
-        ST_LOGE("acquireBuffer: max acquired buffer count reached: %d (max=%d)",
-                numAcquiredBuffers, mMaxAcquiredBufferCount);
-        return INVALID_OPERATION;
-    }
-
-    // check if queue is empty
-    // In asynchronous mode the list is guaranteed to be one buffer
-    // deep, while in synchronous mode we use the oldest buffer.
-    if (mQueue.empty()) {
-        return NO_BUFFER_AVAILABLE;
-    }
-
-    Fifo::iterator front(mQueue.begin());
-
-    // If expectedPresent is specified, we may not want to return a buffer yet.
-    // If it's specified and there's more than one buffer queued, we may
-    // want to drop a buffer.
-    if (expectedPresent != 0) {
-        const int MAX_REASONABLE_NSEC = 1000000000ULL;  // 1 second
-
-        // The "expectedPresent" argument indicates when the buffer is expected
-        // to be presented on-screen.  If the buffer's desired-present time
-        // is earlier (less) than expectedPresent, meaning it'll be displayed
-        // on time or possibly late if we show it ASAP, we acquire and return
-        // it.  If we don't want to display it until after the expectedPresent
-        // time, we return PRESENT_LATER without acquiring it.
-        //
-        // To be safe, we don't defer acquisition if expectedPresent is
-        // more than one second in the future beyond the desired present time
-        // (i.e. we'd be holding the buffer for a long time).
-        //
-        // NOTE: code assumes monotonic time values from the system clock are
-        // positive.
-
-        // Start by checking to see if we can drop frames.  We skip this check
-        // if the timestamps are being auto-generated by Surface -- if the
-        // app isn't generating timestamps explicitly, they probably don't
-        // want frames to be discarded based on them.
-        while (mQueue.size() > 1 && !mQueue[0].mIsAutoTimestamp) {
-            // If entry[1] is timely, drop entry[0] (and repeat).  We apply
-            // an additional criteria here: we only drop the earlier buffer if
-            // our desiredPresent falls within +/- 1 second of the expected
-            // present.  Otherwise, bogus desiredPresent times (e.g. 0 or
-            // a small relative timestamp), which normally mean "ignore the
-            // timestamp and acquire immediately", would cause us to drop
-            // frames.
-            //
-            // We may want to add an additional criteria: don't drop the
-            // earlier buffer if entry[1]'s fence hasn't signaled yet.
-            //
-            // (Vector front is [0], back is [size()-1])
-            const BufferItem& bi(mQueue[1]);
-            nsecs_t desiredPresent = bi.mTimestamp;
-            if (desiredPresent < expectedPresent - MAX_REASONABLE_NSEC ||
-                    desiredPresent > expectedPresent) {
-                // This buffer is set to display in the near future, or
-                // desiredPresent is garbage.  Either way we don't want to
-                // drop the previous buffer just to get this on screen sooner.
-                ST_LOGV("pts nodrop: des=%lld expect=%lld (%lld) now=%lld",
-                        desiredPresent, expectedPresent, desiredPresent - expectedPresent,
-                        systemTime(CLOCK_MONOTONIC));
-                break;
-            }
-            ST_LOGV("pts drop: queue1des=%lld expect=%lld size=%d",
-                    desiredPresent, expectedPresent, mQueue.size());
-            if (stillTracking(front)) {
-                // front buffer is still in mSlots, so mark the slot as free
-                mSlots[front->mBuf].mBufferState = BufferSlot::FREE;
-            }
-            mQueue.erase(front);
-            front = mQueue.begin();
-        }
-
-        // See if the front buffer is due.
-        nsecs_t desiredPresent = front->mTimestamp;
-        if (desiredPresent > expectedPresent &&
-                desiredPresent < expectedPresent + MAX_REASONABLE_NSEC) {
-            ST_LOGV("pts defer: des=%lld expect=%lld (%lld) now=%lld",
-                    desiredPresent, expectedPresent, desiredPresent - expectedPresent,
-                    systemTime(CLOCK_MONOTONIC));
-            return PRESENT_LATER;
-        }
-
-        ST_LOGV("pts accept: des=%lld expect=%lld (%lld) now=%lld",
-                desiredPresent, expectedPresent, desiredPresent - expectedPresent,
-                systemTime(CLOCK_MONOTONIC));
-    }
-
-    int buf = front->mBuf;
-    *buffer = *front;
-    ATRACE_BUFFER_INDEX(buf);
-
-    ST_LOGV("acquireBuffer: acquiring { slot=%d/%llu, buffer=%p }",
-            front->mBuf, front->mFrameNumber,
-            front->mGraphicBuffer->handle);
-    // if front buffer still being tracked update slot state
-    if (stillTracking(front)) {
-        mSlots[buf].mAcquireCalled = true;
-        mSlots[buf].mNeedsCleanupOnRelease = false;
-        mSlots[buf].mBufferState = BufferSlot::ACQUIRED;
-        mSlots[buf].mFence = Fence::NO_FENCE;
-    }
-
-    // If the buffer has previously been acquired by the consumer, set
-    // mGraphicBuffer to NULL to avoid unnecessarily remapping this
-    // buffer on the consumer side.
-    if (buffer->mAcquireCalled) {
-        buffer->mGraphicBuffer = NULL;
-    }
-
-    mQueue.erase(front);
-    mDequeueCondition.broadcast();
-
-    ATRACE_INT(mConsumerName.string(), mQueue.size());
-
-    return NO_ERROR;
-}
-
-status_t BufferQueue::releaseBuffer(
-        int buf, uint64_t frameNumber, EGLDisplay display,
-        EGLSyncKHR eglFence, const sp<Fence>& fence) {
-    ATRACE_CALL();
-    ATRACE_BUFFER_INDEX(buf);
-
-    if (buf == INVALID_BUFFER_SLOT || fence == NULL) {
-        return BAD_VALUE;
-    }
-
-    Mutex::Autolock _l(mMutex);
-
-    // If the frame number has changed because buffer has been reallocated,
-    // we can ignore this releaseBuffer for the old buffer.
-    if (frameNumber != mSlots[buf].mFrameNumber) {
-        return STALE_BUFFER_SLOT;
-    }
-
-
-    // Internal state consistency checks:
-    // Make sure this buffers hasn't been queued while we were owning it (acquired)
-    Fifo::iterator front(mQueue.begin());
-    Fifo::const_iterator const end(mQueue.end());
-    while (front != end) {
-        if (front->mBuf == buf) {
-            LOG_ALWAYS_FATAL("[%s] received new buffer(#%lld) on slot #%d that has not yet been "
-                    "acquired", mConsumerName.string(), frameNumber, buf);
-            break; // never reached
-        }
-        front++;
-    }
-
-    // The buffer can now only be released if its in the acquired state
-    if (mSlots[buf].mBufferState == BufferSlot::ACQUIRED) {
-        mSlots[buf].mEglDisplay = display;
-        mSlots[buf].mEglFence = eglFence;
-        mSlots[buf].mFence = fence;
-        mSlots[buf].mBufferState = BufferSlot::FREE;
-    } else if (mSlots[buf].mNeedsCleanupOnRelease) {
-        ST_LOGV("releasing a stale buf %d its state was %d", buf, mSlots[buf].mBufferState);
-        mSlots[buf].mNeedsCleanupOnRelease = false;
-        return STALE_BUFFER_SLOT;
-    } else {
-        ST_LOGE("attempted to release buf %d but its state was %d", buf, mSlots[buf].mBufferState);
-        return -EINVAL;
-    }
-
-    mDequeueCondition.broadcast();
-    return NO_ERROR;
-}
-
-status_t BufferQueue::consumerConnect(const sp<IConsumerListener>& consumerListener,
-        bool controlledByApp) {
-    ST_LOGV("consumerConnect controlledByApp=%s",
-            controlledByApp ? "true" : "false");
-    Mutex::Autolock lock(mMutex);
-
-    if (mAbandoned) {
-        ST_LOGE("consumerConnect: BufferQueue has been abandoned!");
-        return NO_INIT;
-    }
-    if (consumerListener == NULL) {
-        ST_LOGE("consumerConnect: consumerListener may not be NULL");
-        return BAD_VALUE;
-    }
-
-    mConsumerListener = consumerListener;
-    mConsumerControlledByApp = controlledByApp;
-
-    return NO_ERROR;
-}
-
-status_t BufferQueue::consumerDisconnect() {
-    ST_LOGV("consumerDisconnect");
-    Mutex::Autolock lock(mMutex);
-
-    if (mConsumerListener == NULL) {
-        ST_LOGE("consumerDisconnect: No consumer is connected!");
-        return -EINVAL;
-    }
-
-    mAbandoned = true;
-    mConsumerListener = NULL;
-    mQueue.clear();
-    freeAllBuffersLocked();
-    mDequeueCondition.broadcast();
-    return NO_ERROR;
-}
-
-status_t BufferQueue::getReleasedBuffers(uint32_t* slotMask) {
-    ST_LOGV("getReleasedBuffers");
-    Mutex::Autolock lock(mMutex);
-
-    if (mAbandoned) {
-        ST_LOGE("getReleasedBuffers: BufferQueue has been abandoned!");
-        return NO_INIT;
-    }
-
-    uint32_t mask = 0;
-    for (int i = 0; i < NUM_BUFFER_SLOTS; i++) {
-        if (!mSlots[i].mAcquireCalled) {
-            mask |= 1 << i;
-        }
-    }
-
-    // Remove buffers in flight (on the queue) from the mask where acquire has
-    // been called, as the consumer will not receive the buffer address, so
-    // it should not free these slots.
-    Fifo::iterator front(mQueue.begin());
-    while (front != mQueue.end()) {
-        if (front->mAcquireCalled)
-            mask &= ~(1 << front->mBuf);
-        front++;
-    }
-
-    *slotMask = mask;
-
-    ST_LOGV("getReleasedBuffers: returning mask %#x", mask);
-    return NO_ERROR;
-}
-
-status_t BufferQueue::setDefaultBufferSize(uint32_t w, uint32_t h) {
-    ST_LOGV("setDefaultBufferSize: w=%d, h=%d", w, h);
-    if (!w || !h) {
-        ST_LOGE("setDefaultBufferSize: dimensions cannot be 0 (w=%d, h=%d)",
-                w, h);
-        return BAD_VALUE;
-    }
-
-    Mutex::Autolock lock(mMutex);
-    mDefaultWidth = w;
-    mDefaultHeight = h;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::setDefaultMaxBufferCount(int bufferCount) {
-    ATRACE_CALL();
-    Mutex::Autolock lock(mMutex);
-    return setDefaultMaxBufferCountLocked(bufferCount);
-}
-
-status_t BufferQueue::disableAsyncBuffer() {
-    ATRACE_CALL();
-    Mutex::Autolock lock(mMutex);
-    if (mConsumerListener != NULL) {
-        ST_LOGE("disableAsyncBuffer: consumer already connected!");
-        return INVALID_OPERATION;
-    }
-    mUseAsyncBuffer = false;
-    return NO_ERROR;
-}
-
-status_t BufferQueue::setMaxAcquiredBufferCount(int maxAcquiredBuffers) {
-    ATRACE_CALL();
-    Mutex::Autolock lock(mMutex);
-    if (maxAcquiredBuffers < 1 || maxAcquiredBuffers > MAX_MAX_ACQUIRED_BUFFERS) {
-        ST_LOGE("setMaxAcquiredBufferCount: invalid count specified: %d",
-                maxAcquiredBuffers);
-        return BAD_VALUE;
-    }
-    if (mConnectedApi != NO_CONNECTED_API) {
-        return INVALID_OPERATION;
-    }
-    mMaxAcquiredBufferCount = maxAcquiredBuffers;
-    return NO_ERROR;
-}
-
-int BufferQueue::getMinUndequeuedBufferCount(bool async) const {
-    // if dequeueBuffer is allowed to error out, we don't have to
-    // add an extra buffer.
-    if (!mUseAsyncBuffer)
-        return mMaxAcquiredBufferCount;
-
-    // we're in async mode, or we want to prevent the app to
-    // deadlock itself, we throw-in an extra buffer to guarantee it.
-    if (mDequeueBufferCannotBlock || async)
-        return mMaxAcquiredBufferCount+1;
-
-    return mMaxAcquiredBufferCount;
-}
-
-int BufferQueue::getMinMaxBufferCountLocked(bool async) const {
-    return getMinUndequeuedBufferCount(async) + 1;
-}
-
-int BufferQueue::getMaxBufferCountLocked(bool async) const {
-    int minMaxBufferCount = getMinMaxBufferCountLocked(async);
-
-    int maxBufferCount = mDefaultMaxBufferCount;
-    if (maxBufferCount < minMaxBufferCount) {
-        maxBufferCount = minMaxBufferCount;
-    }
-    if (mOverrideMaxBufferCount != 0) {
-        assert(mOverrideMaxBufferCount >= minMaxBufferCount);
-        maxBufferCount = mOverrideMaxBufferCount;
-    }
-
-    // Any buffers that are dequeued by the producer or sitting in the queue
-    // waiting to be consumed need to have their slots preserved.  Such
-    // buffers will temporarily keep the max buffer count up until the slots
-    // no longer need to be preserved.
-    for (int i = maxBufferCount; i < NUM_BUFFER_SLOTS; i++) {
-        BufferSlot::BufferState state = mSlots[i].mBufferState;
-        if (state == BufferSlot::QUEUED || state == BufferSlot::DEQUEUED) {
-            maxBufferCount = i + 1;
-        }
-    }
-
-    return maxBufferCount;
-}
-
-bool BufferQueue::stillTracking(const BufferItem *item) const {
-    const BufferSlot &slot = mSlots[item->mBuf];
-
-    ST_LOGV("stillTracking?: item: { slot=%d/%llu, buffer=%p }, "
-            "slot: { slot=%d/%llu, buffer=%p }",
-            item->mBuf, item->mFrameNumber,
-            (item->mGraphicBuffer.get() ? item->mGraphicBuffer->handle : 0),
-            item->mBuf, slot.mFrameNumber,
-            (slot.mGraphicBuffer.get() ? slot.mGraphicBuffer->handle : 0));
-
-    // Compare item with its original buffer slot.  We can check the slot
-    // as the buffer would not be moved to a different slot by the producer.
-    return (slot.mGraphicBuffer != NULL &&
-            item->mGraphicBuffer->handle == slot.mGraphicBuffer->handle);
-}
-
 BufferQueue::ProxyConsumerListener::ProxyConsumerListener(
         const wp<ConsumerListener>& consumerListener):
         mConsumerListener(consumerListener) {}
@@ -1240,4 +45,35 @@
     }
 }
 
+void BufferQueue::ProxyConsumerListener::onSidebandStreamChanged() {
+    sp<ConsumerListener> listener(mConsumerListener.promote());
+    if (listener != NULL) {
+        listener->onSidebandStreamChanged();
+    }
+}
+
+void BufferQueue::createBufferQueue(sp<IGraphicBufferProducer>* outProducer,
+        sp<IGraphicBufferConsumer>* outConsumer,
+        const sp<IGraphicBufferAlloc>& allocator) {
+    LOG_ALWAYS_FATAL_IF(outProducer == NULL,
+            "BufferQueue: outProducer must not be NULL");
+    LOG_ALWAYS_FATAL_IF(outConsumer == NULL,
+            "BufferQueue: outConsumer must not be NULL");
+
+    sp<BufferQueueCore> core(new BufferQueueCore(allocator));
+    LOG_ALWAYS_FATAL_IF(core == NULL,
+            "BufferQueue: failed to create BufferQueueCore");
+
+    sp<IGraphicBufferProducer> producer(new BufferQueueProducer(core));
+    LOG_ALWAYS_FATAL_IF(producer == NULL,
+            "BufferQueue: failed to create BufferQueueProducer");
+
+    sp<IGraphicBufferConsumer> consumer(new BufferQueueConsumer(core));
+    LOG_ALWAYS_FATAL_IF(consumer == NULL,
+            "BufferQueue: failed to create BufferQueueConsumer");
+
+    *outProducer = producer;
+    *outConsumer = consumer;
+}
+
 }; // namespace android
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp
new file mode 100644
index 0000000..36e3c06
--- /dev/null
+++ b/libs/gui/BufferQueueConsumer.cpp
@@ -0,0 +1,523 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <inttypes.h>
+
+#define LOG_TAG "BufferQueueConsumer"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+//#define LOG_NDEBUG 0
+
+#include <gui/BufferItem.h>
+#include <gui/BufferQueueConsumer.h>
+#include <gui/BufferQueueCore.h>
+#include <gui/IConsumerListener.h>
+#include <gui/IProducerListener.h>
+
+namespace android {
+
+BufferQueueConsumer::BufferQueueConsumer(const sp<BufferQueueCore>& core) :
+    mCore(core),
+    mSlots(core->mSlots),
+    mConsumerName() {}
+
+BufferQueueConsumer::~BufferQueueConsumer() {}
+
+status_t BufferQueueConsumer::acquireBuffer(BufferItem* outBuffer,
+        nsecs_t expectedPresent) {
+    ATRACE_CALL();
+    Mutex::Autolock lock(mCore->mMutex);
+
+    // Check that the consumer doesn't currently have the maximum number of
+    // buffers acquired. We allow the max buffer count to be exceeded by one
+    // buffer so that the consumer can successfully set up the newly acquired
+    // buffer before releasing the old one.
+    int numAcquiredBuffers = 0;
+    for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+        if (mSlots[s].mBufferState == BufferSlot::ACQUIRED) {
+            ++numAcquiredBuffers;
+        }
+    }
+    if (numAcquiredBuffers >= mCore->mMaxAcquiredBufferCount + 1) {
+        BQ_LOGE("acquireBuffer: max acquired buffer count reached: %d (max %d)",
+                numAcquiredBuffers, mCore->mMaxAcquiredBufferCount);
+        return INVALID_OPERATION;
+    }
+
+    // Check if the queue is empty.
+    // In asynchronous mode the list is guaranteed to be one buffer deep,
+    // while in synchronous mode we use the oldest buffer.
+    if (mCore->mQueue.empty()) {
+        return NO_BUFFER_AVAILABLE;
+    }
+
+    BufferQueueCore::Fifo::iterator front(mCore->mQueue.begin());
+
+    // If expectedPresent is specified, we may not want to return a buffer yet.
+    // If it's specified and there's more than one buffer queued, we may want
+    // to drop a buffer.
+    if (expectedPresent != 0) {
+        const int MAX_REASONABLE_NSEC = 1000000000ULL; // 1 second
+
+        // The 'expectedPresent' argument indicates when the buffer is expected
+        // to be presented on-screen. If the buffer's desired present time is
+        // earlier (less) than expectedPresent -- meaning it will be displayed
+        // on time or possibly late if we show it as soon as possible -- we
+        // acquire and return it. If we don't want to display it until after the
+        // expectedPresent time, we return PRESENT_LATER without acquiring it.
+        //
+        // To be safe, we don't defer acquisition if expectedPresent is more
+        // than one second in the future beyond the desired present time
+        // (i.e., we'd be holding the buffer for a long time).
+        //
+        // NOTE: Code assumes monotonic time values from the system clock
+        // are positive.
+
+        // Start by checking to see if we can drop frames. We skip this check if
+        // the timestamps are being auto-generated by Surface. If the app isn't
+        // generating timestamps explicitly, it probably doesn't want frames to
+        // be discarded based on them.
+        while (mCore->mQueue.size() > 1 && !mCore->mQueue[0].mIsAutoTimestamp) {
+            // If entry[1] is timely, drop entry[0] (and repeat). We apply an
+            // additional criterion here: we only drop the earlier buffer if our
+            // desiredPresent falls within +/- 1 second of the expected present.
+            // Otherwise, bogus desiredPresent times (e.g., 0 or a small
+            // relative timestamp), which normally mean "ignore the timestamp
+            // and acquire immediately", would cause us to drop frames.
+            //
+            // We may want to add an additional criterion: don't drop the
+            // earlier buffer if entry[1]'s fence hasn't signaled yet.
+            const BufferItem& bufferItem(mCore->mQueue[1]);
+            nsecs_t desiredPresent = bufferItem.mTimestamp;
+            if (desiredPresent < expectedPresent - MAX_REASONABLE_NSEC ||
+                    desiredPresent > expectedPresent) {
+                // This buffer is set to display in the near future, or
+                // desiredPresent is garbage. Either way we don't want to drop
+                // the previous buffer just to get this on the screen sooner.
+                BQ_LOGV("acquireBuffer: nodrop desire=%" PRId64 " expect=%"
+                        PRId64 " (%" PRId64 ") now=%" PRId64,
+                        desiredPresent, expectedPresent,
+                        desiredPresent - expectedPresent,
+                        systemTime(CLOCK_MONOTONIC));
+                break;
+            }
+
+            BQ_LOGV("acquireBuffer: drop desire=%" PRId64 " expect=%" PRId64
+                    " size=%zu",
+                    desiredPresent, expectedPresent, mCore->mQueue.size());
+            if (mCore->stillTracking(front)) {
+                // Front buffer is still in mSlots, so mark the slot as free
+                mSlots[front->mSlot].mBufferState = BufferSlot::FREE;
+            }
+            mCore->mQueue.erase(front);
+            front = mCore->mQueue.begin();
+        }
+
+        // See if the front buffer is due
+        nsecs_t desiredPresent = front->mTimestamp;
+        if (desiredPresent > expectedPresent &&
+                desiredPresent < expectedPresent + MAX_REASONABLE_NSEC) {
+            BQ_LOGV("acquireBuffer: defer desire=%" PRId64 " expect=%" PRId64
+                    " (%" PRId64 ") now=%" PRId64,
+                    desiredPresent, expectedPresent,
+                    desiredPresent - expectedPresent,
+                    systemTime(CLOCK_MONOTONIC));
+            return PRESENT_LATER;
+        }
+
+        BQ_LOGV("acquireBuffer: accept desire=%" PRId64 " expect=%" PRId64 " "
+                "(%" PRId64 ") now=%" PRId64, desiredPresent, expectedPresent,
+                desiredPresent - expectedPresent,
+                systemTime(CLOCK_MONOTONIC));
+    }
+
+    int slot = front->mSlot;
+    *outBuffer = *front;
+    ATRACE_BUFFER_INDEX(slot);
+
+    BQ_LOGV("acquireBuffer: acquiring { slot=%d/%" PRIu64 " buffer=%p }",
+            slot, front->mFrameNumber, front->mGraphicBuffer->handle);
+    // If the front buffer is still being tracked, update its slot state
+    if (mCore->stillTracking(front)) {
+        mSlots[slot].mAcquireCalled = true;
+        mSlots[slot].mNeedsCleanupOnRelease = false;
+        mSlots[slot].mBufferState = BufferSlot::ACQUIRED;
+        mSlots[slot].mFence = Fence::NO_FENCE;
+    }
+
+    // If the buffer has previously been acquired by the consumer, set
+    // mGraphicBuffer to NULL to avoid unnecessarily remapping this buffer
+    // on the consumer side
+    if (outBuffer->mAcquireCalled) {
+        outBuffer->mGraphicBuffer = NULL;
+    }
+
+    mCore->mQueue.erase(front);
+
+    // We might have freed a slot while dropping old buffers, or the producer
+    // may be blocked waiting for the number of buffers in the queue to
+    // decrease.
+    mCore->mDequeueCondition.broadcast();
+
+    ATRACE_INT(mCore->mConsumerName.string(), mCore->mQueue.size());
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::detachBuffer(int slot) {
+    ATRACE_CALL();
+    ATRACE_BUFFER_INDEX(slot);
+    BQ_LOGV("detachBuffer(C): slot %d", slot);
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("detachBuffer(C): BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
+        BQ_LOGE("detachBuffer(C): slot index %d out of range [0, %d)",
+                slot, BufferQueueDefs::NUM_BUFFER_SLOTS);
+        return BAD_VALUE;
+    } else if (mSlots[slot].mBufferState != BufferSlot::ACQUIRED) {
+        BQ_LOGE("detachBuffer(C): slot %d is not owned by the consumer "
+                "(state = %d)", slot, mSlots[slot].mBufferState);
+        return BAD_VALUE;
+    }
+
+    mCore->freeBufferLocked(slot);
+    mCore->mDequeueCondition.broadcast();
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::attachBuffer(int* outSlot,
+        const sp<android::GraphicBuffer>& buffer) {
+    ATRACE_CALL();
+
+    if (outSlot == NULL) {
+        BQ_LOGE("attachBuffer(P): outSlot must not be NULL");
+        return BAD_VALUE;
+    } else if (buffer == NULL) {
+        BQ_LOGE("attachBuffer(P): cannot attach NULL buffer");
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    // Make sure we don't have too many acquired buffers and find a free slot
+    // to put the buffer into (the oldest if there are multiple).
+    int numAcquiredBuffers = 0;
+    int found = BufferQueueCore::INVALID_BUFFER_SLOT;
+    for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+        if (mSlots[s].mBufferState == BufferSlot::ACQUIRED) {
+            ++numAcquiredBuffers;
+        } else if (mSlots[s].mBufferState == BufferSlot::FREE) {
+            if (found == BufferQueueCore::INVALID_BUFFER_SLOT ||
+                    mSlots[s].mFrameNumber < mSlots[found].mFrameNumber) {
+                found = s;
+            }
+        }
+    }
+
+    if (numAcquiredBuffers >= mCore->mMaxAcquiredBufferCount + 1) {
+        BQ_LOGE("attachBuffer(P): max acquired buffer count reached: %d "
+                "(max %d)", numAcquiredBuffers,
+                mCore->mMaxAcquiredBufferCount);
+        return INVALID_OPERATION;
+    }
+    if (found == BufferQueueCore::INVALID_BUFFER_SLOT) {
+        BQ_LOGE("attachBuffer(P): could not find free buffer slot");
+        return NO_MEMORY;
+    }
+
+    *outSlot = found;
+    ATRACE_BUFFER_INDEX(*outSlot);
+    BQ_LOGV("attachBuffer(C): returning slot %d", *outSlot);
+
+    mSlots[*outSlot].mGraphicBuffer = buffer;
+    mSlots[*outSlot].mBufferState = BufferSlot::ACQUIRED;
+    mSlots[*outSlot].mAttachedByConsumer = true;
+    mSlots[*outSlot].mNeedsCleanupOnRelease = false;
+    mSlots[*outSlot].mFence = Fence::NO_FENCE;
+    mSlots[*outSlot].mFrameNumber = 0;
+
+    // mAcquireCalled tells BufferQueue that it doesn't need to send a valid
+    // GraphicBuffer pointer on the next acquireBuffer call, which decreases
+    // Binder traffic by not un/flattening the GraphicBuffer. However, it
+    // requires that the consumer maintain a cached copy of the slot <--> buffer
+    // mappings, which is why the consumer doesn't need the valid pointer on
+    // acquire.
+    //
+    // The StreamSplitter is one of the primary users of the attach/detach
+    // logic, and while it is running, all buffers it acquires are immediately
+    // detached, and all buffers it eventually releases are ones that were
+    // attached (as opposed to having been obtained from acquireBuffer), so it
+    // doesn't make sense to maintain the slot/buffer mappings, which would
+    // become invalid for every buffer during detach/attach. By setting this to
+    // false, the valid GraphicBuffer pointer will always be sent with acquire
+    // for attached buffers.
+    mSlots[*outSlot].mAcquireCalled = false;
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::releaseBuffer(int slot, uint64_t frameNumber,
+        const sp<Fence>& releaseFence, EGLDisplay eglDisplay,
+        EGLSyncKHR eglFence) {
+    ATRACE_CALL();
+    ATRACE_BUFFER_INDEX(slot);
+
+    if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS ||
+            releaseFence == NULL) {
+        return BAD_VALUE;
+    }
+
+    sp<IProducerListener> listener;
+    { // Autolock scope
+        Mutex::Autolock lock(mCore->mMutex);
+
+        // If the frame number has changed because the buffer has been reallocated,
+        // we can ignore this releaseBuffer for the old buffer
+        if (frameNumber != mSlots[slot].mFrameNumber) {
+            return STALE_BUFFER_SLOT;
+        }
+
+        // Make sure this buffer hasn't been queued while acquired by the consumer
+        BufferQueueCore::Fifo::iterator current(mCore->mQueue.begin());
+        while (current != mCore->mQueue.end()) {
+            if (current->mSlot == slot) {
+                BQ_LOGE("releaseBuffer: buffer slot %d pending release is "
+                        "currently queued", slot);
+                return BAD_VALUE;
+            }
+            ++current;
+        }
+
+        if (mSlots[slot].mBufferState == BufferSlot::ACQUIRED) {
+            mSlots[slot].mEglDisplay = eglDisplay;
+            mSlots[slot].mEglFence = eglFence;
+            mSlots[slot].mFence = releaseFence;
+            mSlots[slot].mBufferState = BufferSlot::FREE;
+            listener = mCore->mConnectedProducerListener;
+            BQ_LOGV("releaseBuffer: releasing slot %d", slot);
+        } else if (mSlots[slot].mNeedsCleanupOnRelease) {
+            BQ_LOGV("releaseBuffer: releasing a stale buffer slot %d "
+                    "(state = %d)", slot, mSlots[slot].mBufferState);
+            mSlots[slot].mNeedsCleanupOnRelease = false;
+            return STALE_BUFFER_SLOT;
+        } else {
+            BQ_LOGV("releaseBuffer: attempted to release buffer slot %d "
+                    "but its state was %d", slot, mSlots[slot].mBufferState);
+            return BAD_VALUE;
+        }
+
+        mCore->mDequeueCondition.broadcast();
+    } // Autolock scope
+
+    // Call back without lock held
+    if (listener != NULL) {
+        listener->onBufferReleased();
+    }
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::connect(
+        const sp<IConsumerListener>& consumerListener, bool controlledByApp) {
+    ATRACE_CALL();
+
+    if (consumerListener == NULL) {
+        BQ_LOGE("connect(C): consumerListener may not be NULL");
+        return BAD_VALUE;
+    }
+
+    BQ_LOGV("connect(C): controlledByApp=%s",
+            controlledByApp ? "true" : "false");
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("connect(C): BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    mCore->mConsumerListener = consumerListener;
+    mCore->mConsumerControlledByApp = controlledByApp;
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::disconnect() {
+    ATRACE_CALL();
+
+    BQ_LOGV("disconnect(C)");
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mConsumerListener == NULL) {
+        BQ_LOGE("disconnect(C): no consumer is connected");
+        return BAD_VALUE;
+    }
+
+    mCore->mIsAbandoned = true;
+    mCore->mConsumerListener = NULL;
+    mCore->mQueue.clear();
+    mCore->freeAllBuffersLocked();
+    mCore->mDequeueCondition.broadcast();
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::getReleasedBuffers(uint64_t *outSlotMask) {
+    ATRACE_CALL();
+
+    if (outSlotMask == NULL) {
+        BQ_LOGE("getReleasedBuffers: outSlotMask may not be NULL");
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("getReleasedBuffers: BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    uint64_t mask = 0;
+    for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+        if (!mSlots[s].mAcquireCalled) {
+            mask |= (1ULL << s);
+        }
+    }
+
+    // Remove from the mask queued buffers for which acquire has been called,
+    // since the consumer will not receive their buffer addresses and so must
+    // retain their cached information
+    BufferQueueCore::Fifo::iterator current(mCore->mQueue.begin());
+    while (current != mCore->mQueue.end()) {
+        if (current->mAcquireCalled) {
+            mask &= ~(1ULL << current->mSlot);
+        }
+        ++current;
+    }
+
+    BQ_LOGV("getReleasedBuffers: returning mask %#" PRIx64, mask);
+    *outSlotMask = mask;
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::setDefaultBufferSize(uint32_t width,
+        uint32_t height) {
+    ATRACE_CALL();
+
+    if (width == 0 || height == 0) {
+        BQ_LOGV("setDefaultBufferSize: dimensions cannot be 0 (width=%u "
+                "height=%u)", width, height);
+        return BAD_VALUE;
+    }
+
+    BQ_LOGV("setDefaultBufferSize: width=%u height=%u", width, height);
+
+    Mutex::Autolock lock(mCore->mMutex);
+    mCore->mDefaultWidth = width;
+    mCore->mDefaultHeight = height;
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::setDefaultMaxBufferCount(int bufferCount) {
+    ATRACE_CALL();
+    Mutex::Autolock lock(mCore->mMutex);
+    return mCore->setDefaultMaxBufferCountLocked(bufferCount);
+}
+
+status_t BufferQueueConsumer::disableAsyncBuffer() {
+    ATRACE_CALL();
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mConsumerListener != NULL) {
+        BQ_LOGE("disableAsyncBuffer: consumer already connected");
+        return INVALID_OPERATION;
+    }
+
+    BQ_LOGV("disableAsyncBuffer");
+    mCore->mUseAsyncBuffer = false;
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::setMaxAcquiredBufferCount(
+        int maxAcquiredBuffers) {
+    ATRACE_CALL();
+
+    if (maxAcquiredBuffers < 1 ||
+            maxAcquiredBuffers > BufferQueueCore::MAX_MAX_ACQUIRED_BUFFERS) {
+        BQ_LOGE("setMaxAcquiredBufferCount: invalid count %d",
+                maxAcquiredBuffers);
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mConnectedApi != BufferQueueCore::NO_CONNECTED_API) {
+        BQ_LOGE("setMaxAcquiredBufferCount: producer is already connected");
+        return INVALID_OPERATION;
+    }
+
+    BQ_LOGV("setMaxAcquiredBufferCount: %d", maxAcquiredBuffers);
+    mCore->mMaxAcquiredBufferCount = maxAcquiredBuffers;
+    return NO_ERROR;
+}
+
+void BufferQueueConsumer::setConsumerName(const String8& name) {
+    ATRACE_CALL();
+    BQ_LOGV("setConsumerName: '%s'", name.string());
+    Mutex::Autolock lock(mCore->mMutex);
+    mCore->mConsumerName = name;
+    mConsumerName = name;
+}
+
+status_t BufferQueueConsumer::setDefaultBufferFormat(uint32_t defaultFormat) {
+    ATRACE_CALL();
+    BQ_LOGV("setDefaultBufferFormat: %u", defaultFormat);
+    Mutex::Autolock lock(mCore->mMutex);
+    mCore->mDefaultBufferFormat = defaultFormat;
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::setConsumerUsageBits(uint32_t usage) {
+    ATRACE_CALL();
+    BQ_LOGV("setConsumerUsageBits: %#x", usage);
+    Mutex::Autolock lock(mCore->mMutex);
+    mCore->mConsumerUsageBits = usage;
+    return NO_ERROR;
+}
+
+status_t BufferQueueConsumer::setTransformHint(uint32_t hint) {
+    ATRACE_CALL();
+    BQ_LOGV("setTransformHint: %#x", hint);
+    Mutex::Autolock lock(mCore->mMutex);
+    mCore->mTransformHint = hint;
+    return NO_ERROR;
+}
+
+sp<NativeHandle> BufferQueueConsumer::getSidebandStream() const {
+    return mCore->mSidebandStream;
+}
+
+void BufferQueueConsumer::dump(String8& result, const char* prefix) const {
+    mCore->dump(result, prefix);
+}
+
+} // namespace android
diff --git a/libs/gui/BufferQueueCore.cpp b/libs/gui/BufferQueueCore.cpp
new file mode 100644
index 0000000..40e6884
--- /dev/null
+++ b/libs/gui/BufferQueueCore.cpp
@@ -0,0 +1,229 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "BufferQueueCore"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+//#define LOG_NDEBUG 0
+
+#define EGL_EGLEXT_PROTOTYPES
+
+#include <inttypes.h>
+
+#include <gui/BufferItem.h>
+#include <gui/BufferQueueCore.h>
+#include <gui/IConsumerListener.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/IProducerListener.h>
+#include <gui/ISurfaceComposer.h>
+#include <private/gui/ComposerService.h>
+
+template <typename T>
+static inline T max(T a, T b) { return a > b ? a : b; }
+
+namespace android {
+
+static String8 getUniqueName() {
+    static volatile int32_t counter = 0;
+    return String8::format("unnamed-%d-%d", getpid(),
+            android_atomic_inc(&counter));
+}
+
+BufferQueueCore::BufferQueueCore(const sp<IGraphicBufferAlloc>& allocator) :
+    mAllocator(allocator),
+    mMutex(),
+    mIsAbandoned(false),
+    mConsumerControlledByApp(false),
+    mConsumerName(getUniqueName()),
+    mConsumerListener(),
+    mConsumerUsageBits(0),
+    mConnectedApi(NO_CONNECTED_API),
+    mConnectedProducerListener(),
+    mSlots(),
+    mQueue(),
+    mOverrideMaxBufferCount(0),
+    mDequeueCondition(),
+    mUseAsyncBuffer(true),
+    mDequeueBufferCannotBlock(false),
+    mDefaultBufferFormat(PIXEL_FORMAT_RGBA_8888),
+    mDefaultWidth(1),
+    mDefaultHeight(1),
+    mDefaultMaxBufferCount(2),
+    mMaxAcquiredBufferCount(1),
+    mBufferHasBeenQueued(false),
+    mFrameCounter(0),
+    mTransformHint(0)
+{
+    if (allocator == NULL) {
+        sp<ISurfaceComposer> composer(ComposerService::getComposerService());
+        mAllocator = composer->createGraphicBufferAlloc();
+        if (mAllocator == NULL) {
+            BQ_LOGE("createGraphicBufferAlloc failed");
+        }
+    }
+}
+
+BufferQueueCore::~BufferQueueCore() {}
+
+void BufferQueueCore::dump(String8& result, const char* prefix) const {
+    Mutex::Autolock lock(mMutex);
+
+    String8 fifo;
+    Fifo::const_iterator current(mQueue.begin());
+    while (current != mQueue.end()) {
+        fifo.appendFormat("%02d:%p crop=[%d,%d,%d,%d], "
+                "xform=0x%02x, time=%#" PRIx64 ", scale=%s\n",
+                current->mSlot, current->mGraphicBuffer.get(),
+                current->mCrop.left, current->mCrop.top, current->mCrop.right,
+                current->mCrop.bottom, current->mTransform, current->mTimestamp,
+                BufferItem::scalingModeName(current->mScalingMode));
+        ++current;
+    }
+
+    result.appendFormat("%s-BufferQueue mMaxAcquiredBufferCount=%d, "
+            "mDequeueBufferCannotBlock=%d, default-size=[%dx%d], "
+            "default-format=%d, transform-hint=%02x, FIFO(%zu)={%s}\n",
+            prefix, mMaxAcquiredBufferCount, mDequeueBufferCannotBlock,
+            mDefaultWidth, mDefaultHeight, mDefaultBufferFormat, mTransformHint,
+            mQueue.size(), fifo.string());
+
+    // Trim the free buffers so as to not spam the dump
+    int maxBufferCount = 0;
+    for (int s = BufferQueueDefs::NUM_BUFFER_SLOTS - 1; s >= 0; --s) {
+        const BufferSlot& slot(mSlots[s]);
+        if (slot.mBufferState != BufferSlot::FREE ||
+                slot.mGraphicBuffer != NULL) {
+            maxBufferCount = s + 1;
+            break;
+        }
+    }
+
+    for (int s = 0; s < maxBufferCount; ++s) {
+        const BufferSlot& slot(mSlots[s]);
+        const sp<GraphicBuffer>& buffer(slot.mGraphicBuffer);
+        result.appendFormat("%s%s[%02d:%p] state=%-8s", prefix,
+                (slot.mBufferState == BufferSlot::ACQUIRED) ? ">" : " ",
+                s, buffer.get(),
+                BufferSlot::bufferStateName(slot.mBufferState));
+
+        if (buffer != NULL) {
+            result.appendFormat(", %p [%4ux%4u:%4u,%3X]", buffer->handle,
+                    buffer->width, buffer->height, buffer->stride,
+                    buffer->format);
+        }
+
+        result.append("\n");
+    }
+}
+
+int BufferQueueCore::getMinUndequeuedBufferCountLocked(bool async) const {
+    // If dequeueBuffer is allowed to error out, we don't have to add an
+    // extra buffer.
+    if (!mUseAsyncBuffer) {
+        return mMaxAcquiredBufferCount;
+    }
+
+    if (mDequeueBufferCannotBlock || async) {
+        return mMaxAcquiredBufferCount + 1;
+    }
+
+    return mMaxAcquiredBufferCount;
+}
+
+int BufferQueueCore::getMinMaxBufferCountLocked(bool async) const {
+    return getMinUndequeuedBufferCountLocked(async) + 1;
+}
+
+int BufferQueueCore::getMaxBufferCountLocked(bool async) const {
+    int minMaxBufferCount = getMinMaxBufferCountLocked(async);
+
+    int maxBufferCount = max(mDefaultMaxBufferCount, minMaxBufferCount);
+    if (mOverrideMaxBufferCount != 0) {
+        assert(mOverrideMaxBufferCount >= minMaxBufferCount);
+        maxBufferCount = mOverrideMaxBufferCount;
+    }
+
+    // Any buffers that are dequeued by the producer or sitting in the queue
+    // waiting to be consumed need to have their slots preserved. Such buffers
+    // will temporarily keep the max buffer count up until the slots no longer
+    // need to be preserved.
+    for (int s = maxBufferCount; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+        BufferSlot::BufferState state = mSlots[s].mBufferState;
+        if (state == BufferSlot::QUEUED || state == BufferSlot::DEQUEUED) {
+            maxBufferCount = s + 1;
+        }
+    }
+
+    return maxBufferCount;
+}
+
+status_t BufferQueueCore::setDefaultMaxBufferCountLocked(int count) {
+    const int minBufferCount = mUseAsyncBuffer ? 2 : 1;
+    if (count < minBufferCount || count > BufferQueueDefs::NUM_BUFFER_SLOTS) {
+        BQ_LOGV("setDefaultMaxBufferCount: invalid count %d, should be in "
+                "[%d, %d]",
+                count, minBufferCount, BufferQueueDefs::NUM_BUFFER_SLOTS);
+        return BAD_VALUE;
+    }
+
+    BQ_LOGV("setDefaultMaxBufferCount: setting count to %d", count);
+    mDefaultMaxBufferCount = count;
+    mDequeueCondition.broadcast();
+
+    return NO_ERROR;
+}
+
+void BufferQueueCore::freeBufferLocked(int slot) {
+    BQ_LOGV("freeBufferLocked: slot %d", slot);
+    mSlots[slot].mGraphicBuffer.clear();
+    if (mSlots[slot].mBufferState == BufferSlot::ACQUIRED) {
+        mSlots[slot].mNeedsCleanupOnRelease = true;
+    }
+    mSlots[slot].mBufferState = BufferSlot::FREE;
+    mSlots[slot].mFrameNumber = UINT32_MAX;
+    mSlots[slot].mAcquireCalled = false;
+
+    // Destroy fence as BufferQueue now takes ownership
+    if (mSlots[slot].mEglFence != EGL_NO_SYNC_KHR) {
+        eglDestroySyncKHR(mSlots[slot].mEglDisplay, mSlots[slot].mEglFence);
+        mSlots[slot].mEglFence = EGL_NO_SYNC_KHR;
+    }
+    mSlots[slot].mFence = Fence::NO_FENCE;
+}
+
+void BufferQueueCore::freeAllBuffersLocked() {
+    mBufferHasBeenQueued = false;
+    for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+        freeBufferLocked(s);
+    }
+}
+
+bool BufferQueueCore::stillTracking(const BufferItem* item) const {
+    const BufferSlot& slot = mSlots[item->mSlot];
+
+    BQ_LOGV("stillTracking: item { slot=%d/%" PRIu64 " buffer=%p } "
+            "slot { slot=%d/%" PRIu64 " buffer=%p }",
+            item->mSlot, item->mFrameNumber,
+            (item->mGraphicBuffer.get() ? item->mGraphicBuffer->handle : 0),
+            item->mSlot, slot.mFrameNumber,
+            (slot.mGraphicBuffer.get() ? slot.mGraphicBuffer->handle : 0));
+
+    // Compare item with its original buffer slot. We can check the slot as
+    // the buffer would not be moved to a different slot by the producer.
+    return (slot.mGraphicBuffer != NULL) &&
+           (item->mGraphicBuffer->handle == slot.mGraphicBuffer->handle);
+}
+
+} // namespace android
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
new file mode 100644
index 0000000..7017ddf
--- /dev/null
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -0,0 +1,864 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <inttypes.h>
+
+#define LOG_TAG "BufferQueueProducer"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+//#define LOG_NDEBUG 0
+
+#define EGL_EGLEXT_PROTOTYPES
+
+#include <gui/BufferItem.h>
+#include <gui/BufferQueueCore.h>
+#include <gui/BufferQueueProducer.h>
+#include <gui/IConsumerListener.h>
+#include <gui/IGraphicBufferAlloc.h>
+#include <gui/IProducerListener.h>
+
+#include <utils/Log.h>
+#include <utils/Trace.h>
+
+namespace android {
+
+BufferQueueProducer::BufferQueueProducer(const sp<BufferQueueCore>& core) :
+    mCore(core),
+    mSlots(core->mSlots),
+    mConsumerName() {}
+
+BufferQueueProducer::~BufferQueueProducer() {}
+
+status_t BufferQueueProducer::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
+    ATRACE_CALL();
+    BQ_LOGV("requestBuffer: slot %d", slot);
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("requestBuffer: BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
+        BQ_LOGE("requestBuffer: slot index %d out of range [0, %d)",
+                slot, BufferQueueDefs::NUM_BUFFER_SLOTS);
+        return BAD_VALUE;
+    } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) {
+        BQ_LOGE("requestBuffer: slot %d is not owned by the producer "
+                "(state = %d)", slot, mSlots[slot].mBufferState);
+        return BAD_VALUE;
+    }
+
+    mSlots[slot].mRequestBufferCalled = true;
+    *buf = mSlots[slot].mGraphicBuffer;
+    return NO_ERROR;
+}
+
+status_t BufferQueueProducer::setBufferCount(int bufferCount) {
+    ATRACE_CALL();
+    BQ_LOGV("setBufferCount: count = %d", bufferCount);
+
+    sp<IConsumerListener> listener;
+    { // Autolock scope
+        Mutex::Autolock lock(mCore->mMutex);
+
+        if (mCore->mIsAbandoned) {
+            BQ_LOGE("setBufferCount: BufferQueue has been abandoned");
+            return NO_INIT;
+        }
+
+        if (bufferCount > BufferQueueDefs::NUM_BUFFER_SLOTS) {
+            BQ_LOGE("setBufferCount: bufferCount %d too large (max %d)",
+                    bufferCount, BufferQueueDefs::NUM_BUFFER_SLOTS);
+            return BAD_VALUE;
+        }
+
+        // There must be no dequeued buffers when changing the buffer count.
+        for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+            if (mSlots[s].mBufferState == BufferSlot::DEQUEUED) {
+                BQ_LOGE("setBufferCount: buffer owned by producer");
+                return BAD_VALUE;
+            }
+        }
+
+        if (bufferCount == 0) {
+            mCore->mOverrideMaxBufferCount = 0;
+            mCore->mDequeueCondition.broadcast();
+            return NO_ERROR;
+        }
+
+        const int minBufferSlots = mCore->getMinMaxBufferCountLocked(false);
+        if (bufferCount < minBufferSlots) {
+            BQ_LOGE("setBufferCount: requested buffer count %d is less than "
+                    "minimum %d", bufferCount, minBufferSlots);
+            return BAD_VALUE;
+        }
+
+        // Here we are guaranteed that the producer doesn't have any dequeued
+        // buffers and will release all of its buffer references. We don't
+        // clear the queue, however, so that currently queued buffers still
+        // get displayed.
+        mCore->freeAllBuffersLocked();
+        mCore->mOverrideMaxBufferCount = bufferCount;
+        mCore->mDequeueCondition.broadcast();
+        listener = mCore->mConsumerListener;
+    } // Autolock scope
+
+    // Call back without lock held
+    if (listener != NULL) {
+        listener->onBuffersReleased();
+    }
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueProducer::waitForFreeSlotThenRelock(const char* caller,
+        bool async, int* found, status_t* returnFlags) const {
+    bool tryAgain = true;
+    while (tryAgain) {
+        if (mCore->mIsAbandoned) {
+            BQ_LOGE("%s: BufferQueue has been abandoned", caller);
+            return NO_INIT;
+        }
+
+        const int maxBufferCount = mCore->getMaxBufferCountLocked(async);
+        if (async && mCore->mOverrideMaxBufferCount) {
+            // FIXME: Some drivers are manually setting the buffer count
+            // (which they shouldn't), so we do this extra test here to
+            // handle that case. This is TEMPORARY until we get this fixed.
+            if (mCore->mOverrideMaxBufferCount < maxBufferCount) {
+                BQ_LOGE("%s: async mode is invalid with buffer count override",
+                        caller);
+                return BAD_VALUE;
+            }
+        }
+
+        // Free up any buffers that are in slots beyond the max buffer count
+        for (int s = maxBufferCount; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+            assert(mSlots[s].mBufferState == BufferSlot::FREE);
+            if (mSlots[s].mGraphicBuffer != NULL) {
+                mCore->freeBufferLocked(s);
+                *returnFlags |= RELEASE_ALL_BUFFERS;
+            }
+        }
+
+        // Look for a free buffer to give to the client
+        *found = BufferQueueCore::INVALID_BUFFER_SLOT;
+        int dequeuedCount = 0;
+        int acquiredCount = 0;
+        for (int s = 0; s < maxBufferCount; ++s) {
+            switch (mSlots[s].mBufferState) {
+                case BufferSlot::DEQUEUED:
+                    ++dequeuedCount;
+                    break;
+                case BufferSlot::ACQUIRED:
+                    ++acquiredCount;
+                    break;
+                case BufferSlot::FREE:
+                    // We return the oldest of the free buffers to avoid
+                    // stalling the producer if possible, since the consumer
+                    // may still have pending reads of in-flight buffers
+                    if (*found == BufferQueueCore::INVALID_BUFFER_SLOT ||
+                            mSlots[s].mFrameNumber < mSlots[*found].mFrameNumber) {
+                        *found = s;
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        // Producers are not allowed to dequeue more than one buffer if they
+        // did not set a buffer count
+        if (!mCore->mOverrideMaxBufferCount && dequeuedCount) {
+            BQ_LOGE("%s: can't dequeue multiple buffers without setting the "
+                    "buffer count", caller);
+            return INVALID_OPERATION;
+        }
+
+        // See whether a buffer has been queued since the last
+        // setBufferCount so we know whether to perform the min undequeued
+        // buffers check below
+        if (mCore->mBufferHasBeenQueued) {
+            // Make sure the producer is not trying to dequeue more buffers
+            // than allowed
+            const int newUndequeuedCount =
+                maxBufferCount - (dequeuedCount + 1);
+            const int minUndequeuedCount =
+                mCore->getMinUndequeuedBufferCountLocked(async);
+            if (newUndequeuedCount < minUndequeuedCount) {
+                BQ_LOGE("%s: min undequeued buffer count (%d) exceeded "
+                        "(dequeued=%d undequeued=%d)",
+                        caller, minUndequeuedCount,
+                        dequeuedCount, newUndequeuedCount);
+                return INVALID_OPERATION;
+            }
+        }
+
+        // If we disconnect and reconnect quickly, we can be in a state where
+        // our slots are empty but we have many buffers in the queue. This can
+        // cause us to run out of memory if we outrun the consumer. Wait here if
+        // it looks like we have too many buffers queued up.
+        bool tooManyBuffers = mCore->mQueue.size()
+                            > static_cast<size_t>(maxBufferCount);
+        if (tooManyBuffers) {
+            BQ_LOGV("%s: queue size is %zu, waiting", caller,
+                    mCore->mQueue.size());
+        }
+
+        // If no buffer is found, or if the queue has too many buffers
+        // outstanding, wait for a buffer to be acquired or released, or for the
+        // max buffer count to change.
+        tryAgain = (*found == BufferQueueCore::INVALID_BUFFER_SLOT) ||
+                   tooManyBuffers;
+        if (tryAgain) {
+            // Return an error if we're in non-blocking mode (producer and
+            // consumer are controlled by the application).
+            // However, the consumer is allowed to briefly acquire an extra
+            // buffer (which could cause us to have to wait here), which is
+            // okay, since it is only used to implement an atomic acquire +
+            // release (e.g., in GLConsumer::updateTexImage())
+            if (mCore->mDequeueBufferCannotBlock &&
+                    (acquiredCount <= mCore->mMaxAcquiredBufferCount)) {
+                return WOULD_BLOCK;
+            }
+            mCore->mDequeueCondition.wait(mCore->mMutex);
+        }
+    } // while (tryAgain)
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueProducer::dequeueBuffer(int *outSlot,
+        sp<android::Fence> *outFence, bool async,
+        uint32_t width, uint32_t height, uint32_t format, uint32_t usage) {
+    ATRACE_CALL();
+    { // Autolock scope
+        Mutex::Autolock lock(mCore->mMutex);
+        mConsumerName = mCore->mConsumerName;
+    } // Autolock scope
+
+    BQ_LOGV("dequeueBuffer: async=%s w=%u h=%u format=%#x, usage=%#x",
+            async ? "true" : "false", width, height, format, usage);
+
+    if ((width && !height) || (!width && height)) {
+        BQ_LOGE("dequeueBuffer: invalid size: w=%u h=%u", width, height);
+        return BAD_VALUE;
+    }
+
+    status_t returnFlags = NO_ERROR;
+    EGLDisplay eglDisplay = EGL_NO_DISPLAY;
+    EGLSyncKHR eglFence = EGL_NO_SYNC_KHR;
+    bool attachedByConsumer = false;
+
+    { // Autolock scope
+        Mutex::Autolock lock(mCore->mMutex);
+
+        if (format == 0) {
+            format = mCore->mDefaultBufferFormat;
+        }
+
+        // Enable the usage bits the consumer requested
+        usage |= mCore->mConsumerUsageBits;
+
+        int found;
+        status_t status = waitForFreeSlotThenRelock("dequeueBuffer", async,
+                &found, &returnFlags);
+        if (status != NO_ERROR) {
+            return status;
+        }
+
+        // This should not happen
+        if (found == BufferQueueCore::INVALID_BUFFER_SLOT) {
+            BQ_LOGE("dequeueBuffer: no available buffer slots");
+            return -EBUSY;
+        }
+
+        *outSlot = found;
+        ATRACE_BUFFER_INDEX(found);
+
+        attachedByConsumer = mSlots[found].mAttachedByConsumer;
+
+        const bool useDefaultSize = !width && !height;
+        if (useDefaultSize) {
+            width = mCore->mDefaultWidth;
+            height = mCore->mDefaultHeight;
+        }
+
+        mSlots[found].mBufferState = BufferSlot::DEQUEUED;
+
+        const sp<GraphicBuffer>& buffer(mSlots[found].mGraphicBuffer);
+        if ((buffer == NULL) ||
+                (static_cast<uint32_t>(buffer->width) != width) ||
+                (static_cast<uint32_t>(buffer->height) != height) ||
+                (static_cast<uint32_t>(buffer->format) != format) ||
+                ((static_cast<uint32_t>(buffer->usage) & usage) != usage))
+        {
+            mSlots[found].mAcquireCalled = false;
+            mSlots[found].mGraphicBuffer = NULL;
+            mSlots[found].mRequestBufferCalled = false;
+            mSlots[found].mEglDisplay = EGL_NO_DISPLAY;
+            mSlots[found].mEglFence = EGL_NO_SYNC_KHR;
+            mSlots[found].mFence = Fence::NO_FENCE;
+
+            returnFlags |= BUFFER_NEEDS_REALLOCATION;
+        }
+
+        if (CC_UNLIKELY(mSlots[found].mFence == NULL)) {
+            BQ_LOGE("dequeueBuffer: about to return a NULL fence - "
+                    "slot=%d w=%d h=%d format=%u",
+                    found, buffer->width, buffer->height, buffer->format);
+        }
+
+        eglDisplay = mSlots[found].mEglDisplay;
+        eglFence = mSlots[found].mEglFence;
+        *outFence = mSlots[found].mFence;
+        mSlots[found].mEglFence = EGL_NO_SYNC_KHR;
+        mSlots[found].mFence = Fence::NO_FENCE;
+    } // Autolock scope
+
+    if (returnFlags & BUFFER_NEEDS_REALLOCATION) {
+        status_t error;
+        sp<GraphicBuffer> graphicBuffer(mCore->mAllocator->createGraphicBuffer(
+                    width, height, format, usage, &error));
+        if (graphicBuffer == NULL) {
+            BQ_LOGE("dequeueBuffer: createGraphicBuffer failed");
+            return error;
+        }
+
+        { // Autolock scope
+            Mutex::Autolock lock(mCore->mMutex);
+
+            if (mCore->mIsAbandoned) {
+                BQ_LOGE("dequeueBuffer: BufferQueue has been abandoned");
+                return NO_INIT;
+            }
+
+            mSlots[*outSlot].mFrameNumber = UINT32_MAX;
+            mSlots[*outSlot].mGraphicBuffer = graphicBuffer;
+        } // Autolock scope
+    }
+
+    if (attachedByConsumer) {
+        returnFlags |= BUFFER_NEEDS_REALLOCATION;
+    }
+
+    if (eglFence != EGL_NO_SYNC_KHR) {
+        EGLint result = eglClientWaitSyncKHR(eglDisplay, eglFence, 0,
+                1000000000);
+        // If something goes wrong, log the error, but return the buffer without
+        // synchronizing access to it. It's too late at this point to abort the
+        // dequeue operation.
+        if (result == EGL_FALSE) {
+            BQ_LOGE("dequeueBuffer: error %#x waiting for fence",
+                    eglGetError());
+        } else if (result == EGL_TIMEOUT_EXPIRED_KHR) {
+            BQ_LOGE("dequeueBuffer: timeout waiting for fence");
+        }
+        eglDestroySyncKHR(eglDisplay, eglFence);
+    }
+
+    BQ_LOGV("dequeueBuffer: returning slot=%d/%" PRIu64 " buf=%p flags=%#x",
+            *outSlot,
+            mSlots[*outSlot].mFrameNumber,
+            mSlots[*outSlot].mGraphicBuffer->handle, returnFlags);
+
+    return returnFlags;
+}
+
+status_t BufferQueueProducer::detachBuffer(int slot) {
+    ATRACE_CALL();
+    ATRACE_BUFFER_INDEX(slot);
+    BQ_LOGV("detachBuffer(P): slot %d", slot);
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("detachBuffer(P): BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
+        BQ_LOGE("detachBuffer(P): slot index %d out of range [0, %d)",
+                slot, BufferQueueDefs::NUM_BUFFER_SLOTS);
+        return BAD_VALUE;
+    } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) {
+        BQ_LOGE("detachBuffer(P): slot %d is not owned by the producer "
+                "(state = %d)", slot, mSlots[slot].mBufferState);
+        return BAD_VALUE;
+    } else if (!mSlots[slot].mRequestBufferCalled) {
+        BQ_LOGE("detachBuffer(P): buffer in slot %d has not been requested",
+                slot);
+        return BAD_VALUE;
+    }
+
+    mCore->freeBufferLocked(slot);
+    mCore->mDequeueCondition.broadcast();
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueProducer::detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+        sp<Fence>* outFence) {
+    ATRACE_CALL();
+
+    if (outBuffer == NULL) {
+        BQ_LOGE("detachNextBuffer: outBuffer must not be NULL");
+        return BAD_VALUE;
+    } else if (outFence == NULL) {
+        BQ_LOGE("detachNextBuffer: outFence must not be NULL");
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("detachNextBuffer: BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    // Find the oldest valid slot
+    int found = BufferQueueCore::INVALID_BUFFER_SLOT;
+    for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
+        if (mSlots[s].mBufferState == BufferSlot::FREE &&
+                mSlots[s].mGraphicBuffer != NULL) {
+            if (found == BufferQueueCore::INVALID_BUFFER_SLOT ||
+                    mSlots[s].mFrameNumber < mSlots[found].mFrameNumber) {
+                found = s;
+            }
+        }
+    }
+
+    if (found == BufferQueueCore::INVALID_BUFFER_SLOT) {
+        return NO_MEMORY;
+    }
+
+    BQ_LOGV("detachNextBuffer detached slot %d", found);
+
+    *outBuffer = mSlots[found].mGraphicBuffer;
+    *outFence = mSlots[found].mFence;
+    mCore->freeBufferLocked(found);
+
+    return NO_ERROR;
+}
+
+status_t BufferQueueProducer::attachBuffer(int* outSlot,
+        const sp<android::GraphicBuffer>& buffer) {
+    ATRACE_CALL();
+
+    if (outSlot == NULL) {
+        BQ_LOGE("attachBuffer(P): outSlot must not be NULL");
+        return BAD_VALUE;
+    } else if (buffer == NULL) {
+        BQ_LOGE("attachBuffer(P): cannot attach NULL buffer");
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mCore->mMutex);
+
+    status_t returnFlags = NO_ERROR;
+    int found;
+    // TODO: Should we provide an async flag to attachBuffer? It seems
+    // unlikely that buffers which we are attaching to a BufferQueue will
+    // be asynchronous (droppable), but it may not be impossible.
+    status_t status = waitForFreeSlotThenRelock("attachBuffer(P)", false,
+            &found, &returnFlags);
+    if (status != NO_ERROR) {
+        return status;
+    }
+
+    // This should not happen
+    if (found == BufferQueueCore::INVALID_BUFFER_SLOT) {
+        BQ_LOGE("attachBuffer(P): no available buffer slots");
+        return -EBUSY;
+    }
+
+    *outSlot = found;
+    ATRACE_BUFFER_INDEX(*outSlot);
+    BQ_LOGV("attachBuffer(P): returning slot %d flags=%#x",
+            *outSlot, returnFlags);
+
+    mSlots[*outSlot].mGraphicBuffer = buffer;
+    mSlots[*outSlot].mBufferState = BufferSlot::DEQUEUED;
+    mSlots[*outSlot].mEglFence = EGL_NO_SYNC_KHR;
+    mSlots[*outSlot].mFence = Fence::NO_FENCE;
+    mSlots[*outSlot].mRequestBufferCalled = true;
+
+    return returnFlags;
+}
+
+status_t BufferQueueProducer::queueBuffer(int slot,
+        const QueueBufferInput &input, QueueBufferOutput *output) {
+    ATRACE_CALL();
+    ATRACE_BUFFER_INDEX(slot);
+
+    int64_t timestamp;
+    bool isAutoTimestamp;
+    Rect crop;
+    int scalingMode;
+    uint32_t transform;
+    bool async;
+    sp<Fence> fence;
+    input.deflate(&timestamp, &isAutoTimestamp, &crop, &scalingMode, &transform,
+            &async, &fence);
+
+    if (fence == NULL) {
+        BQ_LOGE("queueBuffer: fence is NULL");
+        return BAD_VALUE;
+    }
+
+    switch (scalingMode) {
+        case NATIVE_WINDOW_SCALING_MODE_FREEZE:
+        case NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW:
+        case NATIVE_WINDOW_SCALING_MODE_SCALE_CROP:
+        case NATIVE_WINDOW_SCALING_MODE_NO_SCALE_CROP:
+            break;
+        default:
+            BQ_LOGE("queueBuffer: unknown scaling mode %d", scalingMode);
+            return BAD_VALUE;
+    }
+
+    sp<IConsumerListener> listener;
+    { // Autolock scope
+        Mutex::Autolock lock(mCore->mMutex);
+
+        if (mCore->mIsAbandoned) {
+            BQ_LOGE("queueBuffer: BufferQueue has been abandoned");
+            return NO_INIT;
+        }
+
+        const int maxBufferCount = mCore->getMaxBufferCountLocked(async);
+        if (async && mCore->mOverrideMaxBufferCount) {
+            // FIXME: Some drivers are manually setting the buffer count
+            // (which they shouldn't), so we do this extra test here to
+            // handle that case. This is TEMPORARY until we get this fixed.
+            if (mCore->mOverrideMaxBufferCount < maxBufferCount) {
+                BQ_LOGE("queueBuffer: async mode is invalid with "
+                        "buffer count override");
+                return BAD_VALUE;
+            }
+        }
+
+        if (slot < 0 || slot >= maxBufferCount) {
+            BQ_LOGE("queueBuffer: slot index %d out of range [0, %d)",
+                    slot, maxBufferCount);
+            return BAD_VALUE;
+        } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) {
+            BQ_LOGE("queueBuffer: slot %d is not owned by the producer "
+                    "(state = %d)", slot, mSlots[slot].mBufferState);
+            return BAD_VALUE;
+        } else if (!mSlots[slot].mRequestBufferCalled) {
+            BQ_LOGE("queueBuffer: slot %d was queued without requesting "
+                    "a buffer", slot);
+            return BAD_VALUE;
+        }
+
+        BQ_LOGV("queueBuffer: slot=%d/%" PRIu64 " time=%" PRIu64
+                " crop=[%d,%d,%d,%d] transform=%#x scale=%s",
+                slot, mCore->mFrameCounter + 1, timestamp,
+                crop.left, crop.top, crop.right, crop.bottom,
+                transform, BufferItem::scalingModeName(scalingMode));
+
+        const sp<GraphicBuffer>& graphicBuffer(mSlots[slot].mGraphicBuffer);
+        Rect bufferRect(graphicBuffer->getWidth(), graphicBuffer->getHeight());
+        Rect croppedRect;
+        crop.intersect(bufferRect, &croppedRect);
+        if (croppedRect != crop) {
+            BQ_LOGE("queueBuffer: crop rect is not contained within the "
+                    "buffer in slot %d", slot);
+            return BAD_VALUE;
+        }
+
+        mSlots[slot].mFence = fence;
+        mSlots[slot].mBufferState = BufferSlot::QUEUED;
+        ++mCore->mFrameCounter;
+        mSlots[slot].mFrameNumber = mCore->mFrameCounter;
+
+        BufferItem item;
+        item.mAcquireCalled = mSlots[slot].mAcquireCalled;
+        item.mGraphicBuffer = mSlots[slot].mGraphicBuffer;
+        item.mCrop = crop;
+        item.mTransform = transform & ~NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY;
+        item.mTransformToDisplayInverse =
+                bool(transform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY);
+        item.mScalingMode = scalingMode;
+        item.mTimestamp = timestamp;
+        item.mIsAutoTimestamp = isAutoTimestamp;
+        item.mFrameNumber = mCore->mFrameCounter;
+        item.mSlot = slot;
+        item.mFence = fence;
+        item.mIsDroppable = mCore->mDequeueBufferCannotBlock || async;
+
+        if (mCore->mQueue.empty()) {
+            // When the queue is empty, we can ignore mDequeueBufferCannotBlock
+            // and simply queue this buffer
+            mCore->mQueue.push_back(item);
+            listener = mCore->mConsumerListener;
+        } else {
+            // When the queue is not empty, we need to look at the front buffer
+            // state to see if we need to replace it
+            BufferQueueCore::Fifo::iterator front(mCore->mQueue.begin());
+            if (front->mIsDroppable) {
+                // If the front queued buffer is still being tracked, we first
+                // mark it as freed
+                if (mCore->stillTracking(front)) {
+                    mSlots[front->mSlot].mBufferState = BufferSlot::FREE;
+                    // Reset the frame number of the freed buffer so that it is
+                    // the first in line to be dequeued again
+                    mSlots[front->mSlot].mFrameNumber = 0;
+                }
+                // Overwrite the droppable buffer with the incoming one
+                *front = item;
+            } else {
+                mCore->mQueue.push_back(item);
+                listener = mCore->mConsumerListener;
+            }
+        }
+
+        mCore->mBufferHasBeenQueued = true;
+        mCore->mDequeueCondition.broadcast();
+
+        output->inflate(mCore->mDefaultWidth, mCore->mDefaultHeight,
+                mCore->mTransformHint, mCore->mQueue.size());
+
+        ATRACE_INT(mCore->mConsumerName.string(), mCore->mQueue.size());
+    } // Autolock scope
+
+    // Call back without lock held
+    if (listener != NULL) {
+        listener->onFrameAvailable();
+    }
+
+    return NO_ERROR;
+}
+
+void BufferQueueProducer::cancelBuffer(int slot, const sp<Fence>& fence) {
+    ATRACE_CALL();
+    BQ_LOGV("cancelBuffer: slot %d", slot);
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("cancelBuffer: BufferQueue has been abandoned");
+        return;
+    }
+
+    if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) {
+        BQ_LOGE("cancelBuffer: slot index %d out of range [0, %d)",
+                slot, BufferQueueDefs::NUM_BUFFER_SLOTS);
+        return;
+    } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) {
+        BQ_LOGE("cancelBuffer: slot %d is not owned by the producer "
+                "(state = %d)", slot, mSlots[slot].mBufferState);
+        return;
+    } else if (fence == NULL) {
+        BQ_LOGE("cancelBuffer: fence is NULL");
+        return;
+    }
+
+    mSlots[slot].mBufferState = BufferSlot::FREE;
+    mSlots[slot].mFrameNumber = 0;
+    mSlots[slot].mFence = fence;
+    mCore->mDequeueCondition.broadcast();
+}
+
+int BufferQueueProducer::query(int what, int *outValue) {
+    ATRACE_CALL();
+    Mutex::Autolock lock(mCore->mMutex);
+
+    if (outValue == NULL) {
+        BQ_LOGE("query: outValue was NULL");
+        return BAD_VALUE;
+    }
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("query: BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    int value;
+    switch (what) {
+        case NATIVE_WINDOW_WIDTH:
+            value = mCore->mDefaultWidth;
+            break;
+        case NATIVE_WINDOW_HEIGHT:
+            value = mCore->mDefaultHeight;
+            break;
+        case NATIVE_WINDOW_FORMAT:
+            value = mCore->mDefaultBufferFormat;
+            break;
+        case NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS:
+            value = mCore->getMinUndequeuedBufferCountLocked(false);
+            break;
+        case NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND:
+            value = (mCore->mQueue.size() > 1);
+            break;
+        case NATIVE_WINDOW_CONSUMER_USAGE_BITS:
+            value = mCore->mConsumerUsageBits;
+            break;
+        default:
+            return BAD_VALUE;
+    }
+
+    BQ_LOGV("query: %d? %d", what, value);
+    *outValue = value;
+    return NO_ERROR;
+}
+
+status_t BufferQueueProducer::connect(const sp<IProducerListener>& listener,
+        int api, bool producerControlledByApp, QueueBufferOutput *output) {
+    ATRACE_CALL();
+    Mutex::Autolock lock(mCore->mMutex);
+    mConsumerName = mCore->mConsumerName;
+    BQ_LOGV("connect(P): api=%d producerControlledByApp=%s", api,
+            producerControlledByApp ? "true" : "false");
+
+    if (mCore->mIsAbandoned) {
+        BQ_LOGE("connect(P): BufferQueue has been abandoned");
+        return NO_INIT;
+    }
+
+    if (mCore->mConsumerListener == NULL) {
+        BQ_LOGE("connect(P): BufferQueue has no consumer");
+        return NO_INIT;
+    }
+
+    if (output == NULL) {
+        BQ_LOGE("connect(P): output was NULL");
+        return BAD_VALUE;
+    }
+
+    if (mCore->mConnectedApi != BufferQueueCore::NO_CONNECTED_API) {
+        BQ_LOGE("connect(P): already connected (cur=%d req=%d)",
+                mCore->mConnectedApi, api);
+        return BAD_VALUE;
+    }
+
+    int status = NO_ERROR;
+    switch (api) {
+        case NATIVE_WINDOW_API_EGL:
+        case NATIVE_WINDOW_API_CPU:
+        case NATIVE_WINDOW_API_MEDIA:
+        case NATIVE_WINDOW_API_CAMERA:
+            mCore->mConnectedApi = api;
+            output->inflate(mCore->mDefaultWidth, mCore->mDefaultHeight,
+                    mCore->mTransformHint, mCore->mQueue.size());
+
+            // Set up a death notification so that we can disconnect
+            // automatically if the remote producer dies
+            if (listener != NULL &&
+                    listener->asBinder()->remoteBinder() != NULL) {
+                status = listener->asBinder()->linkToDeath(
+                        static_cast<IBinder::DeathRecipient*>(this));
+                if (status != NO_ERROR) {
+                    BQ_LOGE("connect(P): linkToDeath failed: %s (%d)",
+                            strerror(-status), status);
+                }
+            }
+            mCore->mConnectedProducerListener = listener;
+            break;
+        default:
+            BQ_LOGE("connect(P): unknown API %d", api);
+            status = BAD_VALUE;
+            break;
+    }
+
+    mCore->mBufferHasBeenQueued = false;
+    mCore->mDequeueBufferCannotBlock =
+            mCore->mConsumerControlledByApp && producerControlledByApp;
+
+    return status;
+}
+
+status_t BufferQueueProducer::disconnect(int api) {
+    ATRACE_CALL();
+    BQ_LOGV("disconnect(P): api %d", api);
+
+    int status = NO_ERROR;
+    sp<IConsumerListener> listener;
+    { // Autolock scope
+        Mutex::Autolock lock(mCore->mMutex);
+
+        if (mCore->mIsAbandoned) {
+            // It's not really an error to disconnect after the surface has
+            // been abandoned; it should just be a no-op.
+            return NO_ERROR;
+        }
+
+        switch (api) {
+            case NATIVE_WINDOW_API_EGL:
+            case NATIVE_WINDOW_API_CPU:
+            case NATIVE_WINDOW_API_MEDIA:
+            case NATIVE_WINDOW_API_CAMERA:
+                if (mCore->mConnectedApi == api) {
+                    mCore->freeAllBuffersLocked();
+
+                    // Remove our death notification callback if we have one
+                    if (mCore->mConnectedProducerListener != NULL) {
+                        sp<IBinder> token =
+                                mCore->mConnectedProducerListener->asBinder();
+                        // This can fail if we're here because of the death
+                        // notification, but we just ignore it
+                        token->unlinkToDeath(
+                                static_cast<IBinder::DeathRecipient*>(this));
+                    }
+                    mCore->mConnectedProducerListener = NULL;
+                    mCore->mConnectedApi = BufferQueueCore::NO_CONNECTED_API;
+                    mCore->mSidebandStream.clear();
+                    mCore->mDequeueCondition.broadcast();
+                    listener = mCore->mConsumerListener;
+                } else {
+                    BQ_LOGE("disconnect(P): connected to another API "
+                            "(cur=%d req=%d)", mCore->mConnectedApi, api);
+                    status = BAD_VALUE;
+                }
+                break;
+            default:
+                BQ_LOGE("disconnect(P): unknown API %d", api);
+                status = BAD_VALUE;
+                break;
+        }
+    } // Autolock scope
+
+    // Call back without lock held
+    if (listener != NULL) {
+        listener->onBuffersReleased();
+    }
+
+    return status;
+}
+
+status_t BufferQueueProducer::setSidebandStream(const sp<NativeHandle>& stream) {
+    sp<IConsumerListener> listener;
+    { // Autolock scope
+        Mutex::Autolock _l(mCore->mMutex);
+        mCore->mSidebandStream = stream;
+        listener = mCore->mConsumerListener;
+    } // Autolock scope
+
+    if (listener != NULL) {
+        listener->onSidebandStreamChanged();
+    }
+    return NO_ERROR;
+}
+
+void BufferQueueProducer::binderDied(const wp<android::IBinder>& /* who */) {
+    // If we're here, it means that a producer we were connected to died.
+    // We're guaranteed that we are still connected to it because we remove
+    // this callback upon disconnect. It's therefore safe to read mConnectedApi
+    // without synchronization here.
+    int api = mCore->mConnectedApi;
+    disconnect(api);
+}
+
+} // namespace android
diff --git a/libs/gui/BufferSlot.cpp b/libs/gui/BufferSlot.cpp
new file mode 100644
index 0000000..b8877fe
--- /dev/null
+++ b/libs/gui/BufferSlot.cpp
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <gui/BufferSlot.h>
+
+namespace android {
+
+const char* BufferSlot::bufferStateName(BufferState state) {
+    switch (state) {
+        case BufferSlot::DEQUEUED: return "DEQUEUED";
+        case BufferSlot::QUEUED: return "QUEUED";
+        case BufferSlot::FREE: return "FREE";
+        case BufferSlot::ACQUIRED: return "ACQUIRED";
+        default: return "Unknown";
+    }
+}
+
+} // namespace android
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp
index 674ee5a..f19b6c7 100644
--- a/libs/gui/ConsumerBase.cpp
+++ b/libs/gui/ConsumerBase.cpp
@@ -87,7 +87,7 @@
         "consumer is not abandoned!", mName.string());
 }
 
-void ConsumerBase::onLastStrongRef(const void* id) {
+void ConsumerBase::onLastStrongRef(const void* id __attribute__((unused))) {
     abandon();
 }
 
@@ -123,15 +123,18 @@
         return;
     }
 
-    uint32_t mask = 0;
+    uint64_t mask = 0;
     mConsumer->getReleasedBuffers(&mask);
     for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) {
-        if (mask & (1 << i)) {
+        if (mask & (1ULL << i)) {
             freeBufferLocked(i);
         }
     }
 }
 
+void ConsumerBase::onSidebandStreamChanged() {
+}
+
 void ConsumerBase::abandon() {
     CB_LOGV("abandon");
     Mutex::Autolock lock(mMutex);
@@ -245,7 +248,7 @@
             slot, mSlots[slot].mFrameNumber);
     status_t err = mConsumer->releaseBuffer(slot, mSlots[slot].mFrameNumber,
             display, eglFence, mSlots[slot].mFence);
-    if (err == BufferQueue::STALE_BUFFER_SLOT) {
+    if (err == IGraphicBufferConsumer::STALE_BUFFER_SLOT) {
         freeBufferLocked(slot);
     }
 
diff --git a/libs/gui/IConsumerListener.cpp b/libs/gui/IConsumerListener.cpp
index 5304462..4ccf0ac 100644
--- a/libs/gui/IConsumerListener.cpp
+++ b/libs/gui/IConsumerListener.cpp
@@ -28,7 +28,8 @@
 
 enum {
     ON_FRAME_AVAILABLE = IBinder::FIRST_CALL_TRANSACTION,
-    ON_BUFFER_RELEASED
+    ON_BUFFER_RELEASED,
+    ON_SIDEBAND_STREAM_CHANGED,
 };
 
 class BpConsumerListener : public BpInterface<IConsumerListener>
@@ -49,6 +50,12 @@
         data.writeInterfaceToken(IConsumerListener::getInterfaceDescriptor());
         remote()->transact(ON_BUFFER_RELEASED, data, &reply, IBinder::FLAG_ONEWAY);
     }
+
+    virtual void onSidebandStreamChanged() {
+        Parcel data, reply;
+        data.writeInterfaceToken(IConsumerListener::getInterfaceDescriptor());
+        remote()->transact(ON_SIDEBAND_STREAM_CHANGED, data, &reply, IBinder::FLAG_ONEWAY);
+    }
 };
 
 IMPLEMENT_META_INTERFACE(ConsumerListener, "android.gui.IConsumerListener");
@@ -67,6 +74,10 @@
             CHECK_INTERFACE(IConsumerListener, data, reply);
             onBuffersReleased();
             return NO_ERROR;
+        case ON_SIDEBAND_STREAM_CHANGED:
+            CHECK_INTERFACE(IConsumerListener, data, reply);
+            onSidebandStreamChanged();
+            return NO_ERROR;
     }
     return BBinder::onTransact(code, data, reply, flags);
 }
diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp
index 9574b61..f6d087d 100644
--- a/libs/gui/IGraphicBufferConsumer.cpp
+++ b/libs/gui/IGraphicBufferConsumer.cpp
@@ -14,16 +14,11 @@
  * limitations under the License.
  */
 
-#define EGL_EGLEXT_PROTOTYPES
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-
-
 #include <stdint.h>
 #include <sys/types.h>
 
 #include <utils/Errors.h>
+#include <utils/NativeHandle.h>
 
 #include <binder/Parcel.h>
 #include <binder/IInterface.h>
@@ -70,11 +65,11 @@
     size_t c = 0;
     if (mGraphicBuffer != 0) {
         c += mGraphicBuffer->getFlattenedSize();
-        FlattenableUtils::align<4>(c);
+        c = FlattenableUtils::align<4>(c);
     }
     if (mFence != 0) {
         c += mFence->getFlattenedSize();
-        FlattenableUtils::align<4>(c);
+        c = FlattenableUtils::align<4>(c);
     }
     return sizeof(int32_t) + c + getPodSize();
 }
@@ -90,11 +85,21 @@
     return c;
 }
 
+static void writeBoolAsInt(void*& buffer, size_t& size, bool b) {
+    FlattenableUtils::write(buffer, size, static_cast<int32_t>(b));
+}
+
+static bool readBoolFromInt(void const*& buffer, size_t& size) {
+    int32_t i;
+    FlattenableUtils::read(buffer, size, i);
+    return static_cast<bool>(i);
+}
+
 status_t IGraphicBufferConsumer::BufferItem::flatten(
         void*& buffer, size_t& size, int*& fds, size_t& count) const {
 
     // make sure we have enough space
-    if (count < BufferItem::getFlattenedSize()) {
+    if (size < BufferItem::getFlattenedSize()) {
         return NO_MEMORY;
     }
 
@@ -127,12 +132,12 @@
     FlattenableUtils::write(buffer, size, mTransform);
     FlattenableUtils::write(buffer, size, mScalingMode);
     FlattenableUtils::write(buffer, size, mTimestamp);
-    FlattenableUtils::write(buffer, size, mIsAutoTimestamp);
+    writeBoolAsInt(buffer, size, mIsAutoTimestamp);
     FlattenableUtils::write(buffer, size, mFrameNumber);
     FlattenableUtils::write(buffer, size, mBuf);
-    FlattenableUtils::write(buffer, size, mIsDroppable);
-    FlattenableUtils::write(buffer, size, mAcquireCalled);
-    FlattenableUtils::write(buffer, size, mTransformToDisplayInverse);
+    writeBoolAsInt(buffer, size, mIsDroppable);
+    writeBoolAsInt(buffer, size, mAcquireCalled);
+    writeBoolAsInt(buffer, size, mTransformToDisplayInverse);
 
     return NO_ERROR;
 }
@@ -169,12 +174,12 @@
     FlattenableUtils::read(buffer, size, mTransform);
     FlattenableUtils::read(buffer, size, mScalingMode);
     FlattenableUtils::read(buffer, size, mTimestamp);
-    FlattenableUtils::read(buffer, size, mIsAutoTimestamp);
+    mIsAutoTimestamp = readBoolFromInt(buffer, size);
     FlattenableUtils::read(buffer, size, mFrameNumber);
     FlattenableUtils::read(buffer, size, mBuf);
-    FlattenableUtils::read(buffer, size, mIsDroppable);
-    FlattenableUtils::read(buffer, size, mAcquireCalled);
-    FlattenableUtils::read(buffer, size, mTransformToDisplayInverse);
+    mIsDroppable = readBoolFromInt(buffer, size);
+    mAcquireCalled = readBoolFromInt(buffer, size);
+    mTransformToDisplayInverse = readBoolFromInt(buffer, size);
 
     return NO_ERROR;
 }
@@ -183,6 +188,8 @@
 
 enum {
     ACQUIRE_BUFFER = IBinder::FIRST_CALL_TRANSACTION,
+    DETACH_BUFFER,
+    ATTACH_BUFFER,
     RELEASE_BUFFER,
     CONSUMER_CONNECT,
     CONSUMER_DISCONNECT,
@@ -195,6 +202,7 @@
     SET_DEFAULT_BUFFER_FORMAT,
     SET_CONSUMER_USAGE_BITS,
     SET_TRANSFORM_HINT,
+    GET_SIDEBAND_STREAM,
     DUMP,
 };
 
@@ -222,8 +230,33 @@
         return reply.readInt32();
     }
 
+    virtual status_t detachBuffer(int slot) {
+        Parcel data, reply;
+        data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
+        data.writeInt32(slot);
+        status_t result = remote()->transact(DETACH_BUFFER, data, &reply);
+        if (result != NO_ERROR) {
+            return result;
+        }
+        result = reply.readInt32();
+        return result;
+    }
+
+    virtual status_t attachBuffer(int* slot, const sp<GraphicBuffer>& buffer) {
+        Parcel data, reply;
+        data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
+        data.write(*buffer.get());
+        status_t result = remote()->transact(ATTACH_BUFFER, data, &reply);
+        if (result != NO_ERROR) {
+            return result;
+        }
+        *slot = reply.readInt32();
+        result = reply.readInt32();
+        return result;
+    }
+
     virtual status_t releaseBuffer(int buf, uint64_t frameNumber,
-            EGLDisplay display, EGLSyncKHR fence,
+            EGLDisplay display __attribute__((unused)), EGLSyncKHR fence __attribute__((unused)),
             const sp<Fence>& releaseFence) {
         Parcel data, reply;
         data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
@@ -259,14 +292,18 @@
         return reply.readInt32();
     }
 
-    virtual status_t getReleasedBuffers(uint32_t* slotMask) {
+    virtual status_t getReleasedBuffers(uint64_t* slotMask) {
         Parcel data, reply;
+        if (slotMask == NULL) {
+            ALOGE("getReleasedBuffers: slotMask must not be NULL");
+            return BAD_VALUE;
+        }
         data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
         status_t result = remote()->transact(GET_RELEASED_BUFFERS, data, &reply);
         if (result != NO_ERROR) {
             return result;
         }
-        *slotMask = reply.readInt32();
+        *slotMask = reply.readInt64();
         return reply.readInt32();
     }
 
@@ -354,6 +391,20 @@
         return reply.readInt32();
     }
 
+    virtual sp<NativeHandle> getSidebandStream() const {
+        Parcel data, reply;
+        status_t err;
+        data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
+        if ((err = remote()->transact(GET_SIDEBAND_STREAM, data, &reply)) != NO_ERROR) {
+            return NULL;
+        }
+        sp<NativeHandle> stream;
+        if (reply.readInt32()) {
+            stream = NativeHandle::create(reply.readNativeHandle(), true);
+        }
+        return stream;
+    }
+
     virtual void dump(String8& result, const char* prefix) const {
         Parcel data, reply;
         data.writeInterfaceToken(IGraphicBufferConsumer::getInterfaceDescriptor());
@@ -382,6 +433,23 @@
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
+        case DETACH_BUFFER: {
+            CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
+            int slot = data.readInt32();
+            int result = detachBuffer(slot);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
+        case ATTACH_BUFFER: {
+            CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
+            sp<GraphicBuffer> buffer = new GraphicBuffer();
+            data.read(*buffer.get());
+            int slot;
+            int result = attachBuffer(&slot, buffer);
+            reply->writeInt32(slot);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
         case RELEASE_BUFFER: {
             CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
             int buf = data.readInt32();
@@ -410,9 +478,9 @@
         } break;
         case GET_RELEASED_BUFFERS: {
             CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
-            uint32_t slotMask;
+            uint64_t slotMask;
             status_t result = getReleasedBuffers(&slotMask);
-            reply->writeInt32(slotMask);
+            reply->writeInt64(slotMask);
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp
index 0f461e5..aa6acb9 100644
--- a/libs/gui/IGraphicBufferProducer.cpp
+++ b/libs/gui/IGraphicBufferProducer.cpp
@@ -18,14 +18,16 @@
 #include <sys/types.h>
 
 #include <utils/Errors.h>
+#include <utils/NativeHandle.h>
 #include <utils/RefBase.h>
-#include <utils/Vector.h>
 #include <utils/Timers.h>
+#include <utils/Vector.h>
 
 #include <binder/Parcel.h>
 #include <binder/IInterface.h>
 
 #include <gui/IGraphicBufferProducer.h>
+#include <gui/IProducerListener.h>
 
 namespace android {
 // ----------------------------------------------------------------------------
@@ -34,11 +36,15 @@
     REQUEST_BUFFER = IBinder::FIRST_CALL_TRANSACTION,
     SET_BUFFER_COUNT,
     DEQUEUE_BUFFER,
+    DETACH_BUFFER,
+    DETACH_NEXT_BUFFER,
+    ATTACH_BUFFER,
     QUEUE_BUFFER,
     CANCEL_BUFFER,
     QUERY,
     CONNECT,
     DISCONNECT,
+    SET_SIDEBAND_STREAM,
 };
 
 class BpGraphicBufferProducer : public BpInterface<IGraphicBufferProducer>
@@ -106,6 +112,62 @@
         return result;
     }
 
+    virtual status_t detachBuffer(int slot) {
+        Parcel data, reply;
+        data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
+        data.writeInt32(slot);
+        status_t result = remote()->transact(DETACH_BUFFER, data, &reply);
+        if (result != NO_ERROR) {
+            return result;
+        }
+        result = reply.readInt32();
+        return result;
+    }
+
+    virtual status_t detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+            sp<Fence>* outFence) {
+        if (outBuffer == NULL) {
+            ALOGE("detachNextBuffer: outBuffer must not be NULL");
+            return BAD_VALUE;
+        } else if (outFence == NULL) {
+            ALOGE("detachNextBuffer: outFence must not be NULL");
+            return BAD_VALUE;
+        }
+        Parcel data, reply;
+        data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
+        status_t result = remote()->transact(DETACH_NEXT_BUFFER, data, &reply);
+        if (result != NO_ERROR) {
+            return result;
+        }
+        result = reply.readInt32();
+        if (result == NO_ERROR) {
+            bool nonNull = reply.readInt32();
+            if (nonNull) {
+                *outBuffer = new GraphicBuffer;
+                reply.read(**outBuffer);
+            }
+            nonNull = reply.readInt32();
+            if (nonNull) {
+                *outFence = new Fence;
+                reply.read(**outFence);
+            }
+        }
+        return result;
+    }
+
+    virtual status_t attachBuffer(int* slot, const sp<GraphicBuffer>& buffer) {
+        Parcel data, reply;
+        data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
+        data.write(*buffer.get());
+        status_t result = remote()->transact(ATTACH_BUFFER, data, &reply);
+        if (result != NO_ERROR) {
+            return result;
+        }
+        *slot = reply.readInt32();
+        result = reply.readInt32();
+        return result;
+    }
+
     virtual status_t queueBuffer(int buf,
             const QueueBufferInput& input, QueueBufferOutput* output) {
         Parcel data, reply;
@@ -142,11 +204,16 @@
         return result;
     }
 
-    virtual status_t connect(const sp<IBinder>& token,
+    virtual status_t connect(const sp<IProducerListener>& listener,
             int api, bool producerControlledByApp, QueueBufferOutput* output) {
         Parcel data, reply;
         data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
-        data.writeStrongBinder(token);
+        if (listener != NULL) {
+            data.writeInt32(1);
+            data.writeStrongBinder(listener->asBinder());
+        } else {
+            data.writeInt32(0);
+        }
         data.writeInt32(api);
         data.writeInt32(producerControlledByApp);
         status_t result = remote()->transact(CONNECT, data, &reply);
@@ -169,6 +236,22 @@
         result = reply.readInt32();
         return result;
     }
+
+    virtual status_t setSidebandStream(const sp<NativeHandle>& stream) {
+        Parcel data, reply;
+        status_t result;
+        data.writeInterfaceToken(IGraphicBufferProducer::getInterfaceDescriptor());
+        if (stream.get()) {
+            data.writeInt32(true);
+            data.writeNativeHandle(stream->handle());
+        } else {
+            data.writeInt32(false);
+        }
+        if ((result = remote()->transact(SET_SIDEBAND_STREAM, data, &reply)) == NO_ERROR) {
+            result = reply.readInt32();
+        }
+        return result;
+    }
 };
 
 IMPLEMENT_META_INTERFACE(GraphicBufferProducer, "android.gui.IGraphicBufferProducer");
@@ -216,6 +299,41 @@
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
+        case DETACH_BUFFER: {
+            CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
+            int slot = data.readInt32();
+            int result = detachBuffer(slot);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
+        case DETACH_NEXT_BUFFER: {
+            CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
+            sp<GraphicBuffer> buffer;
+            sp<Fence> fence;
+            int32_t result = detachNextBuffer(&buffer, &fence);
+            reply->writeInt32(result);
+            if (result == NO_ERROR) {
+                reply->writeInt32(buffer != NULL);
+                if (buffer != NULL) {
+                    reply->write(*buffer);
+                }
+                reply->writeInt32(fence != NULL);
+                if (fence != NULL) {
+                    reply->write(*fence);
+                }
+            }
+            return NO_ERROR;
+        } break;
+        case ATTACH_BUFFER: {
+            CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
+            sp<GraphicBuffer> buffer = new GraphicBuffer();
+            data.read(*buffer.get());
+            int slot;
+            int result = attachBuffer(&slot, buffer);
+            reply->writeInt32(slot);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
         case QUEUE_BUFFER: {
             CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
             int buf = data.readInt32();
@@ -246,13 +364,16 @@
         } break;
         case CONNECT: {
             CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
-            sp<IBinder> token = data.readStrongBinder();
+            sp<IProducerListener> listener;
+            if (data.readInt32() == 1) {
+                listener = IProducerListener::asInterface(data.readStrongBinder());
+            }
             int api = data.readInt32();
             bool producerControlledByApp = data.readInt32();
             QueueBufferOutput* const output =
                     reinterpret_cast<QueueBufferOutput *>(
                             reply->writeInplace(sizeof(QueueBufferOutput)));
-            status_t res = connect(token, api, producerControlledByApp, output);
+            status_t res = connect(listener, api, producerControlledByApp, output);
             reply->writeInt32(res);
             return NO_ERROR;
         } break;
@@ -263,6 +384,16 @@
             reply->writeInt32(res);
             return NO_ERROR;
         } break;
+        case SET_SIDEBAND_STREAM: {
+            CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
+            sp<NativeHandle> stream;
+            if (data.readInt32()) {
+                stream = NativeHandle::create(data.readNativeHandle(), true);
+            }
+            status_t result = setSidebandStream(stream);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
     }
     return BBinder::onTransact(code, data, reply, flags);
 }
diff --git a/libs/gui/IProducerListener.cpp b/libs/gui/IProducerListener.cpp
new file mode 100644
index 0000000..efe4069
--- /dev/null
+++ b/libs/gui/IProducerListener.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <binder/Parcel.h>
+
+#include <gui/IProducerListener.h>
+
+namespace android {
+
+enum {
+    ON_BUFFER_RELEASED = IBinder::FIRST_CALL_TRANSACTION,
+};
+
+class BpProducerListener : public BpInterface<IProducerListener>
+{
+public:
+    BpProducerListener(const sp<IBinder>& impl)
+        : BpInterface<IProducerListener>(impl) {}
+
+    virtual void onBufferReleased() {
+        Parcel data, reply;
+        data.writeInterfaceToken(IProducerListener::getInterfaceDescriptor());
+        remote()->transact(ON_BUFFER_RELEASED, data, &reply, IBinder::FLAG_ONEWAY);
+    }
+};
+
+IMPLEMENT_META_INTERFACE(ProducerListener, "android.gui.IProducerListener")
+
+status_t BnProducerListener::onTransact(uint32_t code, const Parcel& data,
+        Parcel* reply, uint32_t flags) {
+    switch (code) {
+        case ON_BUFFER_RELEASED:
+            CHECK_INTERFACE(IProducerListener, data, reply);
+            onBufferReleased();
+            return NO_ERROR;
+    }
+    return BBinder::onTransact(code, data, reply, flags);
+}
+
+} // namespace android
diff --git a/libs/gui/ISensorEventConnection.cpp b/libs/gui/ISensorEventConnection.cpp
index 28fcb53..8f88141 100644
--- a/libs/gui/ISensorEventConnection.cpp
+++ b/libs/gui/ISensorEventConnection.cpp
@@ -34,7 +34,8 @@
     GET_SENSOR_CHANNEL = IBinder::FIRST_CALL_TRANSACTION,
     ENABLE_DISABLE,
     SET_EVENT_RATE,
-    FLUSH_SENSOR
+    FLUSH_SENSOR,
+    DECREASE_WAKE_LOCK_REFCOUNT
 };
 
 class BpSensorEventConnection : public BpInterface<ISensorEventConnection>
@@ -83,6 +84,13 @@
         remote()->transact(FLUSH_SENSOR, data, &reply);
         return reply.readInt32();
     }
+
+    virtual void decreaseWakeLockRefCount() {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISensorEventConnection::getInterfaceDescriptor());
+        remote()->transact(DECREASE_WAKE_LOCK_REFCOUNT, data, &reply, IBinder::FLAG_ONEWAY);
+        return;
+    }
 };
 
 IMPLEMENT_META_INTERFACE(SensorEventConnection, "android.gui.SensorEventConnection");
@@ -125,6 +133,11 @@
             reply->writeInt32(result);
             return NO_ERROR;
         } break;
+        case DECREASE_WAKE_LOCK_REFCOUNT: {
+            CHECK_INTERFACE(ISensorEventConnection, data, reply);
+            decreaseWakeLockRefCount();
+            return NO_ERROR;
+        } break;
     }
     return BBinder::onTransact(code, data, reply, flags);
 }
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index aab0604..c6c88a9 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -104,17 +104,20 @@
 
     virtual status_t captureScreen(const sp<IBinder>& display,
             const sp<IGraphicBufferProducer>& producer,
-            uint32_t reqWidth, uint32_t reqHeight,
-            uint32_t minLayerZ, uint32_t maxLayerZ)
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            uint32_t minLayerZ, uint32_t maxLayerZ,
+            bool useIdentityTransform)
     {
         Parcel data, reply;
         data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
         data.writeStrongBinder(display);
         data.writeStrongBinder(producer->asBinder());
+        data.write(sourceCrop);
         data.writeInt32(reqWidth);
         data.writeInt32(reqHeight);
         data.writeInt32(minLayerZ);
         data.writeInt32(maxLayerZ);
+        data.writeInt32(static_cast<int32_t>(useIdentityTransform));
         remote()->transact(BnSurfaceComposer::CAPTURE_SCREEN, data, &reply);
         return reply.readInt32();
     }
@@ -218,13 +221,58 @@
         remote()->transact(BnSurfaceComposer::UNBLANK, data, &reply);
     }
 
-    virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info)
+    virtual status_t getDisplayConfigs(const sp<IBinder>& display,
+            Vector<DisplayInfo>* configs)
     {
         Parcel data, reply;
         data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
         data.writeStrongBinder(display);
-        remote()->transact(BnSurfaceComposer::GET_DISPLAY_INFO, data, &reply);
-        memcpy(info, reply.readInplace(sizeof(DisplayInfo)), sizeof(DisplayInfo));
+        remote()->transact(BnSurfaceComposer::GET_DISPLAY_CONFIGS, data, &reply);
+        status_t result = reply.readInt32();
+        if (result == NO_ERROR) {
+            size_t numConfigs = static_cast<size_t>(reply.readInt32());
+            configs->clear();
+            configs->resize(numConfigs);
+            for (size_t c = 0; c < numConfigs; ++c) {
+                memcpy(&(configs->editItemAt(c)),
+                        reply.readInplace(sizeof(DisplayInfo)),
+                        sizeof(DisplayInfo));
+            }
+        }
+        return result;
+    }
+
+    virtual int getActiveConfig(const sp<IBinder>& display)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+        data.writeStrongBinder(display);
+        remote()->transact(BnSurfaceComposer::GET_ACTIVE_CONFIG, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual status_t setActiveConfig(const sp<IBinder>& display, int id)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+        data.writeStrongBinder(display);
+        data.writeInt32(id);
+        remote()->transact(BnSurfaceComposer::SET_ACTIVE_CONFIG, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual status_t clearAnimationFrameStats() {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+        remote()->transact(BnSurfaceComposer::CLEAR_ANIMATION_FRAME_STATS, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual status_t getAnimationFrameStats(FrameStats* outStats) const {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+        remote()->transact(BnSurfaceComposer::GET_ANIMATION_FRAME_STATS, data, &reply);
+        reply.read(*outStats);
         return reply.readInt32();
     }
 };
@@ -281,12 +329,17 @@
             sp<IBinder> display = data.readStrongBinder();
             sp<IGraphicBufferProducer> producer =
                     interface_cast<IGraphicBufferProducer>(data.readStrongBinder());
+            Rect sourceCrop;
+            data.read(sourceCrop);
             uint32_t reqWidth = data.readInt32();
             uint32_t reqHeight = data.readInt32();
             uint32_t minLayerZ = data.readInt32();
             uint32_t maxLayerZ = data.readInt32();
+            bool useIdentityTransform = static_cast<bool>(data.readInt32());
+
             status_t res = captureScreen(display, producer,
-                    reqWidth, reqHeight, minLayerZ, maxLayerZ);
+                    sourceCrop, reqWidth, reqHeight, minLayerZ, maxLayerZ,
+                    useIdentityTransform);
             reply->writeInt32(res);
             return NO_ERROR;
         }
@@ -337,12 +390,47 @@
             unblank(display);
             return NO_ERROR;
         }
-        case GET_DISPLAY_INFO: {
+        case GET_DISPLAY_CONFIGS: {
             CHECK_INTERFACE(ISurfaceComposer, data, reply);
-            DisplayInfo info;
+            Vector<DisplayInfo> configs;
             sp<IBinder> display = data.readStrongBinder();
-            status_t result = getDisplayInfo(display, &info);
-            memcpy(reply->writeInplace(sizeof(DisplayInfo)), &info, sizeof(DisplayInfo));
+            status_t result = getDisplayConfigs(display, &configs);
+            reply->writeInt32(result);
+            if (result == NO_ERROR) {
+                reply->writeInt32(static_cast<int32_t>(configs.size()));
+                for (size_t c = 0; c < configs.size(); ++c) {
+                    memcpy(reply->writeInplace(sizeof(DisplayInfo)),
+                            &configs[c], sizeof(DisplayInfo));
+                }
+            }
+            return NO_ERROR;
+        }
+        case GET_ACTIVE_CONFIG: {
+            CHECK_INTERFACE(ISurfaceComposer, data, reply);
+            sp<IBinder> display = data.readStrongBinder();
+            int id = getActiveConfig(display);
+            reply->writeInt32(id);
+            return NO_ERROR;
+        }
+        case SET_ACTIVE_CONFIG: {
+            CHECK_INTERFACE(ISurfaceComposer, data, reply);
+            sp<IBinder> display = data.readStrongBinder();
+            int id = data.readInt32();
+            status_t result = setActiveConfig(display, id);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        }
+        case CLEAR_ANIMATION_FRAME_STATS: {
+            CHECK_INTERFACE(ISurfaceComposer, data, reply);
+            status_t result = clearAnimationFrameStats();
+            reply->writeInt32(result);
+            return NO_ERROR;
+        }
+        case GET_ANIMATION_FRAME_STATS: {
+            CHECK_INTERFACE(ISurfaceComposer, data, reply);
+            FrameStats stats;
+            status_t result = getAnimationFrameStats(&stats);
+            reply->write(stats);
             reply->writeInt32(result);
             return NO_ERROR;
         }
diff --git a/libs/gui/ISurfaceComposerClient.cpp b/libs/gui/ISurfaceComposerClient.cpp
index 1adc134..3da6423 100644
--- a/libs/gui/ISurfaceComposerClient.cpp
+++ b/libs/gui/ISurfaceComposerClient.cpp
@@ -39,7 +39,9 @@
 
 enum {
     CREATE_SURFACE = IBinder::FIRST_CALL_TRANSACTION,
-    DESTROY_SURFACE
+    DESTROY_SURFACE,
+    CLEAR_LAYER_FRAME_STATS,
+    GET_LAYER_FRAME_STATS
 };
 
 class BpSurfaceComposerClient : public BpInterface<ISurfaceComposerClient>
@@ -73,6 +75,23 @@
         remote()->transact(DESTROY_SURFACE, data, &reply);
         return reply.readInt32();
     }
+
+    virtual status_t clearLayerFrameStats(const sp<IBinder>& handle) const {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        data.writeStrongBinder(handle);
+        remote()->transact(CLEAR_LAYER_FRAME_STATS, data, &reply);
+        return reply.readInt32();
+    }
+
+    virtual status_t getLayerFrameStats(const sp<IBinder>& handle, FrameStats* outStats) const {
+        Parcel data, reply;
+        data.writeInterfaceToken(ISurfaceComposerClient::getInterfaceDescriptor());
+        data.writeStrongBinder(handle);
+        remote()->transact(GET_LAYER_FRAME_STATS, data, &reply);
+        reply.read(*outStats);
+        return reply.readInt32();
+    }
 };
 
 IMPLEMENT_META_INTERFACE(SurfaceComposerClient, "android.ui.ISurfaceComposerClient");
@@ -101,7 +120,23 @@
         } break;
         case DESTROY_SURFACE: {
             CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
-            reply->writeInt32( destroySurface( data.readStrongBinder() ) );
+            reply->writeInt32(destroySurface( data.readStrongBinder() ) );
+            return NO_ERROR;
+        } break;
+       case CLEAR_LAYER_FRAME_STATS: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            sp<IBinder> handle = data.readStrongBinder();
+            status_t result = clearLayerFrameStats(handle);
+            reply->writeInt32(result);
+            return NO_ERROR;
+        } break;
+        case GET_LAYER_FRAME_STATS: {
+            CHECK_INTERFACE(ISurfaceComposerClient, data, reply);
+            sp<IBinder> handle = data.readStrongBinder();
+            FrameStats stats;
+            status_t result = getLayerFrameStats(handle, &stats);
+            reply->write(stats);
+            reply->writeInt32(result);
             return NO_ERROR;
         } break;
         default:
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp
index 8f63870..f161aeb 100644
--- a/libs/gui/Sensor.cpp
+++ b/libs/gui/Sensor.cpp
@@ -14,8 +14,10 @@
  * limitations under the License.
  */
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <sys/types.h>
+#include <sys/limits.h>
 
 #include <utils/Errors.h>
 #include <utils/String8.h>
@@ -24,6 +26,7 @@
 #include <hardware/sensors.h>
 
 #include <gui/Sensor.h>
+#include <log/log.h>
 
 // ----------------------------------------------------------------------------
 namespace android {
@@ -32,7 +35,8 @@
 Sensor::Sensor()
     : mHandle(0), mType(0),
       mMinValue(0), mMaxValue(0), mResolution(0),
-      mPower(0), mMinDelay(0), mFifoReservedEventCount(0), mFifoMaxEventCount(0)
+      mPower(0), mMinDelay(0), mFifoReservedEventCount(0), mFifoMaxEventCount(0),
+      mMaxDelay(0), mWakeUpSensor(false)
 {
 }
 
@@ -48,6 +52,7 @@
     mResolution = hwSensor->resolution;
     mPower = hwSensor->power;
     mMinDelay = hwSensor->minDelay;
+    mWakeUpSensor = false;
 
     // Set fifo event count zero for older devices which do not support batching. Fused
     // sensors also have their fifo counts set to zero.
@@ -59,6 +64,21 @@
         mFifoMaxEventCount = 0;
     }
 
+    if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) {
+        if (hwSensor->maxDelay > INT_MAX) {
+            // Max delay is declared as a 64 bit integer for 64 bit architectures. But it should
+            // always fit in a 32 bit integer, log error and cap it to INT_MAX.
+            ALOGE("Sensor maxDelay overflow error %s %" PRId64, mName.string(),
+                  static_cast<int64_t>(hwSensor->maxDelay));
+            mMaxDelay = INT_MAX;
+        } else {
+            mMaxDelay = (int32_t) hwSensor->maxDelay;
+        }
+    } else {
+        // For older hals set maxDelay to 0.
+        mMaxDelay = 0;
+    }
+
     // Ensure existing sensors have correct string type and required
     // permissions.
     switch (mType) {
@@ -107,6 +127,7 @@
         break;
     case SENSOR_TYPE_PROXIMITY:
         mStringType = SENSOR_STRING_TYPE_PROXIMITY;
+        mWakeUpSensor = true;
         break;
     case SENSOR_TYPE_RELATIVE_HUMIDITY:
         mStringType = SENSOR_STRING_TYPE_RELATIVE_HUMIDITY;
@@ -116,6 +137,7 @@
         break;
     case SENSOR_TYPE_SIGNIFICANT_MOTION:
         mStringType = SENSOR_STRING_TYPE_SIGNIFICANT_MOTION;
+        mWakeUpSensor = true;
         break;
     case SENSOR_TYPE_STEP_COUNTER:
         mStringType = SENSOR_STRING_TYPE_STEP_COUNTER;
@@ -126,14 +148,97 @@
     case SENSOR_TYPE_TEMPERATURE:
         mStringType = SENSOR_STRING_TYPE_TEMPERATURE;
         break;
+    case SENSOR_TYPE_NON_WAKE_UP_PROXIMITY_SENSOR:
+        mStringType = SENSOR_STRING_TYPE_NON_WAKE_UP_PROXIMITY_SENSOR;
+        break;
+    case SENSOR_TYPE_WAKE_UP_ACCELEROMETER:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_ACCELEROMETER;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_MAGNETIC_FIELD:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_MAGNETIC_FIELD;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_ORIENTATION:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_ORIENTATION;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_GYROSCOPE:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_GYROSCOPE;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_LIGHT:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_LIGHT;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_PRESSURE:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_PRESSURE;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_GRAVITY:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_GRAVITY;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_LINEAR_ACCELERATION:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_LINEAR_ACCELERATION;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_ROTATION_VECTOR:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_ROTATION_VECTOR;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_RELATIVE_HUMIDITY:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_RELATIVE_HUMIDITY;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_AMBIENT_TEMPERATURE:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_AMBIENT_TEMPERATURE;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_MAGNETIC_FIELD_UNCALIBRATED:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_MAGNETIC_FIELD_UNCALIBRATED;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_GAME_ROTATION_VECTOR:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_GAME_ROTATION_VECTOR;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_GYROSCOPE_UNCALIBRATED:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_GYROSCOPE_UNCALIBRATED;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_STEP_DETECTOR:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_STEP_DETECTOR;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_STEP_COUNTER:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_STEP_COUNTER;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_GEOMAGNETIC_ROTATION_VECTOR:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_GEOMAGNETIC_ROTATION_VECTOR;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_UP_HEART_RATE:
+        mStringType = SENSOR_STRING_TYPE_WAKE_UP_HEART_RATE;
+        mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS;
+        mWakeUpSensor = true;
+        break;
+    case SENSOR_TYPE_WAKE_GESTURE:
+        mStringType = SENSOR_STRING_TYPE_WAKE_GESTURE;
+        mWakeUpSensor = true;
+        break;
     default:
-        // Only pipe the stringType and requiredPermission for custom sensors.
+        // Only pipe the stringType, requiredPermission and flags for custom sensors.
         if (halVersion >= SENSORS_DEVICE_API_VERSION_1_2 && hwSensor->stringType) {
             mStringType = hwSensor->stringType;
         }
         if (halVersion >= SENSORS_DEVICE_API_VERSION_1_2 && hwSensor->requiredPermission) {
             mRequiredPermission = hwSensor->requiredPermission;
         }
+        if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) {
+            mWakeUpSensor = hwSensor->flags & SENSOR_FLAG_WAKE_UP;
+        }
         break;
     }
 }
@@ -202,12 +307,21 @@
     return mRequiredPermission;
 }
 
+int32_t Sensor::getMaxDelay() const {
+    return mMaxDelay;
+}
+
+bool Sensor::isWakeUpSensor() const {
+    return mWakeUpSensor;
+}
+
 size_t Sensor::getFlattenedSize() const
 {
     size_t fixedSize =
             sizeof(int32_t) * 3 +
             sizeof(float) * 4 +
-            sizeof(int32_t) * 3;
+            sizeof(int32_t) * 4 +
+            sizeof(bool) * 1;
 
     size_t variableSize =
             sizeof(uint32_t) + FlattenableUtils::align<4>(mName.length()) +
@@ -237,6 +351,8 @@
     FlattenableUtils::write(buffer, size, mFifoMaxEventCount);
     flattenString8(buffer, size, mStringType);
     flattenString8(buffer, size, mRequiredPermission);
+    FlattenableUtils::write(buffer, size, mMaxDelay);
+    FlattenableUtils::write(buffer, size, mWakeUpSensor);
     return NO_ERROR;
 }
 
@@ -251,7 +367,8 @@
     size_t fixedSize =
             sizeof(int32_t) * 3 +
             sizeof(float) * 4 +
-            sizeof(int32_t) * 3;
+            sizeof(int32_t) * 4 +
+            sizeof(bool) * 1;
     if (size < fixedSize) {
         return NO_MEMORY;
     }
@@ -273,6 +390,8 @@
     if (!unflattenString8(buffer, size, mRequiredPermission)) {
         return NO_MEMORY;
     }
+    FlattenableUtils::read(buffer, size, mMaxDelay);
+    FlattenableUtils::read(buffer, size, mWakeUpSensor);
     return NO_ERROR;
 }
 
diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp
index c365671..c2eaf4e 100644
--- a/libs/gui/SensorEventQueue.cpp
+++ b/libs/gui/SensorEventQueue.cpp
@@ -144,6 +144,15 @@
     return mSensorEventConnection->setEventRate(sensor->getHandle(), ns);
 }
 
+void SensorEventQueue::sendAck(const ASensorEvent* events, int count) {
+    for (int i = 0; i < count; ++i) {
+        if (events[i].flags & WAKE_UP_SENSOR_EVENT_NEEDS_ACK) {
+            mSensorEventConnection->decreaseWakeLockRefCount();
+        }
+    }
+    return;
+}
+
 // ----------------------------------------------------------------------------
 }; // namespace android
 
diff --git a/libs/gui/StreamSplitter.cpp b/libs/gui/StreamSplitter.cpp
new file mode 100644
index 0000000..771b263
--- /dev/null
+++ b/libs/gui/StreamSplitter.cpp
@@ -0,0 +1,284 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <inttypes.h>
+
+#define LOG_TAG "StreamSplitter"
+#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+//#define LOG_NDEBUG 0
+
+#include <gui/IGraphicBufferConsumer.h>
+#include <gui/IGraphicBufferProducer.h>
+#include <gui/StreamSplitter.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include <binder/ProcessState.h>
+
+#include <utils/Trace.h>
+
+namespace android {
+
+status_t StreamSplitter::createSplitter(
+        const sp<IGraphicBufferConsumer>& inputQueue,
+        sp<StreamSplitter>* outSplitter) {
+    if (inputQueue == NULL) {
+        ALOGE("createSplitter: inputQueue must not be NULL");
+        return BAD_VALUE;
+    }
+    if (outSplitter == NULL) {
+        ALOGE("createSplitter: outSplitter must not be NULL");
+        return BAD_VALUE;
+    }
+
+    sp<StreamSplitter> splitter(new StreamSplitter(inputQueue));
+    status_t status = splitter->mInput->consumerConnect(splitter, false);
+    if (status == NO_ERROR) {
+        splitter->mInput->setConsumerName(String8("StreamSplitter"));
+        *outSplitter = splitter;
+    }
+    return status;
+}
+
+StreamSplitter::StreamSplitter(const sp<IGraphicBufferConsumer>& inputQueue)
+      : mIsAbandoned(false), mMutex(), mReleaseCondition(),
+        mOutstandingBuffers(0), mInput(inputQueue), mOutputs(), mBuffers() {}
+
+StreamSplitter::~StreamSplitter() {
+    mInput->consumerDisconnect();
+    Vector<sp<IGraphicBufferProducer> >::iterator output = mOutputs.begin();
+    for (; output != mOutputs.end(); ++output) {
+        (*output)->disconnect(NATIVE_WINDOW_API_CPU);
+    }
+
+    if (mBuffers.size() > 0) {
+        ALOGE("%zu buffers still being tracked", mBuffers.size());
+    }
+}
+
+status_t StreamSplitter::addOutput(
+        const sp<IGraphicBufferProducer>& outputQueue) {
+    if (outputQueue == NULL) {
+        ALOGE("addOutput: outputQueue must not be NULL");
+        return BAD_VALUE;
+    }
+
+    Mutex::Autolock lock(mMutex);
+
+    IGraphicBufferProducer::QueueBufferOutput queueBufferOutput;
+    sp<OutputListener> listener(new OutputListener(this, outputQueue));
+    outputQueue->asBinder()->linkToDeath(listener);
+    status_t status = outputQueue->connect(listener, NATIVE_WINDOW_API_CPU,
+            /* producerControlledByApp */ false, &queueBufferOutput);
+    if (status != NO_ERROR) {
+        ALOGE("addOutput: failed to connect (%d)", status);
+        return status;
+    }
+
+    mOutputs.push_back(outputQueue);
+
+    return NO_ERROR;
+}
+
+void StreamSplitter::setName(const String8 &name) {
+    Mutex::Autolock lock(mMutex);
+    mInput->setConsumerName(name);
+}
+
+void StreamSplitter::onFrameAvailable() {
+    ATRACE_CALL();
+    Mutex::Autolock lock(mMutex);
+
+    // The current policy is that if any one consumer is consuming buffers too
+    // slowly, the splitter will stall the rest of the outputs by not acquiring
+    // any more buffers from the input. This will cause back pressure on the
+    // input queue, slowing down its producer.
+
+    // If there are too many outstanding buffers, we block until a buffer is
+    // released back to the input in onBufferReleased
+    while (mOutstandingBuffers >= MAX_OUTSTANDING_BUFFERS) {
+        mReleaseCondition.wait(mMutex);
+
+        // If the splitter is abandoned while we are waiting, the release
+        // condition variable will be broadcast, and we should just return
+        // without attempting to do anything more (since the input queue will
+        // also be abandoned).
+        if (mIsAbandoned) {
+            return;
+        }
+    }
+    ++mOutstandingBuffers;
+
+    // Acquire and detach the buffer from the input
+    IGraphicBufferConsumer::BufferItem bufferItem;
+    status_t status = mInput->acquireBuffer(&bufferItem, /* presentWhen */ 0);
+    LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+            "acquiring buffer from input failed (%d)", status);
+
+    ALOGV("acquired buffer %#" PRIx64 " from input",
+            bufferItem.mGraphicBuffer->getId());
+
+    status = mInput->detachBuffer(bufferItem.mBuf);
+    LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+            "detaching buffer from input failed (%d)", status);
+
+    // Initialize our reference count for this buffer
+    mBuffers.add(bufferItem.mGraphicBuffer->getId(),
+            new BufferTracker(bufferItem.mGraphicBuffer));
+
+    IGraphicBufferProducer::QueueBufferInput queueInput(
+            bufferItem.mTimestamp, bufferItem.mIsAutoTimestamp,
+            bufferItem.mCrop, bufferItem.mScalingMode,
+            bufferItem.mTransform, bufferItem.mIsDroppable,
+            bufferItem.mFence);
+
+    // Attach and queue the buffer to each of the outputs
+    Vector<sp<IGraphicBufferProducer> >::iterator output = mOutputs.begin();
+    for (; output != mOutputs.end(); ++output) {
+        int slot;
+        status = (*output)->attachBuffer(&slot, bufferItem.mGraphicBuffer);
+        if (status == NO_INIT) {
+            // If we just discovered that this output has been abandoned, note
+            // that, increment the release count so that we still release this
+            // buffer eventually, and move on to the next output
+            onAbandonedLocked();
+            mBuffers.editValueFor(bufferItem.mGraphicBuffer->getId())->
+                    incrementReleaseCountLocked();
+            continue;
+        } else {
+            LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+                    "attaching buffer to output failed (%d)", status);
+        }
+
+        IGraphicBufferProducer::QueueBufferOutput queueOutput;
+        status = (*output)->queueBuffer(slot, queueInput, &queueOutput);
+        if (status == NO_INIT) {
+            // If we just discovered that this output has been abandoned, note
+            // that, increment the release count so that we still release this
+            // buffer eventually, and move on to the next output
+            onAbandonedLocked();
+            mBuffers.editValueFor(bufferItem.mGraphicBuffer->getId())->
+                    incrementReleaseCountLocked();
+            continue;
+        } else {
+            LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+                    "queueing buffer to output failed (%d)", status);
+        }
+
+        ALOGV("queued buffer %#" PRIx64 " to output %p",
+                bufferItem.mGraphicBuffer->getId(), output->get());
+    }
+}
+
+void StreamSplitter::onBufferReleasedByOutput(
+        const sp<IGraphicBufferProducer>& from) {
+    ATRACE_CALL();
+    Mutex::Autolock lock(mMutex);
+
+    sp<GraphicBuffer> buffer;
+    sp<Fence> fence;
+    status_t status = from->detachNextBuffer(&buffer, &fence);
+    if (status == NO_INIT) {
+        // If we just discovered that this output has been abandoned, note that,
+        // but we can't do anything else, since buffer is invalid
+        onAbandonedLocked();
+        return;
+    } else {
+        LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+                "detaching buffer from output failed (%d)", status);
+    }
+
+    ALOGV("detached buffer %#" PRIx64 " from output %p",
+          buffer->getId(), from.get());
+
+    const sp<BufferTracker>& tracker = mBuffers.editValueFor(buffer->getId());
+
+    // Merge the release fence of the incoming buffer so that the fence we send
+    // back to the input includes all of the outputs' fences
+    tracker->mergeFence(fence);
+
+    // Check to see if this is the last outstanding reference to this buffer
+    size_t releaseCount = tracker->incrementReleaseCountLocked();
+    ALOGV("buffer %#" PRIx64 " reference count %zu (of %zu)", buffer->getId(),
+            releaseCount, mOutputs.size());
+    if (releaseCount < mOutputs.size()) {
+        return;
+    }
+
+    // If we've been abandoned, we can't return the buffer to the input, so just
+    // stop tracking it and move on
+    if (mIsAbandoned) {
+        mBuffers.removeItem(buffer->getId());
+        return;
+    }
+
+    // Attach and release the buffer back to the input
+    int consumerSlot;
+    status = mInput->attachBuffer(&consumerSlot, tracker->getBuffer());
+    LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+            "attaching buffer to input failed (%d)", status);
+
+    status = mInput->releaseBuffer(consumerSlot, /* frameNumber */ 0,
+            EGL_NO_DISPLAY, EGL_NO_SYNC_KHR, tracker->getMergedFence());
+    LOG_ALWAYS_FATAL_IF(status != NO_ERROR,
+            "releasing buffer to input failed (%d)", status);
+
+    ALOGV("released buffer %#" PRIx64 " to input", buffer->getId());
+
+    // We no longer need to track the buffer once it has been returned to the
+    // input
+    mBuffers.removeItem(buffer->getId());
+
+    // Notify any waiting onFrameAvailable calls
+    --mOutstandingBuffers;
+    mReleaseCondition.signal();
+}
+
+void StreamSplitter::onAbandonedLocked() {
+    ALOGE("one of my outputs has abandoned me");
+    if (!mIsAbandoned) {
+        mInput->consumerDisconnect();
+    }
+    mIsAbandoned = true;
+    mReleaseCondition.broadcast();
+}
+
+StreamSplitter::OutputListener::OutputListener(
+        const sp<StreamSplitter>& splitter,
+        const sp<IGraphicBufferProducer>& output)
+      : mSplitter(splitter), mOutput(output) {}
+
+StreamSplitter::OutputListener::~OutputListener() {}
+
+void StreamSplitter::OutputListener::onBufferReleased() {
+    mSplitter->onBufferReleasedByOutput(mOutput);
+}
+
+void StreamSplitter::OutputListener::binderDied(const wp<IBinder>& /* who */) {
+    Mutex::Autolock lock(mSplitter->mMutex);
+    mSplitter->onAbandonedLocked();
+}
+
+StreamSplitter::BufferTracker::BufferTracker(const sp<GraphicBuffer>& buffer)
+      : mBuffer(buffer), mMergedFence(Fence::NO_FENCE), mReleaseCount(0) {}
+
+StreamSplitter::BufferTracker::~BufferTracker() {}
+
+void StreamSplitter::BufferTracker::mergeFence(const sp<Fence>& with) {
+    mMergedFence = Fence::merge(String8("StreamSplitter"), mMergedFence, with);
+}
+
+} // namespace android
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 21ffc06..88c45b2 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -27,6 +27,7 @@
 
 #include <ui/Fence.h>
 
+#include <gui/IProducerListener.h>
 #include <gui/ISurfaceComposer.h>
 #include <gui/SurfaceComposerClient.h>
 #include <gui/GLConsumer.h>
@@ -86,6 +87,10 @@
     return mGraphicBufferProducer;
 }
 
+void Surface::setSidebandStream(const sp<NativeHandle>& stream) {
+    mGraphicBufferProducer->setSidebandStream(stream);
+}
+
 int Surface::hook_setSwapInterval(ANativeWindow* window, int interval) {
     Surface* c = getSelf(window);
     return c->setSwapInterval(interval);
@@ -178,19 +183,38 @@
 int Surface::dequeueBuffer(android_native_buffer_t** buffer, int* fenceFd) {
     ATRACE_CALL();
     ALOGV("Surface::dequeueBuffer");
-    Mutex::Autolock lock(mMutex);
+
+    int reqW;
+    int reqH;
+    bool swapIntervalZero;
+    uint32_t reqFormat;
+    uint32_t reqUsage;
+
+    {
+        Mutex::Autolock lock(mMutex);
+
+        reqW = mReqWidth ? mReqWidth : mUserWidth;
+        reqH = mReqHeight ? mReqHeight : mUserHeight;
+
+        swapIntervalZero = mSwapIntervalZero;
+        reqFormat = mReqFormat;
+        reqUsage = mReqUsage;
+    } // Drop the lock so that we can still touch the Surface while blocking in IGBP::dequeueBuffer
+
     int buf = -1;
-    int reqW = mReqWidth ? mReqWidth : mUserWidth;
-    int reqH = mReqHeight ? mReqHeight : mUserHeight;
     sp<Fence> fence;
-    status_t result = mGraphicBufferProducer->dequeueBuffer(&buf, &fence, mSwapIntervalZero,
-            reqW, reqH, mReqFormat, mReqUsage);
+    status_t result = mGraphicBufferProducer->dequeueBuffer(&buf, &fence, swapIntervalZero,
+            reqW, reqH, reqFormat, reqUsage);
+
     if (result < 0) {
-        ALOGV("dequeueBuffer: IGraphicBufferProducer::dequeueBuffer(%d, %d, %d, %d)"
-             "failed: %d", mReqWidth, mReqHeight, mReqFormat, mReqUsage,
+        ALOGV("dequeueBuffer: IGraphicBufferProducer::dequeueBuffer(%d, %d, %d, %d, %d)"
+             "failed: %d", swapIntervalZero, reqW, reqH, reqFormat, reqUsage,
              result);
         return result;
     }
+
+    Mutex::Autolock lock(mMutex);
+
     sp<GraphicBuffer>& gbuf(mSlots[buf].buffer);
 
     // this should never happen
@@ -251,7 +275,7 @@
     return BAD_VALUE;
 }
 
-int Surface::lockBuffer_DEPRECATED(android_native_buffer_t* buffer) {
+int Surface::lockBuffer_DEPRECATED(android_native_buffer_t* buffer __attribute__((unused))) {
     ALOGV("Surface::lockBuffer");
     Mutex::Autolock lock(mMutex);
     return OK;
@@ -482,7 +506,7 @@
     return lock(outBuffer, inOutDirtyBounds);
 }
 
-int Surface::dispatchUnlockAndPost(va_list args) {
+int Surface::dispatchUnlockAndPost(va_list args __attribute__((unused))) {
     return unlockAndPost();
 }
 
@@ -490,10 +514,10 @@
 int Surface::connect(int api) {
     ATRACE_CALL();
     ALOGV("Surface::connect");
-    static sp<BBinder> sLife = new BBinder();
+    static sp<IProducerListener> listener = new DummyProducerListener();
     Mutex::Autolock lock(mMutex);
     IGraphicBufferProducer::QueueBufferOutput output;
-    int err = mGraphicBufferProducer->connect(sLife, api, mProducerControlledByApp, &output);
+    int err = mGraphicBufferProducer->connect(listener, api, mProducerControlledByApp, &output);
     if (err == NO_ERROR) {
         uint32_t numPendingBuffers = 0;
         output.deflate(&mDefaultWidth, &mDefaultHeight, &mTransformHint,
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 2246f5f..eedeca1 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -515,6 +515,21 @@
     return err;
 }
 
+status_t SurfaceComposerClient::clearLayerFrameStats(const sp<IBinder>& token) const {
+    if (mStatus != NO_ERROR) {
+        return mStatus;
+    }
+    return mClient->clearLayerFrameStats(token);
+}
+
+status_t SurfaceComposerClient::getLayerFrameStats(const sp<IBinder>& token,
+        FrameStats* outStats) const {
+    if (mStatus != NO_ERROR) {
+        return mStatus;
+    }
+    return mClient->getLayerFrameStats(token, outStats);
+}
+
 inline Composer& SurfaceComposerClient::getComposer() {
     return mComposer;
 }
@@ -608,10 +623,36 @@
 
 // ----------------------------------------------------------------------------
 
-status_t SurfaceComposerClient::getDisplayInfo(
-        const sp<IBinder>& display, DisplayInfo* info)
+status_t SurfaceComposerClient::getDisplayConfigs(
+        const sp<IBinder>& display, Vector<DisplayInfo>* configs)
 {
-    return ComposerService::getComposerService()->getDisplayInfo(display, info);
+    return ComposerService::getComposerService()->getDisplayConfigs(display, configs);
+}
+
+status_t SurfaceComposerClient::getDisplayInfo(const sp<IBinder>& display,
+        DisplayInfo* info) {
+    Vector<DisplayInfo> configs;
+    status_t result = getDisplayConfigs(display, &configs);
+    if (result != NO_ERROR) {
+        return result;
+    }
+
+    int activeId = getActiveConfig(display);
+    if (activeId < 0) {
+        ALOGE("No active configuration found");
+        return NAME_NOT_FOUND;
+    }
+
+    *info = configs[activeId];
+    return NO_ERROR;
+}
+
+int SurfaceComposerClient::getActiveConfig(const sp<IBinder>& display) {
+    return ComposerService::getComposerService()->getActiveConfig(display);
+}
+
+status_t SurfaceComposerClient::setActiveConfig(const sp<IBinder>& display, int id) {
+    return ComposerService::getComposerService()->setActiveConfig(display, id);
 }
 
 void SurfaceComposerClient::blankDisplay(const sp<IBinder>& token) {
@@ -622,17 +663,25 @@
     ComposerService::getComposerService()->unblank(token);
 }
 
+status_t SurfaceComposerClient::clearAnimationFrameStats() {
+    return ComposerService::getComposerService()->clearAnimationFrameStats();
+}
+
+status_t SurfaceComposerClient::getAnimationFrameStats(FrameStats* outStats) {
+    return ComposerService::getComposerService()->getAnimationFrameStats(outStats);
+}
+
 // ----------------------------------------------------------------------------
 
 status_t ScreenshotClient::capture(
         const sp<IBinder>& display,
         const sp<IGraphicBufferProducer>& producer,
-        uint32_t reqWidth, uint32_t reqHeight,
-        uint32_t minLayerZ, uint32_t maxLayerZ) {
+        Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+        uint32_t minLayerZ, uint32_t maxLayerZ, bool useIdentityTransform) {
     sp<ISurfaceComposer> s(ComposerService::getComposerService());
     if (s == NULL) return NO_INIT;
-    return s->captureScreen(display, producer,
-            reqWidth, reqHeight, minLayerZ, maxLayerZ);
+    return s->captureScreen(display, producer, sourceCrop,
+            reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform);
 }
 
 ScreenshotClient::ScreenshotClient()
@@ -646,16 +695,18 @@
 
 sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
     if (mCpuConsumer == NULL) {
-        mBufferQueue = new BufferQueue();
-        mCpuConsumer = new CpuConsumer(mBufferQueue, 1);
+        sp<IGraphicBufferConsumer> consumer;
+        BufferQueue::createBufferQueue(&mProducer, &consumer);
+        mCpuConsumer = new CpuConsumer(consumer, 1);
         mCpuConsumer->setName(String8("ScreenshotClient"));
     }
     return mCpuConsumer;
 }
 
 status_t ScreenshotClient::update(const sp<IBinder>& display,
-        uint32_t reqWidth, uint32_t reqHeight,
-        uint32_t minLayerZ, uint32_t maxLayerZ) {
+        Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+        uint32_t minLayerZ, uint32_t maxLayerZ,
+        bool useIdentityTransform) {
     sp<ISurfaceComposer> s(ComposerService::getComposerService());
     if (s == NULL) return NO_INIT;
     sp<CpuConsumer> cpuConsumer = getCpuConsumer();
@@ -666,8 +717,8 @@
         mHaveBuffer = false;
     }
 
-    status_t err = s->captureScreen(display, mBufferQueue,
-            reqWidth, reqHeight, minLayerZ, maxLayerZ);
+    status_t err = s->captureScreen(display, mProducer, sourceCrop,
+            reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform);
 
     if (err == NO_ERROR) {
         err = mCpuConsumer->lockNextBuffer(&mBuffer);
@@ -678,13 +729,16 @@
     return err;
 }
 
-status_t ScreenshotClient::update(const sp<IBinder>& display) {
-    return ScreenshotClient::update(display, 0, 0, 0, -1UL);
+status_t ScreenshotClient::update(const sp<IBinder>& display, Rect sourceCrop,
+        bool useIdentityTransform) {
+    return ScreenshotClient::update(display, sourceCrop, 0, 0, 0, -1UL,
+            useIdentityTransform);
 }
 
-status_t ScreenshotClient::update(const sp<IBinder>& display,
-        uint32_t reqWidth, uint32_t reqHeight) {
-    return ScreenshotClient::update(display, reqWidth, reqHeight, 0, -1UL);
+status_t ScreenshotClient::update(const sp<IBinder>& display, Rect sourceCrop,
+        uint32_t reqWidth, uint32_t reqHeight, bool useIdentityTransform) {
+    return ScreenshotClient::update(display, sourceCrop, reqWidth, reqHeight,
+            0, -1UL, useIdentityTransform);
 }
 
 void ScreenshotClient::release() {
diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp
index 16e533c..7597c99 100644
--- a/libs/gui/SurfaceControl.cpp
+++ b/libs/gui/SurfaceControl.cpp
@@ -23,7 +23,6 @@
 
 #include <android/native_window.h>
 
-#include <utils/CallStack.h>
 #include <utils/Errors.h>
 #include <utils/Log.h>
 #include <utils/threads.h>
@@ -93,68 +92,71 @@
 status_t SurfaceControl::setLayerStack(int32_t layerStack) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setLayerStack(mHandle, layerStack);
+    return mClient->setLayerStack(mHandle, layerStack);
 }
 status_t SurfaceControl::setLayer(int32_t layer) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setLayer(mHandle, layer);
+    return mClient->setLayer(mHandle, layer);
 }
 status_t SurfaceControl::setPosition(float x, float y) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setPosition(mHandle, x, y);
+    return mClient->setPosition(mHandle, x, y);
 }
 status_t SurfaceControl::setSize(uint32_t w, uint32_t h) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setSize(mHandle, w, h);
+    return mClient->setSize(mHandle, w, h);
 }
 status_t SurfaceControl::hide() {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->hide(mHandle);
+    return mClient->hide(mHandle);
 }
 status_t SurfaceControl::show() {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->show(mHandle);
+    return mClient->show(mHandle);
 }
 status_t SurfaceControl::setFlags(uint32_t flags, uint32_t mask) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setFlags(mHandle, flags, mask);
+    return mClient->setFlags(mHandle, flags, mask);
 }
 status_t SurfaceControl::setTransparentRegionHint(const Region& transparent) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setTransparentRegionHint(mHandle, transparent);
+    return mClient->setTransparentRegionHint(mHandle, transparent);
 }
 status_t SurfaceControl::setAlpha(float alpha) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setAlpha(mHandle, alpha);
+    return mClient->setAlpha(mHandle, alpha);
 }
 status_t SurfaceControl::setMatrix(float dsdx, float dtdx, float dsdy, float dtdy) {
     status_t err = validate();
     if (err < 0) return err;
-    const sp<SurfaceComposerClient>& client(mClient);
-    return client->setMatrix(mHandle, dsdx, dtdx, dsdy, dtdy);
+    return mClient->setMatrix(mHandle, dsdx, dtdx, dsdy, dtdy);
 }
 status_t SurfaceControl::setCrop(const Rect& crop) {
     status_t err = validate();
     if (err < 0) return err;
+    return mClient->setCrop(mHandle, crop);
+}
+
+status_t SurfaceControl::clearLayerFrameStats() const {
+    status_t err = validate();
+    if (err < 0) return err;
     const sp<SurfaceComposerClient>& client(mClient);
-    return client->setCrop(mHandle, crop);
+    return client->clearLayerFrameStats(mHandle);
+}
+
+status_t SurfaceControl::getLayerFrameStats(FrameStats* outStats) const {
+    status_t err = validate();
+    if (err < 0) return err;
+    const sp<SurfaceComposerClient>& client(mClient);
+    return client->getLayerFrameStats(mHandle, outStats);
 }
 
 status_t SurfaceControl::validate() const
diff --git a/libs/gui/tests/Android.mk b/libs/gui/tests/Android.mk
index 21bd875..e460290 100644
--- a/libs/gui/tests/Android.mk
+++ b/libs/gui/tests/Android.mk
@@ -9,9 +9,20 @@
 LOCAL_SRC_FILES := \
     BufferQueue_test.cpp \
     CpuConsumer_test.cpp \
+    FillBuffer.cpp \
+    GLTest.cpp \
+    IGraphicBufferProducer_test.cpp \
+    MultiTextureConsumer_test.cpp \
+    SRGB_test.cpp \
+    StreamSplitter_test.cpp \
     SurfaceTextureClient_test.cpp \
-    SurfaceTexture_test.cpp \
+    SurfaceTextureFBO_test.cpp \
+    SurfaceTextureGLThreadToGL_test.cpp \
+    SurfaceTextureGLToGL_test.cpp \
+    SurfaceTextureGL_test.cpp \
+    SurfaceTextureMultiContextGL_test.cpp \
     Surface_test.cpp \
+    TextureRenderer.cpp \
 
 LOCAL_SHARED_LIBRARIES := \
 	libEGL \
diff --git a/libs/gui/tests/BufferQueue_test.cpp b/libs/gui/tests/BufferQueue_test.cpp
index 03c1a29..c781366 100644
--- a/libs/gui/tests/BufferQueue_test.cpp
+++ b/libs/gui/tests/BufferQueue_test.cpp
@@ -17,55 +17,135 @@
 #define LOG_TAG "BufferQueue_test"
 //#define LOG_NDEBUG 0
 
-#include <gtest/gtest.h>
+#include <gui/BufferQueue.h>
+#include <gui/IProducerListener.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
 
 #include <utils/String8.h>
 #include <utils/threads.h>
 
-#include <ui/GraphicBuffer.h>
-#include <ui/FramebufferNativeWindow.h>
-
-#include <gui/BufferQueue.h>
+#include <gtest/gtest.h>
 
 namespace android {
 
 class BufferQueueTest : public ::testing::Test {
+
+public:
 protected:
-
-    BufferQueueTest() {}
-
-    virtual void SetUp() {
+    BufferQueueTest() {
         const ::testing::TestInfo* const testInfo =
             ::testing::UnitTest::GetInstance()->current_test_info();
         ALOGV("Begin test: %s.%s", testInfo->test_case_name(),
                 testInfo->name());
-
-        mBQ = new BufferQueue();
     }
 
-    virtual void TearDown() {
-        mBQ.clear();
-
+    ~BufferQueueTest() {
         const ::testing::TestInfo* const testInfo =
             ::testing::UnitTest::GetInstance()->current_test_info();
         ALOGV("End test:   %s.%s", testInfo->test_case_name(),
                 testInfo->name());
     }
 
-    sp<BufferQueue> mBQ;
+    void GetMinUndequeuedBufferCount(int* bufferCount) {
+        ASSERT_TRUE(bufferCount != NULL);
+        ASSERT_EQ(OK, mProducer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS,
+                    bufferCount));
+        ASSERT_GE(*bufferCount, 0);
+    }
+
+    void createBufferQueue() {
+        BufferQueue::createBufferQueue(&mProducer, &mConsumer);
+    }
+
+    sp<IGraphicBufferProducer> mProducer;
+    sp<IGraphicBufferConsumer> mConsumer;
 };
 
 struct DummyConsumer : public BnConsumerListener {
     virtual void onFrameAvailable() {}
     virtual void onBuffersReleased() {}
+    virtual void onSidebandStreamChanged() {}
 };
 
-TEST_F(BufferQueueTest, AcquireBuffer_ExceedsMaxAcquireCount_Fails) {
+// XXX: Tests that fork a process to hold the BufferQueue must run before tests
+// that use a local BufferQueue, or else Binder will get unhappy
+TEST_F(BufferQueueTest, BufferQueueInAnotherProcess) {
+    const String16 PRODUCER_NAME = String16("BQTestProducer");
+    const String16 CONSUMER_NAME = String16("BQTestConsumer");
+
+    pid_t forkPid = fork();
+    ASSERT_NE(forkPid, -1);
+
+    if (forkPid == 0) {
+        // Child process
+        sp<IGraphicBufferProducer> producer;
+        sp<IGraphicBufferConsumer> consumer;
+        BufferQueue::createBufferQueue(&producer, &consumer);
+        sp<IServiceManager> serviceManager = defaultServiceManager();
+        serviceManager->addService(PRODUCER_NAME, producer->asBinder());
+        serviceManager->addService(CONSUMER_NAME, consumer->asBinder());
+        ProcessState::self()->startThreadPool();
+        IPCThreadState::self()->joinThreadPool();
+        LOG_ALWAYS_FATAL("Shouldn't be here");
+    }
+
+    sp<IServiceManager> serviceManager = defaultServiceManager();
+    sp<IBinder> binderProducer =
+        serviceManager->getService(PRODUCER_NAME);
+    mProducer = interface_cast<IGraphicBufferProducer>(binderProducer);
+    EXPECT_TRUE(mProducer != NULL);
+    sp<IBinder> binderConsumer =
+        serviceManager->getService(CONSUMER_NAME);
+    mConsumer = interface_cast<IGraphicBufferConsumer>(binderConsumer);
+    EXPECT_TRUE(mConsumer != NULL);
+
     sp<DummyConsumer> dc(new DummyConsumer);
-    mBQ->consumerConnect(dc, false);
+    ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false));
+    IGraphicBufferProducer::QueueBufferOutput output;
+    ASSERT_EQ(OK,
+            mProducer->connect(NULL, NATIVE_WINDOW_API_CPU, false, &output));
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buffer));
+
+    uint32_t* dataIn;
+    ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN,
+            reinterpret_cast<void**>(&dataIn)));
+    *dataIn = 0x12345678;
+    ASSERT_EQ(OK, buffer->unlock());
+
+    IGraphicBufferProducer::QueueBufferInput input(0, false, Rect(0, 0, 1, 1),
+            NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false, Fence::NO_FENCE);
+    ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output));
+
+    IGraphicBufferConsumer::BufferItem item;
+    ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0));
+
+    uint32_t* dataOut;
+    ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN,
+            reinterpret_cast<void**>(&dataOut)));
+    ASSERT_EQ(*dataOut, 0x12345678);
+    ASSERT_EQ(OK, item.mGraphicBuffer->unlock());
+}
+
+TEST_F(BufferQueueTest, AcquireBuffer_ExceedsMaxAcquireCount_Fails) {
+    createBufferQueue();
+    sp<DummyConsumer> dc(new DummyConsumer);
+    mConsumer->consumerConnect(dc, false);
     IGraphicBufferProducer::QueueBufferOutput qbo;
-    mBQ->connect(NULL, NATIVE_WINDOW_API_CPU, false, &qbo);
-    mBQ->setBufferCount(4);
+    mProducer->connect(new DummyProducerListener, NATIVE_WINDOW_API_CPU, false,
+            &qbo);
+    mProducer->setBufferCount(4);
 
     int slot;
     sp<Fence> fence;
@@ -76,42 +156,206 @@
 
     for (int i = 0; i < 2; i++) {
         ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
-                mBQ->dequeueBuffer(&slot, &fence, false, 1, 1, 0,
+                mProducer->dequeueBuffer(&slot, &fence, false, 1, 1, 0,
                     GRALLOC_USAGE_SW_READ_OFTEN));
-        ASSERT_EQ(OK, mBQ->requestBuffer(slot, &buf));
-        ASSERT_EQ(OK, mBQ->queueBuffer(slot, qbi, &qbo));
-        ASSERT_EQ(OK, mBQ->acquireBuffer(&item, 0));
+        ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buf));
+        ASSERT_EQ(OK, mProducer->queueBuffer(slot, qbi, &qbo));
+        ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0));
     }
 
     ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
-            mBQ->dequeueBuffer(&slot, &fence, false, 1, 1, 0,
+            mProducer->dequeueBuffer(&slot, &fence, false, 1, 1, 0,
                 GRALLOC_USAGE_SW_READ_OFTEN));
-    ASSERT_EQ(OK, mBQ->requestBuffer(slot, &buf));
-    ASSERT_EQ(OK, mBQ->queueBuffer(slot, qbi, &qbo));
+    ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buf));
+    ASSERT_EQ(OK, mProducer->queueBuffer(slot, qbi, &qbo));
 
     // Acquire the third buffer, which should fail.
-    ASSERT_EQ(INVALID_OPERATION, mBQ->acquireBuffer(&item, 0));
+    ASSERT_EQ(INVALID_OPERATION, mConsumer->acquireBuffer(&item, 0));
 }
 
 TEST_F(BufferQueueTest, SetMaxAcquiredBufferCountWithIllegalValues_ReturnsError) {
+    createBufferQueue();
     sp<DummyConsumer> dc(new DummyConsumer);
-    mBQ->consumerConnect(dc, false);
+    mConsumer->consumerConnect(dc, false);
 
-    ASSERT_EQ(BAD_VALUE, mBQ->setMaxAcquiredBufferCount(0));
-    ASSERT_EQ(BAD_VALUE, mBQ->setMaxAcquiredBufferCount(-3));
-    ASSERT_EQ(BAD_VALUE, mBQ->setMaxAcquiredBufferCount(
+    int minBufferCount;
+    ASSERT_NO_FATAL_FAILURE(GetMinUndequeuedBufferCount(&minBufferCount));
+    EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(
+                minBufferCount - 1));
+
+    EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(0));
+    EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(-3));
+    EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(
             BufferQueue::MAX_MAX_ACQUIRED_BUFFERS+1));
-    ASSERT_EQ(BAD_VALUE, mBQ->setMaxAcquiredBufferCount(100));
+    EXPECT_EQ(BAD_VALUE, mConsumer->setMaxAcquiredBufferCount(100));
 }
 
 TEST_F(BufferQueueTest, SetMaxAcquiredBufferCountWithLegalValues_Succeeds) {
+    createBufferQueue();
     sp<DummyConsumer> dc(new DummyConsumer);
-    mBQ->consumerConnect(dc, false);
+    mConsumer->consumerConnect(dc, false);
 
-    ASSERT_EQ(OK, mBQ->setMaxAcquiredBufferCount(1));
-    ASSERT_EQ(OK, mBQ->setMaxAcquiredBufferCount(2));
-    ASSERT_EQ(OK, mBQ->setMaxAcquiredBufferCount(
+    int minBufferCount;
+    ASSERT_NO_FATAL_FAILURE(GetMinUndequeuedBufferCount(&minBufferCount));
+
+    EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(1));
+    EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(2));
+    EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(minBufferCount));
+    EXPECT_EQ(OK, mConsumer->setMaxAcquiredBufferCount(
             BufferQueue::MAX_MAX_ACQUIRED_BUFFERS));
 }
 
+TEST_F(BufferQueueTest, DetachAndReattachOnProducerSide) {
+    createBufferQueue();
+    sp<DummyConsumer> dc(new DummyConsumer);
+    ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false));
+    IGraphicBufferProducer::QueueBufferOutput output;
+    ASSERT_EQ(OK, mProducer->connect(new DummyProducerListener,
+            NATIVE_WINDOW_API_CPU, false, &output));
+
+    ASSERT_EQ(BAD_VALUE, mProducer->detachBuffer(-1)); // Index too low
+    ASSERT_EQ(BAD_VALUE, mProducer->detachBuffer(
+                BufferQueueDefs::NUM_BUFFER_SLOTS)); // Index too high
+    ASSERT_EQ(BAD_VALUE, mProducer->detachBuffer(0)); // Not dequeued
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(BAD_VALUE, mProducer->detachBuffer(slot)); // Not requested
+    ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buffer));
+    ASSERT_EQ(OK, mProducer->detachBuffer(slot));
+    ASSERT_EQ(BAD_VALUE, mProducer->detachBuffer(slot)); // Not dequeued
+
+    sp<GraphicBuffer> safeToClobberBuffer;
+    // Can no longer request buffer from this slot
+    ASSERT_EQ(BAD_VALUE, mProducer->requestBuffer(slot, &safeToClobberBuffer));
+
+    uint32_t* dataIn;
+    ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN,
+            reinterpret_cast<void**>(&dataIn)));
+    *dataIn = 0x12345678;
+    ASSERT_EQ(OK, buffer->unlock());
+
+    int newSlot;
+    ASSERT_EQ(BAD_VALUE, mProducer->attachBuffer(NULL, safeToClobberBuffer));
+    ASSERT_EQ(BAD_VALUE, mProducer->attachBuffer(&newSlot, NULL));
+
+    ASSERT_EQ(OK, mProducer->attachBuffer(&newSlot, buffer));
+    IGraphicBufferProducer::QueueBufferInput input(0, false, Rect(0, 0, 1, 1),
+            NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false, Fence::NO_FENCE);
+    ASSERT_EQ(OK, mProducer->queueBuffer(newSlot, input, &output));
+
+    IGraphicBufferConsumer::BufferItem item;
+    ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0)));
+
+    uint32_t* dataOut;
+    ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN,
+            reinterpret_cast<void**>(&dataOut)));
+    ASSERT_EQ(*dataOut, 0x12345678);
+    ASSERT_EQ(OK, item.mGraphicBuffer->unlock());
+}
+
+TEST_F(BufferQueueTest, DetachAndReattachOnConsumerSide) {
+    createBufferQueue();
+    sp<DummyConsumer> dc(new DummyConsumer);
+    ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false));
+    IGraphicBufferProducer::QueueBufferOutput output;
+    ASSERT_EQ(OK, mProducer->connect(new DummyProducerListener,
+            NATIVE_WINDOW_API_CPU, false, &output));
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buffer));
+    IGraphicBufferProducer::QueueBufferInput input(0, false, Rect(0, 0, 1, 1),
+            NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false, Fence::NO_FENCE);
+    ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output));
+
+    ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(-1)); // Index too low
+    ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(
+            BufferQueueDefs::NUM_BUFFER_SLOTS)); // Index too high
+    ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(0)); // Not acquired
+
+    IGraphicBufferConsumer::BufferItem item;
+    ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0)));
+
+    ASSERT_EQ(OK, mConsumer->detachBuffer(item.mBuf));
+    ASSERT_EQ(BAD_VALUE, mConsumer->detachBuffer(item.mBuf)); // Not acquired
+
+    uint32_t* dataIn;
+    ASSERT_EQ(OK, item.mGraphicBuffer->lock(
+            GraphicBuffer::USAGE_SW_WRITE_OFTEN,
+            reinterpret_cast<void**>(&dataIn)));
+    *dataIn = 0x12345678;
+    ASSERT_EQ(OK, item.mGraphicBuffer->unlock());
+
+    int newSlot;
+    sp<GraphicBuffer> safeToClobberBuffer;
+    ASSERT_EQ(BAD_VALUE, mConsumer->attachBuffer(NULL, safeToClobberBuffer));
+    ASSERT_EQ(BAD_VALUE, mConsumer->attachBuffer(&newSlot, NULL));
+    ASSERT_EQ(OK, mConsumer->attachBuffer(&newSlot, item.mGraphicBuffer));
+
+    ASSERT_EQ(OK, mConsumer->releaseBuffer(newSlot, 0, EGL_NO_DISPLAY,
+            EGL_NO_SYNC_KHR, Fence::NO_FENCE));
+
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buffer));
+
+    uint32_t* dataOut;
+    ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN,
+            reinterpret_cast<void**>(&dataOut)));
+    ASSERT_EQ(*dataOut, 0x12345678);
+    ASSERT_EQ(OK, buffer->unlock());
+}
+
+TEST_F(BufferQueueTest, MoveFromConsumerToProducer) {
+    createBufferQueue();
+    sp<DummyConsumer> dc(new DummyConsumer);
+    ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false));
+    IGraphicBufferProducer::QueueBufferOutput output;
+    ASSERT_EQ(OK, mProducer->connect(new DummyProducerListener,
+            NATIVE_WINDOW_API_CPU, false, &output));
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buffer));
+
+    uint32_t* dataIn;
+    ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN,
+            reinterpret_cast<void**>(&dataIn)));
+    *dataIn = 0x12345678;
+    ASSERT_EQ(OK, buffer->unlock());
+
+    IGraphicBufferProducer::QueueBufferInput input(0, false, Rect(0, 0, 1, 1),
+            NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false, Fence::NO_FENCE);
+    ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output));
+
+    IGraphicBufferConsumer::BufferItem item;
+    ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0)));
+    ASSERT_EQ(OK, mConsumer->detachBuffer(item.mBuf));
+
+    int newSlot;
+    ASSERT_EQ(OK, mProducer->attachBuffer(&newSlot, item.mGraphicBuffer));
+    ASSERT_EQ(OK, mProducer->queueBuffer(newSlot, input, &output));
+    ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, static_cast<nsecs_t>(0)));
+
+    uint32_t* dataOut;
+    ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN,
+            reinterpret_cast<void**>(&dataOut)));
+    ASSERT_EQ(*dataOut, 0x12345678);
+    ASSERT_EQ(OK, item.mGraphicBuffer->unlock());
+}
+
 } // namespace android
diff --git a/libs/gui/tests/CpuConsumer_test.cpp b/libs/gui/tests/CpuConsumer_test.cpp
index b370a2d..abd3724 100644
--- a/libs/gui/tests/CpuConsumer_test.cpp
+++ b/libs/gui/tests/CpuConsumer_test.cpp
@@ -33,8 +33,6 @@
 #include <utils/Mutex.h>
 #include <utils/Condition.h>
 
-#include <ui/FramebufferNativeWindow.h>
-
 #define CPU_CONSUMER_TEST_FORMAT_RAW 0
 #define CPU_CONSUMER_TEST_FORMAT_Y8 0
 #define CPU_CONSUMER_TEST_FORMAT_Y16 0
@@ -66,11 +64,13 @@
                 test_info->name(),
                 params.width, params.height,
                 params.maxLockedBuffers, params.format);
-        sp<BufferQueue> bq = new BufferQueue();
-        mCC = new CpuConsumer(bq, params.maxLockedBuffers);
+        sp<IGraphicBufferProducer> producer;
+        sp<IGraphicBufferConsumer> consumer;
+        BufferQueue::createBufferQueue(&producer, &consumer);
+        mCC = new CpuConsumer(consumer, params.maxLockedBuffers);
         String8 name("CpuConsumer_Under_Test");
         mCC->setName(name);
-        mSTC = new Surface(bq);
+        mSTC = new Surface(producer);
         mANW = mSTC;
     }
 
diff --git a/libs/gui/tests/DisconnectWaiter.h b/libs/gui/tests/DisconnectWaiter.h
new file mode 100644
index 0000000..56e96c2
--- /dev/null
+++ b/libs/gui/tests/DisconnectWaiter.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_DISCONNECT_WAITER_H
+#define ANDROID_DISCONNECT_WAITER_H
+
+#include <gui/IConsumerListener.h>
+
+#include <utils/Condition.h>
+#include <utils/Mutex.h>
+
+namespace android {
+
+// Note that GLConsumer will lose the notifications
+// onBuffersReleased and onFrameAvailable as there is currently
+// no way to forward the events.  This DisconnectWaiter will not let the
+// disconnect finish until finishDisconnect() is called.  It will
+// also block until a disconnect is called
+class DisconnectWaiter : public BnConsumerListener {
+public:
+    DisconnectWaiter () :
+        mWaitForDisconnect(false),
+        mPendingFrames(0) {
+    }
+
+    void waitForFrame() {
+        Mutex::Autolock lock(mMutex);
+        while (mPendingFrames == 0) {
+            mFrameCondition.wait(mMutex);
+        }
+        mPendingFrames--;
+    }
+
+    virtual void onFrameAvailable() {
+        Mutex::Autolock lock(mMutex);
+        mPendingFrames++;
+        mFrameCondition.signal();
+    }
+
+    virtual void onBuffersReleased() {
+        Mutex::Autolock lock(mMutex);
+        while (!mWaitForDisconnect) {
+            mDisconnectCondition.wait(mMutex);
+        }
+    }
+
+    virtual void onSidebandStreamChanged() {}
+
+    void finishDisconnect() {
+        Mutex::Autolock lock(mMutex);
+        mWaitForDisconnect = true;
+        mDisconnectCondition.signal();
+    }
+
+private:
+    Mutex mMutex;
+
+    bool mWaitForDisconnect;
+    Condition mDisconnectCondition;
+
+    int mPendingFrames;
+    Condition mFrameCondition;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/FillBuffer.cpp b/libs/gui/tests/FillBuffer.cpp
new file mode 100644
index 0000000..079962c
--- /dev/null
+++ b/libs/gui/tests/FillBuffer.cpp
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "FillBuffer.h"
+
+#include <ui/GraphicBuffer.h>
+
+#include <gtest/gtest.h>
+
+namespace android {
+
+void fillYV12Buffer(uint8_t* buf, int w, int h, int stride) {
+    const int blockWidth = w > 16 ? w / 16 : 1;
+    const int blockHeight = h > 16 ? h / 16 : 1;
+    const int yuvTexOffsetY = 0;
+    int yuvTexStrideY = stride;
+    int yuvTexOffsetV = yuvTexStrideY * h;
+    int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
+    int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * h/2;
+    int yuvTexStrideU = yuvTexStrideV;
+    for (int x = 0; x < w; x++) {
+        for (int y = 0; y < h; y++) {
+            int parityX = (x / blockWidth) & 1;
+            int parityY = (y / blockHeight) & 1;
+            unsigned char intensity = (parityX ^ parityY) ? 63 : 191;
+            buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity;
+            if (x < w / 2 && y < h / 2) {
+                buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = intensity;
+                if (x * 2 < w / 2 && y * 2 < h / 2) {
+                    buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 0] =
+                    buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 1] =
+                    buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 0] =
+                    buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 1] =
+                        intensity;
+                }
+            }
+        }
+    }
+}
+
+void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride,
+        const android_native_rect_t& rect) {
+    const int yuvTexOffsetY = 0;
+    int yuvTexStrideY = stride;
+    int yuvTexOffsetV = yuvTexStrideY * h;
+    int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
+    int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * h/2;
+    int yuvTexStrideU = yuvTexStrideV;
+    for (int x = 0; x < w; x++) {
+        for (int y = 0; y < h; y++) {
+            bool inside = rect.left <= x && x < rect.right &&
+                    rect.top <= y && y < rect.bottom;
+            buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = inside ? 240 : 64;
+            if (x < w / 2 && y < h / 2) {
+                bool inside = rect.left <= 2*x && 2*x < rect.right &&
+                        rect.top <= 2*y && 2*y < rect.bottom;
+                buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = 16;
+                buf[yuvTexOffsetV + (y * yuvTexStrideV) + x] =
+                        inside ? 16 : 255;
+            }
+        }
+    }
+}
+
+void fillRGBA8Buffer(uint8_t* buf, int w, int h, int stride) {
+    const size_t PIXEL_SIZE = 4;
+    for (int x = 0; x < w; x++) {
+        for (int y = 0; y < h; y++) {
+            off_t offset = (y * stride + x) * PIXEL_SIZE;
+            for (int c = 0; c < 4; c++) {
+                int parityX = (x / (1 << (c+2))) & 1;
+                int parityY = (y / (1 << (c+2))) & 1;
+                buf[offset + c] = (parityX ^ parityY) ? 231 : 35;
+            }
+        }
+    }
+}
+
+void produceOneRGBA8Frame(const sp<ANativeWindow>& anw) {
+    android_native_buffer_t* anb;
+    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(anw.get(),
+            &anb));
+    ASSERT_TRUE(anb != NULL);
+
+    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
+
+    uint8_t* img = NULL;
+    ASSERT_EQ(NO_ERROR, buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN,
+            (void**)(&img)));
+    fillRGBA8Buffer(img, buf->getWidth(), buf->getHeight(), buf->getStride());
+    ASSERT_EQ(NO_ERROR, buf->unlock());
+    ASSERT_EQ(NO_ERROR, anw->queueBuffer(anw.get(), buf->getNativeBuffer(),
+            -1));
+}
+} // namespace android
diff --git a/libs/gui/tests/FillBuffer.h b/libs/gui/tests/FillBuffer.h
new file mode 100644
index 0000000..b584179
--- /dev/null
+++ b/libs/gui/tests/FillBuffer.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_FILL_BUFFER_H
+#define ANDROID_FILL_BUFFER_H
+
+#include <system/window.h>
+#include <utils/StrongPointer.h>
+
+namespace android {
+
+// Fill a YV12 buffer with a multi-colored checkerboard pattern
+void fillYV12Buffer(uint8_t* buf, int w, int h, int stride);
+
+// Fill a YV12 buffer with red outside a given rectangle and green inside it.
+void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride,
+        const android_native_rect_t& rect);
+
+void fillRGBA8Buffer(uint8_t* buf, int w, int h, int stride);
+
+// Produce a single RGBA8 frame by filling a buffer with a checkerboard pattern
+// using the CPU.  This assumes that the ANativeWindow is already configured to
+// allow this to be done (e.g. the format is set to RGBA8).
+//
+// Calls to this function should be wrapped in an ASSERT_NO_FATAL_FAILURE().
+void produceOneRGBA8Frame(const sp<ANativeWindow>& anw);
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/FrameWaiter.h b/libs/gui/tests/FrameWaiter.h
new file mode 100644
index 0000000..bdedba6
--- /dev/null
+++ b/libs/gui/tests/FrameWaiter.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_FRAME_WAITER_H
+#define ANDROID_FRAME_WAITER_H
+
+#include <gui/GLConsumer.h>
+
+namespace android {
+
+class FrameWaiter : public GLConsumer::FrameAvailableListener {
+public:
+    FrameWaiter():
+            mPendingFrames(0) {
+    }
+
+    void waitForFrame() {
+        Mutex::Autolock lock(mMutex);
+        while (mPendingFrames == 0) {
+            mCondition.wait(mMutex);
+        }
+        mPendingFrames--;
+    }
+
+    virtual void onFrameAvailable() {
+        Mutex::Autolock lock(mMutex);
+        mPendingFrames++;
+        mCondition.signal();
+    }
+
+private:
+    int mPendingFrames;
+    Mutex mMutex;
+    Condition mCondition;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/GLTest.cpp b/libs/gui/tests/GLTest.cpp
new file mode 100644
index 0000000..1739d9c
--- /dev/null
+++ b/libs/gui/tests/GLTest.cpp
@@ -0,0 +1,339 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GLTest.h"
+
+#include <gui/Surface.h>
+
+#include <GLES2/gl2.h>
+
+namespace android {
+
+static int abs(int value) {
+    return value > 0 ? value : -value;
+}
+
+void GLTest::SetUp() {
+    const ::testing::TestInfo* const testInfo =
+        ::testing::UnitTest::GetInstance()->current_test_info();
+    ALOGV("Begin test: %s.%s", testInfo->test_case_name(), testInfo->name());
+
+    mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    ASSERT_NE(EGL_NO_DISPLAY, mEglDisplay);
+
+    EGLint majorVersion;
+    EGLint minorVersion;
+    EXPECT_TRUE(eglInitialize(mEglDisplay, &majorVersion, &minorVersion));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    RecordProperty("EglVersionMajor", majorVersion);
+    RecordProperty("EglVersionMinor", minorVersion);
+
+    EGLint numConfigs = 0;
+    EXPECT_TRUE(eglChooseConfig(mEglDisplay, getConfigAttribs(), &mGlConfig, 1,
+            &numConfigs));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    char* displaySecsEnv = getenv("GLTEST_DISPLAY_SECS");
+    if (displaySecsEnv != NULL) {
+        mDisplaySecs = atoi(displaySecsEnv);
+        if (mDisplaySecs < 0) {
+            mDisplaySecs = 0;
+        }
+    } else {
+        mDisplaySecs = 0;
+    }
+
+    if (mDisplaySecs > 0) {
+        mComposerClient = new SurfaceComposerClient;
+        ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());
+
+        mSurfaceControl = mComposerClient->createSurface(
+                String8("Test Surface"), getSurfaceWidth(), getSurfaceHeight(),
+                PIXEL_FORMAT_RGB_888, 0);
+
+        ASSERT_TRUE(mSurfaceControl != NULL);
+        ASSERT_TRUE(mSurfaceControl->isValid());
+
+        SurfaceComposerClient::openGlobalTransaction();
+        ASSERT_EQ(NO_ERROR, mSurfaceControl->setLayer(0x7FFFFFFF));
+        ASSERT_EQ(NO_ERROR, mSurfaceControl->show());
+        SurfaceComposerClient::closeGlobalTransaction();
+
+        sp<ANativeWindow> window = mSurfaceControl->getSurface();
+        mEglSurface = createWindowSurface(mEglDisplay, mGlConfig, window);
+    } else {
+        EGLint pbufferAttribs[] = {
+            EGL_WIDTH, getSurfaceWidth(),
+            EGL_HEIGHT, getSurfaceHeight(),
+            EGL_NONE };
+
+        mEglSurface = eglCreatePbufferSurface(mEglDisplay, mGlConfig,
+                pbufferAttribs);
+    }
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    ASSERT_NE(EGL_NO_SURFACE, mEglSurface);
+
+    mEglContext = eglCreateContext(mEglDisplay, mGlConfig, EGL_NO_CONTEXT,
+            getContextAttribs());
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    ASSERT_NE(EGL_NO_CONTEXT, mEglContext);
+
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    EGLint w, h;
+    EXPECT_TRUE(eglQuerySurface(mEglDisplay, mEglSurface, EGL_WIDTH, &w));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    EXPECT_TRUE(eglQuerySurface(mEglDisplay, mEglSurface, EGL_HEIGHT, &h));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    RecordProperty("EglSurfaceWidth", w);
+    RecordProperty("EglSurfaceHeight", h);
+
+    glViewport(0, 0, w, h);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+}
+
+void GLTest::TearDown() {
+    // Display the result
+    if (mDisplaySecs > 0 && mEglSurface != EGL_NO_SURFACE) {
+        eglSwapBuffers(mEglDisplay, mEglSurface);
+        sleep(mDisplaySecs);
+    }
+
+    if (mComposerClient != NULL) {
+        mComposerClient->dispose();
+    }
+    if (mEglContext != EGL_NO_CONTEXT) {
+        eglDestroyContext(mEglDisplay, mEglContext);
+    }
+    if (mEglSurface != EGL_NO_SURFACE) {
+        eglDestroySurface(mEglDisplay, mEglSurface);
+    }
+    if (mEglDisplay != EGL_NO_DISPLAY) {
+        eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
+                EGL_NO_CONTEXT);
+        eglTerminate(mEglDisplay);
+    }
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    const ::testing::TestInfo* const testInfo =
+        ::testing::UnitTest::GetInstance()->current_test_info();
+    ALOGV("End test:   %s.%s", testInfo->test_case_name(), testInfo->name());
+}
+
+EGLint const* GLTest::getConfigAttribs() {
+    static const EGLint sDefaultConfigAttribs[] = {
+        EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+        EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+        EGL_RED_SIZE, 8,
+        EGL_GREEN_SIZE, 8,
+        EGL_BLUE_SIZE, 8,
+        EGL_ALPHA_SIZE, 8,
+        EGL_DEPTH_SIZE, 16,
+        EGL_STENCIL_SIZE, 8,
+        EGL_NONE };
+
+    return sDefaultConfigAttribs;
+}
+
+EGLint const* GLTest::getContextAttribs() {
+    static const EGLint sDefaultContextAttribs[] = {
+        EGL_CONTEXT_CLIENT_VERSION, 2,
+        EGL_NONE };
+
+    return sDefaultContextAttribs;
+}
+
+EGLint GLTest::getSurfaceWidth() {
+    return 512;
+}
+
+EGLint GLTest::getSurfaceHeight() {
+    return 512;
+}
+
+EGLSurface GLTest::createWindowSurface(EGLDisplay display, EGLConfig config,
+                                       sp<ANativeWindow>& window) const {
+    return eglCreateWindowSurface(display, config, window.get(), NULL);
+}
+
+::testing::AssertionResult GLTest::checkPixel(int x, int y,
+        int r, int g, int b, int a, int tolerance) {
+    GLubyte pixel[4];
+    String8 msg;
+    glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
+    GLenum err = glGetError();
+    if (err != GL_NO_ERROR) {
+        msg += String8::format("error reading pixel: %#x", err);
+        while ((err = glGetError()) != GL_NO_ERROR) {
+            msg += String8::format(", %#x", err);
+        }
+        return ::testing::AssertionFailure(::testing::Message(msg.string()));
+    }
+    if (r >= 0 && abs(r - int(pixel[0])) > tolerance) {
+        msg += String8::format("r(%d isn't %d)", pixel[0], r);
+    }
+    if (g >= 0 && abs(g - int(pixel[1])) > tolerance) {
+        if (!msg.isEmpty()) {
+            msg += " ";
+        }
+        msg += String8::format("g(%d isn't %d)", pixel[1], g);
+    }
+    if (b >= 0 && abs(b - int(pixel[2])) > tolerance) {
+        if (!msg.isEmpty()) {
+            msg += " ";
+        }
+        msg += String8::format("b(%d isn't %d)", pixel[2], b);
+    }
+    if (a >= 0 && abs(a - int(pixel[3])) > tolerance) {
+        if (!msg.isEmpty()) {
+            msg += " ";
+        }
+        msg += String8::format("a(%d isn't %d)", pixel[3], a);
+    }
+    if (!msg.isEmpty()) {
+        return ::testing::AssertionFailure(::testing::Message(msg.string()));
+    } else {
+        return ::testing::AssertionSuccess();
+    }
+}
+
+::testing::AssertionResult GLTest::assertRectEq(const Rect &r1, const Rect &r2,
+                                                int tolerance) {
+    String8 msg;
+
+    if (abs(r1.left - r2.left) > tolerance) {
+        msg += String8::format("left(%d isn't %d)", r1.left, r2.left);
+    }
+    if (abs(r1.top - r2.top) > tolerance) {
+        if (!msg.isEmpty()) {
+            msg += " ";
+        }
+        msg += String8::format("top(%d isn't %d)", r1.top, r2.top);
+    }
+    if (abs(r1.right - r2.right) > tolerance) {
+        if (!msg.isEmpty()) {
+            msg += " ";
+        }
+        msg += String8::format("right(%d isn't %d)", r1.right, r2.right);
+    }
+    if (abs(r1.bottom - r2.bottom) > tolerance) {
+        if (!msg.isEmpty()) {
+            msg += " ";
+        }
+        msg += String8::format("bottom(%d isn't %d)", r1.bottom, r2.bottom);
+    }
+    if (!msg.isEmpty()) {
+        msg += String8::format(" R1: [%d %d %d %d] R2: [%d %d %d %d]",
+                               r1.left, r1.top, r1.right, r1.bottom,
+                               r2.left, r2.top, r2.right, r2.bottom);
+        fprintf(stderr, "assertRectEq: %s\n", msg.string());
+        return ::testing::AssertionFailure(::testing::Message(msg.string()));
+    } else {
+        return ::testing::AssertionSuccess();
+    }
+}
+
+void GLTest::loadShader(GLenum shaderType, const char* pSource,
+        GLuint* outShader) {
+    GLuint shader = glCreateShader(shaderType);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    if (shader) {
+        glShaderSource(shader, 1, &pSource, NULL);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+        glCompileShader(shader);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+        GLint compiled = 0;
+        glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+        if (!compiled) {
+            GLint infoLen = 0;
+            glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
+            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+            if (infoLen) {
+                char* buf = (char*) malloc(infoLen);
+                if (buf) {
+                    glGetShaderInfoLog(shader, infoLen, NULL, buf);
+                    printf("Shader compile log:\n%s\n", buf);
+                    free(buf);
+                    FAIL();
+                }
+            } else {
+                char* buf = (char*) malloc(0x1000);
+                if (buf) {
+                    glGetShaderInfoLog(shader, 0x1000, NULL, buf);
+                    printf("Shader compile log:\n%s\n", buf);
+                    free(buf);
+                    FAIL();
+                }
+            }
+            glDeleteShader(shader);
+            shader = 0;
+        }
+    }
+    ASSERT_TRUE(shader != 0);
+    *outShader = shader;
+}
+
+void GLTest::createProgram(const char* pVertexSource,
+        const char* pFragmentSource, GLuint* outPgm) {
+    GLuint vertexShader, fragmentShader;
+    {
+        SCOPED_TRACE("compiling vertex shader");
+        ASSERT_NO_FATAL_FAILURE(loadShader(GL_VERTEX_SHADER, pVertexSource,
+                &vertexShader));
+    }
+    {
+        SCOPED_TRACE("compiling fragment shader");
+        ASSERT_NO_FATAL_FAILURE(loadShader(GL_FRAGMENT_SHADER, pFragmentSource,
+                &fragmentShader));
+    }
+
+    GLuint program = glCreateProgram();
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    if (program) {
+        glAttachShader(program, vertexShader);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+        glAttachShader(program, fragmentShader);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+        glLinkProgram(program);
+        GLint linkStatus = GL_FALSE;
+        glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
+        if (linkStatus != GL_TRUE) {
+            GLint bufLength = 0;
+            glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
+            if (bufLength) {
+                char* buf = (char*) malloc(bufLength);
+                if (buf) {
+                    glGetProgramInfoLog(program, bufLength, NULL, buf);
+                    printf("Program link log:\n%s\n", buf);
+                    free(buf);
+                    FAIL();
+                }
+            }
+            glDeleteProgram(program);
+            program = 0;
+        }
+    }
+    glDeleteShader(vertexShader);
+    glDeleteShader(fragmentShader);
+    ASSERT_TRUE(program != 0);
+    *outPgm = program;
+}
+
+} // namespace android
diff --git a/libs/gui/tests/GLTest.h b/libs/gui/tests/GLTest.h
new file mode 100644
index 0000000..d3c4a95
--- /dev/null
+++ b/libs/gui/tests/GLTest.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_GL_TEST_H
+#define ANDROID_GL_TEST_H
+
+#include <gtest/gtest.h>
+
+#include <gui/SurfaceComposerClient.h>
+
+#include <EGL/egl.h>
+#include <GLES/gl.h>
+
+namespace android {
+
+class GLTest : public ::testing::Test {
+public:
+    static void loadShader(GLenum shaderType, const char* pSource,
+            GLuint* outShader);
+    static void createProgram(const char* pVertexSource,
+            const char* pFragmentSource, GLuint* outPgm);
+
+protected:
+    GLTest() :
+            mEglDisplay(EGL_NO_DISPLAY),
+            mEglSurface(EGL_NO_SURFACE),
+            mEglContext(EGL_NO_CONTEXT) {
+    }
+
+    virtual void SetUp();
+    virtual void TearDown();
+
+    virtual EGLint const* getConfigAttribs();
+    virtual EGLint const* getContextAttribs();
+    virtual EGLint getSurfaceWidth();
+    virtual EGLint getSurfaceHeight();
+    virtual EGLSurface createWindowSurface(EGLDisplay display, EGLConfig config,
+                                           sp<ANativeWindow>& window) const;
+
+    ::testing::AssertionResult checkPixel(int x, int y,
+            int r, int g, int b, int a, int tolerance = 2);
+    ::testing::AssertionResult assertRectEq(const Rect &r1, const Rect &r2,
+            int tolerance = 1);
+
+    int mDisplaySecs;
+    sp<SurfaceComposerClient> mComposerClient;
+    sp<SurfaceControl> mSurfaceControl;
+
+    EGLDisplay mEglDisplay;
+    EGLSurface mEglSurface;
+    EGLContext mEglContext;
+    EGLConfig  mGlConfig;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/IGraphicBufferProducer_test.cpp b/libs/gui/tests/IGraphicBufferProducer_test.cpp
new file mode 100644
index 0000000..aadfe61
--- /dev/null
+++ b/libs/gui/tests/IGraphicBufferProducer_test.cpp
@@ -0,0 +1,566 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "IGraphicBufferProducer_test"
+//#define LOG_NDEBUG 0
+
+#include <gtest/gtest.h>
+
+#include <utils/String8.h>
+#include <utils/threads.h>
+
+#include <ui/GraphicBuffer.h>
+
+#include <gui/BufferQueue.h>
+#include <gui/IProducerListener.h>
+
+#include <vector>
+
+#define ASSERT_OK(x) ASSERT_EQ(OK, (x))
+#define EXPECT_OK(x) EXPECT_EQ(OK, (x))
+
+#define TEST_TOKEN ((IProducerListener*)(NULL))
+#define TEST_API NATIVE_WINDOW_API_CPU
+#define TEST_API_OTHER NATIVE_WINDOW_API_EGL // valid API that's not TEST_API
+#define TEST_CONTROLLED_BY_APP false
+#define TEST_PRODUCER_USAGE_BITS (0)
+
+// TODO: Make these public constants in a header
+enum {
+    // Default dimensions before setDefaultBufferSize is called
+    DEFAULT_WIDTH = 1,
+    DEFAULT_HEIGHT = 1,
+
+    // Default format before setDefaultBufferFormat is called
+    DEFAULT_FORMAT = HAL_PIXEL_FORMAT_RGBA_8888,
+
+    // Default transform hint before setTransformHint is called
+    DEFAULT_TRANSFORM_HINT = 0,
+};
+
+namespace android {
+
+namespace {
+// Parameters for a generic "valid" input for queueBuffer.
+const int64_t QUEUE_BUFFER_INPUT_TIMESTAMP = 1384888611;
+const bool QUEUE_BUFFER_INPUT_IS_AUTO_TIMESTAMP = false;
+const Rect QUEUE_BUFFER_INPUT_RECT = Rect(DEFAULT_WIDTH, DEFAULT_HEIGHT);
+const int QUEUE_BUFFER_INPUT_SCALING_MODE = 0;
+const int QUEUE_BUFFER_INPUT_TRANSFORM = 0;
+const bool QUEUE_BUFFER_INPUT_ASYNC = false;
+const sp<Fence> QUEUE_BUFFER_INPUT_FENCE = Fence::NO_FENCE;
+}; // namespace anonymous
+
+struct DummyConsumer : public BnConsumerListener {
+    virtual void onFrameAvailable() {}
+    virtual void onBuffersReleased() {}
+    virtual void onSidebandStreamChanged() {}
+};
+
+class IGraphicBufferProducerTest : public ::testing::Test {
+protected:
+
+    IGraphicBufferProducerTest() {}
+
+    virtual void SetUp() {
+        const ::testing::TestInfo* const testInfo =
+            ::testing::UnitTest::GetInstance()->current_test_info();
+        ALOGV("Begin test: %s.%s", testInfo->test_case_name(),
+                testInfo->name());
+
+        mDC = new DummyConsumer;
+
+        BufferQueue::createBufferQueue(&mProducer, &mConsumer);
+
+        // Test check: Can't connect producer if no consumer yet
+        ASSERT_EQ(NO_INIT, TryConnectProducer());
+
+        // Must connect consumer before producer connects will succeed.
+        ASSERT_OK(mConsumer->consumerConnect(mDC, /*controlledByApp*/false));
+    }
+
+    virtual void TearDown() {
+        const ::testing::TestInfo* const testInfo =
+            ::testing::UnitTest::GetInstance()->current_test_info();
+        ALOGV("End test:   %s.%s", testInfo->test_case_name(),
+                testInfo->name());
+    }
+
+    status_t TryConnectProducer() {
+        IGraphicBufferProducer::QueueBufferOutput output;
+        return mProducer->connect(TEST_TOKEN,
+                                  TEST_API,
+                                  TEST_CONTROLLED_BY_APP,
+                                  &output);
+        // TODO: use params to vary token, api, producercontrolledbyapp, etc
+    }
+
+    // Connect to a producer in a 'correct' fashion.
+    //   Precondition: Consumer is connected.
+    void ConnectProducer() {
+        ASSERT_OK(TryConnectProducer());
+    }
+
+    // Create a generic "valid" input for queueBuffer
+    // -- uses the default buffer format, width, etc.
+    static IGraphicBufferProducer::QueueBufferInput CreateBufferInput() {
+        return QueueBufferInputBuilder().build();
+    }
+
+    // Builder pattern to slightly vary *almost* correct input
+    // -- avoids copying and pasting
+    struct QueueBufferInputBuilder {
+        QueueBufferInputBuilder() {
+           timestamp = QUEUE_BUFFER_INPUT_TIMESTAMP;
+           isAutoTimestamp = QUEUE_BUFFER_INPUT_IS_AUTO_TIMESTAMP;
+           crop = QUEUE_BUFFER_INPUT_RECT;
+           scalingMode = QUEUE_BUFFER_INPUT_SCALING_MODE;
+           transform = QUEUE_BUFFER_INPUT_TRANSFORM;
+           async = QUEUE_BUFFER_INPUT_ASYNC;
+           fence = QUEUE_BUFFER_INPUT_FENCE;
+        }
+
+        IGraphicBufferProducer::QueueBufferInput build() {
+            return IGraphicBufferProducer::QueueBufferInput(
+                    timestamp,
+                    isAutoTimestamp,
+                    crop,
+                    scalingMode,
+                    transform,
+                    async,
+                    fence);
+        }
+
+        QueueBufferInputBuilder& setTimestamp(int64_t timestamp) {
+            this->timestamp = timestamp;
+            return *this;
+        }
+
+        QueueBufferInputBuilder& setIsAutoTimestamp(bool isAutoTimestamp) {
+            this->isAutoTimestamp = isAutoTimestamp;
+            return *this;
+        }
+
+        QueueBufferInputBuilder& setCrop(Rect crop) {
+            this->crop = crop;
+            return *this;
+        }
+
+        QueueBufferInputBuilder& setScalingMode(int scalingMode) {
+            this->scalingMode = scalingMode;
+            return *this;
+        }
+
+        QueueBufferInputBuilder& setTransform(uint32_t transform) {
+            this->transform = transform;
+            return *this;
+        }
+
+        QueueBufferInputBuilder& setAsync(bool async) {
+            this->async = async;
+            return *this;
+        }
+
+        QueueBufferInputBuilder& setFence(sp<Fence> fence) {
+            this->fence = fence;
+            return *this;
+        }
+
+    private:
+        int64_t timestamp;
+        bool isAutoTimestamp;
+        Rect crop;
+        int scalingMode;
+        uint32_t transform;
+        int async;
+        sp<Fence> fence;
+    }; // struct QueueBufferInputBuilder
+
+    // To easily store dequeueBuffer results into containers
+    struct DequeueBufferResult {
+        int slot;
+        sp<Fence> fence;
+    };
+
+    status_t dequeueBuffer(bool async, uint32_t w, uint32_t h, uint32_t format, uint32_t usage, DequeueBufferResult* result) {
+        return mProducer->dequeueBuffer(&result->slot, &result->fence, async, w, h, format, usage);
+    }
+
+private: // hide from test body
+    sp<DummyConsumer> mDC;
+
+protected: // accessible from test body
+    sp<IGraphicBufferProducer> mProducer;
+    sp<IGraphicBufferConsumer> mConsumer;
+};
+
+TEST_F(IGraphicBufferProducerTest, ConnectFirst_ReturnsError) {
+    IGraphicBufferProducer::QueueBufferOutput output;
+
+    // NULL output returns BAD_VALUE
+    EXPECT_EQ(BAD_VALUE, mProducer->connect(TEST_TOKEN,
+                                            TEST_API,
+                                            TEST_CONTROLLED_BY_APP,
+                                            /*output*/NULL));
+
+    // Invalid API returns bad value
+    EXPECT_EQ(BAD_VALUE, mProducer->connect(TEST_TOKEN,
+                                            /*api*/0xDEADBEEF,
+                                            TEST_CONTROLLED_BY_APP,
+                                            &output));
+
+    // TODO: get a token from a dead process somehow
+}
+
+TEST_F(IGraphicBufferProducerTest, ConnectAgain_ReturnsError) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    // Can't connect when there is already a producer connected
+    IGraphicBufferProducer::QueueBufferOutput output;
+    EXPECT_EQ(BAD_VALUE, mProducer->connect(TEST_TOKEN,
+                                            TEST_API,
+                                            TEST_CONTROLLED_BY_APP,
+                                            &output));
+
+    ASSERT_OK(mConsumer->consumerDisconnect());
+    // Can't connect when IGBP is abandoned
+    EXPECT_EQ(NO_INIT, mProducer->connect(TEST_TOKEN,
+                                          TEST_API,
+                                          TEST_CONTROLLED_BY_APP,
+                                          &output));
+}
+
+TEST_F(IGraphicBufferProducerTest, Disconnect_Succeeds) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    ASSERT_OK(mProducer->disconnect(TEST_API));
+}
+
+
+TEST_F(IGraphicBufferProducerTest, Disconnect_ReturnsError) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    // Must disconnect with same API number
+    ASSERT_EQ(BAD_VALUE, mProducer->disconnect(TEST_API_OTHER));
+    // API must not be out of range
+    ASSERT_EQ(BAD_VALUE, mProducer->disconnect(/*api*/0xDEADBEEF));
+
+    // TODO: somehow kill mProducer so that this returns DEAD_OBJECT
+}
+
+TEST_F(IGraphicBufferProducerTest, Query_Succeeds) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    // TODO: Make these constants in header
+    const int DEFAULT_CONSUMER_USAGE_BITS = 0;
+
+    int value = -1;
+    EXPECT_OK(mProducer->query(NATIVE_WINDOW_WIDTH, &value));
+    EXPECT_EQ(DEFAULT_WIDTH, value);
+
+    EXPECT_OK(mProducer->query(NATIVE_WINDOW_HEIGHT, &value));
+    EXPECT_EQ(DEFAULT_HEIGHT, value);
+
+    EXPECT_OK(mProducer->query(NATIVE_WINDOW_FORMAT, &value));
+    EXPECT_EQ(DEFAULT_FORMAT, value);
+
+    EXPECT_OK(mProducer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &value));
+    EXPECT_LE(0, value);
+    EXPECT_GE(BufferQueue::NUM_BUFFER_SLOTS, value);
+
+    EXPECT_OK(mProducer->query(NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND, &value));
+    EXPECT_FALSE(value); // Can't run behind when we haven't touched the queue
+
+    EXPECT_OK(mProducer->query(NATIVE_WINDOW_CONSUMER_USAGE_BITS, &value));
+    EXPECT_EQ(DEFAULT_CONSUMER_USAGE_BITS, value);
+
+}
+
+TEST_F(IGraphicBufferProducerTest, Query_ReturnsError) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    // One past the end of the last 'query' enum value. Update this if we add more enums.
+    const int NATIVE_WINDOW_QUERY_LAST_OFF_BY_ONE = NATIVE_WINDOW_CONSUMER_USAGE_BITS + 1;
+
+    int value;
+    // What was out of range
+    EXPECT_EQ(BAD_VALUE, mProducer->query(/*what*/-1, &value));
+    EXPECT_EQ(BAD_VALUE, mProducer->query(/*what*/0xDEADBEEF, &value));
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_QUERY_LAST_OFF_BY_ONE, &value));
+
+    // Some enums from window.h are 'invalid'
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER, &value));
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_CONCRETE_TYPE, &value));
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_DEFAULT_WIDTH, &value));
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_DEFAULT_HEIGHT, &value));
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_TRANSFORM_HINT, &value));
+    // TODO: Consider documented the above enums as unsupported or make a new enum for IGBP
+
+    // Value was NULL
+    EXPECT_EQ(BAD_VALUE, mProducer->query(NATIVE_WINDOW_FORMAT, /*value*/NULL));
+
+    ASSERT_OK(mConsumer->consumerDisconnect());
+
+    // BQ was abandoned
+    EXPECT_EQ(NO_INIT, mProducer->query(NATIVE_WINDOW_FORMAT, &value));
+
+    // TODO: other things in window.h that are supported by Surface::query
+    // but not by BufferQueue::query
+}
+
+// TODO: queue under more complicated situations not involving just a single buffer
+TEST_F(IGraphicBufferProducerTest, Queue_Succeeds) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    int dequeuedSlot = -1;
+    sp<Fence> dequeuedFence;
+
+    // XX: OK to assume first call returns this flag or not? Not really documented.
+    ASSERT_EQ(OK | IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&dequeuedSlot, &dequeuedFence,
+                                     QUEUE_BUFFER_INPUT_ASYNC,
+                                     DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FORMAT,
+                                     TEST_PRODUCER_USAGE_BITS));
+
+    EXPECT_LE(0, dequeuedSlot);
+    EXPECT_GT(BufferQueue::NUM_BUFFER_SLOTS, dequeuedSlot);
+
+    // Request the buffer (pre-requisite for queueing)
+    sp<GraphicBuffer> dequeuedBuffer;
+    ASSERT_OK(mProducer->requestBuffer(dequeuedSlot, &dequeuedBuffer));
+
+    // A generic "valid" input
+    IGraphicBufferProducer::QueueBufferInput input = CreateBufferInput();
+    IGraphicBufferProducer::QueueBufferOutput output;
+
+    // Queue the buffer back into the BQ
+    ASSERT_OK(mProducer->queueBuffer(dequeuedSlot, input, &output));
+
+    {
+        uint32_t width;
+        uint32_t height;
+        uint32_t transformHint;
+        uint32_t numPendingBuffers;
+
+        output.deflate(&width, &height, &transformHint, &numPendingBuffers);
+
+        EXPECT_EQ(DEFAULT_WIDTH, width);
+        EXPECT_EQ(DEFAULT_HEIGHT, height);
+        EXPECT_EQ(DEFAULT_TRANSFORM_HINT, transformHint);
+        EXPECT_EQ(1, numPendingBuffers); // since queueBuffer was called exactly once
+    }
+
+    // Buffer was not in the dequeued state
+    EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(dequeuedSlot, input, &output));
+}
+
+TEST_F(IGraphicBufferProducerTest, Queue_ReturnsError) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    // Invalid slot number
+    {
+        // A generic "valid" input
+        IGraphicBufferProducer::QueueBufferInput input = CreateBufferInput();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(/*slot*/-1, input, &output));
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(/*slot*/0xDEADBEEF, input, &output));
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(BufferQueue::NUM_BUFFER_SLOTS,
+                                                    input, &output));
+    }
+
+    // Slot was not in the dequeued state (all slots start out in Free state)
+    {
+        IGraphicBufferProducer::QueueBufferInput input = CreateBufferInput();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(/*slot*/0, input, &output));
+    }
+
+    // Put the slot into the "dequeued" state for the rest of the test
+    int dequeuedSlot = -1;
+    sp<Fence> dequeuedFence;
+
+    ASSERT_EQ(OK | IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&dequeuedSlot, &dequeuedFence,
+                                     QUEUE_BUFFER_INPUT_ASYNC,
+                                     DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FORMAT,
+                                     TEST_PRODUCER_USAGE_BITS));
+
+    // Slot was enqueued without requesting a buffer
+    {
+        IGraphicBufferProducer::QueueBufferInput input = CreateBufferInput();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(dequeuedSlot, input, &output));
+    }
+
+    // Request the buffer so that the rest of the tests don't fail on earlier checks.
+    sp<GraphicBuffer> dequeuedBuffer;
+    ASSERT_OK(mProducer->requestBuffer(dequeuedSlot, &dequeuedBuffer));
+
+    // Fence was NULL
+    {
+        sp<Fence> nullFence = NULL;
+
+        IGraphicBufferProducer::QueueBufferInput input =
+                QueueBufferInputBuilder().setFence(nullFence).build();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(dequeuedSlot, input, &output));
+    }
+
+    // Scaling mode was unknown
+    {
+        IGraphicBufferProducer::QueueBufferInput input =
+                QueueBufferInputBuilder().setScalingMode(-1).build();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(dequeuedSlot, input, &output));
+
+        input = QueueBufferInputBuilder().setScalingMode(0xDEADBEEF).build();
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(dequeuedSlot, input, &output));
+    }
+
+    // Crop rect is out of bounds of the buffer dimensions
+    {
+        IGraphicBufferProducer::QueueBufferInput input =
+                QueueBufferInputBuilder().setCrop(Rect(DEFAULT_WIDTH + 1, DEFAULT_HEIGHT + 1))
+                .build();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(BAD_VALUE, mProducer->queueBuffer(dequeuedSlot, input, &output));
+    }
+
+    // Abandon the buffer queue so that the last test fails
+    ASSERT_OK(mConsumer->consumerDisconnect());
+
+    // The buffer queue has been abandoned.
+    {
+        IGraphicBufferProducer::QueueBufferInput input = CreateBufferInput();
+        IGraphicBufferProducer::QueueBufferOutput output;
+
+        EXPECT_EQ(NO_INIT, mProducer->queueBuffer(dequeuedSlot, input, &output));
+    }
+}
+
+TEST_F(IGraphicBufferProducerTest, CancelBuffer_DoesntCrash) {
+    ASSERT_NO_FATAL_FAILURE(ConnectProducer());
+
+    int dequeuedSlot = -1;
+    sp<Fence> dequeuedFence;
+
+    ASSERT_EQ(OK | IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            mProducer->dequeueBuffer(&dequeuedSlot, &dequeuedFence,
+                                     QUEUE_BUFFER_INPUT_ASYNC,
+                                     DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FORMAT,
+                                     TEST_PRODUCER_USAGE_BITS));
+
+    // No return code, but at least test that it doesn't blow up...
+    // TODO: add a return code
+    mProducer->cancelBuffer(dequeuedSlot, dequeuedFence);
+}
+
+TEST_F(IGraphicBufferProducerTest, SetBufferCount_Succeeds) {
+
+    // The producer does not wish to set a buffer count
+    EXPECT_OK(mProducer->setBufferCount(0)) << "bufferCount: " << 0;
+    // TODO: how to test "0" buffer count?
+
+    int minBuffers;
+    ASSERT_OK(mProducer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minBuffers));
+
+    // The MIN_UNDEQUEUED_BUFFERS limit is exclusive, so need to increment by at least 1
+    minBuffers++;
+
+    ASSERT_OK(mProducer->setBufferCount(minBuffers)) << "bufferCount: " << minBuffers;
+
+    std::vector<DequeueBufferResult> dequeueList;
+
+    // Should now be able to dequeue up to minBuffers times
+    for (int i = 0; i < minBuffers; ++i) {
+        DequeueBufferResult result;
+
+        EXPECT_LE(OK,
+                dequeueBuffer(QUEUE_BUFFER_INPUT_ASYNC,
+                              DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FORMAT,
+                              TEST_PRODUCER_USAGE_BITS, &result))
+                << "iteration: " << i << ", slot: " << result.slot;
+
+        dequeueList.push_back(result);
+    }
+
+    // Cancel every buffer, so we can set buffer count again
+    for (int i = 0; i < minBuffers; ++i) {
+        DequeueBufferResult& result = dequeueList[i];
+        mProducer->cancelBuffer(result.slot, result.fence);
+    }
+
+    ASSERT_OK(mProducer->setBufferCount(BufferQueue::NUM_BUFFER_SLOTS));
+
+    // Should now be able to dequeue up to NUM_BUFFER_SLOTS times
+    for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; ++i) {
+        int dequeuedSlot = -1;
+        sp<Fence> dequeuedFence;
+
+        EXPECT_LE(OK,
+                mProducer->dequeueBuffer(&dequeuedSlot, &dequeuedFence,
+                                         QUEUE_BUFFER_INPUT_ASYNC,
+                                         DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FORMAT,
+                                         TEST_PRODUCER_USAGE_BITS))
+                << "iteration: " << i << ", slot: " << dequeuedSlot;
+    }
+}
+
+TEST_F(IGraphicBufferProducerTest, SetBufferCount_Fails) {
+    int minBuffers;
+    ASSERT_OK(mProducer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minBuffers));
+
+    // The MIN_UNDEQUEUED_BUFFERS limit is exclusive, so need to increment by at least 1
+    minBuffers++;
+
+    // Buffer count was out of range
+    EXPECT_EQ(BAD_VALUE, mProducer->setBufferCount(-1)) << "bufferCount: " << -1;
+    EXPECT_EQ(BAD_VALUE, mProducer->setBufferCount(minBuffers - 1)) << "bufferCount: " << minBuffers - 1;
+    EXPECT_EQ(BAD_VALUE, mProducer->setBufferCount(BufferQueue::NUM_BUFFER_SLOTS + 1))
+            << "bufferCount: " << BufferQueue::NUM_BUFFER_SLOTS + 1;
+
+    // Pre-requisite to fail out a valid setBufferCount call
+    {
+        int dequeuedSlot = -1;
+        sp<Fence> dequeuedFence;
+
+        ASSERT_LE(OK,
+                mProducer->dequeueBuffer(&dequeuedSlot, &dequeuedFence,
+                                         QUEUE_BUFFER_INPUT_ASYNC,
+                                         DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_FORMAT,
+                                         TEST_PRODUCER_USAGE_BITS))
+                << "slot: " << dequeuedSlot;
+    }
+
+    // Client has one or more buffers dequeued
+    EXPECT_EQ(BAD_VALUE, mProducer->setBufferCount(minBuffers)) << "bufferCount: " << minBuffers;
+
+    // Abandon buffer queue
+    ASSERT_OK(mConsumer->consumerDisconnect());
+
+    // Fail because the buffer queue was abandoned
+    EXPECT_EQ(NO_INIT, mProducer->setBufferCount(minBuffers)) << "bufferCount: " << minBuffers;
+
+}
+
+} // namespace android
diff --git a/libs/gui/tests/MultiTextureConsumer_test.cpp b/libs/gui/tests/MultiTextureConsumer_test.cpp
new file mode 100644
index 0000000..1eb6ef6
--- /dev/null
+++ b/libs/gui/tests/MultiTextureConsumer_test.cpp
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "MultiTextureConsumer_test"
+//#define LOG_NDEBUG 0
+
+#include "GLTest.h"
+
+#include <gui/GLConsumer.h>
+#include <gui/Surface.h>
+
+#include <android/native_window.h>
+
+#include <GLES/glext.h>
+
+namespace android {
+
+class MultiTextureConsumerTest : public GLTest {
+protected:
+    enum { TEX_ID = 123 };
+
+    virtual void SetUp() {
+        GLTest::SetUp();
+        sp<IGraphicBufferProducer> producer;
+        sp<IGraphicBufferConsumer> consumer;
+        BufferQueue::createBufferQueue(&producer, &consumer);
+        mGlConsumer = new GLConsumer(consumer, TEX_ID);
+        mSurface = new Surface(producer);
+        mANW = mSurface.get();
+
+    }
+    virtual void TearDown() {
+        GLTest::TearDown();
+    }
+    virtual EGLint const* getContextAttribs() {
+        return NULL;
+    }
+    virtual EGLint const* getConfigAttribs() {
+        static EGLint sDefaultConfigAttribs[] = {
+            EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+            EGL_RED_SIZE, 8,
+            EGL_GREEN_SIZE, 8,
+            EGL_BLUE_SIZE, 8,
+            EGL_ALPHA_SIZE, 8,
+            EGL_NONE };
+
+        return sDefaultConfigAttribs;
+    }
+    sp<GLConsumer> mGlConsumer;
+    sp<Surface> mSurface;
+    ANativeWindow* mANW;
+};
+
+TEST_F(MultiTextureConsumerTest, EGLImageTargetWorks) {
+    ANativeWindow_Buffer buffer;
+
+    ASSERT_EQ(native_window_set_usage(mANW, GRALLOC_USAGE_SW_WRITE_OFTEN), NO_ERROR);
+    ASSERT_EQ(native_window_set_buffers_format(mANW, HAL_PIXEL_FORMAT_RGBA_8888), NO_ERROR);
+
+    glShadeModel(GL_FLAT);
+    glDisable(GL_DITHER);
+    glDisable(GL_CULL_FACE);
+    glViewport(0, 0, getSurfaceWidth(), getSurfaceHeight());
+    glOrthof(0, getSurfaceWidth(), 0, getSurfaceHeight(), 0, 1);
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glColor4f(1, 1, 1, 1);
+
+    glBindTexture(GL_TEXTURE_EXTERNAL_OES, TEX_ID);
+    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+    uint32_t texel = 0x80808080;
+    glBindTexture(GL_TEXTURE_2D, TEX_ID+1);
+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, &texel);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+    glActiveTexture(GL_TEXTURE1);
+    glBindTexture(GL_TEXTURE_2D, TEX_ID+1);
+    glEnable(GL_TEXTURE_2D);
+    glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
+    glActiveTexture(GL_TEXTURE0);
+    glBindTexture(GL_TEXTURE_EXTERNAL_OES, TEX_ID);
+    glEnable(GL_TEXTURE_EXTERNAL_OES);
+    glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
+    glClear(GL_COLOR_BUFFER_BIT);
+    for (int i=0 ; i<8 ; i++) {
+        mSurface->lock(&buffer, NULL);
+        memset(buffer.bits, (i&7) * 0x20, buffer.stride * buffer.height * 4);
+        mSurface->unlockAndPost();
+
+        mGlConsumer->updateTexImage();
+
+        GLfloat vertices[][2] = { {i*16.0f, 0}, {(i+1)*16.0f, 0}, {(i+1)*16.0f, 16.0f}, {i*16.0f, 16.0f} };
+        glVertexPointer(2, GL_FLOAT, 0, vertices);
+        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    }
+
+    for (int i=0 ; i<8 ; i++) {
+        EXPECT_TRUE(checkPixel(i*16 + 8,  8, i*16, i*16, i*16, i*16, 0));
+    }
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SRGB_test.cpp b/libs/gui/tests/SRGB_test.cpp
new file mode 100644
index 0000000..2d5b8aa
--- /dev/null
+++ b/libs/gui/tests/SRGB_test.cpp
@@ -0,0 +1,477 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SRGB_test"
+//#define LOG_NDEBUG 0
+
+#include "GLTest.h"
+
+#include <gui/CpuConsumer.h>
+#include <gui/Surface.h>
+#include <gui/SurfaceComposerClient.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GLES3/gl3.h>
+
+#include <android/native_window.h>
+
+#include <gtest/gtest.h>
+
+namespace android {
+
+class SRGBTest : public ::testing::Test {
+protected:
+    // Class constants
+    enum {
+        DISPLAY_WIDTH = 512,
+        DISPLAY_HEIGHT = 512,
+        PIXEL_SIZE = 4, // bytes or components
+        DISPLAY_SIZE = DISPLAY_WIDTH * DISPLAY_HEIGHT * PIXEL_SIZE,
+        ALPHA_VALUE = 223, // should be in [0, 255]
+        TOLERANCE = 1,
+    };
+    static const char SHOW_DEBUG_STRING[];
+
+    SRGBTest() :
+            mInputSurface(), mCpuConsumer(), mLockedBuffer(),
+            mEglDisplay(EGL_NO_DISPLAY), mEglConfig(),
+            mEglContext(EGL_NO_CONTEXT), mEglSurface(EGL_NO_SURFACE),
+            mComposerClient(), mSurfaceControl(), mOutputSurface() {
+    }
+
+    virtual ~SRGBTest() {
+        if (mEglDisplay != EGL_NO_DISPLAY) {
+            if (mEglSurface != EGL_NO_SURFACE) {
+                eglDestroySurface(mEglDisplay, mEglSurface);
+            }
+            if (mEglContext != EGL_NO_CONTEXT) {
+                eglDestroyContext(mEglDisplay, mEglContext);
+            }
+            eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
+                    EGL_NO_CONTEXT);
+            eglTerminate(mEglDisplay);
+        }
+    }
+
+    virtual void SetUp() {
+        sp<IGraphicBufferProducer> producer;
+        sp<IGraphicBufferConsumer> consumer;
+        BufferQueue::createBufferQueue(&producer, &consumer);
+        ASSERT_EQ(NO_ERROR, consumer->setDefaultBufferSize(
+                DISPLAY_WIDTH, DISPLAY_HEIGHT));
+        mCpuConsumer = new CpuConsumer(consumer, 1);
+        String8 name("CpuConsumer_for_SRGBTest");
+        mCpuConsumer->setName(name);
+        mInputSurface = new Surface(producer);
+
+        ASSERT_NO_FATAL_FAILURE(createEGLSurface(mInputSurface.get()));
+        ASSERT_NO_FATAL_FAILURE(createDebugSurface());
+    }
+
+    virtual void TearDown() {
+        ASSERT_NO_FATAL_FAILURE(copyToDebugSurface());
+        ASSERT_TRUE(mLockedBuffer.data != NULL);
+        ASSERT_EQ(NO_ERROR, mCpuConsumer->unlockBuffer(mLockedBuffer));
+    }
+
+    static float linearToSRGB(float l) {
+        if (l <= 0.0031308f) {
+            return l * 12.92f;
+        } else {
+            return 1.055f * pow(l, (1 / 2.4f)) - 0.055f;
+        }
+    }
+
+    static float srgbToLinear(float s) {
+        if (s <= 0.04045) {
+            return s / 12.92f;
+        } else {
+            return pow(((s + 0.055f) / 1.055f), 2.4f);
+        }
+    }
+
+    static uint8_t srgbToLinear(uint8_t u) {
+        float f = u / 255.0f;
+        return static_cast<uint8_t>(srgbToLinear(f) * 255.0f + 0.5f);
+    }
+
+    void fillTexture(bool writeAsSRGB) {
+        uint8_t* textureData = new uint8_t[DISPLAY_SIZE];
+
+        for (int y = 0; y < DISPLAY_HEIGHT; ++y) {
+            for (int x = 0; x < DISPLAY_WIDTH; ++x) {
+                float realValue = static_cast<float>(x) / (DISPLAY_WIDTH - 1);
+                realValue *= ALPHA_VALUE / 255.0f; // Premultiply by alpha
+                if (writeAsSRGB) {
+                    realValue = linearToSRGB(realValue);
+                }
+
+                int offset = (y * DISPLAY_WIDTH + x) * PIXEL_SIZE;
+                for (int c = 0; c < 3; ++c) {
+                    uint8_t intValue = static_cast<uint8_t>(
+                            realValue * 255.0f + 0.5f);
+                    textureData[offset + c] = intValue;
+                }
+                textureData[offset + 3] = ALPHA_VALUE;
+            }
+        }
+
+        glTexImage2D(GL_TEXTURE_2D, 0, writeAsSRGB ? GL_SRGB8_ALPHA8 : GL_RGBA8,
+                DISPLAY_WIDTH, DISPLAY_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE,
+                textureData);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+
+        delete[] textureData;
+    }
+
+    void initShaders() {
+        static const char vertexSource[] =
+            "attribute vec4 vPosition;\n"
+            "varying vec2 texCoords;\n"
+            "void main() {\n"
+            "  texCoords = 0.5 * (vPosition.xy + vec2(1.0, 1.0));\n"
+            "  gl_Position = vPosition;\n"
+            "}\n";
+
+        static const char fragmentSource[] =
+            "precision mediump float;\n"
+            "uniform sampler2D texSampler;\n"
+            "varying vec2 texCoords;\n"
+            "void main() {\n"
+            "  gl_FragColor = texture2D(texSampler, texCoords);\n"
+            "}\n";
+
+        GLuint program;
+        {
+            SCOPED_TRACE("Creating shader program");
+            ASSERT_NO_FATAL_FAILURE(GLTest::createProgram(
+                    vertexSource, fragmentSource, &program));
+        }
+
+        GLint positionHandle = glGetAttribLocation(program, "vPosition");
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        ASSERT_NE(-1, positionHandle);
+
+        GLint samplerHandle = glGetUniformLocation(program, "texSampler");
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        ASSERT_NE(-1, samplerHandle);
+
+        static const GLfloat vertices[] = {
+            -1.0f, 1.0f,
+            -1.0f, -1.0f,
+            1.0f, -1.0f,
+            1.0f, 1.0f,
+        };
+
+        glVertexAttribPointer(positionHandle, 2, GL_FLOAT, GL_FALSE, 0, vertices);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glEnableVertexAttribArray(positionHandle);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+
+        glUseProgram(program);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glUniform1i(samplerHandle, 0);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+
+        GLuint textureHandle;
+        glGenTextures(1, &textureHandle);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glBindTexture(GL_TEXTURE_2D, textureHandle);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+    }
+
+    void drawTexture(bool asSRGB, GLint x, GLint y, GLsizei width,
+            GLsizei height) {
+        ASSERT_NO_FATAL_FAILURE(fillTexture(asSRGB));
+        glViewport(x, y, width, height);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+        ASSERT_EQ(GL_NO_ERROR, glGetError());
+    }
+
+    void checkLockedBuffer(PixelFormat format) {
+        ASSERT_EQ(mLockedBuffer.format, format);
+        ASSERT_EQ(mLockedBuffer.width, DISPLAY_WIDTH);
+        ASSERT_EQ(mLockedBuffer.height, DISPLAY_HEIGHT);
+    }
+
+    static bool withinTolerance(int a, int b) {
+        int diff = a - b;
+        return diff >= 0 ? diff <= TOLERANCE : -diff <= TOLERANCE;
+    }
+
+    // Primary producer and consumer
+    sp<Surface> mInputSurface;
+    sp<CpuConsumer> mCpuConsumer;
+    CpuConsumer::LockedBuffer mLockedBuffer;
+
+    EGLDisplay mEglDisplay;
+    EGLConfig mEglConfig;
+    EGLContext mEglContext;
+    EGLSurface mEglSurface;
+
+    // Auxiliary display output
+    sp<SurfaceComposerClient> mComposerClient;
+    sp<SurfaceControl> mSurfaceControl;
+    sp<Surface> mOutputSurface;
+
+private:
+    void createEGLSurface(Surface* inputSurface) {
+        mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_DISPLAY, mEglDisplay);
+
+        EXPECT_TRUE(eglInitialize(mEglDisplay, NULL, NULL));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+        static const EGLint configAttribs[] = {
+            EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT_KHR,
+            EGL_RED_SIZE, 8,
+            EGL_GREEN_SIZE, 8,
+            EGL_BLUE_SIZE, 8,
+            EGL_ALPHA_SIZE, 8,
+            EGL_NONE };
+
+        EGLint numConfigs = 0;
+        EXPECT_TRUE(eglChooseConfig(mEglDisplay, configAttribs, &mEglConfig, 1,
+                &numConfigs));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_GT(numConfigs, 0);
+
+        static const EGLint contextAttribs[] = {
+            EGL_CONTEXT_CLIENT_VERSION, 3,
+            EGL_NONE } ;
+
+        mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT,
+                contextAttribs);
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_CONTEXT, mEglContext);
+
+        mEglSurface = eglCreateWindowSurface(mEglDisplay, mEglConfig,
+                inputSurface, NULL);
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_SURFACE, mEglSurface);
+
+        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+                mEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    }
+
+    void createDebugSurface() {
+        if (getenv(SHOW_DEBUG_STRING) == NULL) return;
+
+        mComposerClient = new SurfaceComposerClient;
+        ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());
+
+        mSurfaceControl = mComposerClient->createSurface(
+                String8("SRGBTest Surface"), DISPLAY_WIDTH, DISPLAY_HEIGHT,
+                PIXEL_FORMAT_RGBA_8888);
+
+        ASSERT_TRUE(mSurfaceControl != NULL);
+        ASSERT_TRUE(mSurfaceControl->isValid());
+
+        SurfaceComposerClient::openGlobalTransaction();
+        ASSERT_EQ(NO_ERROR, mSurfaceControl->setLayer(0x7FFFFFFF));
+        ASSERT_EQ(NO_ERROR, mSurfaceControl->show());
+        SurfaceComposerClient::closeGlobalTransaction();
+
+        ANativeWindow_Buffer outBuffer;
+        ARect inOutDirtyBounds;
+        mOutputSurface = mSurfaceControl->getSurface();
+        mOutputSurface->lock(&outBuffer, &inOutDirtyBounds);
+        uint8_t* bytePointer = reinterpret_cast<uint8_t*>(outBuffer.bits);
+        for (int y = 0; y < outBuffer.height; ++y) {
+            int rowOffset = y * outBuffer.stride; // pixels
+            for (int x = 0; x < outBuffer.width; ++x) {
+                int colOffset = (rowOffset + x) * PIXEL_SIZE; // bytes
+                for (int c = 0; c < PIXEL_SIZE; ++c) {
+                    int offset = colOffset + c;
+                    bytePointer[offset] = ((c + 1) * 56) - 1;
+                }
+            }
+        }
+        mOutputSurface->unlockAndPost();
+    }
+
+    void copyToDebugSurface() {
+        if (!mOutputSurface.get()) return;
+
+        size_t bufferSize = mLockedBuffer.height * mLockedBuffer.stride *
+                PIXEL_SIZE;
+
+        ANativeWindow_Buffer outBuffer;
+        ARect outBufferBounds;
+        mOutputSurface->lock(&outBuffer, &outBufferBounds);
+        ASSERT_EQ(mLockedBuffer.width, outBuffer.width);
+        ASSERT_EQ(mLockedBuffer.height, outBuffer.height);
+        ASSERT_EQ(mLockedBuffer.stride, outBuffer.stride);
+
+        if (mLockedBuffer.format == outBuffer.format) {
+            memcpy(outBuffer.bits, mLockedBuffer.data, bufferSize);
+        } else {
+            ASSERT_EQ(mLockedBuffer.format, PIXEL_FORMAT_sRGB_A_8888);
+            ASSERT_EQ(outBuffer.format, PIXEL_FORMAT_RGBA_8888);
+            uint8_t* outPointer = reinterpret_cast<uint8_t*>(outBuffer.bits);
+            for (int y = 0; y < outBuffer.height; ++y) {
+                int rowOffset = y * outBuffer.stride; // pixels
+                for (int x = 0; x < outBuffer.width; ++x) {
+                    int colOffset = (rowOffset + x) * PIXEL_SIZE; // bytes
+
+                    // RGB are converted
+                    for (int c = 0; c < (PIXEL_SIZE - 1); ++c) {
+                        outPointer[colOffset + c] = srgbToLinear(
+                                mLockedBuffer.data[colOffset + c]);
+                    }
+
+                    // Alpha isn't converted
+                    outPointer[colOffset + 3] =
+                            mLockedBuffer.data[colOffset + 3];
+                }
+            }
+        }
+        mOutputSurface->unlockAndPost();
+
+        int sleepSeconds = atoi(getenv(SHOW_DEBUG_STRING));
+        sleep(sleepSeconds);
+    }
+};
+
+const char SRGBTest::SHOW_DEBUG_STRING[] = "DEBUG_OUTPUT_SECONDS";
+
+TEST_F(SRGBTest, GLRenderFromSRGBTexture) {
+    ASSERT_NO_FATAL_FAILURE(initShaders());
+
+    // The RGB texture is displayed in the top half
+    ASSERT_NO_FATAL_FAILURE(drawTexture(false, 0, DISPLAY_HEIGHT / 2,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT / 2));
+
+    // The SRGB texture is displayed in the bottom half
+    ASSERT_NO_FATAL_FAILURE(drawTexture(true, 0, 0,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT / 2));
+
+    eglSwapBuffers(mEglDisplay, mEglSurface);
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Lock
+    ASSERT_EQ(NO_ERROR, mCpuConsumer->lockNextBuffer(&mLockedBuffer));
+    ASSERT_NO_FATAL_FAILURE(checkLockedBuffer(PIXEL_FORMAT_RGBA_8888));
+
+    // Compare a pixel in the middle of each texture
+    int midSRGBOffset = (DISPLAY_HEIGHT / 4) * mLockedBuffer.stride *
+            PIXEL_SIZE;
+    int midRGBOffset = midSRGBOffset * 3;
+    midRGBOffset += (DISPLAY_WIDTH / 2) * PIXEL_SIZE;
+    midSRGBOffset += (DISPLAY_WIDTH / 2) * PIXEL_SIZE;
+    for (int c = 0; c < PIXEL_SIZE; ++c) {
+        int expectedValue = mLockedBuffer.data[midRGBOffset + c];
+        int actualValue = mLockedBuffer.data[midSRGBOffset + c];
+        ASSERT_PRED2(withinTolerance, expectedValue, actualValue);
+    }
+
+    // mLockedBuffer is unlocked in TearDown so we can copy data from it to
+    // the debug surface if necessary
+}
+
+TEST_F(SRGBTest, RenderToSRGBSurface) {
+    ASSERT_NO_FATAL_FAILURE(initShaders());
+
+    // By default, the first buffer we write into will be RGB
+
+    // Render an RGB texture across the whole surface
+    ASSERT_NO_FATAL_FAILURE(drawTexture(false, 0, 0,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT));
+    eglSwapBuffers(mEglDisplay, mEglSurface);
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Lock
+    ASSERT_EQ(NO_ERROR, mCpuConsumer->lockNextBuffer(&mLockedBuffer));
+    ASSERT_NO_FATAL_FAILURE(checkLockedBuffer(PIXEL_FORMAT_RGBA_8888));
+
+    // Save the values of the middle pixel for later comparison against SRGB
+    uint8_t values[PIXEL_SIZE] = {};
+    int middleOffset = (DISPLAY_HEIGHT / 2) * mLockedBuffer.stride *
+            PIXEL_SIZE;
+    middleOffset += (DISPLAY_WIDTH / 2) * PIXEL_SIZE;
+    for (int c = 0; c < PIXEL_SIZE; ++c) {
+        values[c] = mLockedBuffer.data[middleOffset + c];
+    }
+
+    // Unlock
+    ASSERT_EQ(NO_ERROR, mCpuConsumer->unlockBuffer(mLockedBuffer));
+
+    // Switch to SRGB window surface
+#define EGL_GL_COLORSPACE_KHR      EGL_VG_COLORSPACE
+#define EGL_GL_COLORSPACE_SRGB_KHR EGL_VG_COLORSPACE_sRGB
+
+    static const int srgbAttribs[] = {
+        EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR,
+        EGL_NONE,
+    };
+
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    mEglSurface = eglCreateWindowSurface(mEglDisplay, mEglConfig,
+            mInputSurface.get(), srgbAttribs);
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    ASSERT_NE(EGL_NO_SURFACE, mEglSurface);
+
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Render the texture again
+    ASSERT_NO_FATAL_FAILURE(drawTexture(false, 0, 0,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT));
+    eglSwapBuffers(mEglDisplay, mEglSurface);
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Lock
+    ASSERT_EQ(NO_ERROR, mCpuConsumer->lockNextBuffer(&mLockedBuffer));
+
+    // Make sure we actually got the SRGB buffer on the consumer side
+    ASSERT_NO_FATAL_FAILURE(checkLockedBuffer(PIXEL_FORMAT_sRGB_A_8888));
+
+    // Verify that the stored value is the same, accounting for RGB/SRGB
+    for (int c = 0; c < PIXEL_SIZE; ++c) {
+        // The alpha value should be equivalent before linear->SRGB
+        float rgbAsSRGB = (c == 3) ? values[c] / 255.0f :
+                linearToSRGB(values[c] / 255.0f);
+        int expectedValue = rgbAsSRGB * 255.0f + 0.5f;
+        int actualValue = mLockedBuffer.data[middleOffset + c];
+        ASSERT_PRED2(withinTolerance, expectedValue, actualValue);
+    }
+
+    // mLockedBuffer is unlocked in TearDown so we can copy data from it to
+    // the debug surface if necessary
+}
+
+} // namespace android
diff --git a/libs/gui/tests/StreamSplitter_test.cpp b/libs/gui/tests/StreamSplitter_test.cpp
new file mode 100644
index 0000000..32ec90d
--- /dev/null
+++ b/libs/gui/tests/StreamSplitter_test.cpp
@@ -0,0 +1,246 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "StreamSplitter_test"
+//#define LOG_NDEBUG 0
+
+#include <gui/BufferQueue.h>
+#include <gui/IConsumerListener.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/StreamSplitter.h>
+#include <private/gui/ComposerService.h>
+
+#include <gtest/gtest.h>
+
+namespace android {
+
+class StreamSplitterTest : public ::testing::Test {
+
+protected:
+    StreamSplitterTest() {
+        const ::testing::TestInfo* const testInfo =
+            ::testing::UnitTest::GetInstance()->current_test_info();
+        ALOGV("Begin test: %s.%s", testInfo->test_case_name(),
+                testInfo->name());
+    }
+
+    ~StreamSplitterTest() {
+        const ::testing::TestInfo* const testInfo =
+            ::testing::UnitTest::GetInstance()->current_test_info();
+        ALOGV("End test:   %s.%s", testInfo->test_case_name(),
+                testInfo->name());
+    }
+};
+
+struct DummyListener : public BnConsumerListener {
+    virtual void onFrameAvailable() {}
+    virtual void onBuffersReleased() {}
+    virtual void onSidebandStreamChanged() {}
+};
+
+class CountedAllocator : public BnGraphicBufferAlloc {
+public:
+    CountedAllocator() : mAllocCount(0) {
+        sp<ISurfaceComposer> composer(ComposerService::getComposerService());
+        mAllocator = composer->createGraphicBufferAlloc();
+    }
+
+    virtual ~CountedAllocator() {}
+
+    virtual sp<GraphicBuffer> createGraphicBuffer(uint32_t w, uint32_t h,
+            PixelFormat format, uint32_t usage, status_t* error) {
+        ++mAllocCount;
+        sp<GraphicBuffer> buffer = mAllocator->createGraphicBuffer(w, h, format,
+                usage, error);
+        return buffer;
+    }
+
+    int getAllocCount() const { return mAllocCount; }
+
+private:
+    sp<IGraphicBufferAlloc> mAllocator;
+    int mAllocCount;
+};
+
+TEST_F(StreamSplitterTest, OneInputOneOutput) {
+    sp<CountedAllocator> allocator(new CountedAllocator);
+
+    sp<IGraphicBufferProducer> inputProducer;
+    sp<IGraphicBufferConsumer> inputConsumer;
+    BufferQueue::createBufferQueue(&inputProducer, &inputConsumer, allocator);
+
+    sp<IGraphicBufferProducer> outputProducer;
+    sp<IGraphicBufferConsumer> outputConsumer;
+    BufferQueue::createBufferQueue(&outputProducer, &outputConsumer, allocator);
+    ASSERT_EQ(OK, outputConsumer->consumerConnect(new DummyListener, false));
+
+    sp<StreamSplitter> splitter;
+    status_t status = StreamSplitter::createSplitter(inputConsumer, &splitter);
+    ASSERT_EQ(OK, status);
+    ASSERT_EQ(OK, splitter->addOutput(outputProducer));
+
+    IGraphicBufferProducer::QueueBufferOutput qbOutput;
+    ASSERT_EQ(OK, inputProducer->connect(new DummyProducerListener,
+            NATIVE_WINDOW_API_CPU, false, &qbOutput));
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            inputProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, inputProducer->requestBuffer(slot, &buffer));
+
+    uint32_t* dataIn;
+    ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN,
+            reinterpret_cast<void**>(&dataIn)));
+    *dataIn = 0x12345678;
+    ASSERT_EQ(OK, buffer->unlock());
+
+    IGraphicBufferProducer::QueueBufferInput qbInput(0, false,
+            Rect(0, 0, 1, 1), NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false,
+            Fence::NO_FENCE);
+    ASSERT_EQ(OK, inputProducer->queueBuffer(slot, qbInput, &qbOutput));
+
+    IGraphicBufferConsumer::BufferItem item;
+    ASSERT_EQ(OK, outputConsumer->acquireBuffer(&item, 0));
+
+    uint32_t* dataOut;
+    ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN,
+            reinterpret_cast<void**>(&dataOut)));
+    ASSERT_EQ(*dataOut, 0x12345678);
+    ASSERT_EQ(OK, item.mGraphicBuffer->unlock());
+
+    ASSERT_EQ(OK, outputConsumer->releaseBuffer(item.mBuf, item.mFrameNumber,
+            EGL_NO_DISPLAY, EGL_NO_SYNC_KHR, Fence::NO_FENCE));
+
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            inputProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    ASSERT_EQ(1, allocator->getAllocCount());
+}
+
+TEST_F(StreamSplitterTest, OneInputMultipleOutputs) {
+    const int NUM_OUTPUTS = 4;
+    sp<CountedAllocator> allocator(new CountedAllocator);
+
+    sp<IGraphicBufferProducer> inputProducer;
+    sp<IGraphicBufferConsumer> inputConsumer;
+    BufferQueue::createBufferQueue(&inputProducer, &inputConsumer, allocator);
+
+    sp<IGraphicBufferProducer> outputProducers[NUM_OUTPUTS] = {};
+    sp<IGraphicBufferConsumer> outputConsumers[NUM_OUTPUTS] = {};
+    for (int output = 0; output < NUM_OUTPUTS; ++output) {
+        BufferQueue::createBufferQueue(&outputProducers[output],
+                &outputConsumers[output], allocator);
+        ASSERT_EQ(OK, outputConsumers[output]->consumerConnect(
+                    new DummyListener, false));
+    }
+
+    sp<StreamSplitter> splitter;
+    status_t status = StreamSplitter::createSplitter(inputConsumer, &splitter);
+    ASSERT_EQ(OK, status);
+    for (int output = 0; output < NUM_OUTPUTS; ++output) {
+        ASSERT_EQ(OK, splitter->addOutput(outputProducers[output]));
+    }
+
+    IGraphicBufferProducer::QueueBufferOutput qbOutput;
+    ASSERT_EQ(OK, inputProducer->connect(new DummyProducerListener,
+            NATIVE_WINDOW_API_CPU, false, &qbOutput));
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            inputProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, inputProducer->requestBuffer(slot, &buffer));
+
+    uint32_t* dataIn;
+    ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN,
+            reinterpret_cast<void**>(&dataIn)));
+    *dataIn = 0x12345678;
+    ASSERT_EQ(OK, buffer->unlock());
+
+    IGraphicBufferProducer::QueueBufferInput qbInput(0, false,
+            Rect(0, 0, 1, 1), NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false,
+            Fence::NO_FENCE);
+    ASSERT_EQ(OK, inputProducer->queueBuffer(slot, qbInput, &qbOutput));
+
+    for (int output = 0; output < NUM_OUTPUTS; ++output) {
+        IGraphicBufferConsumer::BufferItem item;
+        ASSERT_EQ(OK, outputConsumers[output]->acquireBuffer(&item, 0));
+
+        uint32_t* dataOut;
+        ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN,
+                    reinterpret_cast<void**>(&dataOut)));
+        ASSERT_EQ(*dataOut, 0x12345678);
+        ASSERT_EQ(OK, item.mGraphicBuffer->unlock());
+
+        ASSERT_EQ(OK, outputConsumers[output]->releaseBuffer(item.mBuf,
+                    item.mFrameNumber, EGL_NO_DISPLAY, EGL_NO_SYNC_KHR,
+                    Fence::NO_FENCE));
+    }
+
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            inputProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    ASSERT_EQ(1, allocator->getAllocCount());
+}
+
+TEST_F(StreamSplitterTest, OutputAbandonment) {
+    sp<IGraphicBufferProducer> inputProducer;
+    sp<IGraphicBufferConsumer> inputConsumer;
+    BufferQueue::createBufferQueue(&inputProducer, &inputConsumer);
+
+    sp<IGraphicBufferProducer> outputProducer;
+    sp<IGraphicBufferConsumer> outputConsumer;
+    BufferQueue::createBufferQueue(&outputProducer, &outputConsumer);
+    ASSERT_EQ(OK, outputConsumer->consumerConnect(new DummyListener, false));
+
+    sp<StreamSplitter> splitter;
+    status_t status = StreamSplitter::createSplitter(inputConsumer, &splitter);
+    ASSERT_EQ(OK, status);
+    ASSERT_EQ(OK, splitter->addOutput(outputProducer));
+
+    IGraphicBufferProducer::QueueBufferOutput qbOutput;
+    ASSERT_EQ(OK, inputProducer->connect(new DummyProducerListener,
+            NATIVE_WINDOW_API_CPU, false, &qbOutput));
+
+    int slot;
+    sp<Fence> fence;
+    sp<GraphicBuffer> buffer;
+    ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION,
+            inputProducer->dequeueBuffer(&slot, &fence, false, 0, 0, 0,
+                    GRALLOC_USAGE_SW_WRITE_OFTEN));
+    ASSERT_EQ(OK, inputProducer->requestBuffer(slot, &buffer));
+
+    // Abandon the output
+    outputConsumer->consumerDisconnect();
+
+    IGraphicBufferProducer::QueueBufferInput qbInput(0, false,
+            Rect(0, 0, 1, 1), NATIVE_WINDOW_SCALING_MODE_FREEZE, 0, false,
+            Fence::NO_FENCE);
+    ASSERT_EQ(OK, inputProducer->queueBuffer(slot, qbInput, &qbOutput));
+
+    // Input should be abandoned
+    ASSERT_EQ(NO_INIT, inputProducer->dequeueBuffer(&slot, &fence, false, 0, 0,
+            0, GRALLOC_USAGE_SW_WRITE_OFTEN));
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SurfaceTextureClient_test.cpp b/libs/gui/tests/SurfaceTextureClient_test.cpp
index 989fcef..7f9fcc4 100644
--- a/libs/gui/tests/SurfaceTextureClient_test.cpp
+++ b/libs/gui/tests/SurfaceTextureClient_test.cpp
@@ -43,9 +43,11 @@
         ALOGV("Begin test: %s.%s", testInfo->test_case_name(),
                 testInfo->name());
 
-        sp<BufferQueue> bq = new BufferQueue();
-        mST = new GLConsumer(bq, 123);
-        mSTC = new Surface(bq);
+        sp<IGraphicBufferProducer> producer;
+        sp<IGraphicBufferConsumer> consumer;
+        BufferQueue::createBufferQueue(&producer, &consumer);
+        mST = new GLConsumer(consumer, 123);
+        mSTC = new Surface(producer);
         mANW = mSTC;
 
         // We need a valid GL context so we can test updateTexImage()
@@ -711,9 +713,11 @@
         ASSERT_NE(EGL_NO_CONTEXT, mEglContext);
 
         for (int i = 0; i < NUM_SURFACE_TEXTURES; i++) {
-            sp<BufferQueue> bq = new BufferQueue();
-            sp<GLConsumer> st(new GLConsumer(bq, i));
-            sp<Surface> stc(new Surface(bq));
+            sp<IGraphicBufferProducer> producer;
+            sp<IGraphicBufferConsumer> consumer;
+            BufferQueue::createBufferQueue(&producer, &consumer);
+            sp<GLConsumer> st(new GLConsumer(consumer, i));
+            sp<Surface> stc(new Surface(producer));
             mEglSurfaces[i] = eglCreateWindowSurface(mEglDisplay, myConfig,
                     static_cast<ANativeWindow*>(stc.get()), NULL);
             ASSERT_EQ(EGL_SUCCESS, eglGetError());
diff --git a/libs/gui/tests/SurfaceTextureFBO.h b/libs/gui/tests/SurfaceTextureFBO.h
new file mode 100644
index 0000000..7f1ae84
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureFBO.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SURFACE_TEXTURE_FBO_H
+#define ANDROID_SURFACE_TEXTURE_FBO_H
+
+#include "SurfaceTextureGL.h"
+
+#include <GLES2/gl2.h>
+
+namespace android {
+
+class SurfaceTextureFBOTest : public SurfaceTextureGLTest {
+protected:
+    virtual void SetUp() {
+        SurfaceTextureGLTest::SetUp();
+
+        glGenFramebuffers(1, &mFbo);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+
+        glGenTextures(1, &mFboTex);
+        glBindTexture(GL_TEXTURE_2D, mFboTex);
+        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, getSurfaceWidth(),
+                getSurfaceHeight(), 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+        glBindTexture(GL_TEXTURE_2D, 0);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+
+        glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
+        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+                GL_TEXTURE_2D, mFboTex, 0);
+        glBindFramebuffer(GL_FRAMEBUFFER, 0);
+        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    }
+
+    virtual void TearDown() {
+        SurfaceTextureGLTest::TearDown();
+
+        glDeleteTextures(1, &mFboTex);
+        glDeleteFramebuffers(1, &mFbo);
+    }
+
+    GLuint mFbo;
+    GLuint mFboTex;
+};
+
+void fillRGBA8BufferSolid(uint8_t* buf, int w, int h, int stride,
+        uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
+    const size_t PIXEL_SIZE = 4;
+    for (int y = 0; y < h; y++) {
+        for (int x = 0; x < w; x++) {
+            off_t offset = (y * stride + x) * PIXEL_SIZE;
+            buf[offset + 0] = r;
+            buf[offset + 1] = g;
+            buf[offset + 2] = b;
+            buf[offset + 3] = a;
+        }
+    }
+}
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/SurfaceTextureFBO_test.cpp b/libs/gui/tests/SurfaceTextureFBO_test.cpp
new file mode 100644
index 0000000..b165ae6
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureFBO_test.cpp
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SurfaceTextureFBO_test"
+//#define LOG_NDEBUG 0
+
+#include "SurfaceTextureFBO.h"
+
+namespace android {
+
+// This test is intended to verify that proper synchronization is done when
+// rendering into an FBO.
+TEST_F(SurfaceTextureFBOTest, BlitFromCpuFilledBufferToFbo) {
+    const int texWidth = 64;
+    const int texHeight = 64;
+
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_RGBA_8888));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    android_native_buffer_t* anb;
+    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+            &anb));
+    ASSERT_TRUE(anb != NULL);
+
+    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
+
+    // Fill the buffer with green
+    uint8_t* img = NULL;
+    buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
+    fillRGBA8BufferSolid(img, texWidth, texHeight, buf->getStride(), 0, 255,
+            0, 255);
+    buf->unlock();
+    ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(),
+            -1));
+
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
+    drawTexture();
+    glBindFramebuffer(GL_FRAMEBUFFER, 0);
+
+    for (int i = 0; i < 4; i++) {
+        SCOPED_TRACE(String8::format("frame %d", i).string());
+
+        ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+                &anb));
+        ASSERT_TRUE(anb != NULL);
+
+        buf = new GraphicBuffer(anb, false);
+
+        // Fill the buffer with red
+        ASSERT_EQ(NO_ERROR, buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN,
+                (void**)(&img)));
+        fillRGBA8BufferSolid(img, texWidth, texHeight, buf->getStride(), 255, 0,
+                0, 255);
+        ASSERT_EQ(NO_ERROR, buf->unlock());
+        ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(),
+                buf->getNativeBuffer(), -1));
+
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+        drawTexture();
+
+        EXPECT_TRUE(checkPixel( 24, 39, 255, 0, 0, 255));
+    }
+
+    glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
+
+    EXPECT_TRUE(checkPixel( 24, 39, 0, 255, 0, 255));
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SurfaceTextureGL.h b/libs/gui/tests/SurfaceTextureGL.h
new file mode 100644
index 0000000..3bff192
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureGL.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SURFACE_TEXTURE_GL_H
+#define ANDROID_SURFACE_TEXTURE_GL_H
+
+#include "GLTest.h"
+
+#include "FrameWaiter.h"
+#include "TextureRenderer.h"
+
+#include <gui/GLConsumer.h>
+#include <gui/Surface.h>
+
+namespace android {
+
+class FrameWaiter;
+class GLConsumer;
+class TextureRenderer;
+
+class SurfaceTextureGLTest : public GLTest {
+protected:
+    enum { TEX_ID = 123 };
+
+    void SetUp() {
+        GLTest::SetUp();
+        sp<IGraphicBufferProducer> producer;
+        BufferQueue::createBufferQueue(&producer, &mConsumer);
+        mST = new GLConsumer(mConsumer, TEX_ID);
+        mSTC = new Surface(producer);
+        mANW = mSTC;
+        mTextureRenderer = new TextureRenderer(TEX_ID, mST);
+        ASSERT_NO_FATAL_FAILURE(mTextureRenderer->SetUp());
+        mFW = new FrameWaiter;
+        mST->setFrameAvailableListener(mFW);
+    }
+
+    void TearDown() {
+        mTextureRenderer.clear();
+        mANW.clear();
+        mSTC.clear();
+        mST.clear();
+        GLTest::TearDown();
+    }
+
+    void drawTexture() {
+        mTextureRenderer->drawTexture();
+    }
+
+    sp<IGraphicBufferConsumer> mConsumer;
+    sp<GLConsumer> mST;
+    sp<Surface> mSTC;
+    sp<ANativeWindow> mANW;
+    sp<TextureRenderer> mTextureRenderer;
+    sp<FrameWaiter> mFW;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/SurfaceTextureGLThreadToGL.h b/libs/gui/tests/SurfaceTextureGLThreadToGL.h
new file mode 100644
index 0000000..6410516
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureGLThreadToGL.h
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SURFACE_TEXTURE_GL_THREAD_TO_GL_H
+#define ANDROID_SURFACE_TEXTURE_GL_THREAD_TO_GL_H
+
+#include "SurfaceTextureGLToGL.h"
+
+namespace android {
+
+/*
+ * This test fixture is for testing GL -> GL texture streaming from one thread
+ * to another.  It contains functionality to create a producer thread that will
+ * perform GL rendering to an ANativeWindow that feeds frames to a
+ * GLConsumer.  Additionally it supports interlocking the producer and
+ * consumer threads so that a specific sequence of calls can be
+ * deterministically created by the test.
+ *
+ * The intended usage is as follows:
+ *
+ * TEST_F(...) {
+ *     class PT : public ProducerThread {
+ *         virtual void render() {
+ *             ...
+ *             swapBuffers();
+ *         }
+ *     };
+ *
+ *     runProducerThread(new PT());
+ *
+ *     // The order of these calls will vary from test to test and may include
+ *     // multiple frames and additional operations (e.g. GL rendering from the
+ *     // texture).
+ *     fc->waitForFrame();
+ *     mST->updateTexImage();
+ *     fc->finishFrame();
+ * }
+ *
+ */
+class SurfaceTextureGLThreadToGLTest : public SurfaceTextureGLToGLTest {
+protected:
+
+    // ProducerThread is an abstract base class to simplify the creation of
+    // OpenGL ES frame producer threads.
+    class ProducerThread : public Thread {
+    public:
+        virtual ~ProducerThread() {
+        }
+
+        void setEglObjects(EGLDisplay producerEglDisplay,
+                EGLSurface producerEglSurface,
+                EGLContext producerEglContext) {
+            mProducerEglDisplay = producerEglDisplay;
+            mProducerEglSurface = producerEglSurface;
+            mProducerEglContext = producerEglContext;
+        }
+
+        virtual bool threadLoop() {
+            eglMakeCurrent(mProducerEglDisplay, mProducerEglSurface,
+                    mProducerEglSurface, mProducerEglContext);
+            render();
+            eglMakeCurrent(mProducerEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
+                    EGL_NO_CONTEXT);
+            return false;
+        }
+
+    protected:
+        virtual void render() = 0;
+
+        void swapBuffers() {
+            eglSwapBuffers(mProducerEglDisplay, mProducerEglSurface);
+        }
+
+        EGLDisplay mProducerEglDisplay;
+        EGLSurface mProducerEglSurface;
+        EGLContext mProducerEglContext;
+    };
+
+    // FrameCondition is a utility class for interlocking between the producer
+    // and consumer threads.  The FrameCondition object should be created and
+    // destroyed in the consumer thread only.  The consumer thread should set
+    // the FrameCondition as the FrameAvailableListener of the GLConsumer,
+    // and should call both waitForFrame and finishFrame once for each expected
+    // frame.
+    //
+    // This interlocking relies on the fact that onFrameAvailable gets called
+    // synchronously from GLConsumer::queueBuffer.
+    class FrameCondition : public GLConsumer::FrameAvailableListener {
+    public:
+        FrameCondition():
+                mFrameAvailable(false),
+                mFrameFinished(false) {
+        }
+
+        // waitForFrame waits for the next frame to arrive.  This should be
+        // called from the consumer thread once for every frame expected by the
+        // test.
+        void waitForFrame() {
+            Mutex::Autolock lock(mMutex);
+            ALOGV("+waitForFrame");
+            while (!mFrameAvailable) {
+                mFrameAvailableCondition.wait(mMutex);
+            }
+            mFrameAvailable = false;
+            ALOGV("-waitForFrame");
+        }
+
+        // Allow the producer to return from its swapBuffers call and continue
+        // on to produce the next frame.  This should be called by the consumer
+        // thread once for every frame expected by the test.
+        void finishFrame() {
+            Mutex::Autolock lock(mMutex);
+            ALOGV("+finishFrame");
+            mFrameFinished = true;
+            mFrameFinishCondition.signal();
+            ALOGV("-finishFrame");
+        }
+
+        // This should be called by GLConsumer on the producer thread.
+        virtual void onFrameAvailable() {
+            Mutex::Autolock lock(mMutex);
+            ALOGV("+onFrameAvailable");
+            mFrameAvailable = true;
+            mFrameAvailableCondition.signal();
+            while (!mFrameFinished) {
+                mFrameFinishCondition.wait(mMutex);
+            }
+            mFrameFinished = false;
+            ALOGV("-onFrameAvailable");
+        }
+
+    protected:
+        bool mFrameAvailable;
+        bool mFrameFinished;
+
+        Mutex mMutex;
+        Condition mFrameAvailableCondition;
+        Condition mFrameFinishCondition;
+    };
+
+    virtual void SetUp() {
+        SurfaceTextureGLToGLTest::SetUp();
+        mFC = new FrameCondition();
+        mST->setFrameAvailableListener(mFC);
+    }
+
+    virtual void TearDown() {
+        if (mProducerThread != NULL) {
+            mProducerThread->requestExitAndWait();
+        }
+        mProducerThread.clear();
+        mFC.clear();
+        SurfaceTextureGLToGLTest::TearDown();
+    }
+
+    void runProducerThread(const sp<ProducerThread> producerThread) {
+        ASSERT_TRUE(mProducerThread == NULL);
+        mProducerThread = producerThread;
+        producerThread->setEglObjects(mEglDisplay, mProducerEglSurface,
+                mProducerEglContext);
+        producerThread->run();
+    }
+
+    sp<ProducerThread> mProducerThread;
+    sp<FrameCondition> mFC;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/SurfaceTextureGLThreadToGL_test.cpp b/libs/gui/tests/SurfaceTextureGLThreadToGL_test.cpp
new file mode 100644
index 0000000..9776733
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureGLThreadToGL_test.cpp
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SurfaceTextureGLThreadToGL_test"
+//#define LOG_NDEBUG 0
+
+#include "SurfaceTextureGLThreadToGL.h"
+
+namespace android {
+
+TEST_F(SurfaceTextureGLThreadToGLTest,
+        UpdateTexImageBeforeFrameFinishedCompletes) {
+    class PT : public ProducerThread {
+        virtual void render() {
+            glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
+            glClear(GL_COLOR_BUFFER_BIT);
+            swapBuffers();
+        }
+    };
+
+    runProducerThread(new PT());
+
+    mFC->waitForFrame();
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    mFC->finishFrame();
+
+    // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
+}
+
+TEST_F(SurfaceTextureGLThreadToGLTest,
+        UpdateTexImageAfterFrameFinishedCompletes) {
+    class PT : public ProducerThread {
+        virtual void render() {
+            glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
+            glClear(GL_COLOR_BUFFER_BIT);
+            swapBuffers();
+        }
+    };
+
+    runProducerThread(new PT());
+
+    mFC->waitForFrame();
+    mFC->finishFrame();
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
+}
+
+TEST_F(SurfaceTextureGLThreadToGLTest,
+        RepeatedUpdateTexImageBeforeFrameFinishedCompletes) {
+    enum { NUM_ITERATIONS = 1024 };
+
+    class PT : public ProducerThread {
+        virtual void render() {
+            for (int i = 0; i < NUM_ITERATIONS; i++) {
+                glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
+                glClear(GL_COLOR_BUFFER_BIT);
+                ALOGV("+swapBuffers");
+                swapBuffers();
+                ALOGV("-swapBuffers");
+            }
+        }
+    };
+
+    runProducerThread(new PT());
+
+    for (int i = 0; i < NUM_ITERATIONS; i++) {
+        mFC->waitForFrame();
+        ALOGV("+updateTexImage");
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+        ALOGV("-updateTexImage");
+        mFC->finishFrame();
+
+        // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
+    }
+}
+
+TEST_F(SurfaceTextureGLThreadToGLTest,
+        RepeatedUpdateTexImageAfterFrameFinishedCompletes) {
+    enum { NUM_ITERATIONS = 1024 };
+
+    class PT : public ProducerThread {
+        virtual void render() {
+            for (int i = 0; i < NUM_ITERATIONS; i++) {
+                glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
+                glClear(GL_COLOR_BUFFER_BIT);
+                ALOGV("+swapBuffers");
+                swapBuffers();
+                ALOGV("-swapBuffers");
+            }
+        }
+    };
+
+    runProducerThread(new PT());
+
+    for (int i = 0; i < NUM_ITERATIONS; i++) {
+        mFC->waitForFrame();
+        mFC->finishFrame();
+        ALOGV("+updateTexImage");
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+        ALOGV("-updateTexImage");
+
+        // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
+    }
+}
+
+// XXX: This test is disabled because it is currently hanging on some devices.
+TEST_F(SurfaceTextureGLThreadToGLTest,
+        DISABLED_RepeatedSwapBuffersWhileDequeueStalledCompletes) {
+    enum { NUM_ITERATIONS = 64 };
+
+    class PT : public ProducerThread {
+        virtual void render() {
+            for (int i = 0; i < NUM_ITERATIONS; i++) {
+                glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
+                glClear(GL_COLOR_BUFFER_BIT);
+                ALOGV("+swapBuffers");
+                swapBuffers();
+                ALOGV("-swapBuffers");
+            }
+        }
+    };
+
+    ASSERT_EQ(OK, mST->setDefaultMaxBufferCount(2));
+
+    runProducerThread(new PT());
+
+    // Allow three frames to be rendered and queued before starting the
+    // rendering in this thread.  For the latter two frames we don't call
+    // updateTexImage so the next dequeue from the producer thread will block
+    // waiting for a frame to become available.
+    mFC->waitForFrame();
+    mFC->finishFrame();
+
+    // We must call updateTexImage to consume the first frame so that the
+    // SurfaceTexture is able to reduce the buffer count to 2.  This is because
+    // the GL driver may dequeue a buffer when the EGLSurface is created, and
+    // that happens before we call setDefaultMaxBufferCount.  It's possible that the
+    // driver does not dequeue a buffer at EGLSurface creation time, so we
+    // cannot rely on this to cause the second dequeueBuffer call to block.
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    mFC->waitForFrame();
+    mFC->finishFrame();
+    mFC->waitForFrame();
+    mFC->finishFrame();
+
+    // Sleep for 100ms to allow the producer thread's dequeueBuffer call to
+    // block waiting for a buffer to become available.
+    usleep(100000);
+
+    // Render and present a number of images.  This thread should not be blocked
+    // by the fact that the producer thread is blocking in dequeue.
+    for (int i = 0; i < NUM_ITERATIONS; i++) {
+        glClear(GL_COLOR_BUFFER_BIT);
+        eglSwapBuffers(mEglDisplay, mEglSurface);
+    }
+
+    // Consume the two pending buffers to unblock the producer thread.
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    // Consume the remaining buffers from the producer thread.
+    for (int i = 0; i < NUM_ITERATIONS-3; i++) {
+        mFC->waitForFrame();
+        mFC->finishFrame();
+        ALOGV("+updateTexImage");
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+        ALOGV("-updateTexImage");
+    }
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SurfaceTextureGLToGL.h b/libs/gui/tests/SurfaceTextureGLToGL.h
new file mode 100644
index 0000000..5a2eff3
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureGLToGL.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SURFACE_TEXTURE_GL_TO_GL_H
+#define ANDROID_SURFACE_TEXTURE_GL_TO_GL_H
+
+#include "SurfaceTextureGL.h"
+
+namespace android {
+
+/*
+ * This test fixture is for testing GL -> GL texture streaming.  It creates an
+ * EGLSurface and an EGLContext for the image producer to use.
+ */
+class SurfaceTextureGLToGLTest : public SurfaceTextureGLTest {
+protected:
+    SurfaceTextureGLToGLTest():
+            mProducerEglSurface(EGL_NO_SURFACE),
+            mProducerEglContext(EGL_NO_CONTEXT) {
+    }
+
+    virtual void SetUp() {
+        SurfaceTextureGLTest::SetUp();
+
+        mProducerEglSurface = eglCreateWindowSurface(mEglDisplay, mGlConfig,
+                mANW.get(), NULL);
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_SURFACE, mProducerEglSurface);
+
+        mProducerEglContext = eglCreateContext(mEglDisplay, mGlConfig,
+                EGL_NO_CONTEXT, getContextAttribs());
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_CONTEXT, mProducerEglContext);
+    }
+
+    virtual void TearDown() {
+        if (mProducerEglContext != EGL_NO_CONTEXT) {
+            eglDestroyContext(mEglDisplay, mProducerEglContext);
+        }
+        if (mProducerEglSurface != EGL_NO_SURFACE) {
+            eglDestroySurface(mEglDisplay, mProducerEglSurface);
+        }
+        SurfaceTextureGLTest::TearDown();
+    }
+
+    EGLSurface mProducerEglSurface;
+    EGLContext mProducerEglContext;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/gui/tests/SurfaceTextureGLToGL_test.cpp b/libs/gui/tests/SurfaceTextureGLToGL_test.cpp
new file mode 100644
index 0000000..f4c7961
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureGLToGL_test.cpp
@@ -0,0 +1,502 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SurfaceTextureGLToGL_test"
+//#define LOG_NDEBUG 0
+
+#include "SurfaceTextureGLToGL.h"
+
+namespace android {
+
+TEST_F(SurfaceTextureGLToGLTest, TransformHintGetsRespected) {
+    const uint32_t texWidth = 32;
+    const uint32_t texHeight = 64;
+
+    mST->setDefaultBufferSize(texWidth, texHeight);
+    mST->setTransformHint(NATIVE_WINDOW_TRANSFORM_ROT_90);
+
+    // This test requires 3 buffers to avoid deadlock because we're
+    // both producer and consumer, and only using one thread.
+    mST->setDefaultMaxBufferCount(3);
+
+    // Do the producer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Start a buffer with our chosen size and transform hint moving
+    // through the system.
+    glClear(GL_COLOR_BUFFER_BIT);  // give the driver something to do
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+    mST->updateTexImage();  // consume it
+    // Swap again.
+    glClear(GL_COLOR_BUFFER_BIT);
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+    mST->updateTexImage();
+
+    // The current buffer should either show the effects of the transform
+    // hint (in the form of an inverse transform), or show that the
+    // transform hint has been ignored.
+    sp<GraphicBuffer> buf = mST->getCurrentBuffer();
+    if (mST->getCurrentTransform() == NATIVE_WINDOW_TRANSFORM_ROT_270) {
+        ASSERT_EQ(texWidth, buf->getHeight());
+        ASSERT_EQ(texHeight, buf->getWidth());
+    } else {
+        ASSERT_EQ(texWidth, buf->getWidth());
+        ASSERT_EQ(texHeight, buf->getHeight());
+    }
+
+    // Reset the transform hint and confirm that it takes.
+    mST->setTransformHint(0);
+    glClear(GL_COLOR_BUFFER_BIT);
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+    mST->updateTexImage();
+    glClear(GL_COLOR_BUFFER_BIT);
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+    mST->updateTexImage();
+
+    buf = mST->getCurrentBuffer();
+    ASSERT_EQ((uint32_t) 0, mST->getCurrentTransform());
+    ASSERT_EQ(texWidth, buf->getWidth());
+    ASSERT_EQ(texHeight, buf->getHeight());
+}
+
+TEST_F(SurfaceTextureGLToGLTest, TexturingFromGLFilledRGBABufferPow2) {
+    const int texWidth = 64;
+    const int texHeight = 64;
+
+    mST->setDefaultBufferSize(texWidth, texHeight);
+
+    // This test requires 3 buffers to complete run on a single thread.
+    mST->setDefaultMaxBufferCount(3);
+
+    // Do the producer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // This is needed to ensure we pick up a buffer of the correct size.
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    glClearColor(0.6, 0.6, 0.6, 0.6);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glEnable(GL_SCISSOR_TEST);
+    glScissor(4, 4, 4, 4);
+    glClearColor(1.0, 0.0, 0.0, 1.0);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glScissor(24, 48, 4, 4);
+    glClearColor(0.0, 1.0, 0.0, 1.0);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glScissor(37, 17, 4, 4);
+    glClearColor(0.0, 0.0, 1.0, 1.0);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    // Do the consumer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    glDisable(GL_SCISSOR_TEST);
+
+    // Skip the first frame, which was empty
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63, 63, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 0, 63, 153, 153, 153, 153));
+
+    EXPECT_TRUE(checkPixel( 4,  7, 255,   0,   0, 255));
+    EXPECT_TRUE(checkPixel(25, 51,   0, 255,   0, 255));
+    EXPECT_TRUE(checkPixel(40, 19,   0,   0, 255, 255));
+    EXPECT_TRUE(checkPixel(29, 51, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 5, 32, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(13,  8, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(46,  3, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(30, 33, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 6, 52, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(55, 33, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(16, 29, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 1, 30, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(41, 37, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(46, 29, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(15, 25, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 3, 52, 153, 153, 153, 153));
+}
+
+TEST_F(SurfaceTextureGLToGLTest, EglDestroySurfaceUnrefsBuffers) {
+    sp<GraphicBuffer> buffers[2];
+
+    // This test requires async mode to run on a single thread.
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    EXPECT_TRUE(eglSwapInterval(mEglDisplay, 0));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    for (int i = 0; i < 2; i++) {
+        // Produce a frame
+        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+                mProducerEglSurface, mProducerEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        glClear(GL_COLOR_BUFFER_BIT);
+        eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+        // Consume a frame
+        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+                mEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        mFW->waitForFrame();
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+        buffers[i] = mST->getCurrentBuffer();
+    }
+
+    // Destroy the GL texture object to release its ref on buffers[2].
+    GLuint texID = TEX_ID;
+    glDeleteTextures(1, &texID);
+
+    // Destroy the EGLSurface
+    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    mProducerEglSurface = EGL_NO_SURFACE;
+
+    // This test should have the only reference to buffer 0.
+    EXPECT_EQ(1, buffers[0]->getStrongCount());
+
+    // The GLConsumer should hold a single reference to buffer 1 in its
+    // mCurrentBuffer member.  All of the references in the slots should have
+    // been released.
+    EXPECT_EQ(2, buffers[1]->getStrongCount());
+}
+
+TEST_F(SurfaceTextureGLToGLTest, EglDestroySurfaceAfterAbandonUnrefsBuffers) {
+    sp<GraphicBuffer> buffers[3];
+
+    // This test requires async mode to run on a single thread.
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    EXPECT_TRUE(eglSwapInterval(mEglDisplay, 0));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    for (int i = 0; i < 3; i++) {
+        // Produce a frame
+        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+                mProducerEglSurface, mProducerEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        glClear(GL_COLOR_BUFFER_BIT);
+        EXPECT_TRUE(eglSwapBuffers(mEglDisplay, mProducerEglSurface));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+        // Consume a frame
+        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+                mEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        mFW->waitForFrame();
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+        buffers[i] = mST->getCurrentBuffer();
+    }
+
+    // Abandon the GLConsumer, releasing the ref that the GLConsumer has
+    // on buffers[2].
+    mST->abandon();
+
+    // Destroy the GL texture object to release its ref on buffers[2].
+    GLuint texID = TEX_ID;
+    glDeleteTextures(1, &texID);
+
+    // Destroy the EGLSurface.
+    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    mProducerEglSurface = EGL_NO_SURFACE;
+
+    EXPECT_EQ(1, buffers[0]->getStrongCount());
+    EXPECT_EQ(1, buffers[1]->getStrongCount());
+
+    // Depending on how lazily the GL driver dequeues buffers, we may end up
+    // with either two or three total buffers.  If there are three, make sure
+    // the last one was properly down-ref'd.
+    if (buffers[2] != buffers[0]) {
+        EXPECT_EQ(1, buffers[2]->getStrongCount());
+    }
+}
+
+TEST_F(SurfaceTextureGLToGLTest, EglMakeCurrentBeforeConsumerDeathUnrefsBuffers) {
+    sp<GraphicBuffer> buffer;
+
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+
+    // Produce a frame
+    glClear(GL_COLOR_BUFFER_BIT);
+    EXPECT_TRUE(eglSwapBuffers(mEglDisplay, mProducerEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Destroy the EGLSurface.
+    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    mProducerEglSurface = EGL_NO_SURFACE;
+    mSTC.clear();
+    mANW.clear();
+    mTextureRenderer.clear();
+
+    // Consume a frame
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    buffer = mST->getCurrentBuffer();
+
+    // Destroy the GL texture object to release its ref
+    GLuint texID = TEX_ID;
+    glDeleteTextures(1, &texID);
+
+    // make un-current, all references to buffer should be gone
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE,
+            EGL_NO_SURFACE, EGL_NO_CONTEXT));
+
+    // Destroy consumer
+    mST.clear();
+
+    EXPECT_EQ(1, buffer->getStrongCount());
+}
+
+TEST_F(SurfaceTextureGLToGLTest, EglMakeCurrentAfterConsumerDeathUnrefsBuffers) {
+    sp<GraphicBuffer> buffer;
+
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+
+    // Produce a frame
+    glClear(GL_COLOR_BUFFER_BIT);
+    EXPECT_TRUE(eglSwapBuffers(mEglDisplay, mProducerEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Destroy the EGLSurface.
+    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    mProducerEglSurface = EGL_NO_SURFACE;
+    mSTC.clear();
+    mANW.clear();
+    mTextureRenderer.clear();
+
+    // Consume a frame
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    buffer = mST->getCurrentBuffer();
+
+    // Destroy the GL texture object to release its ref
+    GLuint texID = TEX_ID;
+    glDeleteTextures(1, &texID);
+
+    // Destroy consumer
+    mST.clear();
+
+    // make un-current, all references to buffer should be gone
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE,
+            EGL_NO_SURFACE, EGL_NO_CONTEXT));
+
+    EXPECT_EQ(1, buffer->getStrongCount());
+}
+
+TEST_F(SurfaceTextureGLToGLTest, TexturingFromUserSizedGLFilledBuffer) {
+    enum { texWidth = 64 };
+    enum { texHeight = 64 };
+
+    // This test requires 3 buffers to complete run on a single thread.
+    mST->setDefaultMaxBufferCount(3);
+
+    // Set the user buffer size.
+    native_window_set_buffers_user_dimensions(mANW.get(), texWidth, texHeight);
+
+    // Do the producer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // This is needed to ensure we pick up a buffer of the correct size.
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    glClearColor(0.6, 0.6, 0.6, 0.6);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glEnable(GL_SCISSOR_TEST);
+    glScissor(4, 4, 1, 1);
+    glClearColor(1.0, 0.0, 0.0, 1.0);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    // Do the consumer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    glDisable(GL_SCISSOR_TEST);
+
+    // Skip the first frame, which was empty
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63, 63, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 0, 63, 153, 153, 153, 153));
+
+    EXPECT_TRUE(checkPixel( 4,  4, 255,   0,   0, 255));
+    EXPECT_TRUE(checkPixel( 5,  5, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 3,  3, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(45, 52, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(12, 36, 153, 153, 153, 153));
+}
+
+TEST_F(SurfaceTextureGLToGLTest, TexturingFromPreRotatedUserSizedGLFilledBuffer) {
+    enum { texWidth = 64 };
+    enum { texHeight = 16 };
+
+    // This test requires 3 buffers to complete run on a single thread.
+    mST->setDefaultMaxBufferCount(3);
+
+    // Set the transform hint.
+    mST->setTransformHint(NATIVE_WINDOW_TRANSFORM_ROT_90);
+
+    // Set the user buffer size.
+    native_window_set_buffers_user_dimensions(mANW.get(), texWidth, texHeight);
+
+    // Do the producer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // This is needed to ensure we pick up a buffer of the correct size and the
+    // new rotation hint.
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    glClearColor(0.6, 0.6, 0.6, 0.6);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glEnable(GL_SCISSOR_TEST);
+    glScissor(24, 4, 1, 1);
+    glClearColor(1.0, 0.0, 0.0, 1.0);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    // Do the consumer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    glDisable(GL_SCISSOR_TEST);
+
+    // Skip the first frame, which was empty
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63, 15, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 0, 15, 153, 153, 153, 153));
+
+    EXPECT_TRUE(checkPixel(24,  4, 255,   0,   0, 255));
+    EXPECT_TRUE(checkPixel(25,  5, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(23,  3, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(45, 13, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(12,  8, 153, 153, 153, 153));
+}
+
+TEST_F(SurfaceTextureGLToGLTest, TexturingFromPreRotatedGLFilledBuffer) {
+    enum { texWidth = 64 };
+    enum { texHeight = 16 };
+
+    // This test requires 3 buffers to complete run on a single thread.
+    mST->setDefaultMaxBufferCount(3);
+
+    // Set the transform hint.
+    mST->setTransformHint(NATIVE_WINDOW_TRANSFORM_ROT_90);
+
+    // Set the default buffer size.
+    mST->setDefaultBufferSize(texWidth, texHeight);
+
+    // Do the producer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
+            mProducerEglSurface, mProducerEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // This is needed to ensure we pick up a buffer of the correct size and the
+    // new rotation hint.
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    glClearColor(0.6, 0.6, 0.6, 0.6);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glEnable(GL_SCISSOR_TEST);
+    glScissor(24, 4, 1, 1);
+    glClearColor(1.0, 0.0, 0.0, 1.0);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
+
+    // Do the consumer side of things
+    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    glDisable(GL_SCISSOR_TEST);
+
+    // Skip the first frame, which was empty
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(63, 15, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel( 0, 15, 153, 153, 153, 153));
+
+    EXPECT_TRUE(checkPixel(24,  4, 255,   0,   0, 255));
+    EXPECT_TRUE(checkPixel(25,  5, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(23,  3, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(45, 13, 153, 153, 153, 153));
+    EXPECT_TRUE(checkPixel(12,  8, 153, 153, 153, 153));
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SurfaceTextureGL_test.cpp b/libs/gui/tests/SurfaceTextureGL_test.cpp
new file mode 100644
index 0000000..fa1e1b7
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureGL_test.cpp
@@ -0,0 +1,703 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SurfaceTextureGL_test"
+//#define LOG_NDEBUG 0
+
+#include "SurfaceTextureGL.h"
+
+#include "DisconnectWaiter.h"
+#include "FillBuffer.h"
+
+namespace android {
+
+TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BufferNpot) {
+    const int texWidth = 64;
+    const int texHeight = 66;
+
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    ANativeWindowBuffer* anb;
+    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+            &anb));
+    ASSERT_TRUE(anb != NULL);
+
+    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
+
+    // Fill the buffer with the a checkerboard pattern
+    uint8_t* img = NULL;
+    buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
+    fillYV12Buffer(img, texWidth, texHeight, buf->getStride());
+    buf->unlock();
+    ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(),
+            -1));
+
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0, 255, 127, 255, 255, 3));
+    EXPECT_TRUE(checkPixel(63,  0,   0, 133,   0, 255, 3));
+    EXPECT_TRUE(checkPixel(63, 65,   0, 133,   0, 255, 3));
+    EXPECT_TRUE(checkPixel( 0, 65, 255, 127, 255, 255, 3));
+
+    EXPECT_TRUE(checkPixel(22, 44, 255, 127, 255, 255, 3));
+    EXPECT_TRUE(checkPixel(45, 52, 255, 127, 255, 255, 3));
+    EXPECT_TRUE(checkPixel(52, 51,  98, 255,  73, 255, 3));
+    EXPECT_TRUE(checkPixel( 7, 31, 155,   0, 118, 255, 3));
+    EXPECT_TRUE(checkPixel(31,  9, 107,  24,  87, 255, 3));
+    EXPECT_TRUE(checkPixel(29, 35, 255, 127, 255, 255, 3));
+    EXPECT_TRUE(checkPixel(36, 22, 155,  29,   0, 255, 3));
+}
+
+TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BufferPow2) {
+    const int texWidth = 64;
+    const int texHeight = 64;
+
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    ANativeWindowBuffer* anb;
+    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+            &anb));
+    ASSERT_TRUE(anb != NULL);
+
+    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
+
+    // Fill the buffer with the a checkerboard pattern
+    uint8_t* img = NULL;
+    buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
+    fillYV12Buffer(img, texWidth, texHeight, buf->getStride());
+    buf->unlock();
+    ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(),
+            -1));
+
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0,   0, 133,   0, 255));
+    EXPECT_TRUE(checkPixel(63,  0, 255, 127, 255, 255));
+    EXPECT_TRUE(checkPixel(63, 63,   0, 133,   0, 255));
+    EXPECT_TRUE(checkPixel( 0, 63, 255, 127, 255, 255));
+
+    EXPECT_TRUE(checkPixel(22, 19, 100, 255,  74, 255));
+    EXPECT_TRUE(checkPixel(45, 11, 100, 255,  74, 255));
+    EXPECT_TRUE(checkPixel(52, 12, 155,   0, 181, 255));
+    EXPECT_TRUE(checkPixel( 7, 32, 150, 237, 170, 255));
+    EXPECT_TRUE(checkPixel(31, 54,   0,  71, 117, 255));
+    EXPECT_TRUE(checkPixel(29, 28,   0, 133,   0, 255));
+    EXPECT_TRUE(checkPixel(36, 41, 100, 232, 255, 255));
+}
+
+TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BufferWithCrop) {
+    const int texWidth = 64;
+    const int texHeight = 66;
+
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    android_native_rect_t crops[] = {
+        {4, 6, 22, 36},
+        {0, 6, 22, 36},
+        {4, 0, 22, 36},
+        {4, 6, texWidth, 36},
+        {4, 6, 22, texHeight},
+    };
+
+    for (int i = 0; i < 5; i++) {
+        const android_native_rect_t& crop(crops[i]);
+        SCOPED_TRACE(String8::format("rect{ l: %d t: %d r: %d b: %d }",
+                crop.left, crop.top, crop.right, crop.bottom).string());
+
+        ASSERT_EQ(NO_ERROR, native_window_set_crop(mANW.get(), &crop));
+
+        ANativeWindowBuffer* anb;
+        ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+                &anb));
+        ASSERT_TRUE(anb != NULL);
+
+        sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
+
+        uint8_t* img = NULL;
+        buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
+        fillYV12BufferRect(img, texWidth, texHeight, buf->getStride(), crop);
+        buf->unlock();
+        ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(),
+                buf->getNativeBuffer(), -1));
+
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+        glClearColor(0.2, 0.2, 0.2, 0.2);
+        glClear(GL_COLOR_BUFFER_BIT);
+
+        glViewport(0, 0, 64, 64);
+        drawTexture();
+
+        EXPECT_TRUE(checkPixel( 0,  0,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(63,  0,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(63, 63,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel( 0, 63,  82, 255,  35, 255));
+
+        EXPECT_TRUE(checkPixel(25, 14,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(35, 31,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(57,  6,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel( 5, 42,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(32, 33,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(16, 26,  82, 255,  35, 255));
+        EXPECT_TRUE(checkPixel(46, 51,  82, 255,  35, 255));
+    }
+}
+
+// This test is intended to catch synchronization bugs between the CPU-written
+// and GPU-read buffers.
+TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BuffersRepeatedly) {
+    enum { texWidth = 16 };
+    enum { texHeight = 16 };
+    enum { numFrames = 1024 };
+
+    ASSERT_EQ(NO_ERROR, mST->setDefaultMaxBufferCount(2));
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    struct TestPixel {
+        int x;
+        int y;
+    };
+    const TestPixel testPixels[] = {
+        {  4, 11 },
+        { 12, 14 },
+        {  7,  2 },
+    };
+    enum {numTestPixels = sizeof(testPixels) / sizeof(testPixels[0])};
+
+    class ProducerThread : public Thread {
+    public:
+        ProducerThread(const sp<ANativeWindow>& anw,
+                const TestPixel* testPixels):
+                mANW(anw),
+                mTestPixels(testPixels) {
+        }
+
+        virtual ~ProducerThread() {
+        }
+
+        virtual bool threadLoop() {
+            for (int i = 0; i < numFrames; i++) {
+                ANativeWindowBuffer* anb;
+                if (native_window_dequeue_buffer_and_wait(mANW.get(),
+                        &anb) != NO_ERROR) {
+                    return false;
+                }
+                if (anb == NULL) {
+                    return false;
+                }
+
+                sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
+
+                const int yuvTexOffsetY = 0;
+                int stride = buf->getStride();
+                int yuvTexStrideY = stride;
+                int yuvTexOffsetV = yuvTexStrideY * texHeight;
+                int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
+                int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * texHeight/2;
+                int yuvTexStrideU = yuvTexStrideV;
+
+                uint8_t* img = NULL;
+                buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
+
+                // Gray out all the test pixels first, so we're more likely to
+                // see a failure if GL is still texturing from the buffer we
+                // just dequeued.
+                for (int j = 0; j < numTestPixels; j++) {
+                    int x = mTestPixels[j].x;
+                    int y = mTestPixels[j].y;
+                    uint8_t value = 128;
+                    img[y*stride + x] = value;
+                }
+
+                // Fill the buffer with gray.
+                for (int y = 0; y < texHeight; y++) {
+                    for (int x = 0; x < texWidth; x++) {
+                        img[yuvTexOffsetY + y*yuvTexStrideY + x] = 128;
+                        img[yuvTexOffsetU + (y/2)*yuvTexStrideU + x/2] = 128;
+                        img[yuvTexOffsetV + (y/2)*yuvTexStrideV + x/2] = 128;
+                    }
+                }
+
+                // Set the test pixels to either white or black.
+                for (int j = 0; j < numTestPixels; j++) {
+                    int x = mTestPixels[j].x;
+                    int y = mTestPixels[j].y;
+                    uint8_t value = 0;
+                    if (j == (i % numTestPixels)) {
+                        value = 255;
+                    }
+                    img[y*stride + x] = value;
+                }
+
+                buf->unlock();
+                if (mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(), -1)
+                        != NO_ERROR) {
+                    return false;
+                }
+            }
+            return false;
+        }
+
+        sp<ANativeWindow> mANW;
+        const TestPixel* mTestPixels;
+    };
+
+    sp<Thread> pt(new ProducerThread(mANW, testPixels));
+    pt->run();
+
+    glViewport(0, 0, texWidth, texHeight);
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    // We wait for the first two frames up front so that the producer will be
+    // likely to dequeue the buffer that's currently being textured from.
+    mFW->waitForFrame();
+    mFW->waitForFrame();
+
+    for (int i = 0; i < numFrames; i++) {
+        SCOPED_TRACE(String8::format("frame %d", i).string());
+
+        // We must wait for each frame to come in because if we ever do an
+        // updateTexImage call that doesn't consume a newly available buffer
+        // then the producer and consumer will get out of sync, which will cause
+        // a deadlock.
+        if (i > 1) {
+            mFW->waitForFrame();
+        }
+        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+        drawTexture();
+
+        for (int j = 0; j < numTestPixels; j++) {
+            int x = testPixels[j].x;
+            int y = testPixels[j].y;
+            uint8_t value = 0;
+            if (j == (i % numTestPixels)) {
+                // We must y-invert the texture coords
+                EXPECT_TRUE(checkPixel(x, texHeight-y-1, 255, 255, 255, 255));
+            } else {
+                // We must y-invert the texture coords
+                EXPECT_TRUE(checkPixel(x, texHeight-y-1, 0, 0, 0, 255));
+            }
+        }
+    }
+
+    pt->requestExitAndWait();
+}
+
+TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledRGBABufferNpot) {
+    const int texWidth = 64;
+    const int texHeight = 66;
+
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_RGBA_8888));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
+    EXPECT_TRUE(checkPixel(63,  0, 231, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(63, 65, 231, 231, 231, 231));
+    EXPECT_TRUE(checkPixel( 0, 65,  35,  35,  35,  35));
+
+    EXPECT_TRUE(checkPixel(15, 10,  35, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(23, 65, 231,  35, 231,  35));
+    EXPECT_TRUE(checkPixel(19, 40,  35, 231,  35,  35));
+    EXPECT_TRUE(checkPixel(38, 30, 231,  35,  35,  35));
+    EXPECT_TRUE(checkPixel(42, 54,  35,  35,  35, 231));
+    EXPECT_TRUE(checkPixel(37, 34,  35, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(31,  8, 231,  35,  35, 231));
+    EXPECT_TRUE(checkPixel(37, 47, 231,  35, 231, 231));
+    EXPECT_TRUE(checkPixel(25, 38,  35,  35,  35,  35));
+    EXPECT_TRUE(checkPixel(49,  6,  35, 231,  35,  35));
+    EXPECT_TRUE(checkPixel(54, 50,  35, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(27, 26, 231, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(10,  6,  35,  35, 231, 231));
+    EXPECT_TRUE(checkPixel(29,  4,  35,  35,  35, 231));
+    EXPECT_TRUE(checkPixel(55, 28,  35,  35, 231,  35));
+    EXPECT_TRUE(checkPixel(58, 55,  35,  35, 231, 231));
+}
+
+TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledRGBABufferPow2) {
+    const int texWidth = 64;
+    const int texHeight = 64;
+
+    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
+            texWidth, texHeight, HAL_PIXEL_FORMAT_RGBA_8888));
+    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
+            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
+
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
+
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+
+    glViewport(0, 0, texWidth, texHeight);
+    drawTexture();
+
+    EXPECT_TRUE(checkPixel( 0,  0, 231, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(63,  0,  35,  35,  35,  35));
+    EXPECT_TRUE(checkPixel(63, 63, 231, 231, 231, 231));
+    EXPECT_TRUE(checkPixel( 0, 63,  35,  35,  35,  35));
+
+    EXPECT_TRUE(checkPixel(12, 46, 231, 231, 231,  35));
+    EXPECT_TRUE(checkPixel(16,  1, 231, 231,  35, 231));
+    EXPECT_TRUE(checkPixel(21, 12, 231,  35,  35, 231));
+    EXPECT_TRUE(checkPixel(26, 51, 231,  35, 231,  35));
+    EXPECT_TRUE(checkPixel( 5, 32,  35, 231, 231,  35));
+    EXPECT_TRUE(checkPixel(13,  8,  35, 231, 231, 231));
+    EXPECT_TRUE(checkPixel(46,  3,  35,  35, 231,  35));
+    EXPECT_TRUE(checkPixel(30, 33,  35,  35,  35,  35));
+    EXPECT_TRUE(checkPixel( 6, 52, 231, 231,  35,  35));
+    EXPECT_TRUE(checkPixel(55, 33,  35, 231,  35, 231));
+    EXPECT_TRUE(checkPixel(16, 29,  35,  35, 231, 231));
+    EXPECT_TRUE(checkPixel( 1, 30,  35,  35,  35, 231));
+    EXPECT_TRUE(checkPixel(41, 37,  35,  35, 231, 231));
+    EXPECT_TRUE(checkPixel(46, 29, 231, 231,  35,  35));
+    EXPECT_TRUE(checkPixel(15, 25,  35, 231,  35, 231));
+    EXPECT_TRUE(checkPixel( 3, 52,  35, 231,  35,  35));
+}
+
+// Tests if GLConsumer and BufferQueue are robust enough
+// to handle a special case where updateTexImage is called
+// in the middle of disconnect.  This ordering is enforced
+// by blocking in the disconnect callback.
+TEST_F(SurfaceTextureGLTest, DisconnectStressTest) {
+
+    class ProducerThread : public Thread {
+    public:
+        ProducerThread(const sp<ANativeWindow>& anw):
+                mANW(anw) {
+        }
+
+        virtual ~ProducerThread() {
+        }
+
+        virtual bool threadLoop() {
+            ANativeWindowBuffer* anb;
+
+            native_window_api_connect(mANW.get(), NATIVE_WINDOW_API_EGL);
+
+            for (int numFrames =0 ; numFrames < 2; numFrames ++) {
+
+                if (native_window_dequeue_buffer_and_wait(mANW.get(),
+                        &anb) != NO_ERROR) {
+                    return false;
+                }
+                if (anb == NULL) {
+                    return false;
+                }
+                if (mANW->queueBuffer(mANW.get(), anb, -1)
+                        != NO_ERROR) {
+                    return false;
+                }
+            }
+
+            native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_EGL);
+
+            return false;
+        }
+
+    private:
+        sp<ANativeWindow> mANW;
+    };
+
+    sp<DisconnectWaiter> dw(new DisconnectWaiter());
+    mConsumer->consumerConnect(dw, false);
+
+
+    sp<Thread> pt(new ProducerThread(mANW));
+    pt->run();
+
+    // eat a frame so GLConsumer will own an at least one slot
+    dw->waitForFrame();
+    EXPECT_EQ(OK,mST->updateTexImage());
+
+    dw->waitForFrame();
+    // Could fail here as GLConsumer thinks it still owns the slot
+    // but bufferQueue has released all slots
+    EXPECT_EQ(OK,mST->updateTexImage());
+
+    dw->finishDisconnect();
+}
+
+
+// This test ensures that the GLConsumer clears the mCurrentTexture
+// when it is disconnected and reconnected.  Otherwise it will
+// attempt to release a buffer that it does not owned
+TEST_F(SurfaceTextureGLTest, DisconnectClearsCurrentTexture) {
+    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
+            NATIVE_WINDOW_API_EGL));
+
+    ANativeWindowBuffer *anb;
+
+    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+
+    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+
+    EXPECT_EQ(OK,mST->updateTexImage());
+    EXPECT_EQ(OK,mST->updateTexImage());
+
+    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
+            NATIVE_WINDOW_API_EGL));
+    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
+            NATIVE_WINDOW_API_EGL));
+
+    EXPECT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+
+    // Will fail here if mCurrentTexture is not cleared properly
+    mFW->waitForFrame();
+    EXPECT_EQ(OK,mST->updateTexImage());
+
+    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
+            NATIVE_WINDOW_API_EGL));
+}
+
+TEST_F(SurfaceTextureGLTest, ScaleToWindowMode) {
+    ASSERT_EQ(OK, native_window_set_scaling_mode(mANW.get(),
+        NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW));
+
+    // The producer image size
+    ASSERT_EQ(OK, native_window_set_buffers_dimensions(mANW.get(), 512, 512));
+
+    // The consumer image size (16 x 9) ratio
+    mST->setDefaultBufferSize(1280, 720);
+
+    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
+            NATIVE_WINDOW_API_CPU));
+
+    ANativeWindowBuffer *anb;
+
+    android_native_rect_t odd = {23, 78, 123, 477};
+    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &odd));
+    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+    mFW->waitForFrame();
+    EXPECT_EQ(OK, mST->updateTexImage());
+    Rect r = mST->getCurrentCrop();
+    assertRectEq(Rect(23, 78, 123, 477), r);
+
+    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
+            NATIVE_WINDOW_API_CPU));
+}
+
+// This test ensures the scaling mode does the right thing
+// ie NATIVE_WINDOW_SCALING_MODE_CROP should crop
+// the image such that it has the same aspect ratio as the
+// default buffer size
+TEST_F(SurfaceTextureGLTest, CroppedScalingMode) {
+    ASSERT_EQ(OK, native_window_set_scaling_mode(mANW.get(),
+        NATIVE_WINDOW_SCALING_MODE_SCALE_CROP));
+
+    // The producer image size
+    ASSERT_EQ(OK, native_window_set_buffers_dimensions(mANW.get(), 512, 512));
+
+    // The consumer image size (16 x 9) ratio
+    mST->setDefaultBufferSize(1280, 720);
+
+    native_window_api_connect(mANW.get(), NATIVE_WINDOW_API_CPU);
+
+    ANativeWindowBuffer *anb;
+
+    // The crop is in the shape of (320, 180) === 16 x 9
+    android_native_rect_t standard = {10, 20, 330, 200};
+    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &standard));
+    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+    mFW->waitForFrame();
+    EXPECT_EQ(OK, mST->updateTexImage());
+    Rect r = mST->getCurrentCrop();
+    // crop should be the same as crop (same aspect ratio)
+    assertRectEq(Rect(10, 20, 330, 200), r);
+
+    // make this wider then desired aspect 239 x 100 (2.39:1)
+    android_native_rect_t wide = {20, 30, 259, 130};
+    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &wide));
+    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+    mFW->waitForFrame();
+    EXPECT_EQ(OK, mST->updateTexImage());
+    r = mST->getCurrentCrop();
+    // crop should be the same height, but have cropped left and right borders
+    // offset is 30.6 px L+, R-
+    assertRectEq(Rect(51, 30, 228, 130), r);
+
+    // This image is taller then desired aspect 400 x 300 (4:3)
+    android_native_rect_t narrow = {0, 0, 400, 300};
+    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &narrow));
+    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
+    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
+    mFW->waitForFrame();
+    EXPECT_EQ(OK, mST->updateTexImage());
+    r = mST->getCurrentCrop();
+    // crop should be the same width, but have cropped top and bottom borders
+    // offset is 37.5 px
+    assertRectEq(Rect(0, 37, 400, 262), r);
+
+    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
+}
+
+TEST_F(SurfaceTextureGLTest, AbandonUnblocksDequeueBuffer) {
+    class ProducerThread : public Thread {
+    public:
+        ProducerThread(const sp<ANativeWindow>& anw):
+                mANW(anw),
+                mDequeueError(NO_ERROR) {
+        }
+
+        virtual ~ProducerThread() {
+        }
+
+        virtual bool threadLoop() {
+            Mutex::Autolock lock(mMutex);
+            ANativeWindowBuffer* anb;
+
+            // Frame 1
+            if (native_window_dequeue_buffer_and_wait(mANW.get(),
+                    &anb) != NO_ERROR) {
+                return false;
+            }
+            if (anb == NULL) {
+                return false;
+            }
+            if (mANW->queueBuffer(mANW.get(), anb, -1)
+                    != NO_ERROR) {
+                return false;
+            }
+
+            // Frame 2
+            if (native_window_dequeue_buffer_and_wait(mANW.get(),
+                    &anb) != NO_ERROR) {
+                return false;
+            }
+            if (anb == NULL) {
+                return false;
+            }
+            if (mANW->queueBuffer(mANW.get(), anb, -1)
+                    != NO_ERROR) {
+                return false;
+            }
+
+            // Frame 3 - error expected
+            mDequeueError = native_window_dequeue_buffer_and_wait(mANW.get(),
+                &anb);
+            return false;
+        }
+
+        status_t getDequeueError() {
+            Mutex::Autolock lock(mMutex);
+            return mDequeueError;
+        }
+
+    private:
+        sp<ANativeWindow> mANW;
+        status_t mDequeueError;
+        Mutex mMutex;
+    };
+
+    ASSERT_EQ(OK, mST->setDefaultMaxBufferCount(2));
+
+    sp<Thread> pt(new ProducerThread(mANW));
+    pt->run();
+
+    mFW->waitForFrame();
+    mFW->waitForFrame();
+
+    // Sleep for 100ms to allow the producer thread's dequeueBuffer call to
+    // block waiting for a buffer to become available.
+    usleep(100000);
+
+    mST->abandon();
+
+    pt->requestExitAndWait();
+    ASSERT_EQ(NO_INIT,
+            reinterpret_cast<ProducerThread*>(pt.get())->getDequeueError());
+}
+
+TEST_F(SurfaceTextureGLTest, InvalidWidthOrHeightFails) {
+    int texHeight = 16;
+    ANativeWindowBuffer* anb;
+
+    GLint maxTextureSize;
+    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
+
+    // make sure it works with small textures
+    mST->setDefaultBufferSize(16, texHeight);
+    EXPECT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+            &anb));
+    EXPECT_EQ(16, anb->width);
+    EXPECT_EQ(texHeight, anb->height);
+    EXPECT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), anb, -1));
+    EXPECT_EQ(NO_ERROR, mST->updateTexImage());
+
+    // make sure it works with GL_MAX_TEXTURE_SIZE
+    mST->setDefaultBufferSize(maxTextureSize, texHeight);
+    EXPECT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+            &anb));
+    EXPECT_EQ(maxTextureSize, anb->width);
+    EXPECT_EQ(texHeight, anb->height);
+    EXPECT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), anb, -1));
+    EXPECT_EQ(NO_ERROR, mST->updateTexImage());
+
+    // make sure it fails with GL_MAX_TEXTURE_SIZE+1
+    mST->setDefaultBufferSize(maxTextureSize+1, texHeight);
+    EXPECT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
+            &anb));
+    EXPECT_EQ(maxTextureSize+1, anb->width);
+    EXPECT_EQ(texHeight, anb->height);
+    EXPECT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), anb, -1));
+    ASSERT_NE(NO_ERROR, mST->updateTexImage());
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SurfaceTextureMultiContextGL.h b/libs/gui/tests/SurfaceTextureMultiContextGL.h
new file mode 100644
index 0000000..7934bbc
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureMultiContextGL.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_SURFACE_TEXTURE_MULTI_CONTEXT_GL_H
+#define ANDROID_SURFACE_TEXTURE_MULTI_CONTEXT_GL_H
+
+#include "SurfaceTextureGL.h"
+
+namespace android {
+
+class SurfaceTextureMultiContextGLTest : public SurfaceTextureGLTest {
+protected:
+    enum { SECOND_TEX_ID = 123 };
+    enum { THIRD_TEX_ID = 456 };
+
+    SurfaceTextureMultiContextGLTest():
+            mSecondEglContext(EGL_NO_CONTEXT) {
+    }
+
+    virtual void SetUp() {
+        SurfaceTextureGLTest::SetUp();
+
+        // Set up the secondary context and texture renderer.
+        mSecondEglContext = eglCreateContext(mEglDisplay, mGlConfig,
+                EGL_NO_CONTEXT, getContextAttribs());
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_CONTEXT, mSecondEglContext);
+
+        ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+                mSecondEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        mSecondTextureRenderer = new TextureRenderer(SECOND_TEX_ID, mST);
+        ASSERT_NO_FATAL_FAILURE(mSecondTextureRenderer->SetUp());
+
+        // Set up the tertiary context and texture renderer.
+        mThirdEglContext = eglCreateContext(mEglDisplay, mGlConfig,
+                EGL_NO_CONTEXT, getContextAttribs());
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        ASSERT_NE(EGL_NO_CONTEXT, mThirdEglContext);
+
+        ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+                mThirdEglContext));
+        ASSERT_EQ(EGL_SUCCESS, eglGetError());
+        mThirdTextureRenderer = new TextureRenderer(THIRD_TEX_ID, mST);
+        ASSERT_NO_FATAL_FAILURE(mThirdTextureRenderer->SetUp());
+
+        // Switch back to the primary context to start the tests.
+        ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+                mEglContext));
+    }
+
+    virtual void TearDown() {
+        if (mThirdEglContext != EGL_NO_CONTEXT) {
+            eglDestroyContext(mEglDisplay, mThirdEglContext);
+        }
+        if (mSecondEglContext != EGL_NO_CONTEXT) {
+            eglDestroyContext(mEglDisplay, mSecondEglContext);
+        }
+        SurfaceTextureGLTest::TearDown();
+    }
+
+    EGLContext mSecondEglContext;
+    sp<TextureRenderer> mSecondTextureRenderer;
+
+    EGLContext mThirdEglContext;
+    sp<TextureRenderer> mThirdTextureRenderer;
+};
+
+}
+
+#endif
diff --git a/libs/gui/tests/SurfaceTextureMultiContextGL_test.cpp b/libs/gui/tests/SurfaceTextureMultiContextGL_test.cpp
new file mode 100644
index 0000000..115a47d
--- /dev/null
+++ b/libs/gui/tests/SurfaceTextureMultiContextGL_test.cpp
@@ -0,0 +1,389 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "SurfaceTextureMultiContextGL_test"
+//#define LOG_NDEBUG 0
+
+#include "SurfaceTextureMultiContextGL.h"
+
+#include "FillBuffer.h"
+
+#include <GLES/glext.h>
+
+namespace android {
+
+TEST_F(SurfaceTextureMultiContextGLTest, UpdateFromMultipleContextsFails) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Attempt to latch the texture on the secondary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+    ASSERT_EQ(INVALID_OPERATION, mST->updateTexImage());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextSucceeds) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Check that the GL texture was deleted.
+    EXPECT_EQ(GL_FALSE, glIsTexture(TEX_ID));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest,
+        DetachFromContextSucceedsAfterProducerDisconnect) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Check that the GL texture was deleted.
+    EXPECT_EQ(GL_FALSE, glIsTexture(TEX_ID));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWhenAbandoned) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Attempt to detach from the primary context.
+    mST->abandon();
+    ASSERT_EQ(NO_INIT, mST->detachFromContext());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWhenDetached) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attempt to detach from the primary context again.
+    ASSERT_EQ(INVALID_OPERATION, mST->detachFromContext());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWithNoDisplay) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Make there be no current display.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
+            EGL_NO_CONTEXT));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Attempt to detach from the primary context.
+    ASSERT_EQ(INVALID_OPERATION, mST->detachFromContext());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWithNoContext) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Make current context be incorrect.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Attempt to detach from the primary context.
+    ASSERT_EQ(INVALID_OPERATION, mST->detachFromContext());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, UpdateTexImageFailsWhenDetached) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attempt to latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(INVALID_OPERATION, mST->updateTexImage());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextSucceeds) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the secondary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
+
+    // Verify that the texture object was created and bound.
+    GLint texBinding = -1;
+    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
+    EXPECT_EQ(SECOND_TEX_ID, texBinding);
+
+    // Try to use the texture from the secondary context.
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+    glViewport(0, 0, 1, 1);
+    mSecondTextureRenderer->drawTexture();
+    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest,
+        AttachToContextSucceedsAfterProducerDisconnect) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the secondary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
+
+    // Verify that the texture object was created and bound.
+    GLint texBinding = -1;
+    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
+    EXPECT_EQ(SECOND_TEX_ID, texBinding);
+
+    // Try to use the texture from the secondary context.
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+    glViewport(0, 0, 1, 1);
+    mSecondTextureRenderer->drawTexture();
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest,
+        AttachToContextSucceedsBeforeUpdateTexImage) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Detach from the primary context.
+    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the secondary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
+
+    // Verify that the texture object was created and bound.
+    GLint texBinding = -1;
+    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
+    EXPECT_EQ(SECOND_TEX_ID, texBinding);
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Try to use the texture from the secondary context.
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+    glViewport(0, 0, 1, 1);
+    mSecondTextureRenderer->drawTexture();
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextFailsWhenAbandoned) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attempt to attach to the secondary context.
+    mST->abandon();
+
+    // Attempt to attach to the primary context.
+    ASSERT_EQ(NO_INIT, mST->attachToContext(SECOND_TEX_ID));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextFailsWhenAttached) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Attempt to attach to the primary context.
+    ASSERT_EQ(INVALID_OPERATION, mST->attachToContext(SECOND_TEX_ID));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest,
+        AttachToContextFailsWhenAttachedBeforeUpdateTexImage) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Attempt to attach to the primary context.
+    ASSERT_EQ(INVALID_OPERATION, mST->attachToContext(SECOND_TEX_ID));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextFailsWithNoDisplay) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Make there be no current display.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
+            EGL_NO_CONTEXT));
+    ASSERT_EQ(EGL_SUCCESS, eglGetError());
+
+    // Attempt to attach with no context current.
+    ASSERT_EQ(INVALID_OPERATION, mST->attachToContext(SECOND_TEX_ID));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextSucceedsTwice) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Latch the texture contents on the primary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the secondary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
+
+    // Detach from the secondary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the tertiary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mThirdEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(THIRD_TEX_ID));
+
+    // Verify that the texture object was created and bound.
+    GLint texBinding = -1;
+    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
+    EXPECT_EQ(THIRD_TEX_ID, texBinding);
+
+    // Try to use the texture from the tertiary context.
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+    glViewport(0, 0, 1, 1);
+    mThirdTextureRenderer->drawTexture();
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest,
+        AttachToContextSucceedsTwiceBeforeUpdateTexImage) {
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Detach from the primary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the secondary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
+
+    // Detach from the secondary context.
+    ASSERT_EQ(OK, mST->detachFromContext());
+
+    // Attach to the tertiary context.
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mThirdEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(THIRD_TEX_ID));
+
+    // Verify that the texture object was created and bound.
+    GLint texBinding = -1;
+    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
+    EXPECT_EQ(THIRD_TEX_ID, texBinding);
+
+    // Latch the texture contents on the tertiary context.
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // Try to use the texture from the tertiary context.
+    glClearColor(0.2, 0.2, 0.2, 0.2);
+    glClear(GL_COLOR_BUFFER_BIT);
+    glViewport(0, 0, 1, 1);
+    mThirdTextureRenderer->drawTexture();
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
+}
+
+TEST_F(SurfaceTextureMultiContextGLTest,
+        UpdateTexImageSucceedsForBufferConsumedBeforeDetach) {
+    ASSERT_EQ(NO_ERROR, mST->setDefaultMaxBufferCount(2));
+
+    // produce two frames and consume them both on the primary context
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+
+    // produce one more frame
+    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
+
+    // Detach from the primary context and attach to the secondary context
+    ASSERT_EQ(OK, mST->detachFromContext());
+    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
+            mSecondEglContext));
+    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
+
+    // Consume final frame on secondary context
+    mFW->waitForFrame();
+    ASSERT_EQ(OK, mST->updateTexImage());
+}
+
+} // namespace android
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
deleted file mode 100644
index e4fba15..0000000
--- a/libs/gui/tests/SurfaceTexture_test.cpp
+++ /dev/null
@@ -1,2816 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "SurfaceTexture_test"
-//#define LOG_NDEBUG 0
-
-#include <gtest/gtest.h>
-#include <gui/GLConsumer.h>
-#include <ui/GraphicBuffer.h>
-#include <utils/String8.h>
-#include <utils/threads.h>
-
-#include <gui/ISurfaceComposer.h>
-#include <gui/Surface.h>
-#include <gui/SurfaceComposerClient.h>
-
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
-#include <GLES/gl.h>
-#include <GLES/glext.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <ui/FramebufferNativeWindow.h>
-#include <android/native_window.h>
-
-namespace android {
-
-class GLTest : public ::testing::Test {
-protected:
-
-    GLTest():
-            mEglDisplay(EGL_NO_DISPLAY),
-            mEglSurface(EGL_NO_SURFACE),
-            mEglContext(EGL_NO_CONTEXT) {
-    }
-
-    virtual void SetUp() {
-        const ::testing::TestInfo* const testInfo =
-            ::testing::UnitTest::GetInstance()->current_test_info();
-        ALOGV("Begin test: %s.%s", testInfo->test_case_name(),
-                testInfo->name());
-
-        mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_DISPLAY, mEglDisplay);
-
-        EGLint majorVersion;
-        EGLint minorVersion;
-        EXPECT_TRUE(eglInitialize(mEglDisplay, &majorVersion, &minorVersion));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        RecordProperty("EglVersionMajor", majorVersion);
-        RecordProperty("EglVersionMajor", minorVersion);
-
-        EGLint numConfigs = 0;
-        EXPECT_TRUE(eglChooseConfig(mEglDisplay, getConfigAttribs(), &mGlConfig,
-                1, &numConfigs));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-        char* displaySecsEnv = getenv("GLTEST_DISPLAY_SECS");
-        if (displaySecsEnv != NULL) {
-            mDisplaySecs = atoi(displaySecsEnv);
-            if (mDisplaySecs < 0) {
-                mDisplaySecs = 0;
-            }
-        } else {
-            mDisplaySecs = 0;
-        }
-
-        if (mDisplaySecs > 0) {
-            mComposerClient = new SurfaceComposerClient;
-            ASSERT_EQ(NO_ERROR, mComposerClient->initCheck());
-
-            mSurfaceControl = mComposerClient->createSurface(
-                    String8("Test Surface"),
-                    getSurfaceWidth(), getSurfaceHeight(),
-                    PIXEL_FORMAT_RGB_888, 0);
-
-            ASSERT_TRUE(mSurfaceControl != NULL);
-            ASSERT_TRUE(mSurfaceControl->isValid());
-
-            SurfaceComposerClient::openGlobalTransaction();
-            ASSERT_EQ(NO_ERROR, mSurfaceControl->setLayer(0x7FFFFFFF));
-            ASSERT_EQ(NO_ERROR, mSurfaceControl->show());
-            SurfaceComposerClient::closeGlobalTransaction();
-
-            sp<ANativeWindow> window = mSurfaceControl->getSurface();
-            mEglSurface = eglCreateWindowSurface(mEglDisplay, mGlConfig,
-                    window.get(), NULL);
-        } else {
-            EGLint pbufferAttribs[] = {
-                EGL_WIDTH, getSurfaceWidth(),
-                EGL_HEIGHT, getSurfaceHeight(),
-                EGL_NONE };
-
-            mEglSurface = eglCreatePbufferSurface(mEglDisplay, mGlConfig,
-                    pbufferAttribs);
-        }
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_SURFACE, mEglSurface);
-
-        mEglContext = eglCreateContext(mEglDisplay, mGlConfig, EGL_NO_CONTEXT,
-                getContextAttribs());
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_CONTEXT, mEglContext);
-
-        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-                mEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-        EGLint w, h;
-        EXPECT_TRUE(eglQuerySurface(mEglDisplay, mEglSurface, EGL_WIDTH, &w));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        EXPECT_TRUE(eglQuerySurface(mEglDisplay, mEglSurface, EGL_HEIGHT, &h));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        RecordProperty("EglSurfaceWidth", w);
-        RecordProperty("EglSurfaceHeight", h);
-
-        glViewport(0, 0, w, h);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    }
-
-    virtual void TearDown() {
-        // Display the result
-        if (mDisplaySecs > 0 && mEglSurface != EGL_NO_SURFACE) {
-            eglSwapBuffers(mEglDisplay, mEglSurface);
-            sleep(mDisplaySecs);
-        }
-
-        if (mComposerClient != NULL) {
-            mComposerClient->dispose();
-        }
-        if (mEglContext != EGL_NO_CONTEXT) {
-            eglDestroyContext(mEglDisplay, mEglContext);
-        }
-        if (mEglSurface != EGL_NO_SURFACE) {
-            eglDestroySurface(mEglDisplay, mEglSurface);
-        }
-        if (mEglDisplay != EGL_NO_DISPLAY) {
-            eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
-                    EGL_NO_CONTEXT);
-            eglTerminate(mEglDisplay);
-        }
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-        const ::testing::TestInfo* const testInfo =
-            ::testing::UnitTest::GetInstance()->current_test_info();
-        ALOGV("End test:   %s.%s", testInfo->test_case_name(),
-                testInfo->name());
-    }
-
-    virtual EGLint const* getConfigAttribs() {
-        static EGLint sDefaultConfigAttribs[] = {
-            EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
-            EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
-            EGL_RED_SIZE, 8,
-            EGL_GREEN_SIZE, 8,
-            EGL_BLUE_SIZE, 8,
-            EGL_ALPHA_SIZE, 8,
-            EGL_DEPTH_SIZE, 16,
-            EGL_STENCIL_SIZE, 8,
-            EGL_NONE };
-
-        return sDefaultConfigAttribs;
-    }
-
-    virtual EGLint const* getContextAttribs() {
-        static EGLint sDefaultContextAttribs[] = {
-            EGL_CONTEXT_CLIENT_VERSION, 2,
-            EGL_NONE };
-
-        return sDefaultContextAttribs;
-    }
-
-    virtual EGLint getSurfaceWidth() {
-        return 512;
-    }
-
-    virtual EGLint getSurfaceHeight() {
-        return 512;
-    }
-
-    ::testing::AssertionResult checkPixel(int x, int y, int r,
-            int g, int b, int a, int tolerance=2) {
-        GLubyte pixel[4];
-        String8 msg;
-        glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
-        GLenum err = glGetError();
-        if (err != GL_NO_ERROR) {
-            msg += String8::format("error reading pixel: %#x", err);
-            while ((err = glGetError()) != GL_NO_ERROR) {
-                msg += String8::format(", %#x", err);
-            }
-            return ::testing::AssertionFailure(
-                    ::testing::Message(msg.string()));
-        }
-        if (r >= 0 && abs(r - int(pixel[0])) > tolerance) {
-            msg += String8::format("r(%d isn't %d)", pixel[0], r);
-        }
-        if (g >= 0 && abs(g - int(pixel[1])) > tolerance) {
-            if (!msg.isEmpty()) {
-                msg += " ";
-            }
-            msg += String8::format("g(%d isn't %d)", pixel[1], g);
-        }
-        if (b >= 0 && abs(b - int(pixel[2])) > tolerance) {
-            if (!msg.isEmpty()) {
-                msg += " ";
-            }
-            msg += String8::format("b(%d isn't %d)", pixel[2], b);
-        }
-        if (a >= 0 && abs(a - int(pixel[3])) > tolerance) {
-            if (!msg.isEmpty()) {
-                msg += " ";
-            }
-            msg += String8::format("a(%d isn't %d)", pixel[3], a);
-        }
-        if (!msg.isEmpty()) {
-            return ::testing::AssertionFailure(
-                    ::testing::Message(msg.string()));
-        } else {
-            return ::testing::AssertionSuccess();
-        }
-    }
-
-    ::testing::AssertionResult assertRectEq(const Rect &r1,
-        const Rect &r2, int tolerance=1) {
-
-        String8 msg;
-
-        if (abs(r1.left - r2.left) > tolerance) {
-            msg += String8::format("left(%d isn't %d)", r1.left, r2.left);
-        }
-        if (abs(r1.top - r2.top) > tolerance) {
-            if (!msg.isEmpty()) {
-                msg += " ";
-            }
-            msg += String8::format("top(%d isn't %d)", r1.top, r2.top);
-        }
-        if (abs(r1.right - r2.right) > tolerance) {
-            if (!msg.isEmpty()) {
-                msg += " ";
-            }
-            msg += String8::format("right(%d isn't %d)", r1.right, r2.right);
-        }
-        if (abs(r1.bottom - r2.bottom) > tolerance) {
-            if (!msg.isEmpty()) {
-                msg += " ";
-            }
-            msg += String8::format("bottom(%d isn't %d)", r1.bottom, r2.bottom);
-        }
-        if (!msg.isEmpty()) {
-            msg += String8::format(" R1: [%d %d %d %d] R2: [%d %d %d %d]",
-                r1.left, r1.top, r1.right, r1.bottom,
-                r2.left, r2.top, r2.right, r2.bottom);
-            fprintf(stderr, "assertRectEq: %s\n", msg.string());
-            return ::testing::AssertionFailure(
-                    ::testing::Message(msg.string()));
-        } else {
-            return ::testing::AssertionSuccess();
-        }
-    }
-
-    int mDisplaySecs;
-    sp<SurfaceComposerClient> mComposerClient;
-    sp<SurfaceControl> mSurfaceControl;
-
-    EGLDisplay mEglDisplay;
-    EGLSurface mEglSurface;
-    EGLContext mEglContext;
-    EGLConfig  mGlConfig;
-};
-
-static void loadShader(GLenum shaderType, const char* pSource,
-        GLuint* outShader) {
-    GLuint shader = glCreateShader(shaderType);
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    if (shader) {
-        glShaderSource(shader, 1, &pSource, NULL);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-        glCompileShader(shader);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-        GLint compiled = 0;
-        glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-        if (!compiled) {
-            GLint infoLen = 0;
-            glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            if (infoLen) {
-                char* buf = (char*) malloc(infoLen);
-                if (buf) {
-                    glGetShaderInfoLog(shader, infoLen, NULL, buf);
-                    printf("Shader compile log:\n%s\n", buf);
-                    free(buf);
-                    FAIL();
-                }
-            } else {
-                char* buf = (char*) malloc(0x1000);
-                if (buf) {
-                    glGetShaderInfoLog(shader, 0x1000, NULL, buf);
-                    printf("Shader compile log:\n%s\n", buf);
-                    free(buf);
-                    FAIL();
-                }
-            }
-            glDeleteShader(shader);
-            shader = 0;
-        }
-    }
-    ASSERT_TRUE(shader != 0);
-    *outShader = shader;
-}
-
-static void createProgram(const char* pVertexSource,
-        const char* pFragmentSource, GLuint* outPgm) {
-    GLuint vertexShader, fragmentShader;
-    {
-        SCOPED_TRACE("compiling vertex shader");
-        ASSERT_NO_FATAL_FAILURE(loadShader(GL_VERTEX_SHADER, pVertexSource,
-                &vertexShader));
-    }
-    {
-        SCOPED_TRACE("compiling fragment shader");
-        ASSERT_NO_FATAL_FAILURE(loadShader(GL_FRAGMENT_SHADER, pFragmentSource,
-                &fragmentShader));
-    }
-
-    GLuint program = glCreateProgram();
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    if (program) {
-        glAttachShader(program, vertexShader);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-        glAttachShader(program, fragmentShader);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-        glLinkProgram(program);
-        GLint linkStatus = GL_FALSE;
-        glGetProgramiv(program, GL_LINK_STATUS, &linkStatus);
-        if (linkStatus != GL_TRUE) {
-            GLint bufLength = 0;
-            glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufLength);
-            if (bufLength) {
-                char* buf = (char*) malloc(bufLength);
-                if (buf) {
-                    glGetProgramInfoLog(program, bufLength, NULL, buf);
-                    printf("Program link log:\n%s\n", buf);
-                    free(buf);
-                    FAIL();
-                }
-            }
-            glDeleteProgram(program);
-            program = 0;
-        }
-    }
-    glDeleteShader(vertexShader);
-    glDeleteShader(fragmentShader);
-    ASSERT_TRUE(program != 0);
-    *outPgm = program;
-}
-
-static int abs(int value) {
-    return value > 0 ? value : -value;
-}
-
-
-// XXX: Code above this point should live elsewhere
-
-class MultiTextureConsumerTest : public GLTest {
-protected:
-    enum { TEX_ID = 123 };
-
-    virtual void SetUp() {
-        GLTest::SetUp();
-        sp<BufferQueue> bq = new BufferQueue();
-        mGlConsumer = new GLConsumer(bq, TEX_ID);
-        mSurface = new Surface(bq);
-        mANW = mSurface.get();
-
-    }
-    virtual void TearDown() {
-        GLTest::TearDown();
-    }
-    virtual EGLint const* getContextAttribs() {
-        return NULL;
-    }
-    virtual EGLint const* getConfigAttribs() {
-        static EGLint sDefaultConfigAttribs[] = {
-            EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
-            EGL_RED_SIZE, 8,
-            EGL_GREEN_SIZE, 8,
-            EGL_BLUE_SIZE, 8,
-            EGL_ALPHA_SIZE, 8,
-            EGL_NONE };
-
-        return sDefaultConfigAttribs;
-    }
-    sp<GLConsumer> mGlConsumer;
-    sp<Surface> mSurface;
-    ANativeWindow* mANW;
-};
-
-
-TEST_F(MultiTextureConsumerTest, EGLImageTargetWorks) {
-    ANativeWindow_Buffer buffer;
-
-    ASSERT_EQ(native_window_set_usage(mANW, GRALLOC_USAGE_SW_WRITE_OFTEN), NO_ERROR);
-    ASSERT_EQ(native_window_set_buffers_format(mANW, HAL_PIXEL_FORMAT_RGBA_8888), NO_ERROR);
-
-    glShadeModel(GL_FLAT);
-    glDisable(GL_DITHER);
-    glDisable(GL_CULL_FACE);
-    glViewport(0, 0, getSurfaceWidth(), getSurfaceHeight());
-    glOrthof(0, getSurfaceWidth(), 0, getSurfaceHeight(), 0, 1);
-    glEnableClientState(GL_VERTEX_ARRAY);
-    glColor4f(1, 1, 1, 1);
-
-    glBindTexture(GL_TEXTURE_EXTERNAL_OES, TEX_ID);
-    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    glTexParameterx(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-    uint32_t texel = 0x80808080;
-    glBindTexture(GL_TEXTURE_2D, TEX_ID+1);
-    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, &texel);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-    glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-    glActiveTexture(GL_TEXTURE1);
-    glBindTexture(GL_TEXTURE_2D, TEX_ID+1);
-    glEnable(GL_TEXTURE_2D);
-    glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-    glActiveTexture(GL_TEXTURE0);
-    glBindTexture(GL_TEXTURE_EXTERNAL_OES, TEX_ID);
-    glEnable(GL_TEXTURE_EXTERNAL_OES);
-    glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-
-    glClear(GL_COLOR_BUFFER_BIT);
-    for (int i=0 ; i<8 ; i++) {
-        mSurface->lock(&buffer, NULL);
-        memset(buffer.bits, (i&7) * 0x20, buffer.stride * buffer.height * 4);
-        mSurface->unlockAndPost();
-
-        mGlConsumer->updateTexImage();
-
-        GLfloat vertices[][2] = { {i*16.0f, 0}, {(i+1)*16.0f, 0}, {(i+1)*16.0f, 16.0f}, {i*16.0f, 16.0f} };
-        glVertexPointer(2, GL_FLOAT, 0, vertices);
-        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    }
-
-    for (int i=0 ; i<8 ; i++) {
-        EXPECT_TRUE(checkPixel(i*16 + 8,  8, i*16, i*16, i*16, i*16, 0));
-    }
-}
-
-
-
-class SurfaceTextureGLTest : public GLTest {
-protected:
-    enum { TEX_ID = 123 };
-
-    virtual void SetUp() {
-        GLTest::SetUp();
-        sp<BufferQueue> bq = new BufferQueue();
-        mBQ = bq;
-        mST = new GLConsumer(bq, TEX_ID);
-        mSTC = new Surface(bq);
-        mANW = mSTC;
-        mTextureRenderer = new TextureRenderer(TEX_ID, mST);
-        ASSERT_NO_FATAL_FAILURE(mTextureRenderer->SetUp());
-        mFW = new FrameWaiter;
-        mST->setFrameAvailableListener(mFW);
-    }
-
-    virtual void TearDown() {
-        mANW.clear();
-        mSTC.clear();
-        mST.clear();
-        GLTest::TearDown();
-    }
-
-    void drawTexture() {
-        mTextureRenderer->drawTexture();
-    }
-
-    class TextureRenderer: public RefBase {
-    public:
-        TextureRenderer(GLuint texName, const sp<GLConsumer>& st):
-                mTexName(texName),
-                mST(st) {
-        }
-
-        void SetUp() {
-            const char vsrc[] =
-                "attribute vec4 vPosition;\n"
-                "varying vec2 texCoords;\n"
-                "uniform mat4 texMatrix;\n"
-                "void main() {\n"
-                "  vec2 vTexCoords = 0.5 * (vPosition.xy + vec2(1.0, 1.0));\n"
-                "  texCoords = (texMatrix * vec4(vTexCoords, 0.0, 1.0)).xy;\n"
-                "  gl_Position = vPosition;\n"
-                "}\n";
-
-            const char fsrc[] =
-                "#extension GL_OES_EGL_image_external : require\n"
-                "precision mediump float;\n"
-                "uniform samplerExternalOES texSampler;\n"
-                "varying vec2 texCoords;\n"
-                "void main() {\n"
-                "  gl_FragColor = texture2D(texSampler, texCoords);\n"
-                "}\n";
-
-            {
-                SCOPED_TRACE("creating shader program");
-                ASSERT_NO_FATAL_FAILURE(createProgram(vsrc, fsrc, &mPgm));
-            }
-
-            mPositionHandle = glGetAttribLocation(mPgm, "vPosition");
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            ASSERT_NE(-1, mPositionHandle);
-            mTexSamplerHandle = glGetUniformLocation(mPgm, "texSampler");
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            ASSERT_NE(-1, mTexSamplerHandle);
-            mTexMatrixHandle = glGetUniformLocation(mPgm, "texMatrix");
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            ASSERT_NE(-1, mTexMatrixHandle);
-        }
-
-        // drawTexture draws the GLConsumer over the entire GL viewport.
-        void drawTexture() {
-            static const GLfloat triangleVertices[] = {
-                -1.0f, 1.0f,
-                -1.0f, -1.0f,
-                1.0f, -1.0f,
-                1.0f, 1.0f,
-            };
-
-            glVertexAttribPointer(mPositionHandle, 2, GL_FLOAT, GL_FALSE, 0,
-                    triangleVertices);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            glEnableVertexAttribArray(mPositionHandle);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-
-            glUseProgram(mPgm);
-            glUniform1i(mTexSamplerHandle, 0);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTexName);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-
-            // XXX: These calls are not needed for GL_TEXTURE_EXTERNAL_OES as
-            // they're setting the defautls for that target, but when hacking
-            // things to use GL_TEXTURE_2D they are needed to achieve the same
-            // behavior.
-            glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER,
-                    GL_LINEAR);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER,
-                    GL_LINEAR);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S,
-                    GL_CLAMP_TO_EDGE);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-            glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T,
-                    GL_CLAMP_TO_EDGE);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-
-            GLfloat texMatrix[16];
-            mST->getTransformMatrix(texMatrix);
-            glUniformMatrix4fv(mTexMatrixHandle, 1, GL_FALSE, texMatrix);
-
-            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
-            ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-        }
-
-        GLuint mTexName;
-        sp<GLConsumer> mST;
-        GLuint mPgm;
-        GLint mPositionHandle;
-        GLint mTexSamplerHandle;
-        GLint mTexMatrixHandle;
-    };
-
-    class FrameWaiter : public GLConsumer::FrameAvailableListener {
-    public:
-        FrameWaiter():
-                mPendingFrames(0) {
-        }
-
-        void waitForFrame() {
-            Mutex::Autolock lock(mMutex);
-            while (mPendingFrames == 0) {
-                mCondition.wait(mMutex);
-            }
-            mPendingFrames--;
-        }
-
-        virtual void onFrameAvailable() {
-            Mutex::Autolock lock(mMutex);
-            mPendingFrames++;
-            mCondition.signal();
-        }
-
-        int mPendingFrames;
-        Mutex mMutex;
-        Condition mCondition;
-    };
-
-    // Note that GLConsumer will lose the notifications
-    // onBuffersReleased and onFrameAvailable as there is currently
-    // no way to forward the events.  This DisconnectWaiter will not let the
-    // disconnect finish until finishDisconnect() is called.  It will
-    // also block until a disconnect is called
-    class DisconnectWaiter : public BnConsumerListener {
-    public:
-        DisconnectWaiter () :
-            mWaitForDisconnect(false),
-            mPendingFrames(0) {
-        }
-
-        void waitForFrame() {
-            Mutex::Autolock lock(mMutex);
-            while (mPendingFrames == 0) {
-                mFrameCondition.wait(mMutex);
-            }
-            mPendingFrames--;
-        }
-
-        virtual void onFrameAvailable() {
-            Mutex::Autolock lock(mMutex);
-            mPendingFrames++;
-            mFrameCondition.signal();
-        }
-
-        virtual void onBuffersReleased() {
-            Mutex::Autolock lock(mMutex);
-            while (!mWaitForDisconnect) {
-                mDisconnectCondition.wait(mMutex);
-            }
-        }
-
-        void finishDisconnect() {
-            Mutex::Autolock lock(mMutex);
-            mWaitForDisconnect = true;
-            mDisconnectCondition.signal();
-        }
-
-    private:
-        Mutex mMutex;
-
-        bool mWaitForDisconnect;
-        Condition mDisconnectCondition;
-
-        int mPendingFrames;
-        Condition mFrameCondition;
-    };
-
-    sp<BufferQueue> mBQ;
-    sp<GLConsumer> mST;
-    sp<Surface> mSTC;
-    sp<ANativeWindow> mANW;
-    sp<TextureRenderer> mTextureRenderer;
-    sp<FrameWaiter> mFW;
-};
-
-// Fill a YV12 buffer with a multi-colored checkerboard pattern
-void fillYV12Buffer(uint8_t* buf, int w, int h, int stride) {
-    const int blockWidth = w > 16 ? w / 16 : 1;
-    const int blockHeight = h > 16 ? h / 16 : 1;
-    const int yuvTexOffsetY = 0;
-    int yuvTexStrideY = stride;
-    int yuvTexOffsetV = yuvTexStrideY * h;
-    int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
-    int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * h/2;
-    int yuvTexStrideU = yuvTexStrideV;
-    for (int x = 0; x < w; x++) {
-        for (int y = 0; y < h; y++) {
-            int parityX = (x / blockWidth) & 1;
-            int parityY = (y / blockHeight) & 1;
-            unsigned char intensity = (parityX ^ parityY) ? 63 : 191;
-            buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity;
-            if (x < w / 2 && y < h / 2) {
-                buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = intensity;
-                if (x * 2 < w / 2 && y * 2 < h / 2) {
-                    buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 0] =
-                    buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 1] =
-                    buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 0] =
-                    buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 1] =
-                        intensity;
-                }
-            }
-        }
-    }
-}
-
-// Fill a YV12 buffer with red outside a given rectangle and green inside it.
-void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride,
-        const android_native_rect_t& rect) {
-    const int yuvTexOffsetY = 0;
-    int yuvTexStrideY = stride;
-    int yuvTexOffsetV = yuvTexStrideY * h;
-    int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
-    int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * h/2;
-    int yuvTexStrideU = yuvTexStrideV;
-    for (int x = 0; x < w; x++) {
-        for (int y = 0; y < h; y++) {
-            bool inside = rect.left <= x && x < rect.right &&
-                    rect.top <= y && y < rect.bottom;
-            buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = inside ? 240 : 64;
-            if (x < w / 2 && y < h / 2) {
-                bool inside = rect.left <= 2*x && 2*x < rect.right &&
-                        rect.top <= 2*y && 2*y < rect.bottom;
-                buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = 16;
-                buf[yuvTexOffsetV + (y * yuvTexStrideV) + x] =
-                        inside ? 16 : 255;
-            }
-        }
-    }
-}
-
-void fillRGBA8Buffer(uint8_t* buf, int w, int h, int stride) {
-    const size_t PIXEL_SIZE = 4;
-    for (int x = 0; x < w; x++) {
-        for (int y = 0; y < h; y++) {
-            off_t offset = (y * stride + x) * PIXEL_SIZE;
-            for (int c = 0; c < 4; c++) {
-                int parityX = (x / (1 << (c+2))) & 1;
-                int parityY = (y / (1 << (c+2))) & 1;
-                buf[offset + c] = (parityX ^ parityY) ? 231 : 35;
-            }
-        }
-    }
-}
-
-void fillRGBA8BufferSolid(uint8_t* buf, int w, int h, int stride, uint8_t r,
-        uint8_t g, uint8_t b, uint8_t a) {
-    const size_t PIXEL_SIZE = 4;
-    for (int y = 0; y < h; y++) {
-        for (int x = 0; x < h; x++) {
-            off_t offset = (y * stride + x) * PIXEL_SIZE;
-            buf[offset + 0] = r;
-            buf[offset + 1] = g;
-            buf[offset + 2] = b;
-            buf[offset + 3] = a;
-        }
-    }
-}
-
-// Produce a single RGBA8 frame by filling a buffer with a checkerboard pattern
-// using the CPU.  This assumes that the ANativeWindow is already configured to
-// allow this to be done (e.g. the format is set to RGBA8).
-//
-// Calls to this function should be wrapped in an ASSERT_NO_FATAL_FAILURE().
-void produceOneRGBA8Frame(const sp<ANativeWindow>& anw) {
-    android_native_buffer_t* anb;
-    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(anw.get(),
-            &anb));
-    ASSERT_TRUE(anb != NULL);
-
-    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
-
-    uint8_t* img = NULL;
-    ASSERT_EQ(NO_ERROR, buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN,
-            (void**)(&img)));
-    fillRGBA8Buffer(img, buf->getWidth(), buf->getHeight(), buf->getStride());
-    ASSERT_EQ(NO_ERROR, buf->unlock());
-    ASSERT_EQ(NO_ERROR, anw->queueBuffer(anw.get(), buf->getNativeBuffer(),
-            -1));
-}
-
-TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BufferNpot) {
-    const int texWidth = 64;
-    const int texHeight = 66;
-
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    ANativeWindowBuffer* anb;
-    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-            &anb));
-    ASSERT_TRUE(anb != NULL);
-
-    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
-
-    // Fill the buffer with the a checkerboard pattern
-    uint8_t* img = NULL;
-    buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
-    fillYV12Buffer(img, texWidth, texHeight, buf->getStride());
-    buf->unlock();
-    ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(),
-            -1));
-
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0, 255, 127, 255, 255, 3));
-    EXPECT_TRUE(checkPixel(63,  0,   0, 133,   0, 255, 3));
-    EXPECT_TRUE(checkPixel(63, 65,   0, 133,   0, 255, 3));
-    EXPECT_TRUE(checkPixel( 0, 65, 255, 127, 255, 255, 3));
-
-    EXPECT_TRUE(checkPixel(22, 44, 255, 127, 255, 255, 3));
-    EXPECT_TRUE(checkPixel(45, 52, 255, 127, 255, 255, 3));
-    EXPECT_TRUE(checkPixel(52, 51,  98, 255,  73, 255, 3));
-    EXPECT_TRUE(checkPixel( 7, 31, 155,   0, 118, 255, 3));
-    EXPECT_TRUE(checkPixel(31,  9, 107,  24,  87, 255, 3));
-    EXPECT_TRUE(checkPixel(29, 35, 255, 127, 255, 255, 3));
-    EXPECT_TRUE(checkPixel(36, 22, 155,  29,   0, 255, 3));
-}
-
-TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BufferPow2) {
-    const int texWidth = 64;
-    const int texHeight = 64;
-
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    ANativeWindowBuffer* anb;
-    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-            &anb));
-    ASSERT_TRUE(anb != NULL);
-
-    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
-
-    // Fill the buffer with the a checkerboard pattern
-    uint8_t* img = NULL;
-    buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
-    fillYV12Buffer(img, texWidth, texHeight, buf->getStride());
-    buf->unlock();
-    ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(),
-            -1));
-
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0,   0, 133,   0, 255));
-    EXPECT_TRUE(checkPixel(63,  0, 255, 127, 255, 255));
-    EXPECT_TRUE(checkPixel(63, 63,   0, 133,   0, 255));
-    EXPECT_TRUE(checkPixel( 0, 63, 255, 127, 255, 255));
-
-    EXPECT_TRUE(checkPixel(22, 19, 100, 255,  74, 255));
-    EXPECT_TRUE(checkPixel(45, 11, 100, 255,  74, 255));
-    EXPECT_TRUE(checkPixel(52, 12, 155,   0, 181, 255));
-    EXPECT_TRUE(checkPixel( 7, 32, 150, 237, 170, 255));
-    EXPECT_TRUE(checkPixel(31, 54,   0,  71, 117, 255));
-    EXPECT_TRUE(checkPixel(29, 28,   0, 133,   0, 255));
-    EXPECT_TRUE(checkPixel(36, 41, 100, 232, 255, 255));
-}
-
-TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BufferWithCrop) {
-    const int texWidth = 64;
-    const int texHeight = 66;
-
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    android_native_rect_t crops[] = {
-        {4, 6, 22, 36},
-        {0, 6, 22, 36},
-        {4, 0, 22, 36},
-        {4, 6, texWidth, 36},
-        {4, 6, 22, texHeight},
-    };
-
-    for (int i = 0; i < 5; i++) {
-        const android_native_rect_t& crop(crops[i]);
-        SCOPED_TRACE(String8::format("rect{ l: %d t: %d r: %d b: %d }",
-                crop.left, crop.top, crop.right, crop.bottom).string());
-
-        ASSERT_EQ(NO_ERROR, native_window_set_crop(mANW.get(), &crop));
-
-        ANativeWindowBuffer* anb;
-        ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-                &anb));
-        ASSERT_TRUE(anb != NULL);
-
-        sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
-
-        uint8_t* img = NULL;
-        buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
-        fillYV12BufferRect(img, texWidth, texHeight, buf->getStride(), crop);
-        buf->unlock();
-        ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(),
-                buf->getNativeBuffer(), -1));
-
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-        glClearColor(0.2, 0.2, 0.2, 0.2);
-        glClear(GL_COLOR_BUFFER_BIT);
-
-        glViewport(0, 0, 64, 64);
-        drawTexture();
-
-        EXPECT_TRUE(checkPixel( 0,  0,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(63,  0,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(63, 63,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel( 0, 63,  82, 255,  35, 255));
-
-        EXPECT_TRUE(checkPixel(25, 14,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(35, 31,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(57,  6,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel( 5, 42,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(32, 33,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(16, 26,  82, 255,  35, 255));
-        EXPECT_TRUE(checkPixel(46, 51,  82, 255,  35, 255));
-    }
-}
-
-// This test is intended to catch synchronization bugs between the CPU-written
-// and GPU-read buffers.
-TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledYV12BuffersRepeatedly) {
-    enum { texWidth = 16 };
-    enum { texHeight = 16 };
-    enum { numFrames = 1024 };
-
-    ASSERT_EQ(NO_ERROR, mST->setDefaultMaxBufferCount(2));
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_YV12));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    struct TestPixel {
-        int x;
-        int y;
-    };
-    const TestPixel testPixels[] = {
-        {  4, 11 },
-        { 12, 14 },
-        {  7,  2 },
-    };
-    enum {numTestPixels = sizeof(testPixels) / sizeof(testPixels[0])};
-
-    class ProducerThread : public Thread {
-    public:
-        ProducerThread(const sp<ANativeWindow>& anw,
-                const TestPixel* testPixels):
-                mANW(anw),
-                mTestPixels(testPixels) {
-        }
-
-        virtual ~ProducerThread() {
-        }
-
-        virtual bool threadLoop() {
-            for (int i = 0; i < numFrames; i++) {
-                ANativeWindowBuffer* anb;
-                if (native_window_dequeue_buffer_and_wait(mANW.get(),
-                        &anb) != NO_ERROR) {
-                    return false;
-                }
-                if (anb == NULL) {
-                    return false;
-                }
-
-                sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
-
-                const int yuvTexOffsetY = 0;
-                int stride = buf->getStride();
-                int yuvTexStrideY = stride;
-                int yuvTexOffsetV = yuvTexStrideY * texHeight;
-                int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf;
-                int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * texHeight/2;
-                int yuvTexStrideU = yuvTexStrideV;
-
-                uint8_t* img = NULL;
-                buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
-
-                // Gray out all the test pixels first, so we're more likely to
-                // see a failure if GL is still texturing from the buffer we
-                // just dequeued.
-                for (int j = 0; j < numTestPixels; j++) {
-                    int x = mTestPixels[j].x;
-                    int y = mTestPixels[j].y;
-                    uint8_t value = 128;
-                    img[y*stride + x] = value;
-                }
-
-                // Fill the buffer with gray.
-                for (int y = 0; y < texHeight; y++) {
-                    for (int x = 0; x < texWidth; x++) {
-                        img[yuvTexOffsetY + y*yuvTexStrideY + x] = 128;
-                        img[yuvTexOffsetU + (y/2)*yuvTexStrideU + x/2] = 128;
-                        img[yuvTexOffsetV + (y/2)*yuvTexStrideV + x/2] = 128;
-                    }
-                }
-
-                // Set the test pixels to either white or black.
-                for (int j = 0; j < numTestPixels; j++) {
-                    int x = mTestPixels[j].x;
-                    int y = mTestPixels[j].y;
-                    uint8_t value = 0;
-                    if (j == (i % numTestPixels)) {
-                        value = 255;
-                    }
-                    img[y*stride + x] = value;
-                }
-
-                buf->unlock();
-                if (mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(), -1)
-                        != NO_ERROR) {
-                    return false;
-                }
-            }
-            return false;
-        }
-
-        sp<ANativeWindow> mANW;
-        const TestPixel* mTestPixels;
-    };
-
-    sp<Thread> pt(new ProducerThread(mANW, testPixels));
-    pt->run();
-
-    glViewport(0, 0, texWidth, texHeight);
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    // We wait for the first two frames up front so that the producer will be
-    // likely to dequeue the buffer that's currently being textured from.
-    mFW->waitForFrame();
-    mFW->waitForFrame();
-
-    for (int i = 0; i < numFrames; i++) {
-        SCOPED_TRACE(String8::format("frame %d", i).string());
-
-        // We must wait for each frame to come in because if we ever do an
-        // updateTexImage call that doesn't consume a newly available buffer
-        // then the producer and consumer will get out of sync, which will cause
-        // a deadlock.
-        if (i > 1) {
-            mFW->waitForFrame();
-        }
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-        drawTexture();
-
-        for (int j = 0; j < numTestPixels; j++) {
-            int x = testPixels[j].x;
-            int y = testPixels[j].y;
-            uint8_t value = 0;
-            if (j == (i % numTestPixels)) {
-                // We must y-invert the texture coords
-                EXPECT_TRUE(checkPixel(x, texHeight-y-1, 255, 255, 255, 255));
-            } else {
-                // We must y-invert the texture coords
-                EXPECT_TRUE(checkPixel(x, texHeight-y-1, 0, 0, 0, 255));
-            }
-        }
-    }
-
-    pt->requestExitAndWait();
-}
-
-TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledRGBABufferNpot) {
-    const int texWidth = 64;
-    const int texHeight = 66;
-
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_RGBA_8888));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
-    EXPECT_TRUE(checkPixel(63,  0, 231, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(63, 65, 231, 231, 231, 231));
-    EXPECT_TRUE(checkPixel( 0, 65,  35,  35,  35,  35));
-
-    EXPECT_TRUE(checkPixel(15, 10,  35, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(23, 65, 231,  35, 231,  35));
-    EXPECT_TRUE(checkPixel(19, 40,  35, 231,  35,  35));
-    EXPECT_TRUE(checkPixel(38, 30, 231,  35,  35,  35));
-    EXPECT_TRUE(checkPixel(42, 54,  35,  35,  35, 231));
-    EXPECT_TRUE(checkPixel(37, 34,  35, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(31,  8, 231,  35,  35, 231));
-    EXPECT_TRUE(checkPixel(37, 47, 231,  35, 231, 231));
-    EXPECT_TRUE(checkPixel(25, 38,  35,  35,  35,  35));
-    EXPECT_TRUE(checkPixel(49,  6,  35, 231,  35,  35));
-    EXPECT_TRUE(checkPixel(54, 50,  35, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(27, 26, 231, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(10,  6,  35,  35, 231, 231));
-    EXPECT_TRUE(checkPixel(29,  4,  35,  35,  35, 231));
-    EXPECT_TRUE(checkPixel(55, 28,  35,  35, 231,  35));
-    EXPECT_TRUE(checkPixel(58, 55,  35,  35, 231, 231));
-}
-
-TEST_F(SurfaceTextureGLTest, TexturingFromCpuFilledRGBABufferPow2) {
-    const int texWidth = 64;
-    const int texHeight = 64;
-
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_RGBA_8888));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0, 231, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(63,  0,  35,  35,  35,  35));
-    EXPECT_TRUE(checkPixel(63, 63, 231, 231, 231, 231));
-    EXPECT_TRUE(checkPixel( 0, 63,  35,  35,  35,  35));
-
-    EXPECT_TRUE(checkPixel(12, 46, 231, 231, 231,  35));
-    EXPECT_TRUE(checkPixel(16,  1, 231, 231,  35, 231));
-    EXPECT_TRUE(checkPixel(21, 12, 231,  35,  35, 231));
-    EXPECT_TRUE(checkPixel(26, 51, 231,  35, 231,  35));
-    EXPECT_TRUE(checkPixel( 5, 32,  35, 231, 231,  35));
-    EXPECT_TRUE(checkPixel(13,  8,  35, 231, 231, 231));
-    EXPECT_TRUE(checkPixel(46,  3,  35,  35, 231,  35));
-    EXPECT_TRUE(checkPixel(30, 33,  35,  35,  35,  35));
-    EXPECT_TRUE(checkPixel( 6, 52, 231, 231,  35,  35));
-    EXPECT_TRUE(checkPixel(55, 33,  35, 231,  35, 231));
-    EXPECT_TRUE(checkPixel(16, 29,  35,  35, 231, 231));
-    EXPECT_TRUE(checkPixel( 1, 30,  35,  35,  35, 231));
-    EXPECT_TRUE(checkPixel(41, 37,  35,  35, 231, 231));
-    EXPECT_TRUE(checkPixel(46, 29, 231, 231,  35,  35));
-    EXPECT_TRUE(checkPixel(15, 25,  35, 231,  35, 231));
-    EXPECT_TRUE(checkPixel( 3, 52,  35, 231,  35,  35));
-}
-
-// Tests if GLConsumer and BufferQueue are robust enough
-// to handle a special case where updateTexImage is called
-// in the middle of disconnect.  This ordering is enforced
-// by blocking in the disconnect callback.
-TEST_F(SurfaceTextureGLTest, DisconnectStressTest) {
-
-    class ProducerThread : public Thread {
-    public:
-        ProducerThread(const sp<ANativeWindow>& anw):
-                mANW(anw) {
-        }
-
-        virtual ~ProducerThread() {
-        }
-
-        virtual bool threadLoop() {
-            ANativeWindowBuffer* anb;
-
-            native_window_api_connect(mANW.get(), NATIVE_WINDOW_API_EGL);
-
-            for (int numFrames =0 ; numFrames < 2; numFrames ++) {
-
-                if (native_window_dequeue_buffer_and_wait(mANW.get(),
-                        &anb) != NO_ERROR) {
-                    return false;
-                }
-                if (anb == NULL) {
-                    return false;
-                }
-                if (mANW->queueBuffer(mANW.get(), anb, -1)
-                        != NO_ERROR) {
-                    return false;
-                }
-            }
-
-            native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_EGL);
-
-            return false;
-        }
-
-    private:
-        sp<ANativeWindow> mANW;
-    };
-
-    sp<DisconnectWaiter> dw(new DisconnectWaiter());
-    mBQ->consumerConnect(dw, false);
-
-
-    sp<Thread> pt(new ProducerThread(mANW));
-    pt->run();
-
-    // eat a frame so GLConsumer will own an at least one slot
-    dw->waitForFrame();
-    EXPECT_EQ(OK,mST->updateTexImage());
-
-    dw->waitForFrame();
-    // Could fail here as GLConsumer thinks it still owns the slot
-    // but bufferQueue has released all slots
-    EXPECT_EQ(OK,mST->updateTexImage());
-
-    dw->finishDisconnect();
-}
-
-
-// This test ensures that the GLConsumer clears the mCurrentTexture
-// when it is disconnected and reconnected.  Otherwise it will
-// attempt to release a buffer that it does not owned
-TEST_F(SurfaceTextureGLTest, DisconnectClearsCurrentTexture) {
-    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
-            NATIVE_WINDOW_API_EGL));
-
-    ANativeWindowBuffer *anb;
-
-    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-
-    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-
-    EXPECT_EQ(OK,mST->updateTexImage());
-    EXPECT_EQ(OK,mST->updateTexImage());
-
-    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
-            NATIVE_WINDOW_API_EGL));
-    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
-            NATIVE_WINDOW_API_EGL));
-
-    EXPECT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-
-    // Will fail here if mCurrentTexture is not cleared properly
-    mFW->waitForFrame();
-    EXPECT_EQ(OK,mST->updateTexImage());
-
-    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
-            NATIVE_WINDOW_API_EGL));
-}
-
-TEST_F(SurfaceTextureGLTest, ScaleToWindowMode) {
-    ASSERT_EQ(OK, native_window_set_scaling_mode(mANW.get(),
-        NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW));
-
-    // The producer image size
-    ASSERT_EQ(OK, native_window_set_buffers_dimensions(mANW.get(), 512, 512));
-
-    // The consumer image size (16 x 9) ratio
-    mST->setDefaultBufferSize(1280, 720);
-
-    ASSERT_EQ(OK, native_window_api_connect(mANW.get(),
-            NATIVE_WINDOW_API_CPU));
-
-    ANativeWindowBuffer *anb;
-
-    android_native_rect_t odd = {23, 78, 123, 477};
-    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &odd));
-    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-    mFW->waitForFrame();
-    EXPECT_EQ(OK, mST->updateTexImage());
-    Rect r = mST->getCurrentCrop();
-    assertRectEq(Rect(23, 78, 123, 477), r);
-
-    ASSERT_EQ(OK, native_window_api_disconnect(mANW.get(),
-            NATIVE_WINDOW_API_CPU));
-}
-
-// This test ensures the scaling mode does the right thing
-// ie NATIVE_WINDOW_SCALING_MODE_CROP should crop
-// the image such that it has the same aspect ratio as the
-// default buffer size
-TEST_F(SurfaceTextureGLTest, CroppedScalingMode) {
-    ASSERT_EQ(OK, native_window_set_scaling_mode(mANW.get(),
-        NATIVE_WINDOW_SCALING_MODE_SCALE_CROP));
-
-    // The producer image size
-    ASSERT_EQ(OK, native_window_set_buffers_dimensions(mANW.get(), 512, 512));
-
-    // The consumer image size (16 x 9) ratio
-    mST->setDefaultBufferSize(1280, 720);
-
-    native_window_api_connect(mANW.get(), NATIVE_WINDOW_API_CPU);
-
-    ANativeWindowBuffer *anb;
-
-    // The crop is in the shape of (320, 180) === 16 x 9
-    android_native_rect_t standard = {10, 20, 330, 200};
-    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &standard));
-    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-    mFW->waitForFrame();
-    EXPECT_EQ(OK, mST->updateTexImage());
-    Rect r = mST->getCurrentCrop();
-    // crop should be the same as crop (same aspect ratio)
-    assertRectEq(Rect(10, 20, 330, 200), r);
-
-    // make this wider then desired aspect 239 x 100 (2.39:1)
-    android_native_rect_t wide = {20, 30, 259, 130};
-    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &wide));
-    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-    mFW->waitForFrame();
-    EXPECT_EQ(OK, mST->updateTexImage());
-    r = mST->getCurrentCrop();
-    // crop should be the same height, but have cropped left and right borders
-    // offset is 30.6 px L+, R-
-    assertRectEq(Rect(51, 30, 228, 130), r);
-
-    // This image is taller then desired aspect 400 x 300 (4:3)
-    android_native_rect_t narrow = {0, 0, 400, 300};
-    ASSERT_EQ(OK, native_window_set_crop(mANW.get(), &narrow));
-    EXPECT_EQ (OK, native_window_dequeue_buffer_and_wait(mANW.get(), &anb));
-    EXPECT_EQ(OK, mANW->queueBuffer(mANW.get(), anb, -1));
-    mFW->waitForFrame();
-    EXPECT_EQ(OK, mST->updateTexImage());
-    r = mST->getCurrentCrop();
-    // crop should be the same width, but have cropped top and bottom borders
-    // offset is 37.5 px
-    assertRectEq(Rect(0, 37, 400, 262), r);
-
-    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
-}
-
-TEST_F(SurfaceTextureGLTest, AbandonUnblocksDequeueBuffer) {
-    class ProducerThread : public Thread {
-    public:
-        ProducerThread(const sp<ANativeWindow>& anw):
-                mANW(anw),
-                mDequeueError(NO_ERROR) {
-        }
-
-        virtual ~ProducerThread() {
-        }
-
-        virtual bool threadLoop() {
-            Mutex::Autolock lock(mMutex);
-            ANativeWindowBuffer* anb;
-
-            // Frame 1
-            if (native_window_dequeue_buffer_and_wait(mANW.get(),
-                    &anb) != NO_ERROR) {
-                return false;
-            }
-            if (anb == NULL) {
-                return false;
-            }
-            if (mANW->queueBuffer(mANW.get(), anb, -1)
-                    != NO_ERROR) {
-                return false;
-            }
-
-            // Frame 2
-            if (native_window_dequeue_buffer_and_wait(mANW.get(),
-                    &anb) != NO_ERROR) {
-                return false;
-            }
-            if (anb == NULL) {
-                return false;
-            }
-            if (mANW->queueBuffer(mANW.get(), anb, -1)
-                    != NO_ERROR) {
-                return false;
-            }
-
-            // Frame 3 - error expected
-            mDequeueError = native_window_dequeue_buffer_and_wait(mANW.get(),
-                &anb);
-            return false;
-        }
-
-        status_t getDequeueError() {
-            Mutex::Autolock lock(mMutex);
-            return mDequeueError;
-        }
-
-    private:
-        sp<ANativeWindow> mANW;
-        status_t mDequeueError;
-        Mutex mMutex;
-    };
-
-    ASSERT_EQ(OK, mST->setDefaultMaxBufferCount(2));
-
-    sp<Thread> pt(new ProducerThread(mANW));
-    pt->run();
-
-    mFW->waitForFrame();
-    mFW->waitForFrame();
-
-    // Sleep for 100ms to allow the producer thread's dequeueBuffer call to
-    // block waiting for a buffer to become available.
-    usleep(100000);
-
-    mST->abandon();
-
-    pt->requestExitAndWait();
-    ASSERT_EQ(NO_INIT,
-            reinterpret_cast<ProducerThread*>(pt.get())->getDequeueError());
-}
-
-TEST_F(SurfaceTextureGLTest, InvalidWidthOrHeightFails) {
-    int texHeight = 16;
-    ANativeWindowBuffer* anb;
-
-    GLint maxTextureSize;
-    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
-
-    // make sure it works with small textures
-    mST->setDefaultBufferSize(16, texHeight);
-    EXPECT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-            &anb));
-    EXPECT_EQ(16, anb->width);
-    EXPECT_EQ(texHeight, anb->height);
-    EXPECT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), anb, -1));
-    EXPECT_EQ(NO_ERROR, mST->updateTexImage());
-
-    // make sure it works with GL_MAX_TEXTURE_SIZE
-    mST->setDefaultBufferSize(maxTextureSize, texHeight);
-    EXPECT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-            &anb));
-    EXPECT_EQ(maxTextureSize, anb->width);
-    EXPECT_EQ(texHeight, anb->height);
-    EXPECT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), anb, -1));
-    EXPECT_EQ(NO_ERROR, mST->updateTexImage());
-
-    // make sure it fails with GL_MAX_TEXTURE_SIZE+1
-    mST->setDefaultBufferSize(maxTextureSize+1, texHeight);
-    EXPECT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-            &anb));
-    EXPECT_EQ(maxTextureSize+1, anb->width);
-    EXPECT_EQ(texHeight, anb->height);
-    EXPECT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), anb, -1));
-    ASSERT_NE(NO_ERROR, mST->updateTexImage());
-}
-
-/*
- * This test fixture is for testing GL -> GL texture streaming.  It creates an
- * EGLSurface and an EGLContext for the image producer to use.
- */
-class SurfaceTextureGLToGLTest : public SurfaceTextureGLTest {
-protected:
-    SurfaceTextureGLToGLTest():
-            mProducerEglSurface(EGL_NO_SURFACE),
-            mProducerEglContext(EGL_NO_CONTEXT) {
-    }
-
-    virtual void SetUp() {
-        SurfaceTextureGLTest::SetUp();
-
-        mProducerEglSurface = eglCreateWindowSurface(mEglDisplay, mGlConfig,
-                mANW.get(), NULL);
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_SURFACE, mProducerEglSurface);
-
-        mProducerEglContext = eglCreateContext(mEglDisplay, mGlConfig,
-                EGL_NO_CONTEXT, getContextAttribs());
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_CONTEXT, mProducerEglContext);
-    }
-
-    virtual void TearDown() {
-        if (mProducerEglContext != EGL_NO_CONTEXT) {
-            eglDestroyContext(mEglDisplay, mProducerEglContext);
-        }
-        if (mProducerEglSurface != EGL_NO_SURFACE) {
-            eglDestroySurface(mEglDisplay, mProducerEglSurface);
-        }
-        SurfaceTextureGLTest::TearDown();
-    }
-
-    EGLSurface mProducerEglSurface;
-    EGLContext mProducerEglContext;
-};
-
-TEST_F(SurfaceTextureGLToGLTest, TransformHintGetsRespected) {
-    const uint32_t texWidth = 32;
-    const uint32_t texHeight = 64;
-
-    mST->setDefaultBufferSize(texWidth, texHeight);
-    mST->setTransformHint(NATIVE_WINDOW_TRANSFORM_ROT_90);
-
-    // This test requires 3 buffers to avoid deadlock because we're
-    // both producer and consumer, and only using one thread.
-    mST->setDefaultMaxBufferCount(3);
-
-    // Do the producer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // Start a buffer with our chosen size and transform hint moving
-    // through the system.
-    glClear(GL_COLOR_BUFFER_BIT);  // give the driver something to do
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-    mST->updateTexImage();  // consume it
-    // Swap again.
-    glClear(GL_COLOR_BUFFER_BIT);
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-    mST->updateTexImage();
-
-    // The current buffer should either show the effects of the transform
-    // hint (in the form of an inverse transform), or show that the
-    // transform hint has been ignored.
-    sp<GraphicBuffer> buf = mST->getCurrentBuffer();
-    if (mST->getCurrentTransform() == NATIVE_WINDOW_TRANSFORM_ROT_270) {
-        ASSERT_EQ(texWidth, buf->getHeight());
-        ASSERT_EQ(texHeight, buf->getWidth());
-    } else {
-        ASSERT_EQ(texWidth, buf->getWidth());
-        ASSERT_EQ(texHeight, buf->getHeight());
-    }
-
-    // Reset the transform hint and confirm that it takes.
-    mST->setTransformHint(0);
-    glClear(GL_COLOR_BUFFER_BIT);
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-    mST->updateTexImage();
-    glClear(GL_COLOR_BUFFER_BIT);
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-    mST->updateTexImage();
-
-    buf = mST->getCurrentBuffer();
-    ASSERT_EQ((uint32_t) 0, mST->getCurrentTransform());
-    ASSERT_EQ(texWidth, buf->getWidth());
-    ASSERT_EQ(texHeight, buf->getHeight());
-}
-
-TEST_F(SurfaceTextureGLToGLTest, TexturingFromGLFilledRGBABufferPow2) {
-    const int texWidth = 64;
-    const int texHeight = 64;
-
-    mST->setDefaultBufferSize(texWidth, texHeight);
-
-    // This test requires 3 buffers to complete run on a single thread.
-    mST->setDefaultMaxBufferCount(3);
-
-    // Do the producer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // This is needed to ensure we pick up a buffer of the correct size.
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    glClearColor(0.6, 0.6, 0.6, 0.6);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glEnable(GL_SCISSOR_TEST);
-    glScissor(4, 4, 4, 4);
-    glClearColor(1.0, 0.0, 0.0, 1.0);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glScissor(24, 48, 4, 4);
-    glClearColor(0.0, 1.0, 0.0, 1.0);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glScissor(37, 17, 4, 4);
-    glClearColor(0.0, 0.0, 1.0, 1.0);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    // Do the consumer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    glDisable(GL_SCISSOR_TEST);
-
-    // Skip the first frame, which was empty
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63, 63, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 0, 63, 153, 153, 153, 153));
-
-    EXPECT_TRUE(checkPixel( 4,  7, 255,   0,   0, 255));
-    EXPECT_TRUE(checkPixel(25, 51,   0, 255,   0, 255));
-    EXPECT_TRUE(checkPixel(40, 19,   0,   0, 255, 255));
-    EXPECT_TRUE(checkPixel(29, 51, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 5, 32, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(13,  8, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(46,  3, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(30, 33, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 6, 52, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(55, 33, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(16, 29, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 1, 30, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(41, 37, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(46, 29, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(15, 25, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 3, 52, 153, 153, 153, 153));
-}
-
-TEST_F(SurfaceTextureGLToGLTest, EglDestroySurfaceUnrefsBuffers) {
-    sp<GraphicBuffer> buffers[2];
-
-    // This test requires async mode to run on a single thread.
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    EXPECT_TRUE(eglSwapInterval(mEglDisplay, 0));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    for (int i = 0; i < 2; i++) {
-        // Produce a frame
-        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-                mProducerEglSurface, mProducerEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        glClear(GL_COLOR_BUFFER_BIT);
-        eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-        // Consume a frame
-        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-                mEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        mFW->waitForFrame();
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-        buffers[i] = mST->getCurrentBuffer();
-    }
-
-    // Destroy the GL texture object to release its ref on buffers[2].
-    GLuint texID = TEX_ID;
-    glDeleteTextures(1, &texID);
-
-    // Destroy the EGLSurface
-    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    mProducerEglSurface = EGL_NO_SURFACE;
-
-    // This test should have the only reference to buffer 0.
-    EXPECT_EQ(1, buffers[0]->getStrongCount());
-
-    // The GLConsumer should hold a single reference to buffer 1 in its
-    // mCurrentBuffer member.  All of the references in the slots should have
-    // been released.
-    EXPECT_EQ(2, buffers[1]->getStrongCount());
-}
-
-TEST_F(SurfaceTextureGLToGLTest, EglDestroySurfaceAfterAbandonUnrefsBuffers) {
-    sp<GraphicBuffer> buffers[3];
-
-    // This test requires async mode to run on a single thread.
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    EXPECT_TRUE(eglSwapInterval(mEglDisplay, 0));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    for (int i = 0; i < 3; i++) {
-        // Produce a frame
-        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-                mProducerEglSurface, mProducerEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        glClear(GL_COLOR_BUFFER_BIT);
-        EXPECT_TRUE(eglSwapBuffers(mEglDisplay, mProducerEglSurface));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-        // Consume a frame
-        EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-                mEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        mFW->waitForFrame();
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-        buffers[i] = mST->getCurrentBuffer();
-    }
-
-    // Abandon the GLConsumer, releasing the ref that the GLConsumer has
-    // on buffers[2].
-    mST->abandon();
-
-    // Destroy the GL texture object to release its ref on buffers[2].
-    GLuint texID = TEX_ID;
-    glDeleteTextures(1, &texID);
-
-    // Destroy the EGLSurface.
-    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    mProducerEglSurface = EGL_NO_SURFACE;
-
-    EXPECT_EQ(1, buffers[0]->getStrongCount());
-    EXPECT_EQ(1, buffers[1]->getStrongCount());
-
-    // Depending on how lazily the GL driver dequeues buffers, we may end up
-    // with either two or three total buffers.  If there are three, make sure
-    // the last one was properly down-ref'd.
-    if (buffers[2] != buffers[0]) {
-        EXPECT_EQ(1, buffers[2]->getStrongCount());
-    }
-}
-
-TEST_F(SurfaceTextureGLToGLTest, EglMakeCurrentBeforeConsumerDeathUnrefsBuffers) {
-    sp<GraphicBuffer> buffer;
-
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-
-    // Produce a frame
-    glClear(GL_COLOR_BUFFER_BIT);
-    EXPECT_TRUE(eglSwapBuffers(mEglDisplay, mProducerEglSurface));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // Destroy the EGLSurface.
-    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    mProducerEglSurface = EGL_NO_SURFACE;
-    mSTC.clear();
-    mANW.clear();
-    mTextureRenderer.clear();
-
-    // Consume a frame
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    buffer = mST->getCurrentBuffer();
-
-    // Destroy the GL texture object to release its ref
-    GLuint texID = TEX_ID;
-    glDeleteTextures(1, &texID);
-
-    // make un-current, all references to buffer should be gone
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE,
-            EGL_NO_SURFACE, EGL_NO_CONTEXT));
-
-    // Destroy consumer
-    mST.clear();
-
-    EXPECT_EQ(1, buffer->getStrongCount());
-}
-
-TEST_F(SurfaceTextureGLToGLTest, EglMakeCurrentAfterConsumerDeathUnrefsBuffers) {
-    sp<GraphicBuffer> buffer;
-
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-
-    // Produce a frame
-    glClear(GL_COLOR_BUFFER_BIT);
-    EXPECT_TRUE(eglSwapBuffers(mEglDisplay, mProducerEglSurface));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // Destroy the EGLSurface.
-    EXPECT_TRUE(eglDestroySurface(mEglDisplay, mProducerEglSurface));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    mProducerEglSurface = EGL_NO_SURFACE;
-    mSTC.clear();
-    mANW.clear();
-    mTextureRenderer.clear();
-
-    // Consume a frame
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    buffer = mST->getCurrentBuffer();
-
-    // Destroy the GL texture object to release its ref
-    GLuint texID = TEX_ID;
-    glDeleteTextures(1, &texID);
-
-    // Destroy consumer
-    mST.clear();
-
-    // make un-current, all references to buffer should be gone
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE,
-            EGL_NO_SURFACE, EGL_NO_CONTEXT));
-
-    EXPECT_EQ(1, buffer->getStrongCount());
-}
-
-TEST_F(SurfaceTextureGLToGLTest, TexturingFromUserSizedGLFilledBuffer) {
-    enum { texWidth = 64 };
-    enum { texHeight = 64 };
-
-    // This test requires 3 buffers to complete run on a single thread.
-    mST->setDefaultMaxBufferCount(3);
-
-    // Set the user buffer size.
-    native_window_set_buffers_user_dimensions(mANW.get(), texWidth, texHeight);
-
-    // Do the producer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // This is needed to ensure we pick up a buffer of the correct size.
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    glClearColor(0.6, 0.6, 0.6, 0.6);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glEnable(GL_SCISSOR_TEST);
-    glScissor(4, 4, 1, 1);
-    glClearColor(1.0, 0.0, 0.0, 1.0);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    // Do the consumer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    glDisable(GL_SCISSOR_TEST);
-
-    // Skip the first frame, which was empty
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63, 63, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 0, 63, 153, 153, 153, 153));
-
-    EXPECT_TRUE(checkPixel( 4,  4, 255,   0,   0, 255));
-    EXPECT_TRUE(checkPixel( 5,  5, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 3,  3, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(45, 52, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(12, 36, 153, 153, 153, 153));
-}
-
-TEST_F(SurfaceTextureGLToGLTest, TexturingFromPreRotatedUserSizedGLFilledBuffer) {
-    enum { texWidth = 64 };
-    enum { texHeight = 16 };
-
-    // This test requires 3 buffers to complete run on a single thread.
-    mST->setDefaultMaxBufferCount(3);
-
-    // Set the transform hint.
-    mST->setTransformHint(NATIVE_WINDOW_TRANSFORM_ROT_90);
-
-    // Set the user buffer size.
-    native_window_set_buffers_user_dimensions(mANW.get(), texWidth, texHeight);
-
-    // Do the producer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // This is needed to ensure we pick up a buffer of the correct size and the
-    // new rotation hint.
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    glClearColor(0.6, 0.6, 0.6, 0.6);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glEnable(GL_SCISSOR_TEST);
-    glScissor(24, 4, 1, 1);
-    glClearColor(1.0, 0.0, 0.0, 1.0);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    // Do the consumer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    glDisable(GL_SCISSOR_TEST);
-
-    // Skip the first frame, which was empty
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63, 15, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 0, 15, 153, 153, 153, 153));
-
-    EXPECT_TRUE(checkPixel(24,  4, 255,   0,   0, 255));
-    EXPECT_TRUE(checkPixel(25,  5, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(23,  3, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(45, 13, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(12,  8, 153, 153, 153, 153));
-}
-
-TEST_F(SurfaceTextureGLToGLTest, TexturingFromPreRotatedGLFilledBuffer) {
-    enum { texWidth = 64 };
-    enum { texHeight = 16 };
-
-    // This test requires 3 buffers to complete run on a single thread.
-    mST->setDefaultMaxBufferCount(3);
-
-    // Set the transform hint.
-    mST->setTransformHint(NATIVE_WINDOW_TRANSFORM_ROT_90);
-
-    // Set the default buffer size.
-    mST->setDefaultBufferSize(texWidth, texHeight);
-
-    // Do the producer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mProducerEglSurface,
-            mProducerEglSurface, mProducerEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // This is needed to ensure we pick up a buffer of the correct size and the
-    // new rotation hint.
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    glClearColor(0.6, 0.6, 0.6, 0.6);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glEnable(GL_SCISSOR_TEST);
-    glScissor(24, 4, 1, 1);
-    glClearColor(1.0, 0.0, 0.0, 1.0);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    eglSwapBuffers(mEglDisplay, mProducerEglSurface);
-
-    // Do the consumer side of things
-    EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    glDisable(GL_SCISSOR_TEST);
-
-    // Skip the first frame, which was empty
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    glViewport(0, 0, texWidth, texHeight);
-    drawTexture();
-
-    EXPECT_TRUE(checkPixel( 0,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63,  0, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(63, 15, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel( 0, 15, 153, 153, 153, 153));
-
-    EXPECT_TRUE(checkPixel(24,  4, 255,   0,   0, 255));
-    EXPECT_TRUE(checkPixel(25,  5, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(23,  3, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(45, 13, 153, 153, 153, 153));
-    EXPECT_TRUE(checkPixel(12,  8, 153, 153, 153, 153));
-}
-
-/*
- * This test fixture is for testing GL -> GL texture streaming from one thread
- * to another.  It contains functionality to create a producer thread that will
- * perform GL rendering to an ANativeWindow that feeds frames to a
- * GLConsumer.  Additionally it supports interlocking the producer and
- * consumer threads so that a specific sequence of calls can be
- * deterministically created by the test.
- *
- * The intended usage is as follows:
- *
- * TEST_F(...) {
- *     class PT : public ProducerThread {
- *         virtual void render() {
- *             ...
- *             swapBuffers();
- *         }
- *     };
- *
- *     runProducerThread(new PT());
- *
- *     // The order of these calls will vary from test to test and may include
- *     // multiple frames and additional operations (e.g. GL rendering from the
- *     // texture).
- *     fc->waitForFrame();
- *     mST->updateTexImage();
- *     fc->finishFrame();
- * }
- *
- */
-class SurfaceTextureGLThreadToGLTest : public SurfaceTextureGLToGLTest {
-protected:
-
-    // ProducerThread is an abstract base class to simplify the creation of
-    // OpenGL ES frame producer threads.
-    class ProducerThread : public Thread {
-    public:
-        virtual ~ProducerThread() {
-        }
-
-        void setEglObjects(EGLDisplay producerEglDisplay,
-                EGLSurface producerEglSurface,
-                EGLContext producerEglContext) {
-            mProducerEglDisplay = producerEglDisplay;
-            mProducerEglSurface = producerEglSurface;
-            mProducerEglContext = producerEglContext;
-        }
-
-        virtual bool threadLoop() {
-            eglMakeCurrent(mProducerEglDisplay, mProducerEglSurface,
-                    mProducerEglSurface, mProducerEglContext);
-            render();
-            eglMakeCurrent(mProducerEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
-                    EGL_NO_CONTEXT);
-            return false;
-        }
-
-    protected:
-        virtual void render() = 0;
-
-        void swapBuffers() {
-            eglSwapBuffers(mProducerEglDisplay, mProducerEglSurface);
-        }
-
-        EGLDisplay mProducerEglDisplay;
-        EGLSurface mProducerEglSurface;
-        EGLContext mProducerEglContext;
-    };
-
-    // FrameCondition is a utility class for interlocking between the producer
-    // and consumer threads.  The FrameCondition object should be created and
-    // destroyed in the consumer thread only.  The consumer thread should set
-    // the FrameCondition as the FrameAvailableListener of the GLConsumer,
-    // and should call both waitForFrame and finishFrame once for each expected
-    // frame.
-    //
-    // This interlocking relies on the fact that onFrameAvailable gets called
-    // synchronously from GLConsumer::queueBuffer.
-    class FrameCondition : public GLConsumer::FrameAvailableListener {
-    public:
-        FrameCondition():
-                mFrameAvailable(false),
-                mFrameFinished(false) {
-        }
-
-        // waitForFrame waits for the next frame to arrive.  This should be
-        // called from the consumer thread once for every frame expected by the
-        // test.
-        void waitForFrame() {
-            Mutex::Autolock lock(mMutex);
-            ALOGV("+waitForFrame");
-            while (!mFrameAvailable) {
-                mFrameAvailableCondition.wait(mMutex);
-            }
-            mFrameAvailable = false;
-            ALOGV("-waitForFrame");
-        }
-
-        // Allow the producer to return from its swapBuffers call and continue
-        // on to produce the next frame.  This should be called by the consumer
-        // thread once for every frame expected by the test.
-        void finishFrame() {
-            Mutex::Autolock lock(mMutex);
-            ALOGV("+finishFrame");
-            mFrameFinished = true;
-            mFrameFinishCondition.signal();
-            ALOGV("-finishFrame");
-        }
-
-        // This should be called by GLConsumer on the producer thread.
-        virtual void onFrameAvailable() {
-            Mutex::Autolock lock(mMutex);
-            ALOGV("+onFrameAvailable");
-            mFrameAvailable = true;
-            mFrameAvailableCondition.signal();
-            while (!mFrameFinished) {
-                mFrameFinishCondition.wait(mMutex);
-            }
-            mFrameFinished = false;
-            ALOGV("-onFrameAvailable");
-        }
-
-    protected:
-        bool mFrameAvailable;
-        bool mFrameFinished;
-
-        Mutex mMutex;
-        Condition mFrameAvailableCondition;
-        Condition mFrameFinishCondition;
-    };
-
-    virtual void SetUp() {
-        SurfaceTextureGLToGLTest::SetUp();
-        mFC = new FrameCondition();
-        mST->setFrameAvailableListener(mFC);
-    }
-
-    virtual void TearDown() {
-        if (mProducerThread != NULL) {
-            mProducerThread->requestExitAndWait();
-        }
-        mProducerThread.clear();
-        mFC.clear();
-        SurfaceTextureGLToGLTest::TearDown();
-    }
-
-    void runProducerThread(const sp<ProducerThread> producerThread) {
-        ASSERT_TRUE(mProducerThread == NULL);
-        mProducerThread = producerThread;
-        producerThread->setEglObjects(mEglDisplay, mProducerEglSurface,
-                mProducerEglContext);
-        producerThread->run();
-    }
-
-    sp<ProducerThread> mProducerThread;
-    sp<FrameCondition> mFC;
-};
-
-TEST_F(SurfaceTextureGLThreadToGLTest,
-        UpdateTexImageBeforeFrameFinishedCompletes) {
-    class PT : public ProducerThread {
-        virtual void render() {
-            glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
-            glClear(GL_COLOR_BUFFER_BIT);
-            swapBuffers();
-        }
-    };
-
-    runProducerThread(new PT());
-
-    mFC->waitForFrame();
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    mFC->finishFrame();
-
-    // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
-}
-
-TEST_F(SurfaceTextureGLThreadToGLTest,
-        UpdateTexImageAfterFrameFinishedCompletes) {
-    class PT : public ProducerThread {
-        virtual void render() {
-            glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
-            glClear(GL_COLOR_BUFFER_BIT);
-            swapBuffers();
-        }
-    };
-
-    runProducerThread(new PT());
-
-    mFC->waitForFrame();
-    mFC->finishFrame();
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
-}
-
-TEST_F(SurfaceTextureGLThreadToGLTest,
-        RepeatedUpdateTexImageBeforeFrameFinishedCompletes) {
-    enum { NUM_ITERATIONS = 1024 };
-
-    class PT : public ProducerThread {
-        virtual void render() {
-            for (int i = 0; i < NUM_ITERATIONS; i++) {
-                glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
-                glClear(GL_COLOR_BUFFER_BIT);
-                ALOGV("+swapBuffers");
-                swapBuffers();
-                ALOGV("-swapBuffers");
-            }
-        }
-    };
-
-    runProducerThread(new PT());
-
-    for (int i = 0; i < NUM_ITERATIONS; i++) {
-        mFC->waitForFrame();
-        ALOGV("+updateTexImage");
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-        ALOGV("-updateTexImage");
-        mFC->finishFrame();
-
-        // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
-    }
-}
-
-TEST_F(SurfaceTextureGLThreadToGLTest,
-        RepeatedUpdateTexImageAfterFrameFinishedCompletes) {
-    enum { NUM_ITERATIONS = 1024 };
-
-    class PT : public ProducerThread {
-        virtual void render() {
-            for (int i = 0; i < NUM_ITERATIONS; i++) {
-                glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
-                glClear(GL_COLOR_BUFFER_BIT);
-                ALOGV("+swapBuffers");
-                swapBuffers();
-                ALOGV("-swapBuffers");
-            }
-        }
-    };
-
-    runProducerThread(new PT());
-
-    for (int i = 0; i < NUM_ITERATIONS; i++) {
-        mFC->waitForFrame();
-        mFC->finishFrame();
-        ALOGV("+updateTexImage");
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-        ALOGV("-updateTexImage");
-
-        // TODO: Add frame verification once RGB TEX_EXTERNAL_OES is supported!
-    }
-}
-
-// XXX: This test is disabled because it is currently hanging on some devices.
-TEST_F(SurfaceTextureGLThreadToGLTest,
-        DISABLED_RepeatedSwapBuffersWhileDequeueStalledCompletes) {
-    enum { NUM_ITERATIONS = 64 };
-
-    class PT : public ProducerThread {
-        virtual void render() {
-            for (int i = 0; i < NUM_ITERATIONS; i++) {
-                glClearColor(0.0f, 1.0f, 0.0f, 1.0f);
-                glClear(GL_COLOR_BUFFER_BIT);
-                ALOGV("+swapBuffers");
-                swapBuffers();
-                ALOGV("-swapBuffers");
-            }
-        }
-    };
-
-    ASSERT_EQ(OK, mST->setDefaultMaxBufferCount(2));
-
-    runProducerThread(new PT());
-
-    // Allow three frames to be rendered and queued before starting the
-    // rendering in this thread.  For the latter two frames we don't call
-    // updateTexImage so the next dequeue from the producer thread will block
-    // waiting for a frame to become available.
-    mFC->waitForFrame();
-    mFC->finishFrame();
-
-    // We must call updateTexImage to consume the first frame so that the
-    // SurfaceTexture is able to reduce the buffer count to 2.  This is because
-    // the GL driver may dequeue a buffer when the EGLSurface is created, and
-    // that happens before we call setDefaultMaxBufferCount.  It's possible that the
-    // driver does not dequeue a buffer at EGLSurface creation time, so we
-    // cannot rely on this to cause the second dequeueBuffer call to block.
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    mFC->waitForFrame();
-    mFC->finishFrame();
-    mFC->waitForFrame();
-    mFC->finishFrame();
-
-    // Sleep for 100ms to allow the producer thread's dequeueBuffer call to
-    // block waiting for a buffer to become available.
-    usleep(100000);
-
-    // Render and present a number of images.  This thread should not be blocked
-    // by the fact that the producer thread is blocking in dequeue.
-    for (int i = 0; i < NUM_ITERATIONS; i++) {
-        glClear(GL_COLOR_BUFFER_BIT);
-        eglSwapBuffers(mEglDisplay, mEglSurface);
-    }
-
-    // Consume the two pending buffers to unblock the producer thread.
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    // Consume the remaining buffers from the producer thread.
-    for (int i = 0; i < NUM_ITERATIONS-3; i++) {
-        mFC->waitForFrame();
-        mFC->finishFrame();
-        ALOGV("+updateTexImage");
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-        ALOGV("-updateTexImage");
-    }
-}
-
-class SurfaceTextureFBOTest : public SurfaceTextureGLTest {
-protected:
-
-    virtual void SetUp() {
-        SurfaceTextureGLTest::SetUp();
-
-        glGenFramebuffers(1, &mFbo);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-
-        glGenTextures(1, &mFboTex);
-        glBindTexture(GL_TEXTURE_2D, mFboTex);
-        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, getSurfaceWidth(),
-                getSurfaceHeight(), 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-        glBindTexture(GL_TEXTURE_2D, 0);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-
-        glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
-        glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-                GL_TEXTURE_2D, mFboTex, 0);
-        glBindFramebuffer(GL_FRAMEBUFFER, 0);
-        ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    }
-
-    virtual void TearDown() {
-        SurfaceTextureGLTest::TearDown();
-
-        glDeleteTextures(1, &mFboTex);
-        glDeleteFramebuffers(1, &mFbo);
-    }
-
-    GLuint mFbo;
-    GLuint mFboTex;
-};
-
-// This test is intended to verify that proper synchronization is done when
-// rendering into an FBO.
-TEST_F(SurfaceTextureFBOTest, BlitFromCpuFilledBufferToFbo) {
-    const int texWidth = 64;
-    const int texHeight = 64;
-
-    ASSERT_EQ(NO_ERROR, native_window_set_buffers_geometry(mANW.get(),
-            texWidth, texHeight, HAL_PIXEL_FORMAT_RGBA_8888));
-    ASSERT_EQ(NO_ERROR, native_window_set_usage(mANW.get(),
-            GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN));
-
-    android_native_buffer_t* anb;
-    ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-            &anb));
-    ASSERT_TRUE(anb != NULL);
-
-    sp<GraphicBuffer> buf(new GraphicBuffer(anb, false));
-
-    // Fill the buffer with green
-    uint8_t* img = NULL;
-    buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
-    fillRGBA8BufferSolid(img, texWidth, texHeight, buf->getStride(), 0, 255,
-            0, 255);
-    buf->unlock();
-    ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(), buf->getNativeBuffer(),
-            -1));
-
-    ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-    glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
-    drawTexture();
-    glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
-    for (int i = 0; i < 4; i++) {
-        SCOPED_TRACE(String8::format("frame %d", i).string());
-
-        ASSERT_EQ(NO_ERROR, native_window_dequeue_buffer_and_wait(mANW.get(),
-                &anb));
-        ASSERT_TRUE(anb != NULL);
-
-        buf = new GraphicBuffer(anb, false);
-
-        // Fill the buffer with red
-        ASSERT_EQ(NO_ERROR, buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN,
-                (void**)(&img)));
-        fillRGBA8BufferSolid(img, texWidth, texHeight, buf->getStride(), 255, 0,
-                0, 255);
-        ASSERT_EQ(NO_ERROR, buf->unlock());
-        ASSERT_EQ(NO_ERROR, mANW->queueBuffer(mANW.get(),
-                buf->getNativeBuffer(), -1));
-
-        ASSERT_EQ(NO_ERROR, mST->updateTexImage());
-
-        drawTexture();
-
-        EXPECT_TRUE(checkPixel( 24, 39, 255, 0, 0, 255));
-    }
-
-    glBindFramebuffer(GL_FRAMEBUFFER, mFbo);
-
-    EXPECT_TRUE(checkPixel( 24, 39, 0, 255, 0, 255));
-}
-
-class SurfaceTextureMultiContextGLTest : public SurfaceTextureGLTest {
-protected:
-    enum { SECOND_TEX_ID = 123 };
-    enum { THIRD_TEX_ID = 456 };
-
-    SurfaceTextureMultiContextGLTest():
-            mSecondEglContext(EGL_NO_CONTEXT) {
-    }
-
-    virtual void SetUp() {
-        SurfaceTextureGLTest::SetUp();
-
-        // Set up the secondary context and texture renderer.
-        mSecondEglContext = eglCreateContext(mEglDisplay, mGlConfig,
-                EGL_NO_CONTEXT, getContextAttribs());
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_CONTEXT, mSecondEglContext);
-
-        ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-                mSecondEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        mSecondTextureRenderer = new TextureRenderer(SECOND_TEX_ID, mST);
-        ASSERT_NO_FATAL_FAILURE(mSecondTextureRenderer->SetUp());
-
-        // Set up the tertiary context and texture renderer.
-        mThirdEglContext = eglCreateContext(mEglDisplay, mGlConfig,
-                EGL_NO_CONTEXT, getContextAttribs());
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        ASSERT_NE(EGL_NO_CONTEXT, mThirdEglContext);
-
-        ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-                mThirdEglContext));
-        ASSERT_EQ(EGL_SUCCESS, eglGetError());
-        mThirdTextureRenderer = new TextureRenderer(THIRD_TEX_ID, mST);
-        ASSERT_NO_FATAL_FAILURE(mThirdTextureRenderer->SetUp());
-
-        // Switch back to the primary context to start the tests.
-        ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-                mEglContext));
-    }
-
-    virtual void TearDown() {
-        if (mThirdEglContext != EGL_NO_CONTEXT) {
-            eglDestroyContext(mEglDisplay, mThirdEglContext);
-        }
-        if (mSecondEglContext != EGL_NO_CONTEXT) {
-            eglDestroyContext(mEglDisplay, mSecondEglContext);
-        }
-        SurfaceTextureGLTest::TearDown();
-    }
-
-    EGLContext mSecondEglContext;
-    sp<TextureRenderer> mSecondTextureRenderer;
-
-    EGLContext mThirdEglContext;
-    sp<TextureRenderer> mThirdTextureRenderer;
-};
-
-TEST_F(SurfaceTextureMultiContextGLTest, UpdateFromMultipleContextsFails) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Attempt to latch the texture on the secondary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-    ASSERT_EQ(INVALID_OPERATION, mST->updateTexImage());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextSucceeds) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Check that the GL texture was deleted.
-    EXPECT_EQ(GL_FALSE, glIsTexture(TEX_ID));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest,
-        DetachFromContextSucceedsAfterProducerDisconnect) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Check that the GL texture was deleted.
-    EXPECT_EQ(GL_FALSE, glIsTexture(TEX_ID));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWhenAbandoned) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Attempt to detach from the primary context.
-    mST->abandon();
-    ASSERT_EQ(NO_INIT, mST->detachFromContext());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWhenDetached) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attempt to detach from the primary context again.
-    ASSERT_EQ(INVALID_OPERATION, mST->detachFromContext());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWithNoDisplay) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Make there be no current display.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
-            EGL_NO_CONTEXT));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // Attempt to detach from the primary context.
-    ASSERT_EQ(INVALID_OPERATION, mST->detachFromContext());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, DetachFromContextFailsWithNoContext) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Make current context be incorrect.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // Attempt to detach from the primary context.
-    ASSERT_EQ(INVALID_OPERATION, mST->detachFromContext());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, UpdateTexImageFailsWhenDetached) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attempt to latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(INVALID_OPERATION, mST->updateTexImage());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextSucceeds) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the secondary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
-
-    // Verify that the texture object was created and bound.
-    GLint texBinding = -1;
-    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
-    EXPECT_EQ(SECOND_TEX_ID, texBinding);
-
-    // Try to use the texture from the secondary context.
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-    glViewport(0, 0, 1, 1);
-    mSecondTextureRenderer->drawTexture();
-    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest,
-        AttachToContextSucceedsAfterProducerDisconnect) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the secondary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
-
-    // Verify that the texture object was created and bound.
-    GLint texBinding = -1;
-    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
-    EXPECT_EQ(SECOND_TEX_ID, texBinding);
-
-    // Try to use the texture from the secondary context.
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-    glViewport(0, 0, 1, 1);
-    mSecondTextureRenderer->drawTexture();
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest,
-        AttachToContextSucceedsBeforeUpdateTexImage) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Detach from the primary context.
-    native_window_api_disconnect(mANW.get(), NATIVE_WINDOW_API_CPU);
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the secondary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
-
-    // Verify that the texture object was created and bound.
-    GLint texBinding = -1;
-    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
-    EXPECT_EQ(SECOND_TEX_ID, texBinding);
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Try to use the texture from the secondary context.
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-    glViewport(0, 0, 1, 1);
-    mSecondTextureRenderer->drawTexture();
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextFailsWhenAbandoned) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attempt to attach to the secondary context.
-    mST->abandon();
-
-    // Attempt to attach to the primary context.
-    ASSERT_EQ(NO_INIT, mST->attachToContext(SECOND_TEX_ID));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextFailsWhenAttached) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Attempt to attach to the primary context.
-    ASSERT_EQ(INVALID_OPERATION, mST->attachToContext(SECOND_TEX_ID));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest,
-        AttachToContextFailsWhenAttachedBeforeUpdateTexImage) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Attempt to attach to the primary context.
-    ASSERT_EQ(INVALID_OPERATION, mST->attachToContext(SECOND_TEX_ID));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextFailsWithNoDisplay) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Make there be no current display.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE,
-            EGL_NO_CONTEXT));
-    ASSERT_EQ(EGL_SUCCESS, eglGetError());
-
-    // Attempt to attach with no context current.
-    ASSERT_EQ(INVALID_OPERATION, mST->attachToContext(SECOND_TEX_ID));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest, AttachToContextSucceedsTwice) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Latch the texture contents on the primary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the secondary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
-
-    // Detach from the secondary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the tertiary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mThirdEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(THIRD_TEX_ID));
-
-    // Verify that the texture object was created and bound.
-    GLint texBinding = -1;
-    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
-    EXPECT_EQ(THIRD_TEX_ID, texBinding);
-
-    // Try to use the texture from the tertiary context.
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-    glViewport(0, 0, 1, 1);
-    mThirdTextureRenderer->drawTexture();
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest,
-        AttachToContextSucceedsTwiceBeforeUpdateTexImage) {
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Detach from the primary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the secondary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
-
-    // Detach from the secondary context.
-    ASSERT_EQ(OK, mST->detachFromContext());
-
-    // Attach to the tertiary context.
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mThirdEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(THIRD_TEX_ID));
-
-    // Verify that the texture object was created and bound.
-    GLint texBinding = -1;
-    glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &texBinding);
-    EXPECT_EQ(THIRD_TEX_ID, texBinding);
-
-    // Latch the texture contents on the tertiary context.
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // Try to use the texture from the tertiary context.
-    glClearColor(0.2, 0.2, 0.2, 0.2);
-    glClear(GL_COLOR_BUFFER_BIT);
-    glViewport(0, 0, 1, 1);
-    mThirdTextureRenderer->drawTexture();
-    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
-    ASSERT_TRUE(checkPixel( 0,  0,  35,  35,  35,  35));
-}
-
-TEST_F(SurfaceTextureMultiContextGLTest,
-        UpdateTexImageSucceedsForBufferConsumedBeforeDetach) {
-    ASSERT_EQ(NO_ERROR, mST->setDefaultMaxBufferCount(2));
-
-    // produce two frames and consume them both on the primary context
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-
-    // produce one more frame
-    ASSERT_NO_FATAL_FAILURE(produceOneRGBA8Frame(mANW));
-
-    // Detach from the primary context and attach to the secondary context
-    ASSERT_EQ(OK, mST->detachFromContext());
-    ASSERT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
-            mSecondEglContext));
-    ASSERT_EQ(OK, mST->attachToContext(SECOND_TEX_ID));
-
-    // Consume final frame on secondary context
-    mFW->waitForFrame();
-    ASSERT_EQ(OK, mST->updateTexImage());
-}
-
-} // namespace android
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index e0272ba..5e6aeef 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -21,6 +21,7 @@
 #include <gui/Surface.h>
 #include <gui/SurfaceComposerClient.h>
 #include <gui/BufferItemConsumer.h>
+#include <ui/Rect.h>
 #include <utils/String8.h>
 
 #include <private/gui/ComposerService.h>
@@ -88,12 +89,14 @@
     sp<ANativeWindow> anw(mSurface);
 
     // Verify the screenshot works with no protected buffers.
-    sp<BufferQueue> bq = new BufferQueue();
-    sp<CpuConsumer> consumer = new CpuConsumer(bq, 1);
+    sp<IGraphicBufferProducer> producer;
+    sp<IGraphicBufferConsumer> consumer;
+    BufferQueue::createBufferQueue(&producer, &consumer);
+    sp<CpuConsumer> cpuConsumer = new CpuConsumer(consumer, 1);
     sp<ISurfaceComposer> sf(ComposerService::getComposerService());
     sp<IBinder> display(sf->getBuiltInDisplay(ISurfaceComposer::eDisplayIdMain));
-    ASSERT_EQ(NO_ERROR, sf->captureScreen(display, bq,
-            64, 64, 0, 0x7fffffff));
+    ASSERT_EQ(NO_ERROR, sf->captureScreen(display, producer, Rect(),
+            64, 64, 0, 0x7fffffff, false));
 
     // Set the PROTECTED usage bit and verify that the screenshot fails.  Note
     // that we need to dequeue a buffer in order for it to actually get
@@ -121,8 +124,8 @@
                 &buf));
         ASSERT_EQ(NO_ERROR, anw->queueBuffer(anw.get(), buf, -1));
     }
-    ASSERT_EQ(NO_ERROR, sf->captureScreen(display, bq,
-            64, 64, 0, 0x7fffffff));
+    ASSERT_EQ(NO_ERROR, sf->captureScreen(display, producer, Rect(),
+            64, 64, 0, 0x7fffffff, false));
 }
 
 TEST_F(SurfaceTest, ConcreteTypeIsSurface) {
@@ -136,10 +139,12 @@
 TEST_F(SurfaceTest, QueryConsumerUsage) {
     const int TEST_USAGE_FLAGS =
             GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_HW_RENDER;
-    sp<BufferQueue> bq = new BufferQueue();
-    sp<BufferItemConsumer> c = new BufferItemConsumer(bq,
+    sp<IGraphicBufferProducer> producer;
+    sp<IGraphicBufferConsumer> consumer;
+    BufferQueue::createBufferQueue(&producer, &consumer);
+    sp<BufferItemConsumer> c = new BufferItemConsumer(consumer,
             TEST_USAGE_FLAGS);
-    sp<Surface> s = new Surface(bq);
+    sp<Surface> s = new Surface(producer);
 
     sp<ANativeWindow> anw(s);
 
diff --git a/libs/gui/tests/TextureRenderer.cpp b/libs/gui/tests/TextureRenderer.cpp
new file mode 100644
index 0000000..90951b3
--- /dev/null
+++ b/libs/gui/tests/TextureRenderer.cpp
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "TextureRenderer.h"
+
+#include "GLTest.h"
+
+#include <gui/GLConsumer.h>
+
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+
+#include <gtest/gtest.h>
+
+namespace android {
+
+TextureRenderer::TextureRenderer(GLuint texName,
+        const sp<GLConsumer>& st) : mTexName(texName), mST(st) {
+}
+
+void TextureRenderer::SetUp() {
+    const char vsrc[] =
+        "attribute vec4 vPosition;\n"
+        "varying vec2 texCoords;\n"
+        "uniform mat4 texMatrix;\n"
+        "void main() {\n"
+        "  vec2 vTexCoords = 0.5 * (vPosition.xy + vec2(1.0, 1.0));\n"
+        "  texCoords = (texMatrix * vec4(vTexCoords, 0.0, 1.0)).xy;\n"
+        "  gl_Position = vPosition;\n"
+        "}\n";
+
+    const char fsrc[] =
+        "#extension GL_OES_EGL_image_external : require\n"
+        "precision mediump float;\n"
+        "uniform samplerExternalOES texSampler;\n"
+        "varying vec2 texCoords;\n"
+        "void main() {\n"
+        "  gl_FragColor = texture2D(texSampler, texCoords);\n"
+        "}\n";
+
+    {
+        SCOPED_TRACE("creating shader program");
+        ASSERT_NO_FATAL_FAILURE(GLTest::createProgram(vsrc, fsrc, &mPgm));
+    }
+
+    mPositionHandle = glGetAttribLocation(mPgm, "vPosition");
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_NE(-1, mPositionHandle);
+    mTexSamplerHandle = glGetUniformLocation(mPgm, "texSampler");
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_NE(-1, mTexSamplerHandle);
+    mTexMatrixHandle = glGetUniformLocation(mPgm, "texMatrix");
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    ASSERT_NE(-1, mTexMatrixHandle);
+}
+
+// drawTexture draws the GLConsumer over the entire GL viewport.
+void TextureRenderer::drawTexture() {
+    static const GLfloat triangleVertices[] = {
+        -1.0f, 1.0f,
+        -1.0f, -1.0f,
+        1.0f, -1.0f,
+        1.0f, 1.0f,
+    };
+
+    glVertexAttribPointer(mPositionHandle, 2, GL_FLOAT, GL_FALSE, 0,
+            triangleVertices);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    glEnableVertexAttribArray(mPositionHandle);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+
+    glUseProgram(mPgm);
+    glUniform1i(mTexSamplerHandle, 0);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    glBindTexture(GL_TEXTURE_EXTERNAL_OES, mTexName);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+
+    // XXX: These calls are not needed for GL_TEXTURE_EXTERNAL_OES as
+    // they're setting the defautls for that target, but when hacking
+    // things to use GL_TEXTURE_2D they are needed to achieve the same
+    // behavior.
+    glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER,
+            GL_LINEAR);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER,
+            GL_LINEAR);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S,
+            GL_CLAMP_TO_EDGE);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+    glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T,
+            GL_CLAMP_TO_EDGE);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+
+    GLfloat texMatrix[16];
+    mST->getTransformMatrix(texMatrix);
+    glUniformMatrix4fv(mTexMatrixHandle, 1, GL_FALSE, texMatrix);
+
+    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+    ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
+}
+
+} // namespace android
diff --git a/libs/gui/tests/TextureRenderer.h b/libs/gui/tests/TextureRenderer.h
new file mode 100644
index 0000000..37b2b47
--- /dev/null
+++ b/libs/gui/tests/TextureRenderer.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_TEXTURE_RENDERER_H
+#define ANDROID_TEXTURE_RENDERER_H
+
+#include <GLES/gl.h>
+
+#include <utils/RefBase.h>
+
+namespace android {
+
+class GLConsumer;
+
+class TextureRenderer : public RefBase {
+public:
+    TextureRenderer(GLuint texName, const sp<GLConsumer>& st);
+
+    void SetUp();
+    void drawTexture();
+
+private:
+    GLuint mTexName;
+    sp<GLConsumer> mST;
+    GLuint mPgm;
+    GLint mPositionHandle;
+    GLint mTexSamplerHandle;
+    GLint mTexMatrixHandle;
+};
+
+} // namespace android
+
+#endif
diff --git a/libs/input/Android.mk b/libs/input/Android.mk
index f1921a4..944ac7f 100644
--- a/libs/input/Android.mk
+++ b/libs/input/Android.mk
@@ -27,6 +27,7 @@
 
 deviceSources := \
     $(commonSources) \
+    IInputFlinger.cpp \
     InputTransport.cpp \
     VelocityControl.cpp \
     VelocityTracker.cpp
diff --git a/libs/input/IInputFlinger.cpp b/libs/input/IInputFlinger.cpp
new file mode 100644
index 0000000..e009731
--- /dev/null
+++ b/libs/input/IInputFlinger.cpp
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <binder/Parcel.h>
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+
+#include <input/IInputFlinger.h>
+
+
+namespace android {
+
+class BpInputFlinger : public BpInterface<IInputFlinger> {
+public:
+    BpInputFlinger(const sp<IBinder>& impl) :
+            BpInterface<IInputFlinger>(impl) { }
+
+    virtual status_t doSomething() {
+        Parcel data, reply;
+        data.writeInterfaceToken(IInputFlinger::getInterfaceDescriptor());
+        remote()->transact(BnInputFlinger::DO_SOMETHING_TRANSACTION, data, &reply);
+        return reply.readInt32();
+    }
+};
+
+IMPLEMENT_META_INTERFACE(InputFlinger, "android.input.IInputFlinger");
+
+
+status_t BnInputFlinger::onTransact(
+        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
+    switch(code) {
+    case DO_SOMETHING_TRANSACTION: {
+        CHECK_INTERFACE(IInputFlinger, data, reply);
+        reply->writeInt32(0);
+        break;
+    }
+    default:
+        return BBinder::onTransact(code, data, reply, flags);
+    }
+    return NO_ERROR;
+}
+
+};
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index d9f22e9..3a7afe9 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -21,6 +21,7 @@
 #include <limits.h>
 
 #include <input/Input.h>
+#include <input/InputEventLabels.h>
 
 #ifdef HAVE_ANDROID_OS
 #include <binder/Parcel.h>
@@ -42,82 +43,12 @@
 
 // --- KeyEvent ---
 
-bool KeyEvent::hasDefaultAction(int32_t keyCode) {
-    switch (keyCode) {
-        case AKEYCODE_HOME:
-        case AKEYCODE_BACK:
-        case AKEYCODE_CALL:
-        case AKEYCODE_ENDCALL:
-        case AKEYCODE_VOLUME_UP:
-        case AKEYCODE_VOLUME_DOWN:
-        case AKEYCODE_VOLUME_MUTE:
-        case AKEYCODE_POWER:
-        case AKEYCODE_CAMERA:
-        case AKEYCODE_HEADSETHOOK:
-        case AKEYCODE_MENU:
-        case AKEYCODE_NOTIFICATION:
-        case AKEYCODE_FOCUS:
-        case AKEYCODE_SEARCH:
-        case AKEYCODE_MEDIA_PLAY:
-        case AKEYCODE_MEDIA_PAUSE:
-        case AKEYCODE_MEDIA_PLAY_PAUSE:
-        case AKEYCODE_MEDIA_STOP:
-        case AKEYCODE_MEDIA_NEXT:
-        case AKEYCODE_MEDIA_PREVIOUS:
-        case AKEYCODE_MEDIA_REWIND:
-        case AKEYCODE_MEDIA_RECORD:
-        case AKEYCODE_MEDIA_FAST_FORWARD:
-        case AKEYCODE_MUTE:
-        case AKEYCODE_BRIGHTNESS_DOWN:
-        case AKEYCODE_BRIGHTNESS_UP:
-        case AKEYCODE_MEDIA_AUDIO_TRACK:
-            return true;
-    }
-    
-    return false;
+const char* KeyEvent::getLabel(int32_t keyCode) {
+    return getLabelByKeyCode(keyCode);
 }
 
-bool KeyEvent::hasDefaultAction() const {
-    return hasDefaultAction(getKeyCode());
-}
-
-bool KeyEvent::isSystemKey(int32_t keyCode) {
-    switch (keyCode) {
-        case AKEYCODE_MENU:
-        case AKEYCODE_SOFT_RIGHT:
-        case AKEYCODE_HOME:
-        case AKEYCODE_BACK:
-        case AKEYCODE_CALL:
-        case AKEYCODE_ENDCALL:
-        case AKEYCODE_VOLUME_UP:
-        case AKEYCODE_VOLUME_DOWN:
-        case AKEYCODE_VOLUME_MUTE:
-        case AKEYCODE_MUTE:
-        case AKEYCODE_POWER:
-        case AKEYCODE_HEADSETHOOK:
-        case AKEYCODE_MEDIA_PLAY:
-        case AKEYCODE_MEDIA_PAUSE:
-        case AKEYCODE_MEDIA_PLAY_PAUSE:
-        case AKEYCODE_MEDIA_STOP:
-        case AKEYCODE_MEDIA_NEXT:
-        case AKEYCODE_MEDIA_PREVIOUS:
-        case AKEYCODE_MEDIA_REWIND:
-        case AKEYCODE_MEDIA_RECORD:
-        case AKEYCODE_MEDIA_FAST_FORWARD:
-        case AKEYCODE_CAMERA:
-        case AKEYCODE_FOCUS:
-        case AKEYCODE_SEARCH:
-        case AKEYCODE_BRIGHTNESS_DOWN:
-        case AKEYCODE_BRIGHTNESS_UP:
-        case AKEYCODE_MEDIA_AUDIO_TRACK:
-            return true;
-    }
-    
-    return false;
-}
-
-bool KeyEvent::isSystemKey() const {
-    return isSystemKey(getKeyCode());
+int32_t KeyEvent::getKeyCodeFromLabel(const char* label) {
+    return getKeyCodeByLabel(label);
 }
 
 void KeyEvent::initialize(
@@ -591,6 +522,14 @@
     return false;
 }
 
+const char* MotionEvent::getLabel(int32_t axis) {
+    return getAxisLabel(axis);
+}
+
+int32_t MotionEvent::getAxisFromLabel(const char* label) {
+    return getAxisByLabel(label);
+}
+
 
 // --- PooledInputEventFactory ---
 
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp
index 2d0fb8c..090ee53 100644
--- a/libs/input/InputTransport.cpp
+++ b/libs/input/InputTransport.cpp
@@ -22,6 +22,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include <math.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -300,7 +301,7 @@
             "action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, "
             "xOffset=%f, yOffset=%f, "
             "xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, "
-            "pointerCount=%d",
+            "pointerCount=%" PRIu32,
             mChannel->getName().string(), seq,
             deviceId, source, action, flags, edgeFlags, metaState, buttonState,
             xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount);
@@ -312,7 +313,7 @@
     }
 
     if (pointerCount > MAX_POINTERS || pointerCount < 1) {
-        ALOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
+        ALOGE("channel '%s' publisher ~ Invalid number of pointers provided: %" PRIu32 ".",
                 mChannel->getName().string(), pointerCount);
         return BAD_VALUE;
     }
diff --git a/libs/input/KeyCharacterMap.cpp b/libs/input/KeyCharacterMap.cpp
index 15a8774..b03e01e 100644
--- a/libs/input/KeyCharacterMap.cpp
+++ b/libs/input/KeyCharacterMap.cpp
@@ -24,6 +24,7 @@
 #endif
 
 #include <android/keycodes.h>
+#include <input/InputEventLabels.h>
 #include <input/Keyboard.h>
 #include <input/KeyCharacterMap.h>
 
diff --git a/libs/input/KeyLayoutMap.cpp b/libs/input/KeyLayoutMap.cpp
index 0800a31..2b2f13e 100644
--- a/libs/input/KeyLayoutMap.cpp
+++ b/libs/input/KeyLayoutMap.cpp
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 
 #include <android/keycodes.h>
+#include <input/InputEventLabels.h>
 #include <input/Keyboard.h>
 #include <input/KeyLayoutMap.h>
 #include <utils/Log.h>
diff --git a/libs/input/Keyboard.cpp b/libs/input/Keyboard.cpp
index 7d4ac92..f4d9507 100644
--- a/libs/input/Keyboard.cpp
+++ b/libs/input/Keyboard.cpp
@@ -21,7 +21,7 @@
 #include <limits.h>
 
 #include <input/Keyboard.h>
-#include <input/KeycodeLabels.h>
+#include <input/InputEventLabels.h>
 #include <input/KeyLayoutMap.h>
 #include <input/KeyCharacterMap.h>
 #include <input/InputDevice.h>
@@ -167,46 +167,6 @@
     return strstr(deviceIdentifier.name.string(), "-keypad");
 }
 
-static int lookupValueByLabel(const char* literal, const KeycodeLabel *list) {
-    while (list->literal) {
-        if (strcmp(literal, list->literal) == 0) {
-            return list->value;
-        }
-        list++;
-    }
-    return list->value;
-}
-
-static const char* lookupLabelByValue(int value, const KeycodeLabel *list) {
-    while (list->literal) {
-        if (list->value == value) {
-            return list->literal;
-        }
-        list++;
-    }
-    return NULL;
-}
-
-int32_t getKeyCodeByLabel(const char* label) {
-    return int32_t(lookupValueByLabel(label, KEYCODES));
-}
-
-uint32_t getKeyFlagByLabel(const char* label) {
-    return uint32_t(lookupValueByLabel(label, FLAGS));
-}
-
-int32_t getAxisByLabel(const char* label) {
-    return int32_t(lookupValueByLabel(label, AXES));
-}
-
-const char* getAxisLabel(int32_t axisId) {
-    return lookupLabelByValue(axisId, AXES);
-}
-
-int32_t getLedByLabel(const char* label) {
-    return int32_t(lookupValueByLabel(label, LEDS));
-}
-
 static int32_t setEphemeralMetaState(int32_t mask, bool down, int32_t oldMetaState) {
     int32_t newMetaState;
     if (down) {
diff --git a/libs/input/tests/InputEvent_test.cpp b/libs/input/tests/InputEvent_test.cpp
index 78ea98e..9105ae5 100644
--- a/libs/input/tests/InputEvent_test.cpp
+++ b/libs/input/tests/InputEvent_test.cpp
@@ -53,8 +53,8 @@
 
     // Set first axis.
     ASSERT_EQ(OK, coords.setAxisValue(1, 5));
-    ASSERT_EQ(0x00000002ULL, coords.bits);
     ASSERT_EQ(5, coords.values[0]);
+    ASSERT_EQ(0x4000000000000000ULL, coords.bits);
 
     ASSERT_EQ(0, coords.getAxisValue(0))
             << "getAxisValue should return zero because axis is not present";
@@ -63,7 +63,7 @@
 
     // Set an axis with a higher id than all others.  (appending value at the end)
     ASSERT_EQ(OK, coords.setAxisValue(3, 2));
-    ASSERT_EQ(0x0000000aULL, coords.bits);
+    ASSERT_EQ(0x5000000000000000ULL, coords.bits);
     ASSERT_EQ(5, coords.values[0]);
     ASSERT_EQ(2, coords.values[1]);
 
@@ -78,7 +78,7 @@
 
     // Set an axis with an id lower than all others.  (prepending value at beginning)
     ASSERT_EQ(OK, coords.setAxisValue(0, 4));
-    ASSERT_EQ(0x0000000bULL, coords.bits);
+    ASSERT_EQ(0xd000000000000000ULL, coords.bits);
     ASSERT_EQ(4, coords.values[0]);
     ASSERT_EQ(5, coords.values[1]);
     ASSERT_EQ(2, coords.values[2]);
@@ -94,7 +94,7 @@
 
     // Set an axis with an id between the others.  (inserting value in the middle)
     ASSERT_EQ(OK, coords.setAxisValue(2, 1));
-    ASSERT_EQ(0x0000000fULL, coords.bits);
+    ASSERT_EQ(0xf000000000000000ULL, coords.bits);
     ASSERT_EQ(4, coords.values[0]);
     ASSERT_EQ(5, coords.values[1]);
     ASSERT_EQ(1, coords.values[2]);
@@ -111,7 +111,7 @@
 
     // Set an existing axis value in place.
     ASSERT_EQ(OK, coords.setAxisValue(1, 6));
-    ASSERT_EQ(0x0000000fULL, coords.bits);
+    ASSERT_EQ(0xf000000000000000ULL, coords.bits);
     ASSERT_EQ(4, coords.values[0]);
     ASSERT_EQ(6, coords.values[1]);
     ASSERT_EQ(1, coords.values[2]);
diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk
index 008446b..eec97be 100644
--- a/libs/ui/Android.mk
+++ b/libs/ui/Android.mk
@@ -18,6 +18,7 @@
 LOCAL_SRC_FILES:= \
 	Fence.cpp \
 	FramebufferNativeWindow.cpp \
+	FrameStats.cpp \
 	GraphicBuffer.cpp \
 	GraphicBufferAllocator.cpp \
 	GraphicBufferMapper.cpp \
diff --git a/libs/ui/FrameStats.cpp b/libs/ui/FrameStats.cpp
new file mode 100644
index 0000000..acbe27e
--- /dev/null
+++ b/libs/ui/FrameStats.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ui/FrameStats.h>
+
+namespace android {
+
+bool FrameStats::isFixedSize() const {
+    return false;
+}
+
+size_t FrameStats::getFlattenedSize() const {
+    const size_t timestampSize = sizeof(nsecs_t);
+
+    size_t size = timestampSize;
+    size += 3 * desiredPresentTimesNano.size() * timestampSize;
+
+    return size;
+}
+
+status_t FrameStats::flatten(void* buffer, size_t size) const {
+    if (size < getFlattenedSize()) {
+        return NO_MEMORY;
+    }
+
+    nsecs_t* timestamps = reinterpret_cast<nsecs_t*>(buffer);
+    const size_t timestampSize = sizeof(nsecs_t);
+    size_t frameCount = desiredPresentTimesNano.size();
+
+    memcpy(timestamps, &refreshPeriodNano, timestampSize);
+    timestamps += 1;
+
+    memcpy(timestamps, desiredPresentTimesNano.array(), frameCount * timestampSize);
+    timestamps += frameCount;
+
+    memcpy(timestamps, actualPresentTimesNano.array(), frameCount * timestampSize);
+    timestamps += frameCount;
+
+    memcpy(timestamps, frameReadyTimesNano.array(), frameCount * timestampSize);
+
+    return NO_ERROR;
+}
+
+status_t FrameStats::unflatten(void const* buffer, size_t size) {
+    const size_t timestampSize = sizeof(nsecs_t);
+
+    if (size < timestampSize) {
+        return NO_MEMORY;
+    }
+
+    nsecs_t const* timestamps = reinterpret_cast<nsecs_t const*>(buffer);
+    size_t frameCount = (size - timestampSize) / (3 * timestampSize);
+
+    memcpy(&refreshPeriodNano, timestamps, timestampSize);
+    timestamps += 1;
+
+    desiredPresentTimesNano.resize(frameCount);
+    memcpy(desiredPresentTimesNano.editArray(), timestamps, frameCount * timestampSize);
+    timestamps += frameCount;
+
+    actualPresentTimesNano.resize(frameCount);
+    memcpy(actualPresentTimesNano.editArray(), timestamps, frameCount * timestampSize);
+    timestamps += frameCount;
+
+    frameReadyTimesNano.resize(frameCount);
+    memcpy(frameReadyTimesNano.editArray(), timestamps, frameCount * timestampSize);
+
+    return NO_ERROR;
+}
+
+} // namespace android
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 708888e..e21dc53 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -34,9 +34,17 @@
 // Buffer and implementation of ANativeWindowBuffer
 // ===========================================================================
 
+static uint64_t getUniqueId() {
+    static volatile int32_t nextId = 0;
+    uint64_t id = static_cast<uint64_t>(getpid()) << 32;
+    id |= static_cast<uint32_t>(android_atomic_inc(&nextId));
+    return id;
+}
+
 GraphicBuffer::GraphicBuffer()
     : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR) {
+      mInitCheck(NO_ERROR), mId(getUniqueId())
+{
     width  = 
     height = 
     stride = 
@@ -48,7 +56,7 @@
 GraphicBuffer::GraphicBuffer(uint32_t w, uint32_t h, 
         PixelFormat reqFormat, uint32_t reqUsage)
     : BASE(), mOwner(ownData), mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR)
+      mInitCheck(NO_ERROR), mId(getUniqueId())
 {
     width  = 
     height = 
@@ -64,7 +72,7 @@
         uint32_t inStride, native_handle_t* inHandle, bool keepOwnership)
     : BASE(), mOwner(keepOwnership ? ownHandle : ownNone),
       mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR)
+      mInitCheck(NO_ERROR), mId(getUniqueId())
 {
     width  = w;
     height = h;
@@ -77,7 +85,7 @@
 GraphicBuffer::GraphicBuffer(ANativeWindowBuffer* buffer, bool keepOwnership)
     : BASE(), mOwner(keepOwnership ? ownHandle : ownNone),
       mBufferMapper(GraphicBufferMapper::get()),
-      mInitCheck(NO_ERROR), mWrappedBuffer(buffer)
+      mInitCheck(NO_ERROR), mWrappedBuffer(buffer), mId(getUniqueId())
 {
     width  = buffer->width;
     height = buffer->height;
@@ -247,7 +255,7 @@
 }
 
 size_t GraphicBuffer::getFlattenedSize() const {
-    return (8 + (handle ? handle->numInts : 0))*sizeof(int);
+    return (10 + (handle ? handle->numInts : 0))*sizeof(int);
 }
 
 size_t GraphicBuffer::getFdCount() const {
@@ -261,22 +269,24 @@
     size_t fdCountNeeded = GraphicBuffer::getFdCount();
     if (count < fdCountNeeded) return NO_MEMORY;
 
-    int* buf = static_cast<int*>(buffer);
+    int32_t* buf = static_cast<int32_t*>(buffer);
     buf[0] = 'GBFR';
     buf[1] = width;
     buf[2] = height;
     buf[3] = stride;
     buf[4] = format;
     buf[5] = usage;
-    buf[6] = 0;
-    buf[7] = 0;
+    buf[6] = static_cast<int32_t>(mId >> 32);
+    buf[7] = static_cast<int32_t>(mId & 0xFFFFFFFFull);
+    buf[8] = 0;
+    buf[9] = 0;
 
     if (handle) {
-        buf[6] = handle->numFds;
-        buf[7] = handle->numInts;
+        buf[8] = handle->numFds;
+        buf[9] = handle->numInts;
         native_handle_t const* const h = handle;
         memcpy(fds,     h->data,             h->numFds*sizeof(int));
-        memcpy(&buf[8], h->data + h->numFds, h->numInts*sizeof(int));
+        memcpy(&buf[10], h->data + h->numFds, h->numInts*sizeof(int));
     }
 
     buffer = reinterpret_cast<void*>(static_cast<int*>(buffer) + sizeNeeded);
@@ -296,10 +306,10 @@
     int const* buf = static_cast<int const*>(buffer);
     if (buf[0] != 'GBFR') return BAD_TYPE;
 
-    const size_t numFds  = buf[6];
-    const size_t numInts = buf[7];
+    const size_t numFds  = buf[8];
+    const size_t numInts = buf[9];
 
-    const size_t sizeNeeded = (8 + numInts) * sizeof(int);
+    const size_t sizeNeeded = (10 + numInts) * sizeof(int);
     if (size < sizeNeeded) return NO_MEMORY;
 
     size_t fdCountNeeded = 0;
@@ -318,13 +328,16 @@
         usage  = buf[5];
         native_handle* h = native_handle_create(numFds, numInts);
         memcpy(h->data,          fds,     numFds*sizeof(int));
-        memcpy(h->data + numFds, &buf[8], numInts*sizeof(int));
+        memcpy(h->data + numFds, &buf[10], numInts*sizeof(int));
         handle = h;
     } else {
         width = height = stride = format = usage = 0;
         handle = NULL;
     }
 
+    mId = static_cast<uint64_t>(buf[6]) << 32;
+    mId |= static_cast<uint32_t>(buf[7]);
+
     mOwner = ownHandle;
 
     if (handle != 0) {
diff --git a/libs/ui/PixelFormat.cpp b/libs/ui/PixelFormat.cpp
index d2d103a..5ce7fba 100644
--- a/libs/ui/PixelFormat.cpp
+++ b/libs/ui/PixelFormat.cpp
@@ -26,6 +26,8 @@
         case PIXEL_FORMAT_RGBA_8888:
         case PIXEL_FORMAT_RGBX_8888:
         case PIXEL_FORMAT_BGRA_8888:
+        case PIXEL_FORMAT_sRGB_A_8888:
+        case PIXEL_FORMAT_sRGB_X_8888:
             return 4;
         case PIXEL_FORMAT_RGB_888:
             return 3;
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index 6d58f56..fa812f4 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -222,6 +222,22 @@
     return *this;
 }
 
+bool Region::contains(const Point& point) const {
+    return contains(point.x, point.y);
+}
+
+bool Region::contains(int x, int y) const {
+    const_iterator cur = begin();
+    const_iterator const tail = end();
+    while (cur != tail) {
+        if (y >= cur->top && y < cur->bottom && x >= cur->left && x < cur->right) {
+            return true;
+        }
+        cur++;
+    }
+    return false;
+}
+
 void Region::clear()
 {
     mStorage.clear();
diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h
index 54afaab..5843d5e 100644
--- a/opengl/include/GLES/glext.h
+++ b/opengl/include/GLES/glext.h
@@ -1,7 +1,7 @@
 #ifndef __glext_h_
 #define __glext_h_
 
-/* $Revision: 16481 $ on $Date:: 2012-01-04 10:43:56 -0800 #$ */
+/* $Revision: 20798 $ on $Date:: 2013-03-07 01:19:34 -0800 #$ */
 
 #ifdef __cplusplus
 extern "C" {
@@ -165,6 +165,9 @@
 #define GL_DEPTH24_STENCIL8_OES                                 0x88F0
 #endif
 
+/* GL_OES_required_internalformat */
+/* No new tokens introduced by this extension. */
+
 /* GL_OES_rgb8_rgba8 */
 #ifndef GL_OES_rgb8_rgba8
 #define GL_RGB8_OES                                             0x8051
@@ -240,7 +243,7 @@
  * APPLE extension tokens
  *------------------------------------------------------------------------*/
 
-/* GL_APPLE_texture_2D_limited_npot */
+/* GL_APPLE_copy_texture_levels */
 /* No new tokens introduced by this extension. */
 
 /* GL_APPLE_framebuffer_multisample */
@@ -254,6 +257,41 @@
 #define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA
 #endif
 
+/* GL_APPLE_sync */
+#ifndef GL_APPLE_sync
+
+/* These types are defined with reference to <inttypes.h>
+ * in the Apple extension spec, but here we use the Khronos
+ * portable types in khrplatform.h, and assume those types
+ * are always defined.
+ * If any other extensions using these types are defined,
+ * the typedefs must move out of this block and be shared.
+ */
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef struct __GLsync *GLsync;
+
+#define GL_SYNC_OBJECT_APPLE                                    0x8A53
+#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE                        0x9111
+#define GL_OBJECT_TYPE_APPLE                                    0x9112
+#define GL_SYNC_CONDITION_APPLE                                 0x9113
+#define GL_SYNC_STATUS_APPLE                                    0x9114
+#define GL_SYNC_FLAGS_APPLE                                     0x9115
+#define GL_SYNC_FENCE_APPLE                                     0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE                     0x9117
+#define GL_UNSIGNALED_APPLE                                     0x9118
+#define GL_SIGNALED_APPLE                                       0x9119
+#define GL_ALREADY_SIGNALED_APPLE                               0x911A
+#define GL_TIMEOUT_EXPIRED_APPLE                                0x911B
+#define GL_CONDITION_SATISFIED_APPLE                            0x911C
+#define GL_WAIT_FAILED_APPLE                                    0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE                        0x00000001
+#define GL_TIMEOUT_IGNORED_APPLE                                0xFFFFFFFFFFFFFFFFull
+#endif
+
+/* GL_APPLE_texture_2D_limited_npot */
+/* No new tokens introduced by this extension. */
+
 /* GL_APPLE_texture_format_BGRA8888 */
 #ifndef GL_APPLE_texture_format_BGRA8888
 #define GL_BGRA_EXT                                             0x80E1
@@ -288,12 +326,23 @@
 #define GL_STENCIL_EXT                                          0x1802
 #endif
 
+/* GL_EXT_map_buffer_range */
+#ifndef GL_EXT_map_buffer_range
+#define GL_MAP_READ_BIT_EXT                                     0x0001
+#define GL_MAP_WRITE_BIT_EXT                                    0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT_EXT                         0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT                        0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT                           0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT_EXT                           0x0020
+#endif
+
 /* GL_EXT_multisampled_render_to_texture */
 #ifndef GL_EXT_multisampled_render_to_texture
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C
-#define GL_RENDERBUFFER_SAMPLES_EXT                             0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x9134
-#define GL_MAX_SAMPLES_EXT                                      0x9135
+/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */
+#define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56
+#define GL_MAX_SAMPLES_EXT                                      0x8D57
 #endif
 
 /* GL_EXT_multi_draw_arrays */
@@ -353,10 +402,10 @@
 /* GL_EXT_texture_storage */
 #ifndef GL_EXT_texture_storage
 #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F
-#define GL_ALPHA8_EXT                                           0x803C  
+#define GL_ALPHA8_EXT                                           0x803C
 #define GL_LUMINANCE8_EXT                                       0x8040
 #define GL_LUMINANCE8_ALPHA8_EXT                                0x8045
-#define GL_RGBA32F_EXT                                          0x8814  
+#define GL_RGBA32F_EXT                                          0x8814
 #define GL_RGB32F_EXT                                           0x8815
 #define GL_ALPHA32F_EXT                                         0x8816
 #define GL_LUMINANCE32F_EXT                                     0x8818
@@ -366,7 +415,7 @@
 #define GL_ALPHA16F_EXT                                         0x881C
 #define GL_LUMINANCE16F_EXT                                     0x881E
 #define GL_LUMINANCE_ALPHA16F_EXT                               0x881F
-#define GL_RGB10_A2_EXT                                         0x8059  
+#define GL_RGB10_A2_EXT                                         0x8059
 #define GL_RGB10_EXT                                            0x8052
 #define GL_BGRA8_EXT                                            0x93A1
 #endif
@@ -771,6 +820,11 @@
 #define GL_OES_packed_depth_stencil 1
 #endif
 
+/* GL_OES_required_internalformat */
+#ifndef GL_OES_required_internalformat
+#define GL_OES_required_internalformat 1
+#endif
+
 /* GL_OES_query_matrix */
 #ifndef GL_OES_query_matrix
 #define GL_OES_query_matrix 1
@@ -892,22 +946,52 @@
  * APPLE extension functions
  *------------------------------------------------------------------------*/
 
-/* GL_APPLE_texture_2D_limited_npot */
-#ifndef GL_APPLE_texture_2D_limited_npot
-#define GL_APPLE_texture_2D_limited_npot 1
+/* GL_APPLE_copy_texture_levels */
+#ifndef GL_APPLE_copy_texture_levels
+#define GL_APPLE_copy_texture_levels 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
 #endif
 
 /* GL_APPLE_framebuffer_multisample */
 #ifndef GL_APPLE_framebuffer_multisample
 #define GL_APPLE_framebuffer_multisample 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
 GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
 #endif /* GL_GLEXT_PROTOTYPES */
 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
 #endif
 
+/* GL_APPLE_sync */
+#ifndef GL_APPLE_sync
+#define GL_APPLE_sync 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
+GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
+GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
+GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
+GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
+typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
+typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
+typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+
+/* GL_APPLE_texture_2D_limited_npot */
+#ifndef GL_APPLE_texture_2D_limited_npot
+#define GL_APPLE_texture_2D_limited_npot 1
+#endif
+
 /* GL_APPLE_texture_format_BGRA8888 */
 #ifndef GL_APPLE_texture_format_BGRA8888
 #define GL_APPLE_texture_format_BGRA8888 1
@@ -945,12 +1029,23 @@
 typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
 #endif
 
+/* GL_EXT_map_buffer_range */
+#ifndef GL_EXT_map_buffer_range
+#define GL_EXT_map_buffer_range 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY *glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+
 /* GL_EXT_multisampled_render_to_texture */
 #ifndef GL_EXT_multisampled_render_to_texture
 #define GL_EXT_multisampled_render_to_texture 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
 #endif
 typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
@@ -960,11 +1055,11 @@
 #ifndef GL_EXT_multi_draw_arrays
 #define GL_EXT_multi_draw_arrays 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei);
+GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* const*, GLsizei);
 #endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const*indices, GLsizei primcount);
 #endif
 
 /* GL_EXT_read_format_bgra */
@@ -1054,8 +1149,8 @@
 #ifndef GL_IMG_user_clip_plane
 #define GL_IMG_user_clip_plane 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn);
-GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn);
+GL_API void GL_APIENTRY glClipPlanefIMG (GLenum, const GLfloat *);
+GL_API void GL_APIENTRY glClipPlanexIMG (GLenum, const GLfixed *);
 #endif
 typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
 typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
@@ -1065,11 +1160,11 @@
 #ifndef GL_IMG_multisampled_render_to_texture
 #define GL_IMG_multisampled_render_to_texture 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
 #endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
 #endif
 
 /*------------------------------------------------------------------------*
@@ -1080,13 +1175,13 @@
 #ifndef GL_NV_fence
 #define GL_NV_fence 1
 #ifdef GL_GLEXT_PROTOTYPES
-GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
-GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
-GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
-GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
-GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
-GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence);
-GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
+GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
+GL_API void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
+GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint);
+GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint);
+GL_API void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
+GL_API void GL_APIENTRY glFinishFenceNV (GLuint);
+GL_API void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
 #endif
 typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
 typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
diff --git a/opengl/include/GLES2/gl2.h b/opengl/include/GLES2/gl2.h
index c2d8357..8a4d43a 100644
--- a/opengl/include/GLES2/gl2.h
+++ b/opengl/include/GLES2/gl2.h
@@ -1,56 +1,83 @@
 #ifndef __gl2_h_
-#define __gl2_h_
-
-/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
-
-#include <GLES2/gl2platform.h>
+#define __gl2_h_ 1
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+** Copyright (c) 2013-2014 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.
+*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision: 26696 $ on $Date: 2014-05-17 14:48:55 -0700 (Sat, 17 May 2014) $
+*/
+
+#include <GLES2/gl2platform.h>
+
+/* Generated on date 20140517 */
+
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2\.[0-9]
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
  */
 
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
-
-typedef void             GLvoid;
-typedef char             GLchar;
-typedef unsigned int     GLenum;
-typedef unsigned char    GLboolean;
-typedef unsigned int     GLbitfield;
-typedef khronos_int8_t   GLbyte;
-typedef short            GLshort;
-typedef int              GLint;
-typedef int              GLsizei;
-typedef khronos_uint8_t  GLubyte;
-typedef unsigned short   GLushort;
-typedef unsigned int     GLuint;
-typedef khronos_float_t  GLfloat;
-typedef khronos_float_t  GLclampf;
-typedef khronos_int32_t  GLfixed;
-
-/* GL types for handling large vertex buffer objects */
+#ifndef GL_ES_VERSION_2_0
+#define GL_ES_VERSION_2_0 1
+#include <KHR/khrplatform.h>
+typedef khronos_int8_t GLbyte;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef short GLshort;
+typedef unsigned short GLushort;
+typedef void GLvoid;
+typedef struct __GLsync *GLsync;
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef unsigned int GLenum;
+typedef unsigned int GLuint;
+typedef char GLchar;
+typedef khronos_float_t GLfloat;
+typedef khronos_ssize_t GLsizeiptr;
 typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t  GLsizeiptr;
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_2_0                 1
-
-/* ClearBufferMask */
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
 #define GL_DEPTH_BUFFER_BIT               0x00000100
 #define GL_STENCIL_BUFFER_BIT             0x00000400
 #define GL_COLOR_BUFFER_BIT               0x00004000
-
-/* Boolean */
 #define GL_FALSE                          0
 #define GL_TRUE                           1
-
-/* BeginMode */
 #define GL_POINTS                         0x0000
 #define GL_LINES                          0x0001
 #define GL_LINE_LOOP                      0x0002
@@ -58,18 +85,6 @@
 #define GL_TRIANGLES                      0x0004
 #define GL_TRIANGLE_STRIP                 0x0005
 #define GL_TRIANGLE_FAN                   0x0006
-
-/* AlphaFunction (not supported in ES20) */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* BlendingFactorDest */
 #define GL_ZERO                           0
 #define GL_ONE                            1
 #define GL_SRC_COLOR                      0x0300
@@ -78,29 +93,15 @@
 #define GL_ONE_MINUS_SRC_ALPHA            0x0303
 #define GL_DST_ALPHA                      0x0304
 #define GL_ONE_MINUS_DST_ALPHA            0x0305
-
-/* BlendingFactorSrc */
-/*      GL_ZERO */
-/*      GL_ONE */
 #define GL_DST_COLOR                      0x0306
 #define GL_ONE_MINUS_DST_COLOR            0x0307
 #define GL_SRC_ALPHA_SATURATE             0x0308
-/*      GL_SRC_ALPHA */
-/*      GL_ONE_MINUS_SRC_ALPHA */
-/*      GL_DST_ALPHA */
-/*      GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
 #define GL_FUNC_ADD                       0x8006
 #define GL_BLEND_EQUATION                 0x8009
-#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_RGB             0x8009
 #define GL_BLEND_EQUATION_ALPHA           0x883D
-
-/* BlendSubtract */
 #define GL_FUNC_SUBTRACT                  0x800A
 #define GL_FUNC_REVERSE_SUBTRACT          0x800B
-
-/* Separate Blend Functions */
 #define GL_BLEND_DST_RGB                  0x80C8
 #define GL_BLEND_SRC_RGB                  0x80C9
 #define GL_BLEND_DST_ALPHA                0x80CA
@@ -110,38 +111,19 @@
 #define GL_CONSTANT_ALPHA                 0x8003
 #define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
 #define GL_BLEND_COLOR                    0x8005
-
-/* Buffer Objects */
 #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_STREAM_DRAW                    0x88E0
 #define GL_STATIC_DRAW                    0x88E4
 #define GL_DYNAMIC_DRAW                   0x88E8
-
 #define GL_BUFFER_SIZE                    0x8764
 #define GL_BUFFER_USAGE                   0x8765
-
 #define GL_CURRENT_VERTEX_ATTRIB          0x8626
-
-/* CullFaceMode */
 #define GL_FRONT                          0x0404
 #define GL_BACK                           0x0405
 #define GL_FRONT_AND_BACK                 0x0408
-
-/* DepthFunction */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* EnableCap */
 #define GL_TEXTURE_2D                     0x0DE1
 #define GL_CULL_FACE                      0x0B44
 #define GL_BLEND                          0x0BE2
@@ -152,19 +134,13 @@
 #define GL_POLYGON_OFFSET_FILL            0x8037
 #define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
 #define GL_SAMPLE_COVERAGE                0x80A0
-
-/* ErrorCode */
 #define GL_NO_ERROR                       0
 #define GL_INVALID_ENUM                   0x0500
 #define GL_INVALID_VALUE                  0x0501
 #define GL_INVALID_OPERATION              0x0502
 #define GL_OUT_OF_MEMORY                  0x0505
-
-/* FrontFaceDirection */
 #define GL_CW                             0x0900
 #define GL_CCW                            0x0901
-
-/* GetPName */
 #define GL_LINE_WIDTH                     0x0B21
 #define GL_ALIASED_POINT_SIZE_RANGE       0x846D
 #define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
@@ -191,7 +167,6 @@
 #define GL_STENCIL_BACK_WRITEMASK         0x8CA5
 #define GL_VIEWPORT                       0x0BA2
 #define GL_SCISSOR_BOX                    0x0C10
-/*      GL_SCISSOR_TEST */
 #define GL_COLOR_CLEAR_VALUE              0x0C22
 #define GL_COLOR_WRITEMASK                0x0C23
 #define GL_UNPACK_ALIGNMENT               0x0CF5
@@ -206,32 +181,18 @@
 #define GL_DEPTH_BITS                     0x0D56
 #define GL_STENCIL_BITS                   0x0D57
 #define GL_POLYGON_OFFSET_UNITS           0x2A00
-/*      GL_POLYGON_OFFSET_FILL */
 #define GL_POLYGON_OFFSET_FACTOR          0x8038
 #define GL_TEXTURE_BINDING_2D             0x8069
 #define GL_SAMPLE_BUFFERS                 0x80A8
 #define GL_SAMPLES                        0x80A9
 #define GL_SAMPLE_COVERAGE_VALUE          0x80AA
 #define GL_SAMPLE_COVERAGE_INVERT         0x80AB
-
-/* GetTextureParameter */
-/*      GL_TEXTURE_MAG_FILTER */
-/*      GL_TEXTURE_MIN_FILTER */
-/*      GL_TEXTURE_WRAP_S */
-/*      GL_TEXTURE_WRAP_T */
-
 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
 #define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
-
-/* HintMode */
 #define GL_DONT_CARE                      0x1100
 #define GL_FASTEST                        0x1101
 #define GL_NICEST                         0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT            0x8192
-
-/* DataType */
+#define GL_GENERATE_MIPMAP_HINT           0x8192
 #define GL_BYTE                           0x1400
 #define GL_UNSIGNED_BYTE                  0x1401
 #define GL_SHORT                          0x1402
@@ -240,44 +201,35 @@
 #define GL_UNSIGNED_INT                   0x1405
 #define GL_FLOAT                          0x1406
 #define GL_FIXED                          0x140C
-
-/* PixelFormat */
 #define GL_DEPTH_COMPONENT                0x1902
 #define GL_ALPHA                          0x1906
 #define GL_RGB                            0x1907
 #define GL_RGBA                           0x1908
 #define GL_LUMINANCE                      0x1909
 #define GL_LUMINANCE_ALPHA                0x190A
-
-/* PixelType */
-/*      GL_UNSIGNED_BYTE */
 #define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
 #define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
 #define GL_UNSIGNED_SHORT_5_6_5           0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER                  0x8B30
-#define GL_VERTEX_SHADER                    0x8B31
-#define GL_MAX_VERTEX_ATTRIBS               0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
-#define GL_MAX_VARYING_VECTORS              0x8DFC
+#define GL_FRAGMENT_SHADER                0x8B30
+#define GL_VERTEX_SHADER                  0x8B31
+#define GL_MAX_VERTEX_ATTRIBS             0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB
+#define GL_MAX_VARYING_VECTORS            0x8DFC
 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
-#define GL_SHADER_TYPE                      0x8B4F
-#define GL_DELETE_STATUS                    0x8B80
-#define GL_LINK_STATUS                      0x8B82
-#define GL_VALIDATE_STATUS                  0x8B83
-#define GL_ATTACHED_SHADERS                 0x8B85
-#define GL_ACTIVE_UNIFORMS                  0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
-#define GL_ACTIVE_ATTRIBUTES                0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
-#define GL_CURRENT_PROGRAM                  0x8B8D
-
-/* StencilFunction */
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD
+#define GL_SHADER_TYPE                    0x8B4F
+#define GL_DELETE_STATUS                  0x8B80
+#define GL_LINK_STATUS                    0x8B82
+#define GL_VALIDATE_STATUS                0x8B83
+#define GL_ATTACHED_SHADERS               0x8B85
+#define GL_ACTIVE_UNIFORMS                0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
+#define GL_ACTIVE_ATTRIBUTES              0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
+#define GL_CURRENT_PROGRAM                0x8B8D
 #define GL_NEVER                          0x0200
 #define GL_LESS                           0x0201
 #define GL_EQUAL                          0x0202
@@ -286,9 +238,6 @@
 #define GL_NOTEQUAL                       0x0205
 #define GL_GEQUAL                         0x0206
 #define GL_ALWAYS                         0x0207
-
-/* StencilOp */
-/*      GL_ZERO */
 #define GL_KEEP                           0x1E00
 #define GL_REPLACE                        0x1E01
 #define GL_INCR                           0x1E02
@@ -296,35 +245,21 @@
 #define GL_INVERT                         0x150A
 #define GL_INCR_WRAP                      0x8507
 #define GL_DECR_WRAP                      0x8508
-
-/* StringName */
 #define GL_VENDOR                         0x1F00
 #define GL_RENDERER                       0x1F01
 #define GL_VERSION                        0x1F02
 #define GL_EXTENSIONS                     0x1F03
-
-/* TextureMagFilter */
 #define GL_NEAREST                        0x2600
 #define GL_LINEAR                         0x2601
-
-/* TextureMinFilter */
-/*      GL_NEAREST */
-/*      GL_LINEAR */
 #define GL_NEAREST_MIPMAP_NEAREST         0x2700
 #define GL_LINEAR_MIPMAP_NEAREST          0x2701
 #define GL_NEAREST_MIPMAP_LINEAR          0x2702
 #define GL_LINEAR_MIPMAP_LINEAR           0x2703
-
-/* TextureParameterName */
 #define GL_TEXTURE_MAG_FILTER             0x2800
 #define GL_TEXTURE_MIN_FILTER             0x2801
 #define GL_TEXTURE_WRAP_S                 0x2802
 #define GL_TEXTURE_WRAP_T                 0x2803
-
-/* TextureTarget */
-/*      GL_TEXTURE_2D */
 #define GL_TEXTURE                        0x1702
-
 #define GL_TEXTURE_CUBE_MAP               0x8513
 #define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
@@ -334,8 +269,6 @@
 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
-
-/* TextureUnit */
 #define GL_TEXTURE0                       0x84C0
 #define GL_TEXTURE1                       0x84C1
 #define GL_TEXTURE2                       0x84C2
@@ -369,13 +302,9 @@
 #define GL_TEXTURE30                      0x84DE
 #define GL_TEXTURE31                      0x84DF
 #define GL_ACTIVE_TEXTURE                 0x84E0
-
-/* TextureWrapMode */
 #define GL_REPEAT                         0x2901
 #define GL_CLAMP_TO_EDGE                  0x812F
 #define GL_MIRRORED_REPEAT                0x8370
-
-/* Uniform Types */
 #define GL_FLOAT_VEC2                     0x8B50
 #define GL_FLOAT_VEC3                     0x8B51
 #define GL_FLOAT_VEC4                     0x8B52
@@ -391,48 +320,34 @@
 #define GL_FLOAT_MAT4                     0x8B5C
 #define GL_SAMPLER_2D                     0x8B5E
 #define GL_SAMPLER_CUBE                   0x8B60
-
-/* Vertex Arrays */
-#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_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
+#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_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
-
-/* Shader Source */
 #define GL_COMPILE_STATUS                 0x8B81
 #define GL_INFO_LOG_LENGTH                0x8B84
 #define GL_SHADER_SOURCE_LENGTH           0x8B88
 #define GL_SHADER_COMPILER                0x8DFA
-
-/* Shader Binary */
 #define GL_SHADER_BINARY_FORMATS          0x8DF8
 #define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
-
-/* Shader Precision-Specified Types */
 #define GL_LOW_FLOAT                      0x8DF0
 #define GL_MEDIUM_FLOAT                   0x8DF1
 #define GL_HIGH_FLOAT                     0x8DF2
 #define GL_LOW_INT                        0x8DF3
 #define GL_MEDIUM_INT                     0x8DF4
 #define GL_HIGH_INT                       0x8DF5
-
-/* Framebuffer Object. */
 #define GL_FRAMEBUFFER                    0x8D40
 #define GL_RENDERBUFFER                   0x8D41
-
 #define GL_RGBA4                          0x8056
 #define GL_RGB5_A1                        0x8057
 #define GL_RGB565                         0x8D62
 #define GL_DEPTH_COMPONENT16              0x81A5
 #define GL_STENCIL_INDEX8                 0x8D48
-
 #define GL_RENDERBUFFER_WIDTH             0x8D42
 #define GL_RENDERBUFFER_HEIGHT            0x8D43
 #define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
@@ -442,179 +357,169 @@
 #define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
 #define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
 #define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
-
 #define GL_COLOR_ATTACHMENT0              0x8CE0
 #define GL_DEPTH_ATTACHMENT               0x8D00
 #define GL_STENCIL_ATTACHMENT             0x8D20
-
 #define GL_NONE                           0
-
-#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
+#define GL_FRAMEBUFFER_COMPLETE           0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
-
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD
 #define GL_FRAMEBUFFER_BINDING            0x8CA6
 #define GL_RENDERBUFFER_BINDING           0x8CA7
 #define GL_MAX_RENDERBUFFER_SIZE          0x84E8
-
 #define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
-
-/*-------------------------------------------------------------------------
- * GL core functions.
- *-----------------------------------------------------------------------*/
-
-GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
-GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);
-GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
-GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void         GL_APIENTRY glFinish (void);
-GL_APICALL void         GL_APIENTRY glFlush (void);
-GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL GLint        GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum       GL_APIENTRY glGetError (void);
-GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL GLint        GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
-GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
-GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
+GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
+GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
+GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
+GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glFinish (void);
+GL_APICALL void GL_APIENTRY glFlush (void);
+GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
+GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL GLenum GL_APIENTRY glGetError (void);
+GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
+GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
+GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
+GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
+GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
+GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GL_ES_VERSION_2_0 */
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __gl2_h_ */
+#endif
diff --git a/opengl/include/GLES2/gl2ext.h b/opengl/include/GLES2/gl2ext.h
index 8f8d80a..9749f9f 100644
--- a/opengl/include/GLES2/gl2ext.h
+++ b/opengl/include/GLES2/gl2ext.h
@@ -1,1160 +1,1359 @@
 #ifndef __gl2ext_h_
-#define __gl2ext_h_
-
-/* $Revision: 16619 $ on $Date:: 2012-01-18 10:00:14 -0800 #$ */
+#define __gl2ext_h_ 1
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*
- * This document is licensed under the SGI Free Software B License Version
- * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
- */
+** Copyright (c) 2013-2014 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.
+*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision$ on $Date$
+*/
 
 #ifndef GL_APIENTRYP
-#   define GL_APIENTRYP GL_APIENTRY*
+#define GL_APIENTRYP GL_APIENTRY*
 #endif
 
-/*------------------------------------------------------------------------*
- * OES extension tokens
- *------------------------------------------------------------------------*/
+/* Generated on date 20140519 */
 
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_ETC1_RGB8_OES                                        0x8D64
-#endif
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2\.[0-9]
+ * Versions emitted: _nomatch_^
+ * Default extensions included: gles2
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
 
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_PALETTE4_RGB8_OES                                    0x8B90
-#define GL_PALETTE4_RGBA8_OES                                   0x8B91
-#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
-#define GL_PALETTE4_RGBA4_OES                                   0x8B93
-#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
-#define GL_PALETTE8_RGB8_OES                                    0x8B95
-#define GL_PALETTE8_RGBA8_OES                                   0x8B96
-#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
-#define GL_PALETTE8_RGBA4_OES                                   0x8B98
-#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
+#ifndef GL_KHR_blend_equation_advanced
+#define GL_KHR_blend_equation_advanced 1
+#define GL_BLEND_ADVANCED_COHERENT_KHR    0x9285
+#define GL_MULTIPLY_KHR                   0x9294
+#define GL_SCREEN_KHR                     0x9295
+#define GL_OVERLAY_KHR                    0x9296
+#define GL_DARKEN_KHR                     0x9297
+#define GL_LIGHTEN_KHR                    0x9298
+#define GL_COLORDODGE_KHR                 0x9299
+#define GL_COLORBURN_KHR                  0x929A
+#define GL_HARDLIGHT_KHR                  0x929B
+#define GL_SOFTLIGHT_KHR                  0x929C
+#define GL_DIFFERENCE_KHR                 0x929E
+#define GL_EXCLUSION_KHR                  0x92A0
+#define GL_HSL_HUE_KHR                    0x92AD
+#define GL_HSL_SATURATION_KHR             0x92AE
+#define GL_HSL_COLOR_KHR                  0x92AF
+#define GL_HSL_LUMINOSITY_KHR             0x92B0
+typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);
 #endif
+#endif /* GL_KHR_blend_equation_advanced */
 
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_DEPTH_COMPONENT24_OES                                0x81A6
+#ifndef GL_KHR_debug
+#define GL_KHR_debug 1
+typedef void (GL_APIENTRY  *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
+#define GL_SAMPLER                        0x82E6
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR   0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION_KHR    0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM_KHR  0x8245
+#define GL_DEBUG_SOURCE_API_KHR           0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR   0x8249
+#define GL_DEBUG_SOURCE_APPLICATION_KHR   0x824A
+#define GL_DEBUG_SOURCE_OTHER_KHR         0x824B
+#define GL_DEBUG_TYPE_ERROR_KHR           0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY_KHR     0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE_KHR     0x8250
+#define GL_DEBUG_TYPE_OTHER_KHR           0x8251
+#define GL_DEBUG_TYPE_MARKER_KHR          0x8268
+#define GL_DEBUG_TYPE_PUSH_GROUP_KHR      0x8269
+#define GL_DEBUG_TYPE_POP_GROUP_KHR       0x826A
+#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C
+#define GL_DEBUG_GROUP_STACK_DEPTH_KHR    0x826D
+#define GL_BUFFER_KHR                     0x82E0
+#define GL_SHADER_KHR                     0x82E1
+#define GL_PROGRAM_KHR                    0x82E2
+#define GL_VERTEX_ARRAY_KHR               0x8074
+#define GL_QUERY_KHR                      0x82E3
+#define GL_SAMPLER_KHR                    0x82E6
+#define GL_MAX_LABEL_LENGTH_KHR           0x82E8
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR   0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR  0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_KHR      0x9145
+#define GL_DEBUG_SEVERITY_HIGH_KHR        0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_KHR      0x9147
+#define GL_DEBUG_SEVERITY_LOW_KHR         0x9148
+#define GL_DEBUG_OUTPUT_KHR               0x92E0
+#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR     0x00000002
+#define GL_STACK_OVERFLOW_KHR             0x0503
+#define GL_STACK_UNDERFLOW_KHR            0x0504
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
+typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);
+typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);
+GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);
+GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);
 #endif
+#endif /* GL_KHR_debug */
 
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_DEPTH_COMPONENT32_OES                                0x81A7
-#endif
+#ifndef GL_KHR_texture_compression_astc_hdr
+#define GL_KHR_texture_compression_astc_hdr 1
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR   0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR   0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR   0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR   0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR   0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR   0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR   0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR   0x93B7
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR  0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR  0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR  0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
+#endif /* GL_KHR_texture_compression_astc_hdr */
 
-/* GL_OES_depth_texture */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-typedef void* GLeglImageOES;
-#endif
-
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-/* GLeglImageOES defined in GL_OES_EGL_image already. */
-#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
-#define GL_SAMPLER_EXTERNAL_OES                                 0x8D66
-#define GL_TEXTURE_BINDING_EXTERNAL_OES                         0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES                     0x8D68
-#endif
-
-/* GL_OES_element_index_uint */
-#ifndef GL_OES_element_index_uint
-#define GL_UNSIGNED_INT                                         0x1405
-#endif
-
-/* GL_OES_get_program_binary */
-#ifndef GL_OES_get_program_binary
-#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
-#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
-#endif
-
-/* GL_OES_mapbuffer */
-#ifndef GL_OES_mapbuffer
-#define GL_WRITE_ONLY_OES                                       0x88B9
-#define GL_BUFFER_ACCESS_OES                                    0x88BB
-#define GL_BUFFER_MAPPED_OES                                    0x88BC
-#define GL_BUFFER_MAP_POINTER_OES                               0x88BD
-#endif
-
-/* GL_OES_packed_depth_stencil */
-#ifndef GL_OES_packed_depth_stencil
-#define GL_DEPTH_STENCIL_OES                                    0x84F9
-#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
-#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
-#endif
-
-/* GL_OES_rgb8_rgba8 */
-#ifndef GL_OES_rgb8_rgba8
-#define GL_RGB8_OES                                             0x8051
-#define GL_RGBA8_OES                                            0x8058
-#endif
-
-/* GL_OES_standard_derivatives */
-#ifndef GL_OES_standard_derivatives
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
-#endif
-
-/* GL_OES_stencil1 */
-#ifndef GL_OES_stencil1
-#define GL_STENCIL_INDEX1_OES                                   0x8D46
-#endif
-
-/* GL_OES_stencil4 */
-#ifndef GL_OES_stencil4
-#define GL_STENCIL_INDEX4_OES                                   0x8D47
-#endif
-
-/* GL_OES_texture_3D */
-#ifndef GL_OES_texture_3D
-#define GL_TEXTURE_WRAP_R_OES                                   0x8072
-#define GL_TEXTURE_3D_OES                                       0x806F
-#define GL_TEXTURE_BINDING_3D_OES                               0x806A
-#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
-#define GL_SAMPLER_3D_OES                                       0x8B5F
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
-#endif
-
-/* GL_OES_texture_float */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_half_float */
-#ifndef GL_OES_texture_half_float
-#define GL_HALF_FLOAT_OES                                       0x8D61
-#endif
-
-/* GL_OES_texture_half_float_linear */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_texture_npot */
-/* No new tokens introduced by this extension. */
-
-/* GL_OES_vertex_array_object */
-#ifndef GL_OES_vertex_array_object
-#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
-#endif
-
-/* GL_OES_vertex_half_float */
-/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
-
-/* GL_OES_vertex_type_10_10_10_2 */
-#ifndef GL_OES_vertex_type_10_10_10_2
-#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
-#define GL_INT_10_10_10_2_OES                                   0x8DF7
-#endif
-
-/*------------------------------------------------------------------------*
- * AMD extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
-#ifndef GL_AMD_compressed_3DC_texture
-#define GL_3DC_X_AMD                                            0x87F9
-#define GL_3DC_XY_AMD                                           0x87FA
-#endif
-
-/* GL_AMD_compressed_ATC_texture */
-#ifndef GL_AMD_compressed_ATC_texture
-#define GL_ATC_RGB_AMD                                          0x8C92
-#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
-#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
-#endif
-
-/* GL_AMD_performance_monitor */
-#ifndef GL_AMD_performance_monitor
-#define GL_COUNTER_TYPE_AMD                                     0x8BC0
-#define GL_COUNTER_RANGE_AMD                                    0x8BC1
-#define GL_UNSIGNED_INT64_AMD                                   0x8BC2
-#define GL_PERCENTAGE_AMD                                       0x8BC3
-#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
-#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
-#define GL_PERFMON_RESULT_AMD                                   0x8BC6
-#endif
-
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD                                      0x8740
-#endif
-
-/*------------------------------------------------------------------------*
- * ANGLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_ANGLE                               0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE                               0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE                       0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE                       0x8CAA
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_ANGLE                           0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE             0x8D56
-#define GL_MAX_SAMPLES_ANGLE                                    0x8D57
-#endif
-
-/*------------------------------------------------------------------------*
- * APPLE extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_RGB_422_APPLE                                        0x8A1F
-#define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA
-#define GL_UNSIGNED_SHORT_8_8_REV_APPLE                         0x85BB
-#endif
-
-/* GL_APPLE_framebuffer_multisample */
-#ifndef GL_APPLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_APPLE                           0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE             0x8D56
-#define GL_MAX_SAMPLES_APPLE                                    0x8D57
-#define GL_READ_FRAMEBUFFER_APPLE                               0x8CA8
-#define GL_DRAW_FRAMEBUFFER_APPLE                               0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE                       0x8CA6
-#define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA
-#endif
-
-/* GL_APPLE_texture_format_BGRA8888 */
-#ifndef GL_APPLE_texture_format_BGRA8888
-#define GL_BGRA_EXT                                             0x80E1
-#endif
-
-/* GL_APPLE_texture_max_level */
-#ifndef GL_APPLE_texture_max_level
-#define GL_TEXTURE_MAX_LEVEL_APPLE                              0x813D
-#endif
-
-/*------------------------------------------------------------------------*
- * ARM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_ARM_mali_shader_binary */
-#ifndef GL_ARM_mali_shader_binary
-#define GL_MALI_SHADER_BINARY_ARM                               0x8F60
-#endif
-
-/* GL_ARM_rgba8 */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * EXT extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_EXT_blend_minmax */
-#ifndef GL_EXT_blend_minmax
-#define GL_MIN_EXT                                              0x8007
-#define GL_MAX_EXT                                              0x8008
-#endif
-
-/* GL_EXT_color_buffer_half_float */
-#ifndef GL_EXT_color_buffer_half_float
-#define GL_RGBA16F_EXT                                          0x881A
-#define GL_RGB16F_EXT                                           0x881B
-#define GL_RG16F_EXT                                            0x822F
-#define GL_R16F_EXT                                             0x822D
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT            0x8211
-#define GL_UNSIGNED_NORMALIZED_EXT                              0x8C17
-#endif
-
-/* GL_EXT_debug_label */
-#ifndef GL_EXT_debug_label
-#define GL_PROGRAM_PIPELINE_OBJECT_EXT                          0x8A4F
-#define GL_PROGRAM_OBJECT_EXT                                   0x8B40
-#define GL_SHADER_OBJECT_EXT                                    0x8B48
-#define GL_BUFFER_OBJECT_EXT                                    0x9151
-#define GL_QUERY_OBJECT_EXT                                     0x9153
-#define GL_VERTEX_ARRAY_OBJECT_EXT                              0x9154
-#endif
-
-/* GL_EXT_debug_marker */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_discard_framebuffer */
-#ifndef GL_EXT_discard_framebuffer
-#define GL_COLOR_EXT                                            0x1800
-#define GL_DEPTH_EXT                                            0x1801
-#define GL_STENCIL_EXT                                          0x1802
-#endif
-
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C
-#define GL_RENDERBUFFER_SAMPLES_EXT                             0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x9134
-#define GL_MAX_SAMPLES_EXT                                      0x9135
-#endif
-
-/* GL_EXT_multi_draw_arrays */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_ANY_SAMPLES_PASSED_EXT                               0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT                  0x8D6A
-#define GL_CURRENT_QUERY_EXT                                    0x8865
-#define GL_QUERY_RESULT_EXT                                     0x8866
-#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867
-#endif
-
-/* GL_EXT_read_format_bgra */
-#ifndef GL_EXT_read_format_bgra
-#define GL_BGRA_EXT                                             0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
-#endif
-
-/* GL_EXT_robustness */
-#ifndef GL_EXT_robustness
-/* reuse GL_NO_ERROR */
-#define GL_GUILTY_CONTEXT_RESET_EXT                             0x8253
-#define GL_INNOCENT_CONTEXT_RESET_EXT                           0x8254
-#define GL_UNKNOWN_CONTEXT_RESET_EXT                            0x8255
-#define GL_CONTEXT_ROBUST_ACCESS_EXT                            0x90F3
-#define GL_RESET_NOTIFICATION_STRATEGY_EXT                      0x8256
-#define GL_LOSE_CONTEXT_ON_RESET_EXT                            0x8252
-#define GL_NO_RESET_NOTIFICATION_EXT                            0x8261
-#endif
-
-/* GL_EXT_separate_shader_objects */
-#ifndef GL_EXT_separate_shader_objects
-#define GL_VERTEX_SHADER_BIT_EXT                                0x00000001
-#define GL_FRAGMENT_SHADER_BIT_EXT                              0x00000002
-#define GL_ALL_SHADER_BITS_EXT                                  0xFFFFFFFF
-#define GL_PROGRAM_SEPARABLE_EXT                                0x8258
-#define GL_ACTIVE_PROGRAM_EXT                                   0x8259
-#define GL_PROGRAM_PIPELINE_BINDING_EXT                         0x825A
-#endif
-
-/* GL_EXT_shader_texture_lod */
-/* No new tokens introduced by this extension. */
-
-/* GL_EXT_shadow_samplers */
-#ifndef GL_EXT_shadow_samplers
-#define GL_TEXTURE_COMPARE_MODE_EXT                             0x884C
-#define GL_TEXTURE_COMPARE_FUNC_EXT                             0x884D
-#define GL_COMPARE_REF_TO_TEXTURE_EXT                           0x884E
-#define GL_SAMPLER_2D_SHADOW_EXT                                0x8B62
-#endif
-
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_SRGB_EXT                                             0x8C40
-#define GL_SRGB_ALPHA_EXT                                       0x8C42
-#define GL_SRGB8_ALPHA8_EXT                                     0x8C43
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT            0x8210
-#endif
-
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1
-#endif
-
-/* GL_EXT_texture_filter_anisotropic */
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
-#endif
-
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA_EXT                                             0x80E1
-#endif
-
-/* GL_EXT_texture_rg */
-#ifndef GL_EXT_texture_rg
-#define GL_RED_EXT                                              0x1903
-#define GL_RG_EXT                                               0x8227
-#define GL_R8_EXT                                               0x8229
-#define GL_RG8_EXT                                              0x822B
-#endif
-
-/* GL_EXT_texture_storage */
-#ifndef GL_EXT_texture_storage
-#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F
-#define GL_ALPHA8_EXT                                           0x803C  
-#define GL_LUMINANCE8_EXT                                       0x8040
-#define GL_LUMINANCE8_ALPHA8_EXT                                0x8045
-#define GL_RGBA32F_EXT                                          0x8814  
-#define GL_RGB32F_EXT                                           0x8815
-#define GL_ALPHA32F_EXT                                         0x8816
-#define GL_LUMINANCE32F_EXT                                     0x8818
-#define GL_LUMINANCE_ALPHA32F_EXT                               0x8819
-/* reuse GL_RGBA16F_EXT */
-#define GL_RGB16F_EXT                                           0x881B
-#define GL_ALPHA16F_EXT                                         0x881C
-#define GL_LUMINANCE16F_EXT                                     0x881E
-#define GL_LUMINANCE_ALPHA16F_EXT                               0x881F
-#define GL_RGB10_A2_EXT                                         0x8059  
-#define GL_RGB10_EXT                                            0x8052
-#define GL_BGRA8_EXT                                            0x93A1
-#endif
-
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
-#endif
-
-/* GL_EXT_unpack_subimage */
-#ifndef GL_EXT_unpack_subimage
-#define GL_UNPACK_ROW_LENGTH                                    0x0CF2
-#define GL_UNPACK_SKIP_ROWS                                     0x0CF3
-#define GL_UNPACK_SKIP_PIXELS                                   0x0CF4
-#endif
-
-/*------------------------------------------------------------------------*
- * DMP extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_SHADER_BINARY_DMP                                    0x9250
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_BGRA_IMG                                             0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_SGX_BINARY_IMG                                       0x8C0A
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
-#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
-#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
-#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
-#ifndef GL_IMG_multisampled_render_to_texture
-#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134
-#define GL_MAX_SAMPLES_IMG                                      0x9135
-#define GL_TEXTURE_SAMPLES_IMG                                  0x9136
-#endif
-
-/*------------------------------------------------------------------------*
- * NV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_COVERAGE_COMPONENT_NV                                0x8ED0
-#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
-#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
-#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
-#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
-#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
-#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
-#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
-#define GL_COVERAGE_BUFFER_BIT_NV                               0x8000
-#endif
-
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
-#endif
-
-/* GL_NV_draw_buffers */
-#ifndef GL_NV_draw_buffers
-#define GL_MAX_DRAW_BUFFERS_NV                                  0x8824
-#define GL_DRAW_BUFFER0_NV                                      0x8825
-#define GL_DRAW_BUFFER1_NV                                      0x8826
-#define GL_DRAW_BUFFER2_NV                                      0x8827
-#define GL_DRAW_BUFFER3_NV                                      0x8828
-#define GL_DRAW_BUFFER4_NV                                      0x8829
-#define GL_DRAW_BUFFER5_NV                                      0x882A
-#define GL_DRAW_BUFFER6_NV                                      0x882B
-#define GL_DRAW_BUFFER7_NV                                      0x882C
-#define GL_DRAW_BUFFER8_NV                                      0x882D
-#define GL_DRAW_BUFFER9_NV                                      0x882E
-#define GL_DRAW_BUFFER10_NV                                     0x882F
-#define GL_DRAW_BUFFER11_NV                                     0x8830
-#define GL_DRAW_BUFFER12_NV                                     0x8831
-#define GL_DRAW_BUFFER13_NV                                     0x8832
-#define GL_DRAW_BUFFER14_NV                                     0x8833
-#define GL_DRAW_BUFFER15_NV                                     0x8834
-#define GL_COLOR_ATTACHMENT0_NV                                 0x8CE0
-#define GL_COLOR_ATTACHMENT1_NV                                 0x8CE1
-#define GL_COLOR_ATTACHMENT2_NV                                 0x8CE2
-#define GL_COLOR_ATTACHMENT3_NV                                 0x8CE3
-#define GL_COLOR_ATTACHMENT4_NV                                 0x8CE4
-#define GL_COLOR_ATTACHMENT5_NV                                 0x8CE5
-#define GL_COLOR_ATTACHMENT6_NV                                 0x8CE6
-#define GL_COLOR_ATTACHMENT7_NV                                 0x8CE7
-#define GL_COLOR_ATTACHMENT8_NV                                 0x8CE8
-#define GL_COLOR_ATTACHMENT9_NV                                 0x8CE9
-#define GL_COLOR_ATTACHMENT10_NV                                0x8CEA
-#define GL_COLOR_ATTACHMENT11_NV                                0x8CEB
-#define GL_COLOR_ATTACHMENT12_NV                                0x8CEC
-#define GL_COLOR_ATTACHMENT13_NV                                0x8CED
-#define GL_COLOR_ATTACHMENT14_NV                                0x8CEE
-#define GL_COLOR_ATTACHMENT15_NV                                0x8CEF
-#endif
-
-/* GL_NV_fbo_color_attachments */
-#ifndef GL_NV_fbo_color_attachments
-#define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF
-/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
-#endif
-
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV                                     0x84F2
-#define GL_FENCE_STATUS_NV                                      0x84F3
-#define GL_FENCE_CONDITION_NV                                   0x84F4
-#endif
-
-/* GL_NV_read_buffer */
-#ifndef GL_NV_read_buffer
-#define GL_READ_BUFFER_NV                                       0x0C02
-#endif
-
-/* GL_NV_read_buffer_front */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_depth_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_read_stencil */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_compression_s3tc_update */
-/* No new tokens introduced by this extension. */
-
-/* GL_NV_texture_npot_2D_mipmap */
-/* No new tokens introduced by this extension. */
-
-/*------------------------------------------------------------------------*
- * QCOM extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
-#ifndef GL_QCOM_alpha_test
-#define GL_ALPHA_TEST_QCOM                                      0x0BC0
-#define GL_ALPHA_TEST_FUNC_QCOM                                 0x0BC1
-#define GL_ALPHA_TEST_REF_QCOM                                  0x0BC2
-#endif
-
-/* GL_QCOM_driver_control */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_extended_get */
-#ifndef GL_QCOM_extended_get
-#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
-#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
-#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
-#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
-#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
-#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
-#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
-#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
-#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
-#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
-#define GL_STATE_RESTORE                                        0x8BDC
-#endif
-
-/* GL_QCOM_extended_get2 */
-/* No new tokens introduced by this extension. */
-
-/* GL_QCOM_perfmon_global_mode */
-#ifndef GL_QCOM_perfmon_global_mode
-#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
-#endif
-
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
-#endif
-
-/* GL_QCOM_tiled_rendering */
-#ifndef GL_QCOM_tiled_rendering
-#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
-#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
-#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
-#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
-#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
-#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
-#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
-#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
-#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
-#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
-#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
-#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
-#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
-#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
-#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
-#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
-#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
-#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
-#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
-#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
-#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
-#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
-#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
-#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
-#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
-#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
-#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
-#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
-#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
-#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
-#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
-#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
-#endif
-
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
-
-/* GL_VIV_shader_binary */
-#ifndef GL_VIV_shader_binary
-#define GL_SHADER_BINARY_VIV                                    0x8FC4
-#endif
-
-/*------------------------------------------------------------------------*
- * End of extension tokens, start of corresponding extension functions
- *------------------------------------------------------------------------*/
-
-/*------------------------------------------------------------------------*
- * OES extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_OES_compressed_ETC1_RGB8_texture */
-#ifndef GL_OES_compressed_ETC1_RGB8_texture
-#define GL_OES_compressed_ETC1_RGB8_texture 1
-#endif
-
-/* GL_OES_compressed_paletted_texture */
-#ifndef GL_OES_compressed_paletted_texture
-#define GL_OES_compressed_paletted_texture 1
-#endif
-
-/* GL_OES_depth24 */
-#ifndef GL_OES_depth24
-#define GL_OES_depth24 1
-#endif
-
-/* GL_OES_depth32 */
-#ifndef GL_OES_depth32
-#define GL_OES_depth32 1
-#endif
-
-/* GL_OES_depth_texture */
-#ifndef GL_OES_depth_texture
-#define GL_OES_depth_texture 1
-#endif
+#ifndef GL_KHR_texture_compression_astc_ldr
+#define GL_KHR_texture_compression_astc_ldr 1
+#endif /* GL_KHR_texture_compression_astc_ldr */
 
-/* GL_OES_EGL_image */
 #ifndef GL_OES_EGL_image
 #define GL_OES_EGL_image 1
+typedef void *GLeglImageOES;
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
 #endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
+#endif /* GL_OES_EGL_image */
 
-/* GL_OES_EGL_image_external */
 #ifndef GL_OES_EGL_image_external
 #define GL_OES_EGL_image_external 1
-/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
-#endif
+#define GL_TEXTURE_EXTERNAL_OES           0x8D65
+#define GL_TEXTURE_BINDING_EXTERNAL_OES   0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#define GL_SAMPLER_EXTERNAL_OES           0x8D66
+#endif /* GL_OES_EGL_image_external */
 
-/* GL_OES_element_index_uint */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#define GL_ETC1_RGB8_OES                  0x8D64
+#endif /* GL_OES_compressed_ETC1_RGB8_texture */
+
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#define GL_PALETTE4_RGB8_OES              0x8B90
+#define GL_PALETTE4_RGBA8_OES             0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES          0x8B92
+#define GL_PALETTE4_RGBA4_OES             0x8B93
+#define GL_PALETTE4_RGB5_A1_OES           0x8B94
+#define GL_PALETTE8_RGB8_OES              0x8B95
+#define GL_PALETTE8_RGBA8_OES             0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES          0x8B97
+#define GL_PALETTE8_RGBA4_OES             0x8B98
+#define GL_PALETTE8_RGB5_A1_OES           0x8B99
+#endif /* GL_OES_compressed_paletted_texture */
+
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#define GL_DEPTH_COMPONENT24_OES          0x81A6
+#endif /* GL_OES_depth24 */
+
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#define GL_DEPTH_COMPONENT32_OES          0x81A7
+#endif /* GL_OES_depth32 */
+
+#ifndef GL_OES_depth_texture
+#define GL_OES_depth_texture 1
+#endif /* GL_OES_depth_texture */
+
 #ifndef GL_OES_element_index_uint
 #define GL_OES_element_index_uint 1
-#endif
+#endif /* GL_OES_element_index_uint */
 
-/* GL_OES_fbo_render_mipmap */
 #ifndef GL_OES_fbo_render_mipmap
 #define GL_OES_fbo_render_mipmap 1
-#endif
+#endif /* GL_OES_fbo_render_mipmap */
 
-/* GL_OES_fragment_precision_high */
 #ifndef GL_OES_fragment_precision_high
 #define GL_OES_fragment_precision_high 1
-#endif
+#endif /* GL_OES_fragment_precision_high */
 
-/* GL_OES_get_program_binary */
 #ifndef GL_OES_get_program_binary
 #define GL_OES_get_program_binary 1
+#define GL_PROGRAM_BINARY_LENGTH_OES      0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
+#define GL_PROGRAM_BINARY_FORMATS_OES     0x87FF
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
 #ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
 #endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-#endif
+#endif /* GL_OES_get_program_binary */
 
-/* GL_OES_mapbuffer */
 #ifndef GL_OES_mapbuffer
 #define GL_OES_mapbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
-GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
-#endif
-typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+#define GL_WRITE_ONLY_OES                 0x88B9
+#define GL_BUFFER_ACCESS_OES              0x88BB
+#define GL_BUFFER_MAPPED_OES              0x88BC
+#define GL_BUFFER_MAP_POINTER_OES         0x88BD
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);
 #endif
+#endif /* GL_OES_mapbuffer */
 
-/* GL_OES_packed_depth_stencil */
 #ifndef GL_OES_packed_depth_stencil
 #define GL_OES_packed_depth_stencil 1
-#endif
+#define GL_DEPTH_STENCIL_OES              0x84F9
+#define GL_UNSIGNED_INT_24_8_OES          0x84FA
+#define GL_DEPTH24_STENCIL8_OES           0x88F0
+#endif /* GL_OES_packed_depth_stencil */
 
-/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_required_internalformat
+#define GL_OES_required_internalformat 1
+#define GL_ALPHA8_OES                     0x803C
+#define GL_DEPTH_COMPONENT16_OES          0x81A5
+#define GL_LUMINANCE4_ALPHA4_OES          0x8043
+#define GL_LUMINANCE8_ALPHA8_OES          0x8045
+#define GL_LUMINANCE8_OES                 0x8040
+#define GL_RGBA4_OES                      0x8056
+#define GL_RGB5_A1_OES                    0x8057
+#define GL_RGB565_OES                     0x8D62
+#define GL_RGB8_OES                       0x8051
+#define GL_RGBA8_OES                      0x8058
+#define GL_RGB10_EXT                      0x8052
+#define GL_RGB10_A2_EXT                   0x8059
+#endif /* GL_OES_required_internalformat */
+
 #ifndef GL_OES_rgb8_rgba8
 #define GL_OES_rgb8_rgba8 1
-#endif
+#endif /* GL_OES_rgb8_rgba8 */
 
-/* GL_OES_standard_derivatives */
+#ifndef GL_OES_sample_shading
+#define GL_OES_sample_shading 1
+#define GL_SAMPLE_SHADING_OES             0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE_OES   0x8C37
+typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value);
+#endif
+#endif /* GL_OES_sample_shading */
+
+#ifndef GL_OES_sample_variables
+#define GL_OES_sample_variables 1
+#endif /* GL_OES_sample_variables */
+
+#ifndef GL_OES_shader_image_atomic
+#define GL_OES_shader_image_atomic 1
+#endif /* GL_OES_shader_image_atomic */
+
+#ifndef GL_OES_shader_multisample_interpolation
+#define GL_OES_shader_multisample_interpolation 1
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C
+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D
+#endif /* GL_OES_shader_multisample_interpolation */
+
 #ifndef GL_OES_standard_derivatives
 #define GL_OES_standard_derivatives 1
-#endif
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
+#endif /* GL_OES_standard_derivatives */
 
-/* GL_OES_stencil1 */
 #ifndef GL_OES_stencil1
 #define GL_OES_stencil1 1
-#endif
+#define GL_STENCIL_INDEX1_OES             0x8D46
+#endif /* GL_OES_stencil1 */
 
-/* GL_OES_stencil4 */
 #ifndef GL_OES_stencil4
 #define GL_OES_stencil4 1
-#endif
+#define GL_STENCIL_INDEX4_OES             0x8D47
+#endif /* GL_OES_stencil4 */
 
-/* GL_OES_texture_3D */
+#ifndef GL_OES_surfaceless_context
+#define GL_OES_surfaceless_context 1
+#define GL_FRAMEBUFFER_UNDEFINED_OES      0x8219
+#endif /* GL_OES_surfaceless_context */
+
 #ifndef GL_OES_texture_3D
 #define GL_OES_texture_3D 1
+#define GL_TEXTURE_WRAP_R_OES             0x8072
+#define GL_TEXTURE_3D_OES                 0x806F
+#define GL_TEXTURE_BINDING_3D_OES         0x806A
+#define GL_MAX_3D_TEXTURE_SIZE_OES        0x8073
+#define GL_SAMPLER_3D_OES                 0x8B5F
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
 #ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
 #endif
-typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (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 (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (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 (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
-#endif
+#endif /* GL_OES_texture_3D */
 
-/* GL_OES_texture_float */
+#ifndef GL_OES_texture_compression_astc
+#define GL_OES_texture_compression_astc 1
+#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0
+#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1
+#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2
+#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3
+#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4
+#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5
+#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6
+#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7
+#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8
+#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9
+#endif /* GL_OES_texture_compression_astc */
+
 #ifndef GL_OES_texture_float
 #define GL_OES_texture_float 1
-#endif
+#endif /* GL_OES_texture_float */
 
-/* GL_OES_texture_float_linear */
 #ifndef GL_OES_texture_float_linear
 #define GL_OES_texture_float_linear 1
-#endif
+#endif /* GL_OES_texture_float_linear */
 
-/* GL_OES_texture_half_float */
 #ifndef GL_OES_texture_half_float
 #define GL_OES_texture_half_float 1
-#endif
+#define GL_HALF_FLOAT_OES                 0x8D61
+#endif /* GL_OES_texture_half_float */
 
-/* GL_OES_texture_half_float_linear */
 #ifndef GL_OES_texture_half_float_linear
 #define GL_OES_texture_half_float_linear 1
-#endif
+#endif /* GL_OES_texture_half_float_linear */
 
-/* GL_OES_texture_npot */
 #ifndef GL_OES_texture_npot
 #define GL_OES_texture_npot 1
-#endif
+#endif /* GL_OES_texture_npot */
 
-/* GL_OES_vertex_array_object */
+#ifndef GL_OES_texture_stencil8
+#define GL_OES_texture_stencil8 1
+#define GL_STENCIL_INDEX_OES              0x1901
+#define GL_STENCIL_INDEX8_OES             0x8D48
+#endif /* GL_OES_texture_stencil8 */
+
+#ifndef GL_OES_texture_storage_multisample_2d_array
+#define GL_OES_texture_storage_multisample_2d_array 1
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+#endif
+#endif /* GL_OES_texture_storage_multisample_2d_array */
+
 #ifndef GL_OES_vertex_array_object
 #define GL_OES_vertex_array_object 1
+#define GL_VERTEX_ARRAY_BINDING_OES       0x85B5
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
 GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
 GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
 GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
 #endif
-typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
-typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
-typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
-typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
-#endif
+#endif /* GL_OES_vertex_array_object */
 
-/* GL_OES_vertex_half_float */
 #ifndef GL_OES_vertex_half_float
 #define GL_OES_vertex_half_float 1
-#endif
+#endif /* GL_OES_vertex_half_float */
 
-/* GL_OES_vertex_type_10_10_10_2 */
 #ifndef GL_OES_vertex_type_10_10_10_2
 #define GL_OES_vertex_type_10_10_10_2 1
-#endif
+#define GL_UNSIGNED_INT_10_10_10_2_OES    0x8DF6
+#define GL_INT_10_10_10_2_OES             0x8DF7
+#endif /* GL_OES_vertex_type_10_10_10_2 */
 
-/*------------------------------------------------------------------------*
- * AMD extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_AMD_compressed_3DC_texture */
 #ifndef GL_AMD_compressed_3DC_texture
 #define GL_AMD_compressed_3DC_texture 1
-#endif
+#define GL_3DC_X_AMD                      0x87F9
+#define GL_3DC_XY_AMD                     0x87FA
+#endif /* GL_AMD_compressed_3DC_texture */
 
-/* GL_AMD_compressed_ATC_texture */
 #ifndef GL_AMD_compressed_ATC_texture
 #define GL_AMD_compressed_ATC_texture 1
-#endif
+#define GL_ATC_RGB_AMD                    0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD    0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif /* GL_AMD_compressed_ATC_texture */
 
-/* AMD_performance_monitor */
 #ifndef GL_AMD_performance_monitor
 #define GL_AMD_performance_monitor 1
+#define GL_COUNTER_TYPE_AMD               0x8BC0
+#define GL_COUNTER_RANGE_AMD              0x8BC1
+#define GL_UNSIGNED_INT64_AMD             0x8BC2
+#define GL_PERCENTAGE_AMD                 0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5
+#define GL_PERFMON_RESULT_AMD             0x8BC6
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
+typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
+typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
-GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
 GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
 GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
 #endif
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
-typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
-typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
-#endif
+#endif /* GL_AMD_performance_monitor */
 
-/* GL_AMD_program_binary_Z400 */
 #ifndef GL_AMD_program_binary_Z400
 #define GL_AMD_program_binary_Z400 1
-#endif
+#define GL_Z400_BINARY_AMD                0x8740
+#endif /* GL_AMD_program_binary_Z400 */
 
-/*------------------------------------------------------------------------*
- * ANGLE extension functions
- *------------------------------------------------------------------------*/
+#ifndef GL_ANGLE_depth_texture
+#define GL_ANGLE_depth_texture 1
+#endif /* GL_ANGLE_depth_texture */
 
-/* GL_ANGLE_framebuffer_blit */
 #ifndef GL_ANGLE_framebuffer_blit
 #define GL_ANGLE_framebuffer_blit 1
+#define GL_READ_FRAMEBUFFER_ANGLE         0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE         0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
 #endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-#endif
+#endif /* GL_ANGLE_framebuffer_blit */
 
-/* GL_ANGLE_framebuffer_multisample */
 #ifndef GL_ANGLE_framebuffer_multisample
 #define GL_ANGLE_framebuffer_multisample 1
+#define GL_RENDERBUFFER_SAMPLES_ANGLE     0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
+#define GL_MAX_SAMPLES_ANGLE              0x8D57
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 #endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif /* GL_ANGLE_framebuffer_multisample */
+
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_ANGLE_instanced_arrays 1
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);
 #endif
+#endif /* GL_ANGLE_instanced_arrays */
 
-/*------------------------------------------------------------------------*
- * APPLE extension functions
- *------------------------------------------------------------------------*/
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_ANGLE_pack_reverse_row_order 1
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE   0x93A4
+#endif /* GL_ANGLE_pack_reverse_row_order */
 
-/* GL_APPLE_rgb_422 */
-#ifndef GL_APPLE_rgb_422
-#define GL_APPLE_rgb_422 1
+#ifndef GL_ANGLE_program_binary
+#define GL_ANGLE_program_binary 1
+#define GL_PROGRAM_BINARY_ANGLE           0x93A6
+#endif /* GL_ANGLE_program_binary */
+
+#ifndef GL_ANGLE_texture_compression_dxt3
+#define GL_ANGLE_texture_compression_dxt3 1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
+#endif /* GL_ANGLE_texture_compression_dxt3 */
+
+#ifndef GL_ANGLE_texture_compression_dxt5
+#define GL_ANGLE_texture_compression_dxt5 1
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
+#endif /* GL_ANGLE_texture_compression_dxt5 */
+
+#ifndef GL_ANGLE_texture_usage
+#define GL_ANGLE_texture_usage 1
+#define GL_TEXTURE_USAGE_ANGLE            0x93A2
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE   0x93A3
+#endif /* GL_ANGLE_texture_usage */
+
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_ANGLE_translated_shader_source 1
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
+typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);
 #endif
+#endif /* GL_ANGLE_translated_shader_source */
 
-/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_copy_texture_levels
+#define GL_APPLE_copy_texture_levels 1
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
+#endif
+#endif /* GL_APPLE_copy_texture_levels */
+
 #ifndef GL_APPLE_framebuffer_multisample
 #define GL_APPLE_framebuffer_multisample 1
+#define GL_RENDERBUFFER_SAMPLES_APPLE     0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
+#define GL_MAX_SAMPLES_APPLE              0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE         0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE         0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
 #endif
+#endif /* GL_APPLE_framebuffer_multisample */
 
-/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#define GL_RGB_422_APPLE                  0x8A1F
+#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB
+#define GL_RGB_RAW_422_APPLE              0x8A51
+#endif /* GL_APPLE_rgb_422 */
+
+#ifndef GL_APPLE_sync
+#define GL_APPLE_sync 1
+#define GL_SYNC_OBJECT_APPLE              0x8A53
+#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE  0x9111
+#define GL_OBJECT_TYPE_APPLE              0x9112
+#define GL_SYNC_CONDITION_APPLE           0x9113
+#define GL_SYNC_STATUS_APPLE              0x9114
+#define GL_SYNC_FLAGS_APPLE               0x9115
+#define GL_SYNC_FENCE_APPLE               0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117
+#define GL_UNSIGNALED_APPLE               0x9118
+#define GL_SIGNALED_APPLE                 0x9119
+#define GL_ALREADY_SIGNALED_APPLE         0x911A
+#define GL_TIMEOUT_EXPIRED_APPLE          0x911B
+#define GL_CONDITION_SATISFIED_APPLE      0x911C
+#define GL_WAIT_FAILED_APPLE              0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE  0x00000001
+#define GL_TIMEOUT_IGNORED_APPLE          0xFFFFFFFFFFFFFFFFull
+typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
+typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);
+typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);
+typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);
+GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);
+GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);
+GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+#endif /* GL_APPLE_sync */
+
 #ifndef GL_APPLE_texture_format_BGRA8888
 #define GL_APPLE_texture_format_BGRA8888 1
-#endif
+#define GL_BGRA_EXT                       0x80E1
+#define GL_BGRA8_EXT                      0x93A1
+#endif /* GL_APPLE_texture_format_BGRA8888 */
 
-/* GL_APPLE_texture_max_level */
 #ifndef GL_APPLE_texture_max_level
 #define GL_APPLE_texture_max_level 1
-#endif
+#define GL_TEXTURE_MAX_LEVEL_APPLE        0x813D
+#endif /* GL_APPLE_texture_max_level */
 
-/*------------------------------------------------------------------------*
- * ARM extension functions
- *------------------------------------------------------------------------*/
+#ifndef GL_ARM_mali_program_binary
+#define GL_ARM_mali_program_binary 1
+#define GL_MALI_PROGRAM_BINARY_ARM        0x8F61
+#endif /* GL_ARM_mali_program_binary */
 
-/* GL_ARM_mali_shader_binary */
 #ifndef GL_ARM_mali_shader_binary
 #define GL_ARM_mali_shader_binary 1
-#endif
+#define GL_MALI_SHADER_BINARY_ARM         0x8F60
+#endif /* GL_ARM_mali_shader_binary */
 
-/* GL_ARM_rgba8 */
 #ifndef GL_ARM_rgba8
 #define GL_ARM_rgba8 1
-#endif
+#endif /* GL_ARM_rgba8 */
 
-/*------------------------------------------------------------------------*
- * EXT extension functions
- *------------------------------------------------------------------------*/
+#ifndef GL_ARM_shader_framebuffer_fetch
+#define GL_ARM_shader_framebuffer_fetch 1
+#define GL_FETCH_PER_SAMPLE_ARM           0x8F65
+#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66
+#endif /* GL_ARM_shader_framebuffer_fetch */
 
-/* GL_EXT_blend_minmax */
+#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil
+#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1
+#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */
+
+#ifndef GL_DMP_shader_binary
+#define GL_DMP_shader_binary 1
+#define GL_SHADER_BINARY_DMP              0x9250
+#endif /* GL_DMP_shader_binary */
+
 #ifndef GL_EXT_blend_minmax
 #define GL_EXT_blend_minmax 1
-#endif
+#define GL_MIN_EXT                        0x8007
+#define GL_MAX_EXT                        0x8008
+#endif /* GL_EXT_blend_minmax */
 
-/* GL_EXT_color_buffer_half_float */
 #ifndef GL_EXT_color_buffer_half_float
 #define GL_EXT_color_buffer_half_float 1
-#endif
+#define GL_RGBA16F_EXT                    0x881A
+#define GL_RGB16F_EXT                     0x881B
+#define GL_RG16F_EXT                      0x822F
+#define GL_R16F_EXT                       0x822D
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
+#define GL_UNSIGNED_NORMALIZED_EXT        0x8C17
+#endif /* GL_EXT_color_buffer_half_float */
 
-/* GL_EXT_debug_label */
+#ifndef GL_EXT_copy_image
+#define GL_EXT_copy_image 1
+typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+#endif
+#endif /* GL_EXT_copy_image */
+
 #ifndef GL_EXT_debug_label
 #define GL_EXT_debug_label 1
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT    0x8A4F
+#define GL_PROGRAM_OBJECT_EXT             0x8B40
+#define GL_SHADER_OBJECT_EXT              0x8B48
+#define GL_BUFFER_OBJECT_EXT              0x9151
+#define GL_QUERY_OBJECT_EXT               0x9153
+#define GL_VERTEX_ARRAY_OBJECT_EXT        0x9154
+#define GL_TRANSFORM_FEEDBACK             0x8E22
+typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
 GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
 #endif
-typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
-typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-#endif
+#endif /* GL_EXT_debug_label */
 
-/* GL_EXT_debug_marker */
 #ifndef GL_EXT_debug_marker
 #define GL_EXT_debug_marker 1
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
 GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
 GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
 #endif
-typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
-typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
-#endif
+#endif /* GL_EXT_debug_marker */
 
-/* GL_EXT_discard_framebuffer */
 #ifndef GL_EXT_discard_framebuffer
 #define GL_EXT_discard_framebuffer 1
+#define GL_COLOR_EXT                      0x1800
+#define GL_DEPTH_EXT                      0x1801
+#define GL_STENCIL_EXT                    0x1802
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
 #endif
-typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
-#endif
+#endif /* GL_EXT_discard_framebuffer */
 
-/* GL_EXT_multisampled_render_to_texture */
-#ifndef GL_EXT_multisampled_render_to_texture
-#define GL_EXT_multisampled_render_to_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-/* GL_EXT_occlusion_query_boolean */
-#ifndef GL_EXT_occlusion_query_boolean
-#define GL_EXT_occlusion_query_boolean 1
+#ifndef GL_EXT_disjoint_timer_query
+#define GL_EXT_disjoint_timer_query 1
+#define GL_QUERY_COUNTER_BITS_EXT         0x8864
+#define GL_CURRENT_QUERY_EXT              0x8865
+#define GL_QUERY_RESULT_EXT               0x8866
+#define GL_QUERY_RESULT_AVAILABLE_EXT     0x8867
+#define GL_TIME_ELAPSED_EXT               0x88BF
+#define GL_TIMESTAMP_EXT                  0x8E28
+#define GL_GPU_DISJOINT_EXT               0x8FBB
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
 GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
 GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
+GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);
 GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);
 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);
 #endif
-typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
-typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
-typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
-typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
-#endif
+#endif /* GL_EXT_disjoint_timer_query */
 
-/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_draw_buffers
+#define GL_EXT_draw_buffers 1
+#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF
+#define GL_MAX_DRAW_BUFFERS_EXT           0x8824
+#define GL_DRAW_BUFFER0_EXT               0x8825
+#define GL_DRAW_BUFFER1_EXT               0x8826
+#define GL_DRAW_BUFFER2_EXT               0x8827
+#define GL_DRAW_BUFFER3_EXT               0x8828
+#define GL_DRAW_BUFFER4_EXT               0x8829
+#define GL_DRAW_BUFFER5_EXT               0x882A
+#define GL_DRAW_BUFFER6_EXT               0x882B
+#define GL_DRAW_BUFFER7_EXT               0x882C
+#define GL_DRAW_BUFFER8_EXT               0x882D
+#define GL_DRAW_BUFFER9_EXT               0x882E
+#define GL_DRAW_BUFFER10_EXT              0x882F
+#define GL_DRAW_BUFFER11_EXT              0x8830
+#define GL_DRAW_BUFFER12_EXT              0x8831
+#define GL_DRAW_BUFFER13_EXT              0x8832
+#define GL_DRAW_BUFFER14_EXT              0x8833
+#define GL_DRAW_BUFFER15_EXT              0x8834
+#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
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
+#endif
+#endif /* GL_EXT_draw_buffers */
+
+#ifndef GL_EXT_draw_buffers_indexed
+#define GL_EXT_draw_buffers_indexed 1
+#define GL_MIN                            0x8007
+#define GL_MAX                            0x8008
+typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index);
+typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index);
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index);
+GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index);
+GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode);
+GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index);
+#endif
+#endif /* GL_EXT_draw_buffers_indexed */
+
+#ifndef GL_EXT_draw_instanced
+#define GL_EXT_draw_instanced 1
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+#endif
+#endif /* GL_EXT_draw_instanced */
+
+#ifndef GL_EXT_geometry_shader
+#define GL_EXT_geometry_shader 1
+#define GL_GEOMETRY_SHADER_EXT            0x8DD9
+#define GL_GEOMETRY_SHADER_BIT_EXT        0x00000004
+#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916
+#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917
+#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918
+#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F
+#define GL_LAYER_PROVOKING_VERTEX_EXT     0x825E
+#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_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD
+#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7
+#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D
+#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E
+#define GL_UNDEFINED_VERTEX_EXT           0x8260
+#define GL_PRIMITIVES_GENERATED_EXT       0x8C87
+#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312
+#define GL_MAX_FRAMEBUFFER_LAYERS_EXT     0x9317
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7
+#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);
+#endif
+#endif /* GL_EXT_geometry_shader */
+
+#ifndef GL_EXT_gpu_shader5
+#define GL_EXT_gpu_shader5 1
+#endif /* GL_EXT_gpu_shader5 */
+
+#ifndef GL_EXT_instanced_arrays
+#define GL_EXT_instanced_arrays 1
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor);
+#endif
+#endif /* GL_EXT_instanced_arrays */
+
+#ifndef GL_EXT_map_buffer_range
+#define GL_EXT_map_buffer_range 1
+#define GL_MAP_READ_BIT_EXT               0x0001
+#define GL_MAP_WRITE_BIT_EXT              0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT_EXT   0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT  0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT     0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT_EXT     0x0020
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+#endif /* GL_EXT_map_buffer_range */
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
+#endif
+#endif /* GL_EXT_multi_draw_arrays */
+
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_EXT_multisampled_render_to_texture 1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
+#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
+#define GL_MAX_SAMPLES_EXT                0x8D57
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+#endif /* GL_EXT_multisampled_render_to_texture */
+
+#ifndef GL_EXT_multiview_draw_buffers
+#define GL_EXT_multiview_draw_buffers 1
+#define GL_COLOR_ATTACHMENT_EXT           0x90F0
+#define GL_MULTIVIEW_EXT                  0x90F1
+#define GL_DRAW_BUFFER_EXT                0x0C01
+#define GL_READ_BUFFER_EXT                0x0C02
+#define GL_MAX_MULTIVIEW_BUFFERS_EXT      0x90F2
+typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);
+typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);
+GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);
+GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);
+#endif
+#endif /* GL_EXT_multiview_draw_buffers */
+
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_EXT_occlusion_query_boolean 1
+#define GL_ANY_SAMPLES_PASSED_EXT         0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
+#endif /* GL_EXT_occlusion_query_boolean */
+
+#ifndef GL_EXT_primitive_bounding_box
+#define GL_EXT_primitive_bounding_box 1
+#define GL_PRIMITIVE_BOUNDING_BOX_EXT     0x92BE
+typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
+#endif
+#endif /* GL_EXT_primitive_bounding_box */
+
+#ifndef GL_EXT_pvrtc_sRGB
+#define GL_EXT_pvrtc_sRGB 1
+#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
+#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1
+#endif /* GL_EXT_pvrtc_sRGB */
+
 #ifndef GL_EXT_read_format_bgra
 #define GL_EXT_read_format_bgra 1
-#endif
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
+#endif /* GL_EXT_read_format_bgra */
 
-/* GL_EXT_robustness */
 #ifndef GL_EXT_robustness
 #define GL_EXT_robustness 1
+#define GL_GUILTY_CONTEXT_RESET_EXT       0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT     0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT      0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT      0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT      0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT      0x8261
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
 GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
 GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
 #endif
-typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
-typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
-typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
-#endif
+#endif /* GL_EXT_robustness */
 
-/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_sRGB
+#define GL_EXT_sRGB 1
+#define GL_SRGB_EXT                       0x8C40
+#define GL_SRGB_ALPHA_EXT                 0x8C42
+#define GL_SRGB8_ALPHA8_EXT               0x8C43
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
+#endif /* GL_EXT_sRGB */
+
+#ifndef GL_EXT_sRGB_write_control
+#define GL_EXT_sRGB_write_control 1
+#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9
+#endif /* GL_EXT_sRGB_write_control */
+
 #ifndef GL_EXT_separate_shader_objects
 #define GL_EXT_separate_shader_objects 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
-GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
-GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
-GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
-GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
-GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
-GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
-GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
-GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
-GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
-GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
-GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
-GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
-#endif
-typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+#define GL_ACTIVE_PROGRAM_EXT             0x8259
+#define GL_VERTEX_SHADER_BIT_EXT          0x00000001
+#define GL_FRAGMENT_SHADER_BIT_EXT        0x00000002
+#define GL_ALL_SHADER_BITS_EXT            0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE_EXT          0x8258
+#define GL_PROGRAM_PIPELINE_BINDING_EXT   0x825A
 typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
-typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
 typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
 typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
 typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
 typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
 typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
-typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
 typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
 typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
+GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);
+GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);
+GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
 #endif
+#endif /* GL_EXT_separate_shader_objects */
 
-/* GL_EXT_shader_texture_lod */
+#ifndef GL_EXT_shader_framebuffer_fetch
+#define GL_EXT_shader_framebuffer_fetch 1
+#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52
+#endif /* GL_EXT_shader_framebuffer_fetch */
+
+#ifndef GL_EXT_shader_implicit_conversions
+#define GL_EXT_shader_implicit_conversions 1
+#endif /* GL_EXT_shader_implicit_conversions */
+
+#ifndef GL_EXT_shader_integer_mix
+#define GL_EXT_shader_integer_mix 1
+#endif /* GL_EXT_shader_integer_mix */
+
+#ifndef GL_EXT_shader_io_blocks
+#define GL_EXT_shader_io_blocks 1
+#endif /* GL_EXT_shader_io_blocks */
+
+#ifndef GL_EXT_shader_pixel_local_storage
+#define GL_EXT_shader_pixel_local_storage 1
+#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63
+#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67
+#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64
+#endif /* GL_EXT_shader_pixel_local_storage */
+
 #ifndef GL_EXT_shader_texture_lod
 #define GL_EXT_shader_texture_lod 1
-#endif
+#endif /* GL_EXT_shader_texture_lod */
 
-/* GL_EXT_shadow_samplers */
 #ifndef GL_EXT_shadow_samplers
 #define GL_EXT_shadow_samplers 1
-#endif
+#define GL_TEXTURE_COMPARE_MODE_EXT       0x884C
+#define GL_TEXTURE_COMPARE_FUNC_EXT       0x884D
+#define GL_COMPARE_REF_TO_TEXTURE_EXT     0x884E
+#define GL_SAMPLER_2D_SHADOW_EXT          0x8B62
+#endif /* GL_EXT_shadow_samplers */
 
-/* GL_EXT_sRGB */
-#ifndef GL_EXT_sRGB
-#define GL_EXT_sRGB 1
+#ifndef GL_EXT_tessellation_shader
+#define GL_EXT_tessellation_shader 1
+#define GL_PATCHES_EXT                    0x000E
+#define GL_PATCH_VERTICES_EXT             0x8E72
+#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75
+#define GL_TESS_GEN_MODE_EXT              0x8E76
+#define GL_TESS_GEN_SPACING_EXT           0x8E77
+#define GL_TESS_GEN_VERTEX_ORDER_EXT      0x8E78
+#define GL_TESS_GEN_POINT_MODE_EXT        0x8E79
+#define GL_ISOLINES_EXT                   0x8E7A
+#define GL_QUADS_EXT                      0x0007
+#define GL_FRACTIONAL_ODD_EXT             0x8E7B
+#define GL_FRACTIONAL_EVEN_EXT            0x8E7C
+#define GL_MAX_PATCH_VERTICES_EXT         0x8E7D
+#define GL_MAX_TESS_GEN_LEVEL_EXT         0x8E7E
+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F
+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80
+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81
+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82
+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83
+#define GL_MAX_TESS_PATCH_COMPONENTS_EXT  0x8E84
+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85
+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86
+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89
+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A
+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C
+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D
+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E
+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4
+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB
+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC
+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8
+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9
+#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221
+#define GL_IS_PER_PATCH_EXT               0x92E7
+#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307
+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308
+#define GL_TESS_CONTROL_SHADER_EXT        0x8E88
+#define GL_TESS_EVALUATION_SHADER_EXT     0x8E87
+#define GL_TESS_CONTROL_SHADER_BIT_EXT    0x00000008
+#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010
+typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value);
 #endif
+#endif /* GL_EXT_tessellation_shader */
 
-/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_border_clamp
+#define GL_EXT_texture_border_clamp 1
+#define GL_TEXTURE_BORDER_COLOR_EXT       0x1004
+#define GL_CLAMP_TO_BORDER_EXT            0x812D
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
+GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);
+GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param);
+GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params);
+#endif
+#endif /* GL_EXT_texture_border_clamp */
+
+#ifndef GL_EXT_texture_buffer
+#define GL_EXT_texture_buffer 1
+#define GL_TEXTURE_BUFFER_EXT             0x8C2A
+#define GL_TEXTURE_BUFFER_BINDING_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_OFFSET_ALIGNMENT_EXT 0x919F
+#define GL_SAMPLER_BUFFER_EXT             0x8DC2
+#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8
+#define GL_IMAGE_BUFFER_EXT               0x9051
+#define GL_INT_IMAGE_BUFFER_EXT           0x905C
+#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067
+#define GL_TEXTURE_BUFFER_OFFSET_EXT      0x919D
+#define GL_TEXTURE_BUFFER_SIZE_EXT        0x919E
+typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);
+GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+#endif
+#endif /* GL_EXT_texture_buffer */
+
 #ifndef GL_EXT_texture_compression_dxt1
 #define GL_EXT_texture_compression_dxt1 1
-#endif
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1
+#endif /* GL_EXT_texture_compression_dxt1 */
 
-/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_compression_s3tc
+#define GL_EXT_texture_compression_s3tc 1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3
+#endif /* GL_EXT_texture_compression_s3tc */
+
+#ifndef GL_EXT_texture_cube_map_array
+#define GL_EXT_texture_cube_map_array 1
+#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT     0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A
+#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT     0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F
+#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A
+#endif /* GL_EXT_texture_cube_map_array */
+
 #ifndef GL_EXT_texture_filter_anisotropic
 #define GL_EXT_texture_filter_anisotropic 1
-#endif
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif /* GL_EXT_texture_filter_anisotropic */
 
-/* GL_EXT_texture_format_BGRA8888 */
 #ifndef GL_EXT_texture_format_BGRA8888
 #define GL_EXT_texture_format_BGRA8888 1
-#endif
+#endif /* GL_EXT_texture_format_BGRA8888 */
 
-/* GL_EXT_texture_rg */
 #ifndef GL_EXT_texture_rg
 #define GL_EXT_texture_rg 1
-#endif
+#define GL_RED_EXT                        0x1903
+#define GL_RG_EXT                         0x8227
+#define GL_R8_EXT                         0x8229
+#define GL_RG8_EXT                        0x822B
+#endif /* GL_EXT_texture_rg */
 
-/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_sRGB_decode
+#define GL_EXT_texture_sRGB_decode 1
+#define GL_TEXTURE_SRGB_DECODE_EXT        0x8A48
+#define GL_DECODE_EXT                     0x8A49
+#define GL_SKIP_DECODE_EXT                0x8A4A
+#endif /* GL_EXT_texture_sRGB_decode */
+
 #ifndef GL_EXT_texture_storage
 #define GL_EXT_texture_storage 1
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT   0x912F
+#define GL_ALPHA8_EXT                     0x803C
+#define GL_LUMINANCE8_EXT                 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT          0x8045
+#define GL_RGBA32F_EXT                    0x8814
+#define GL_RGB32F_EXT                     0x8815
+#define GL_ALPHA32F_EXT                   0x8816
+#define GL_LUMINANCE32F_EXT               0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT         0x8819
+#define GL_ALPHA16F_EXT                   0x881C
+#define GL_LUMINANCE16F_EXT               0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT         0x881F
+#define GL_R32F_EXT                       0x822E
+#define GL_RG32F_EXT                      0x8230
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
@@ -1163,105 +1362,298 @@
 GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 #endif
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-#endif
+#endif /* GL_EXT_texture_storage */
 
-/* GL_EXT_texture_type_2_10_10_10_REV */
 #ifndef GL_EXT_texture_type_2_10_10_10_REV
 #define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
+#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
+#endif /* GL_EXT_texture_type_2_10_10_10_REV */
 
-/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_texture_view
+#define GL_EXT_texture_view 1
+#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT     0x82DB
+#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT    0x82DC
+#define GL_TEXTURE_VIEW_MIN_LAYER_EXT     0x82DD
+#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT    0x82DE
+#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF
+typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+#endif
+#endif /* GL_EXT_texture_view */
+
 #ifndef GL_EXT_unpack_subimage
 #define GL_EXT_unpack_subimage 1
-#endif
+#define GL_UNPACK_ROW_LENGTH_EXT          0x0CF2
+#define GL_UNPACK_SKIP_ROWS_EXT           0x0CF3
+#define GL_UNPACK_SKIP_PIXELS_EXT         0x0CF4
+#endif /* GL_EXT_unpack_subimage */
 
-/*------------------------------------------------------------------------*
- * DMP extension functions
- *------------------------------------------------------------------------*/
+#ifndef GL_FJ_shader_binary_GCCSO
+#define GL_FJ_shader_binary_GCCSO 1
+#define GL_GCCSO_SHADER_BINARY_FJ         0x9260
+#endif /* GL_FJ_shader_binary_GCCSO */
 
-/* GL_DMP_shader_binary */
-#ifndef GL_DMP_shader_binary
-#define GL_DMP_shader_binary 1
-#endif
-
-/*------------------------------------------------------------------------*
- * IMG extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_IMG_program_binary */
-#ifndef GL_IMG_program_binary
-#define GL_IMG_program_binary 1
-#endif
-
-/* GL_IMG_read_format */
-#ifndef GL_IMG_read_format
-#define GL_IMG_read_format 1
-#endif
-
-/* GL_IMG_shader_binary */
-#ifndef GL_IMG_shader_binary
-#define GL_IMG_shader_binary 1
-#endif
-
-/* GL_IMG_texture_compression_pvrtc */
-#ifndef GL_IMG_texture_compression_pvrtc
-#define GL_IMG_texture_compression_pvrtc 1
-#endif
-
-/* GL_IMG_multisampled_render_to_texture */
 #ifndef GL_IMG_multisampled_render_to_texture
 #define GL_IMG_multisampled_render_to_texture 1
+#define GL_RENDERBUFFER_SAMPLES_IMG       0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
+#define GL_MAX_SAMPLES_IMG                0x9135
+#define GL_TEXTURE_SAMPLES_IMG            0x9136
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
 #endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif /* GL_IMG_multisampled_render_to_texture */
+
+#ifndef GL_IMG_program_binary
+#define GL_IMG_program_binary 1
+#define GL_SGX_PROGRAM_BINARY_IMG         0x9130
+#endif /* GL_IMG_program_binary */
+
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#define GL_BGRA_IMG                       0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
+#endif /* GL_IMG_read_format */
+
+#ifndef GL_IMG_shader_binary
+#define GL_IMG_shader_binary 1
+#define GL_SGX_BINARY_IMG                 0x8C0A
+#endif /* GL_IMG_shader_binary */
+
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
+#endif /* GL_IMG_texture_compression_pvrtc */
+
+#ifndef GL_IMG_texture_compression_pvrtc2
+#define GL_IMG_texture_compression_pvrtc2 1
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138
+#endif /* GL_IMG_texture_compression_pvrtc2 */
+
+#ifndef GL_INTEL_performance_query
+#define GL_INTEL_performance_query 1
+#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000
+#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001
+#define GL_PERFQUERY_WAIT_INTEL           0x83FB
+#define GL_PERFQUERY_FLUSH_INTEL          0x83FA
+#define GL_PERFQUERY_DONOT_FLUSH_INTEL    0x83F9
+#define GL_PERFQUERY_COUNTER_EVENT_INTEL  0x94F0
+#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1
+#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2
+#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3
+#define GL_PERFQUERY_COUNTER_RAW_INTEL    0x94F4
+#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5
+#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8
+#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9
+#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA
+#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB
+#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC
+#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD
+#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE
+#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF
+#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500
+typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);
+typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);
+typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);
+typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);
+typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);
+typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);
+typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
+typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
+typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);
+typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);
+GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);
+GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);
+GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);
+GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);
+GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);
+GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);
+GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);
+GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);
+GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);
 #endif
+#endif /* GL_INTEL_performance_query */
 
-/*------------------------------------------------------------------------*
- * NV extension functions
- *------------------------------------------------------------------------*/
+#ifndef GL_NV_blend_equation_advanced
+#define GL_NV_blend_equation_advanced 1
+#define GL_BLEND_OVERLAP_NV               0x9281
+#define GL_BLEND_PREMULTIPLIED_SRC_NV     0x9280
+#define GL_BLUE_NV                        0x1905
+#define GL_COLORBURN_NV                   0x929A
+#define GL_COLORDODGE_NV                  0x9299
+#define GL_CONJOINT_NV                    0x9284
+#define GL_CONTRAST_NV                    0x92A1
+#define GL_DARKEN_NV                      0x9297
+#define GL_DIFFERENCE_NV                  0x929E
+#define GL_DISJOINT_NV                    0x9283
+#define GL_DST_ATOP_NV                    0x928F
+#define GL_DST_IN_NV                      0x928B
+#define GL_DST_NV                         0x9287
+#define GL_DST_OUT_NV                     0x928D
+#define GL_DST_OVER_NV                    0x9289
+#define GL_EXCLUSION_NV                   0x92A0
+#define GL_GREEN_NV                       0x1904
+#define GL_HARDLIGHT_NV                   0x929B
+#define GL_HARDMIX_NV                     0x92A9
+#define GL_HSL_COLOR_NV                   0x92AF
+#define GL_HSL_HUE_NV                     0x92AD
+#define GL_HSL_LUMINOSITY_NV              0x92B0
+#define GL_HSL_SATURATION_NV              0x92AE
+#define GL_INVERT_OVG_NV                  0x92B4
+#define GL_INVERT_RGB_NV                  0x92A3
+#define GL_LIGHTEN_NV                     0x9298
+#define GL_LINEARBURN_NV                  0x92A5
+#define GL_LINEARDODGE_NV                 0x92A4
+#define GL_LINEARLIGHT_NV                 0x92A7
+#define GL_MINUS_CLAMPED_NV               0x92B3
+#define GL_MINUS_NV                       0x929F
+#define GL_MULTIPLY_NV                    0x9294
+#define GL_OVERLAY_NV                     0x9296
+#define GL_PINLIGHT_NV                    0x92A8
+#define GL_PLUS_CLAMPED_ALPHA_NV          0x92B2
+#define GL_PLUS_CLAMPED_NV                0x92B1
+#define GL_PLUS_DARKER_NV                 0x9292
+#define GL_PLUS_NV                        0x9291
+#define GL_RED_NV                         0x1903
+#define GL_SCREEN_NV                      0x9295
+#define GL_SOFTLIGHT_NV                   0x929C
+#define GL_SRC_ATOP_NV                    0x928E
+#define GL_SRC_IN_NV                      0x928A
+#define GL_SRC_NV                         0x9286
+#define GL_SRC_OUT_NV                     0x928C
+#define GL_SRC_OVER_NV                    0x9288
+#define GL_UNCORRELATED_NV                0x9282
+#define GL_VIVIDLIGHT_NV                  0x92A6
+#define GL_XOR_NV                         0x1506
+typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glBlendBarrierNV (void);
+#endif
+#endif /* GL_NV_blend_equation_advanced */
 
-/* GL_NV_coverage_sample */
+#ifndef GL_NV_blend_equation_advanced_coherent
+#define GL_NV_blend_equation_advanced_coherent 1
+#define GL_BLEND_ADVANCED_COHERENT_NV     0x9285
+#endif /* GL_NV_blend_equation_advanced_coherent */
+
+#ifndef GL_NV_copy_buffer
+#define GL_NV_copy_buffer 1
+#define GL_COPY_READ_BUFFER_NV            0x8F36
+#define GL_COPY_WRITE_BUFFER_NV           0x8F37
+typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+#endif
+#endif /* GL_NV_copy_buffer */
+
 #ifndef GL_NV_coverage_sample
 #define GL_NV_coverage_sample 1
+#define GL_COVERAGE_COMPONENT_NV          0x8ED0
+#define GL_COVERAGE_COMPONENT4_NV         0x8ED1
+#define GL_COVERAGE_ATTACHMENT_NV         0x8ED2
+#define GL_COVERAGE_BUFFERS_NV            0x8ED3
+#define GL_COVERAGE_SAMPLES_NV            0x8ED4
+#define GL_COVERAGE_ALL_FRAGMENTS_NV      0x8ED5
+#define GL_COVERAGE_EDGE_FRAGMENTS_NV     0x8ED6
+#define GL_COVERAGE_AUTOMATIC_NV          0x8ED7
+#define GL_COVERAGE_BUFFER_BIT_NV         0x00008000
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
 GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
 #endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
-#endif
+#endif /* GL_NV_coverage_sample */
 
-/* GL_NV_depth_nonlinear */
 #ifndef GL_NV_depth_nonlinear
 #define GL_NV_depth_nonlinear 1
-#endif
+#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
+#endif /* GL_NV_depth_nonlinear */
 
-/* GL_NV_draw_buffers */
 #ifndef GL_NV_draw_buffers
 #define GL_NV_draw_buffers 1
+#define GL_MAX_DRAW_BUFFERS_NV            0x8824
+#define GL_DRAW_BUFFER0_NV                0x8825
+#define GL_DRAW_BUFFER1_NV                0x8826
+#define GL_DRAW_BUFFER2_NV                0x8827
+#define GL_DRAW_BUFFER3_NV                0x8828
+#define GL_DRAW_BUFFER4_NV                0x8829
+#define GL_DRAW_BUFFER5_NV                0x882A
+#define GL_DRAW_BUFFER6_NV                0x882B
+#define GL_DRAW_BUFFER7_NV                0x882C
+#define GL_DRAW_BUFFER8_NV                0x882D
+#define GL_DRAW_BUFFER9_NV                0x882E
+#define GL_DRAW_BUFFER10_NV               0x882F
+#define GL_DRAW_BUFFER11_NV               0x8830
+#define GL_DRAW_BUFFER12_NV               0x8831
+#define GL_DRAW_BUFFER13_NV               0x8832
+#define GL_DRAW_BUFFER14_NV               0x8833
+#define GL_DRAW_BUFFER15_NV               0x8834
+#define GL_COLOR_ATTACHMENT0_NV           0x8CE0
+#define GL_COLOR_ATTACHMENT1_NV           0x8CE1
+#define GL_COLOR_ATTACHMENT2_NV           0x8CE2
+#define GL_COLOR_ATTACHMENT3_NV           0x8CE3
+#define GL_COLOR_ATTACHMENT4_NV           0x8CE4
+#define GL_COLOR_ATTACHMENT5_NV           0x8CE5
+#define GL_COLOR_ATTACHMENT6_NV           0x8CE6
+#define GL_COLOR_ATTACHMENT7_NV           0x8CE7
+#define GL_COLOR_ATTACHMENT8_NV           0x8CE8
+#define GL_COLOR_ATTACHMENT9_NV           0x8CE9
+#define GL_COLOR_ATTACHMENT10_NV          0x8CEA
+#define GL_COLOR_ATTACHMENT11_NV          0x8CEB
+#define GL_COLOR_ATTACHMENT12_NV          0x8CEC
+#define GL_COLOR_ATTACHMENT13_NV          0x8CED
+#define GL_COLOR_ATTACHMENT14_NV          0x8CEE
+#define GL_COLOR_ATTACHMENT15_NV          0x8CEF
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
 #endif
-typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
-#endif
+#endif /* GL_NV_draw_buffers */
 
-/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_draw_instanced
+#define GL_NV_draw_instanced 1
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
+#endif
+#endif /* GL_NV_draw_instanced */
+
+#ifndef GL_NV_explicit_attrib_location
+#define GL_NV_explicit_attrib_location 1
+#endif /* GL_NV_explicit_attrib_location */
+
 #ifndef GL_NV_fbo_color_attachments
 #define GL_NV_fbo_color_attachments 1
-#endif
+#define GL_MAX_COLOR_ATTACHMENTS_NV       0x8CDF
+#endif /* GL_NV_fbo_color_attachments */
 
-/* GL_NV_fence */
 #ifndef GL_NV_fence
 #define GL_NV_fence 1
+#define GL_ALL_COMPLETED_NV               0x84F2
+#define GL_FENCE_STATUS_NV                0x84F3
+#define GL_FENCE_CONDITION_NV             0x84F4
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
 GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
@@ -1271,85 +1663,185 @@
 GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
 GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
 #endif
-typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
+#endif /* GL_NV_fence */
 
-/* GL_NV_read_buffer */
+#ifndef GL_NV_framebuffer_blit
+#define GL_NV_framebuffer_blit 1
+#define GL_READ_FRAMEBUFFER_NV            0x8CA8
+#define GL_DRAW_FRAMEBUFFER_NV            0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_NV    0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_NV    0x8CAA
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+#endif /* GL_NV_framebuffer_blit */
+
+#ifndef GL_NV_framebuffer_multisample
+#define GL_NV_framebuffer_multisample 1
+#define GL_RENDERBUFFER_SAMPLES_NV        0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56
+#define GL_MAX_SAMPLES_NV                 0x8D57
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+#endif /* GL_NV_framebuffer_multisample */
+
+#ifndef GL_NV_generate_mipmap_sRGB
+#define GL_NV_generate_mipmap_sRGB 1
+#endif /* GL_NV_generate_mipmap_sRGB */
+
+#ifndef GL_NV_instanced_arrays
+#define GL_NV_instanced_arrays 1
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);
+#endif
+#endif /* GL_NV_instanced_arrays */
+
+#ifndef GL_NV_non_square_matrices
+#define GL_NV_non_square_matrices 1
+#define GL_FLOAT_MAT2x3_NV                0x8B65
+#define GL_FLOAT_MAT2x4_NV                0x8B66
+#define GL_FLOAT_MAT3x2_NV                0x8B67
+#define GL_FLOAT_MAT3x4_NV                0x8B68
+#define GL_FLOAT_MAT4x2_NV                0x8B69
+#define GL_FLOAT_MAT4x3_NV                0x8B6A
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#endif
+#endif /* GL_NV_non_square_matrices */
+
 #ifndef GL_NV_read_buffer
 #define GL_NV_read_buffer 1
+#define GL_READ_BUFFER_NV                 0x0C02
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
 #endif
-typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
-#endif
+#endif /* GL_NV_read_buffer */
 
-/* GL_NV_read_buffer_front */
 #ifndef GL_NV_read_buffer_front
 #define GL_NV_read_buffer_front 1
-#endif
+#endif /* GL_NV_read_buffer_front */
 
-/* GL_NV_read_depth */
 #ifndef GL_NV_read_depth
 #define GL_NV_read_depth 1
-#endif
+#endif /* GL_NV_read_depth */
 
-/* GL_NV_read_depth_stencil */
 #ifndef GL_NV_read_depth_stencil
 #define GL_NV_read_depth_stencil 1
-#endif
+#endif /* GL_NV_read_depth_stencil */
 
-/* GL_NV_read_stencil */
 #ifndef GL_NV_read_stencil
 #define GL_NV_read_stencil 1
-#endif
+#endif /* GL_NV_read_stencil */
 
-/* GL_NV_texture_compression_s3tc_update */
+#ifndef GL_NV_sRGB_formats
+#define GL_NV_sRGB_formats 1
+#define GL_SLUMINANCE_NV                  0x8C46
+#define GL_SLUMINANCE_ALPHA_NV            0x8C44
+#define GL_SRGB8_NV                       0x8C41
+#define GL_SLUMINANCE8_NV                 0x8C47
+#define GL_SLUMINANCE8_ALPHA8_NV          0x8C45
+#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV   0x8C4C
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
+#define GL_ETC1_SRGB8_NV                  0x88EE
+#endif /* GL_NV_sRGB_formats */
+
+#ifndef GL_NV_shadow_samplers_array
+#define GL_NV_shadow_samplers_array 1
+#define GL_SAMPLER_2D_ARRAY_SHADOW_NV     0x8DC4
+#endif /* GL_NV_shadow_samplers_array */
+
+#ifndef GL_NV_shadow_samplers_cube
+#define GL_NV_shadow_samplers_cube 1
+#define GL_SAMPLER_CUBE_SHADOW_NV         0x8DC5
+#endif /* GL_NV_shadow_samplers_cube */
+
+#ifndef GL_NV_texture_border_clamp
+#define GL_NV_texture_border_clamp 1
+#define GL_TEXTURE_BORDER_COLOR_NV        0x1004
+#define GL_CLAMP_TO_BORDER_NV             0x812D
+#endif /* GL_NV_texture_border_clamp */
+
 #ifndef GL_NV_texture_compression_s3tc_update
 #define GL_NV_texture_compression_s3tc_update 1
-#endif
+#endif /* GL_NV_texture_compression_s3tc_update */
 
-/* GL_NV_texture_npot_2D_mipmap */
 #ifndef GL_NV_texture_npot_2D_mipmap
 #define GL_NV_texture_npot_2D_mipmap 1
-#endif
+#endif /* GL_NV_texture_npot_2D_mipmap */
 
-/*------------------------------------------------------------------------*
- * QCOM extension functions
- *------------------------------------------------------------------------*/
-
-/* GL_QCOM_alpha_test */
 #ifndef GL_QCOM_alpha_test
 #define GL_QCOM_alpha_test 1
+#define GL_ALPHA_TEST_QCOM                0x0BC0
+#define GL_ALPHA_TEST_FUNC_QCOM           0x0BC1
+#define GL_ALPHA_TEST_REF_QCOM            0x0BC2
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
 #endif
-typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
-#endif
+#endif /* GL_QCOM_alpha_test */
 
-/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_binning_control
+#define GL_QCOM_binning_control 1
+#define GL_BINNING_CONTROL_HINT_QCOM      0x8FB0
+#define GL_CPU_OPTIMIZED_QCOM             0x8FB1
+#define GL_GPU_OPTIMIZED_QCOM             0x8FB2
+#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3
+#endif /* GL_QCOM_binning_control */
+
 #ifndef GL_QCOM_driver_control
 #define GL_QCOM_driver_control 1
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
 GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
 #endif
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
-typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
-#endif
+#endif /* GL_QCOM_driver_control */
 
-/* GL_QCOM_extended_get */
 #ifndef GL_QCOM_extended_get
 #define GL_QCOM_extended_get 1
+#define GL_TEXTURE_WIDTH_QCOM             0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM            0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM             0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM   0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM            0x8BD6
+#define GL_TEXTURE_TYPE_QCOM              0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM       0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM        0x8BD9
+#define GL_TEXTURE_TARGET_QCOM            0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM      0x8BDB
+#define GL_STATE_RESTORE                  0x8BDC
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
 GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
@@ -1357,66 +1849,84 @@
 GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
 GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
 GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
-GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);
+GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);
 #endif
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
-typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
-#endif
+#endif /* GL_QCOM_extended_get */
 
-/* GL_QCOM_extended_get2 */
 #ifndef GL_QCOM_extended_get2
 #define GL_QCOM_extended_get2 1
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
 GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
 GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
 GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
 #endif
-typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
-typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
-typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
-#endif
+#endif /* GL_QCOM_extended_get2 */
 
-/* GL_QCOM_perfmon_global_mode */
 #ifndef GL_QCOM_perfmon_global_mode
 #define GL_QCOM_perfmon_global_mode 1
-#endif
+#define GL_PERFMON_GLOBAL_MODE_QCOM       0x8FA0
+#endif /* GL_QCOM_perfmon_global_mode */
 
-/* GL_QCOM_writeonly_rendering */
-#ifndef GL_QCOM_writeonly_rendering
-#define GL_QCOM_writeonly_rendering 1
-#endif
-
-/* GL_QCOM_tiled_rendering */
 #ifndef GL_QCOM_tiled_rendering
 #define GL_QCOM_tiled_rendering 1
+#define GL_COLOR_BUFFER_BIT0_QCOM         0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM         0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM         0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM         0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM         0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM         0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM         0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM         0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM         0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM         0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM         0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM         0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM         0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM         0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM         0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM         0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM       0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM       0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM       0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM       0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM       0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM       0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM       0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM       0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM   0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM   0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM   0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM   0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM   0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM   0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM   0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM   0x80000000
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
 #ifdef GL_GLEXT_PROTOTYPES
 GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
 GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
 #endif
-typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
-typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
-#endif
+#endif /* GL_QCOM_tiled_rendering */
 
-/*------------------------------------------------------------------------*
- * VIV extension tokens
- *------------------------------------------------------------------------*/
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#define GL_WRITEONLY_RENDERING_QCOM       0x8823
+#endif /* GL_QCOM_writeonly_rendering */
 
-/* GL_VIV_shader_binary */
 #ifndef GL_VIV_shader_binary
 #define GL_VIV_shader_binary 1
-#endif
+#define GL_SHADER_BINARY_VIV              0x8FC4
+#endif /* GL_VIV_shader_binary */
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __gl2ext_h_ */
+#endif
diff --git a/opengl/include/GLES2/gl2platform.h b/opengl/include/GLES2/gl2platform.h
index c9fa3c4..89d4d44 100644
--- a/opengl/include/GLES2/gl2platform.h
+++ b/opengl/include/GLES2/gl2platform.h
@@ -1,7 +1,7 @@
 #ifndef __gl2platform_h_
 #define __gl2platform_h_
 
-/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
+/* $Revision: 23328 $ on $Date:: 2013-10-02 02:28:28 -0700 #$ */
 
 /*
  * This document is licensed under the SGI Free Software B License Version
diff --git a/opengl/include/GLES3/gl3.h b/opengl/include/GLES3/gl3.h
index 9c79862..c9a3175 100644
--- a/opengl/include/GLES3/gl3.h
+++ b/opengl/include/GLES3/gl3.h
@@ -1,18 +1,12 @@
 #ifndef __gl3_h_
-#define __gl3_h_
-
-/* 
- * gl3.h last updated on $Date: 2013-02-12 14:37:24 -0800 (Tue, 12 Feb 2013) $
- */
-
-#include <GLES3/gl3platform.h>
+#define __gl3_h_ 1
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*
-** Copyright (c) 2007-2013 The Khronos Group Inc.
+** Copyright (c) 2013-2014 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
@@ -33,1026 +27,910 @@
 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 */
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision: 26696 $ on $Date: 2014-05-17 14:48:55 -0700 (Sat, 17 May 2014) $
+*/
 
-/*-------------------------------------------------------------------------
- * Data type definitions
- *-----------------------------------------------------------------------*/
+#include <GLES3/gl3platform.h>
 
-/* OpenGL ES 2.0 */
+/* Generated on date 20140517 */
 
-typedef void             GLvoid;
-typedef char             GLchar;
-typedef unsigned int     GLenum;
-typedef unsigned char    GLboolean;
-typedef unsigned int     GLbitfield;
-typedef khronos_int8_t   GLbyte;
-typedef short            GLshort;
-typedef int              GLint;
-typedef int              GLsizei;
-typedef khronos_uint8_t  GLubyte;
-typedef unsigned short   GLushort;
-typedef unsigned int     GLuint;
-typedef khronos_float_t  GLfloat;
-typedef khronos_float_t  GLclampf;
-typedef khronos_int32_t  GLfixed;
-typedef khronos_intptr_t GLintptr;
-typedef khronos_ssize_t  GLsizeiptr;
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2\.[0-9]|3.0
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
 
-/* OpenGL ES 3.0 */
-
-typedef unsigned short   GLhalf;
-typedef khronos_int64_t  GLint64;
-typedef khronos_uint64_t GLuint64;
+#ifndef GL_ES_VERSION_2_0
+#define GL_ES_VERSION_2_0 1
+#include <KHR/khrplatform.h>
+typedef khronos_int8_t GLbyte;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef short GLshort;
+typedef unsigned short GLushort;
+typedef void GLvoid;
 typedef struct __GLsync *GLsync;
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef unsigned int GLenum;
+typedef unsigned int GLuint;
+typedef char GLchar;
+typedef khronos_float_t GLfloat;
+typedef khronos_ssize_t GLsizeiptr;
+typedef khronos_intptr_t GLintptr;
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+#define GL_DEPTH_BUFFER_BIT               0x00000100
+#define GL_STENCIL_BUFFER_BIT             0x00000400
+#define GL_COLOR_BUFFER_BIT               0x00004000
+#define GL_FALSE                          0
+#define GL_TRUE                           1
+#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_ZERO                           0
+#define GL_ONE                            1
+#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
+#define GL_FUNC_ADD                       0x8006
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_BLEND_EQUATION_RGB             0x8009
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+#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_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_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_DYNAMIC_DRAW                   0x88E8
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+#define GL_FRONT                          0x0404
+#define GL_BACK                           0x0405
+#define GL_FRONT_AND_BACK                 0x0408
+#define GL_TEXTURE_2D                     0x0DE1
+#define GL_CULL_FACE                      0x0B44
+#define GL_BLEND                          0x0BE2
+#define GL_DITHER                         0x0BD0
+#define GL_STENCIL_TEST                   0x0B90
+#define GL_DEPTH_TEST                     0x0B71
+#define GL_SCISSOR_TEST                   0x0C11
+#define GL_POLYGON_OFFSET_FILL            0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_COVERAGE                0x80A0
+#define GL_NO_ERROR                       0
+#define GL_INVALID_ENUM                   0x0500
+#define GL_INVALID_VALUE                  0x0501
+#define GL_INVALID_OPERATION              0x0502
+#define GL_OUT_OF_MEMORY                  0x0505
+#define GL_CW                             0x0900
+#define GL_CCW                            0x0901
+#define GL_LINE_WIDTH                     0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#define GL_CULL_FACE_MODE                 0x0B45
+#define GL_FRONT_FACE                     0x0B46
+#define GL_DEPTH_RANGE                    0x0B70
+#define GL_DEPTH_WRITEMASK                0x0B72
+#define GL_DEPTH_CLEAR_VALUE              0x0B73
+#define GL_DEPTH_FUNC                     0x0B74
+#define GL_STENCIL_CLEAR_VALUE            0x0B91
+#define GL_STENCIL_FUNC                   0x0B92
+#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_VALUE_MASK             0x0B93
+#define GL_STENCIL_WRITEMASK              0x0B98
+#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_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#define GL_VIEWPORT                       0x0BA2
+#define GL_SCISSOR_BOX                    0x0C10
+#define GL_COLOR_CLEAR_VALUE              0x0C22
+#define GL_COLOR_WRITEMASK                0x0C23
+#define GL_UNPACK_ALIGNMENT               0x0CF5
+#define GL_PACK_ALIGNMENT                 0x0D05
+#define GL_MAX_TEXTURE_SIZE               0x0D33
+#define GL_MAX_VIEWPORT_DIMS              0x0D3A
+#define GL_SUBPIXEL_BITS                  0x0D50
+#define GL_RED_BITS                       0x0D52
+#define GL_GREEN_BITS                     0x0D53
+#define GL_BLUE_BITS                      0x0D54
+#define GL_ALPHA_BITS                     0x0D55
+#define GL_DEPTH_BITS                     0x0D56
+#define GL_STENCIL_BITS                   0x0D57
+#define GL_POLYGON_OFFSET_UNITS           0x2A00
+#define GL_POLYGON_OFFSET_FACTOR          0x8038
+#define GL_TEXTURE_BINDING_2D             0x8069
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+#define GL_DONT_CARE                      0x1100
+#define GL_FASTEST                        0x1101
+#define GL_NICEST                         0x1102
+#define GL_GENERATE_MIPMAP_HINT           0x8192
+#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_FIXED                          0x140C
+#define GL_DEPTH_COMPONENT                0x1902
+#define GL_ALPHA                          0x1906
+#define GL_RGB                            0x1907
+#define GL_RGBA                           0x1908
+#define GL_LUMINANCE                      0x1909
+#define GL_LUMINANCE_ALPHA                0x190A
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+#define GL_FRAGMENT_SHADER                0x8B30
+#define GL_VERTEX_SHADER                  0x8B31
+#define GL_MAX_VERTEX_ATTRIBS             0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB
+#define GL_MAX_VARYING_VECTORS            0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD
+#define GL_SHADER_TYPE                    0x8B4F
+#define GL_DELETE_STATUS                  0x8B80
+#define GL_LINK_STATUS                    0x8B82
+#define GL_VALIDATE_STATUS                0x8B83
+#define GL_ATTACHED_SHADERS               0x8B85
+#define GL_ACTIVE_UNIFORMS                0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
+#define GL_ACTIVE_ATTRIBUTES              0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
+#define GL_CURRENT_PROGRAM                0x8B8D
+#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_KEEP                           0x1E00
+#define GL_REPLACE                        0x1E01
+#define GL_INCR                           0x1E02
+#define GL_DECR                           0x1E03
+#define GL_INVERT                         0x150A
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+#define GL_VENDOR                         0x1F00
+#define GL_RENDERER                       0x1F01
+#define GL_VERSION                        0x1F02
+#define GL_EXTENSIONS                     0x1F03
+#define GL_NEAREST                        0x2600
+#define GL_LINEAR                         0x2601
+#define GL_NEAREST_MIPMAP_NEAREST         0x2700
+#define GL_LINEAR_MIPMAP_NEAREST          0x2701
+#define GL_NEAREST_MIPMAP_LINEAR          0x2702
+#define GL_LINEAR_MIPMAP_LINEAR           0x2703
+#define GL_TEXTURE_MAG_FILTER             0x2800
+#define GL_TEXTURE_MIN_FILTER             0x2801
+#define GL_TEXTURE_WRAP_S                 0x2802
+#define GL_TEXTURE_WRAP_T                 0x2803
+#define GL_TEXTURE                        0x1702
+#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_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+#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_REPEAT                         0x2901
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_MIRRORED_REPEAT                0x8370
+#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_2D                     0x8B5E
+#define GL_SAMPLER_CUBE                   0x8B60
+#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_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_SHADER_COMPILER                0x8DFA
+#define GL_SHADER_BINARY_FORMATS          0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+#define GL_RGBA4                          0x8056
+#define GL_RGB5_A1                        0x8057
+#define GL_RGB565                         0x8D62
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_STENCIL_INDEX8                 0x8D48
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+#define GL_NONE                           0
+#define GL_FRAMEBUFFER_COMPLETE           0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
+GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
+GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
+GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
+GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glFinish (void);
+GL_APICALL void GL_APIENTRY glFlush (void);
+GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
+GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL GLenum GL_APIENTRY glGetError (void);
+GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
+GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
+GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
+GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
+GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
+GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GL_ES_VERSION_2_0 */
 
-/*-------------------------------------------------------------------------
- * Token definitions
- *-----------------------------------------------------------------------*/
-
-/* OpenGL ES core versions */
-#define GL_ES_VERSION_3_0                                1
-#define GL_ES_VERSION_2_0                                1
-
-/* OpenGL ES 2.0 */
-
-/* ClearBufferMask */
-#define GL_DEPTH_BUFFER_BIT                              0x00000100
-#define GL_STENCIL_BUFFER_BIT                            0x00000400
-#define GL_COLOR_BUFFER_BIT                              0x00004000
-
-/* Boolean */
-#define GL_FALSE                                         0
-#define GL_TRUE                                          1
-
-/* BeginMode */
-#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
-
-/* BlendingFactorDest */
-#define GL_ZERO                                          0
-#define GL_ONE                                           1
-#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
-
-/* BlendingFactorSrc */
-/*      GL_ZERO */
-/*      GL_ONE */
-#define GL_DST_COLOR                                     0x0306
-#define GL_ONE_MINUS_DST_COLOR                           0x0307
-#define GL_SRC_ALPHA_SATURATE                            0x0308
-/*      GL_SRC_ALPHA */
-/*      GL_ONE_MINUS_SRC_ALPHA */
-/*      GL_DST_ALPHA */
-/*      GL_ONE_MINUS_DST_ALPHA */
-
-/* BlendEquationSeparate */
-#define GL_FUNC_ADD                                      0x8006
-#define GL_BLEND_EQUATION                                0x8009
-#define GL_BLEND_EQUATION_RGB                            0x8009    /* same as BLEND_EQUATION */
-#define GL_BLEND_EQUATION_ALPHA                          0x883D
-
-/* BlendSubtract */
-#define GL_FUNC_SUBTRACT                                 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT                         0x800B
-
-/* Separate Blend Functions */
-#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_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
-
-/* Buffer Objects */
-#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_STREAM_DRAW                                   0x88E0
-#define GL_STATIC_DRAW                                   0x88E4
-#define GL_DYNAMIC_DRAW                                  0x88E8
-
-#define GL_BUFFER_SIZE                                   0x8764
-#define GL_BUFFER_USAGE                                  0x8765
-
-#define GL_CURRENT_VERTEX_ATTRIB                         0x8626
-
-/* CullFaceMode */
-#define GL_FRONT                                         0x0404
-#define GL_BACK                                          0x0405
-#define GL_FRONT_AND_BACK                                0x0408
-
-/* DepthFunction */
-/*      GL_NEVER */
-/*      GL_LESS */
-/*      GL_EQUAL */
-/*      GL_LEQUAL */
-/*      GL_GREATER */
-/*      GL_NOTEQUAL */
-/*      GL_GEQUAL */
-/*      GL_ALWAYS */
-
-/* EnableCap */
-#define GL_TEXTURE_2D                                    0x0DE1
-#define GL_CULL_FACE                                     0x0B44
-#define GL_BLEND                                         0x0BE2
-#define GL_DITHER                                        0x0BD0
-#define GL_STENCIL_TEST                                  0x0B90
-#define GL_DEPTH_TEST                                    0x0B71
-#define GL_SCISSOR_TEST                                  0x0C11
-#define GL_POLYGON_OFFSET_FILL                           0x8037
-#define GL_SAMPLE_ALPHA_TO_COVERAGE                      0x809E
-#define GL_SAMPLE_COVERAGE                               0x80A0
-
-/* ErrorCode */
-#define GL_NO_ERROR                                      0
-#define GL_INVALID_ENUM                                  0x0500
-#define GL_INVALID_VALUE                                 0x0501
-#define GL_INVALID_OPERATION                             0x0502
-#define GL_OUT_OF_MEMORY                                 0x0505
-
-/* FrontFaceDirection */
-#define GL_CW                                            0x0900
-#define GL_CCW                                           0x0901
-
-/* GetPName */
-#define GL_LINE_WIDTH                                    0x0B21
-#define GL_ALIASED_POINT_SIZE_RANGE                      0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE                      0x846E
-#define GL_CULL_FACE_MODE                                0x0B45
-#define GL_FRONT_FACE                                    0x0B46
-#define GL_DEPTH_RANGE                                   0x0B70
-#define GL_DEPTH_WRITEMASK                               0x0B72
-#define GL_DEPTH_CLEAR_VALUE                             0x0B73
-#define GL_DEPTH_FUNC                                    0x0B74
-#define GL_STENCIL_CLEAR_VALUE                           0x0B91
-#define GL_STENCIL_FUNC                                  0x0B92
-#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_VALUE_MASK                            0x0B93
-#define GL_STENCIL_WRITEMASK                             0x0B98
-#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_STENCIL_BACK_REF                              0x8CA3
-#define GL_STENCIL_BACK_VALUE_MASK                       0x8CA4
-#define GL_STENCIL_BACK_WRITEMASK                        0x8CA5
-#define GL_VIEWPORT                                      0x0BA2
-#define GL_SCISSOR_BOX                                   0x0C10
-/*      GL_SCISSOR_TEST */
-#define GL_COLOR_CLEAR_VALUE                             0x0C22
-#define GL_COLOR_WRITEMASK                               0x0C23
-#define GL_UNPACK_ALIGNMENT                              0x0CF5
-#define GL_PACK_ALIGNMENT                                0x0D05
-#define GL_MAX_TEXTURE_SIZE                              0x0D33
-#define GL_MAX_VIEWPORT_DIMS                             0x0D3A
-#define GL_SUBPIXEL_BITS                                 0x0D50
-#define GL_RED_BITS                                      0x0D52
-#define GL_GREEN_BITS                                    0x0D53
-#define GL_BLUE_BITS                                     0x0D54
-#define GL_ALPHA_BITS                                    0x0D55
-#define GL_DEPTH_BITS                                    0x0D56
-#define GL_STENCIL_BITS                                  0x0D57
-#define GL_POLYGON_OFFSET_UNITS                          0x2A00
-/*      GL_POLYGON_OFFSET_FILL */
-#define GL_POLYGON_OFFSET_FACTOR                         0x8038
-#define GL_TEXTURE_BINDING_2D                            0x8069
-#define GL_SAMPLE_BUFFERS                                0x80A8
-#define GL_SAMPLES                                       0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE                         0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT                        0x80AB
-
-/* GetTextureParameter */
-/*      GL_TEXTURE_MAG_FILTER */
-/*      GL_TEXTURE_MIN_FILTER */
-/*      GL_TEXTURE_WRAP_S */
-/*      GL_TEXTURE_WRAP_T */
-
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS                0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS                    0x86A3
-
-/* HintMode */
-#define GL_DONT_CARE                                     0x1100
-#define GL_FASTEST                                       0x1101
-#define GL_NICEST                                        0x1102
-
-/* HintTarget */
-#define GL_GENERATE_MIPMAP_HINT                          0x8192
-
-/* DataType */
-#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_FIXED                                         0x140C
-
-/* PixelFormat */
-#define GL_DEPTH_COMPONENT                               0x1902
-#define GL_ALPHA                                         0x1906
-#define GL_RGB                                           0x1907
-#define GL_RGBA                                          0x1908
-#define GL_LUMINANCE                                     0x1909
-#define GL_LUMINANCE_ALPHA                               0x190A
-
-/* PixelType */
-/*      GL_UNSIGNED_BYTE */
-#define GL_UNSIGNED_SHORT_4_4_4_4                        0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1                        0x8034
-#define GL_UNSIGNED_SHORT_5_6_5                          0x8363
-
-/* Shaders */
-#define GL_FRAGMENT_SHADER                               0x8B30
-#define GL_VERTEX_SHADER                                 0x8B31
-#define GL_MAX_VERTEX_ATTRIBS                            0x8869
-#define GL_MAX_VERTEX_UNIFORM_VECTORS                    0x8DFB
-#define GL_MAX_VARYING_VECTORS                           0x8DFC
-#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS              0x8B4D
-#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS                0x8B4C
-#define GL_MAX_TEXTURE_IMAGE_UNITS                       0x8872
-#define GL_MAX_FRAGMENT_UNIFORM_VECTORS                  0x8DFD
-#define GL_SHADER_TYPE                                   0x8B4F
-#define GL_DELETE_STATUS                                 0x8B80
-#define GL_LINK_STATUS                                   0x8B82
-#define GL_VALIDATE_STATUS                               0x8B83
-#define GL_ATTACHED_SHADERS                              0x8B85
-#define GL_ACTIVE_UNIFORMS                               0x8B86
-#define GL_ACTIVE_UNIFORM_MAX_LENGTH                     0x8B87
-#define GL_ACTIVE_ATTRIBUTES                             0x8B89
-#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH                   0x8B8A
-#define GL_SHADING_LANGUAGE_VERSION                      0x8B8C
-#define GL_CURRENT_PROGRAM                               0x8B8D
-
-/* StencilFunction */
-#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
-
-/* StencilOp */
-/*      GL_ZERO */
-#define GL_KEEP                                          0x1E00
-#define GL_REPLACE                                       0x1E01
-#define GL_INCR                                          0x1E02
-#define GL_DECR                                          0x1E03
-#define GL_INVERT                                        0x150A
-#define GL_INCR_WRAP                                     0x8507
-#define GL_DECR_WRAP                                     0x8508
-
-/* StringName */
-#define GL_VENDOR                                        0x1F00
-#define GL_RENDERER                                      0x1F01
-#define GL_VERSION                                       0x1F02
-#define GL_EXTENSIONS                                    0x1F03
-
-/* TextureMagFilter */
-#define GL_NEAREST                                       0x2600
-#define GL_LINEAR                                        0x2601
-
-/* TextureMinFilter */
-/*      GL_NEAREST */
-/*      GL_LINEAR */
-#define GL_NEAREST_MIPMAP_NEAREST                        0x2700
-#define GL_LINEAR_MIPMAP_NEAREST                         0x2701
-#define GL_NEAREST_MIPMAP_LINEAR                         0x2702
-#define GL_LINEAR_MIPMAP_LINEAR                          0x2703
-
-/* TextureParameterName */
-#define GL_TEXTURE_MAG_FILTER                            0x2800
-#define GL_TEXTURE_MIN_FILTER                            0x2801
-#define GL_TEXTURE_WRAP_S                                0x2802
-#define GL_TEXTURE_WRAP_T                                0x2803
-
-/* TextureTarget */
-/*      GL_TEXTURE_2D */
-#define GL_TEXTURE                                       0x1702
-
-#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_MAX_CUBE_MAP_TEXTURE_SIZE                     0x851C
-
-/* TextureUnit */
-#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
-
-/* TextureWrapMode */
-#define GL_REPEAT                                        0x2901
-#define GL_CLAMP_TO_EDGE                                 0x812F
-#define GL_MIRRORED_REPEAT                               0x8370
-
-/* Uniform Types */
-#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_2D                                    0x8B5E
-#define GL_SAMPLER_CUBE                                  0x8B60
-
-/* Vertex Arrays */
-#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_VERTEX_ATTRIB_ARRAY_NORMALIZED                0x886A
-#define GL_VERTEX_ATTRIB_ARRAY_POINTER                   0x8645
-#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING            0x889F
-
-/* Read Format */
-#define GL_IMPLEMENTATION_COLOR_READ_TYPE                0x8B9A
-#define GL_IMPLEMENTATION_COLOR_READ_FORMAT              0x8B9B
-
-/* Shader Source */
-#define GL_COMPILE_STATUS                                0x8B81
-#define GL_INFO_LOG_LENGTH                               0x8B84
-#define GL_SHADER_SOURCE_LENGTH                          0x8B88
-#define GL_SHADER_COMPILER                               0x8DFA
-
-/* Shader Binary */
-#define GL_SHADER_BINARY_FORMATS                         0x8DF8
-#define GL_NUM_SHADER_BINARY_FORMATS                     0x8DF9
-
-/* Shader Precision-Specified Types */
-#define GL_LOW_FLOAT                                     0x8DF0
-#define GL_MEDIUM_FLOAT                                  0x8DF1
-#define GL_HIGH_FLOAT                                    0x8DF2
-#define GL_LOW_INT                                       0x8DF3
-#define GL_MEDIUM_INT                                    0x8DF4
-#define GL_HIGH_INT                                      0x8DF5
-
-/* Framebuffer Object. */
-#define GL_FRAMEBUFFER                                   0x8D40
-#define GL_RENDERBUFFER                                  0x8D41
-
-#define GL_RGBA4                                         0x8056
-#define GL_RGB5_A1                                       0x8057
-#define GL_RGB565                                        0x8D62
-#define GL_DEPTH_COMPONENT16                             0x81A5
-#define GL_STENCIL_INDEX8                                0x8D48
-
-#define GL_RENDERBUFFER_WIDTH                            0x8D42
-#define GL_RENDERBUFFER_HEIGHT                           0x8D43
-#define GL_RENDERBUFFER_INTERNAL_FORMAT                  0x8D44
-#define GL_RENDERBUFFER_RED_SIZE                         0x8D50
-#define GL_RENDERBUFFER_GREEN_SIZE                       0x8D51
-#define GL_RENDERBUFFER_BLUE_SIZE                        0x8D52
-#define GL_RENDERBUFFER_ALPHA_SIZE                       0x8D53
-#define GL_RENDERBUFFER_DEPTH_SIZE                       0x8D54
-#define GL_RENDERBUFFER_STENCIL_SIZE                     0x8D55
-
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE            0x8CD0
-#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME            0x8CD1
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL          0x8CD2
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE  0x8CD3
-
-#define GL_COLOR_ATTACHMENT0                             0x8CE0
-#define GL_DEPTH_ATTACHMENT                              0x8D00
-#define GL_STENCIL_ATTACHMENT                            0x8D20
-
-#define GL_NONE                                          0
-
-#define GL_FRAMEBUFFER_COMPLETE                          0x8CD5
-#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT             0x8CD6
-#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT     0x8CD7
-#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS             0x8CD9
-#define GL_FRAMEBUFFER_UNSUPPORTED                       0x8CDD
-
-#define GL_FRAMEBUFFER_BINDING                           0x8CA6
-#define GL_RENDERBUFFER_BINDING                          0x8CA7
-#define GL_MAX_RENDERBUFFER_SIZE                         0x84E8
-
-#define GL_INVALID_FRAMEBUFFER_OPERATION                 0x0506
-
-/* OpenGL ES 3.0 */
-
-#define GL_READ_BUFFER                                   0x0C02
-#define GL_UNPACK_ROW_LENGTH                             0x0CF2
-#define GL_UNPACK_SKIP_ROWS                              0x0CF3
-#define GL_UNPACK_SKIP_PIXELS                            0x0CF4
-#define GL_PACK_ROW_LENGTH                               0x0D02
-#define GL_PACK_SKIP_ROWS                                0x0D03
-#define GL_PACK_SKIP_PIXELS                              0x0D04
-#define GL_COLOR                                         0x1800
-#define GL_DEPTH                                         0x1801
-#define GL_STENCIL                                       0x1802
-#define GL_RED                                           0x1903
-#define GL_RGB8                                          0x8051
-#define GL_RGBA8                                         0x8058
-#define GL_RGB10_A2                                      0x8059
-#define GL_TEXTURE_BINDING_3D                            0x806A
-#define GL_UNPACK_SKIP_IMAGES                            0x806D
-#define GL_UNPACK_IMAGE_HEIGHT                           0x806E
-#define GL_TEXTURE_3D                                    0x806F
-#define GL_TEXTURE_WRAP_R                                0x8072
-#define GL_MAX_3D_TEXTURE_SIZE                           0x8073
-#define GL_UNSIGNED_INT_2_10_10_10_REV                   0x8368
-#define GL_MAX_ELEMENTS_VERTICES                         0x80E8
-#define GL_MAX_ELEMENTS_INDICES                          0x80E9
-#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_MIN                                           0x8007
-#define GL_MAX                                           0x8008
-#define GL_DEPTH_COMPONENT24                             0x81A6
-#define GL_MAX_TEXTURE_LOD_BIAS                          0x84FD
-#define GL_TEXTURE_COMPARE_MODE                          0x884C
-#define GL_TEXTURE_COMPARE_FUNC                          0x884D
-#define GL_CURRENT_QUERY                                 0x8865
-#define GL_QUERY_RESULT                                  0x8866
-#define GL_QUERY_RESULT_AVAILABLE                        0x8867
-#define GL_BUFFER_MAPPED                                 0x88BC
-#define GL_BUFFER_MAP_POINTER                            0x88BD
-#define GL_STREAM_READ                                   0x88E1
-#define GL_STREAM_COPY                                   0x88E2
-#define GL_STATIC_READ                                   0x88E5
-#define GL_STATIC_COPY                                   0x88E6
-#define GL_DYNAMIC_READ                                  0x88E9
-#define GL_DYNAMIC_COPY                                  0x88EA
-#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_MAX_FRAGMENT_UNIFORM_COMPONENTS               0x8B49
-#define GL_MAX_VERTEX_UNIFORM_COMPONENTS                 0x8B4A
-#define GL_SAMPLER_3D                                    0x8B5F
-#define GL_SAMPLER_2D_SHADOW                             0x8B62
-#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT               0x8B8B
-#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_SRGB8_ALPHA8                                  0x8C43
-#define GL_COMPARE_REF_TO_TEXTURE                        0x884E
-#define GL_MAJOR_VERSION                                 0x821B
-#define GL_MINOR_VERSION                                 0x821C
-#define GL_NUM_EXTENSIONS                                0x821D
-#define GL_RGBA32F                                       0x8814
-#define GL_RGB32F                                        0x8815
-#define GL_RGBA16F                                       0x881A
-#define GL_RGB16F                                        0x881B
-#define GL_VERTEX_ATTRIB_ARRAY_INTEGER                   0x88FD
-#define GL_MAX_ARRAY_TEXTURE_LAYERS                      0x88FF
-#define GL_MIN_PROGRAM_TEXEL_OFFSET                      0x8904
-#define GL_MAX_PROGRAM_TEXEL_OFFSET                      0x8905
-#define GL_MAX_VARYING_COMPONENTS                        0x8B4B
-#define GL_TEXTURE_2D_ARRAY                              0x8C1A
-#define GL_TEXTURE_BINDING_2D_ARRAY                      0x8C1D
-#define GL_R11F_G11F_B10F                                0x8C3A
-#define GL_UNSIGNED_INT_10F_11F_11F_REV                  0x8C3B
-#define GL_RGB9_E5                                       0x8C3D
-#define GL_UNSIGNED_INT_5_9_9_9_REV                      0x8C3E
-#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH         0x8C76
-#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE                0x8C7F
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS    0x8C80
-#define GL_TRANSFORM_FEEDBACK_VARYINGS                   0x8C83
-#define GL_TRANSFORM_FEEDBACK_BUFFER_START               0x8C84
-#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE                0x8C85
-#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN         0x8C88
-#define GL_RASTERIZER_DISCARD                            0x8C89
+#ifndef GL_ES_VERSION_3_0
+#define GL_ES_VERSION_3_0 1
+typedef unsigned short GLhalf;
+#define GL_READ_BUFFER                    0x0C02
+#define GL_UNPACK_ROW_LENGTH              0x0CF2
+#define GL_UNPACK_SKIP_ROWS               0x0CF3
+#define GL_UNPACK_SKIP_PIXELS             0x0CF4
+#define GL_PACK_ROW_LENGTH                0x0D02
+#define GL_PACK_SKIP_ROWS                 0x0D03
+#define GL_PACK_SKIP_PIXELS               0x0D04
+#define GL_COLOR                          0x1800
+#define GL_DEPTH                          0x1801
+#define GL_STENCIL                        0x1802
+#define GL_RED                            0x1903
+#define GL_RGB8                           0x8051
+#define GL_RGBA8                          0x8058
+#define GL_RGB10_A2                       0x8059
+#define GL_TEXTURE_BINDING_3D             0x806A
+#define GL_UNPACK_SKIP_IMAGES             0x806D
+#define GL_UNPACK_IMAGE_HEIGHT            0x806E
+#define GL_TEXTURE_3D                     0x806F
+#define GL_TEXTURE_WRAP_R                 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE            0x8073
+#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368
+#define GL_MAX_ELEMENTS_VERTICES          0x80E8
+#define GL_MAX_ELEMENTS_INDICES           0x80E9
+#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_MIN                            0x8007
+#define GL_MAX                            0x8008
+#define GL_DEPTH_COMPONENT24              0x81A6
+#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD
+#define GL_TEXTURE_COMPARE_MODE           0x884C
+#define GL_TEXTURE_COMPARE_FUNC           0x884D
+#define GL_CURRENT_QUERY                  0x8865
+#define GL_QUERY_RESULT                   0x8866
+#define GL_QUERY_RESULT_AVAILABLE         0x8867
+#define GL_BUFFER_MAPPED                  0x88BC
+#define GL_BUFFER_MAP_POINTER             0x88BD
+#define GL_STREAM_READ                    0x88E1
+#define GL_STREAM_COPY                    0x88E2
+#define GL_STATIC_READ                    0x88E5
+#define GL_STATIC_COPY                    0x88E6
+#define GL_DYNAMIC_READ                   0x88E9
+#define GL_DYNAMIC_COPY                   0x88EA
+#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_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
+#define GL_SAMPLER_3D                     0x8B5F
+#define GL_SAMPLER_2D_SHADOW              0x8B62
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#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_SRGB8_ALPHA8                   0x8C43
+#define GL_COMPARE_REF_TO_TEXTURE         0x884E
+#define GL_MAJOR_VERSION                  0x821B
+#define GL_MINOR_VERSION                  0x821C
+#define GL_NUM_EXTENSIONS                 0x821D
+#define GL_RGBA32F                        0x8814
+#define GL_RGB32F                         0x8815
+#define GL_RGBA16F                        0x881A
+#define GL_RGB16F                         0x881B
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD
+#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF
+#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905
+#define GL_MAX_VARYING_COMPONENTS         0x8B4B
+#define GL_TEXTURE_2D_ARRAY               0x8C1A
+#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D
+#define GL_R11F_G11F_B10F                 0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B
+#define GL_RGB9_E5                        0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_RASTERIZER_DISCARD             0x8C89
 #define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
-#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS       0x8C8B
-#define GL_INTERLEAVED_ATTRIBS                           0x8C8C
-#define GL_SEPARATE_ATTRIBS                              0x8C8D
-#define GL_TRANSFORM_FEEDBACK_BUFFER                     0x8C8E
-#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING             0x8C8F
-#define GL_RGBA32UI                                      0x8D70
-#define GL_RGB32UI                                       0x8D71
-#define GL_RGBA16UI                                      0x8D76
-#define GL_RGB16UI                                       0x8D77
-#define GL_RGBA8UI                                       0x8D7C
-#define GL_RGB8UI                                        0x8D7D
-#define GL_RGBA32I                                       0x8D82
-#define GL_RGB32I                                        0x8D83
-#define GL_RGBA16I                                       0x8D88
-#define GL_RGB16I                                        0x8D89
-#define GL_RGBA8I                                        0x8D8E
-#define GL_RGB8I                                         0x8D8F
-#define GL_RED_INTEGER                                   0x8D94
-#define GL_RGB_INTEGER                                   0x8D98
-#define GL_RGBA_INTEGER                                  0x8D99
-#define GL_SAMPLER_2D_ARRAY                              0x8DC1
-#define GL_SAMPLER_2D_ARRAY_SHADOW                       0x8DC4
-#define GL_SAMPLER_CUBE_SHADOW                           0x8DC5
-#define GL_UNSIGNED_INT_VEC2                             0x8DC6
-#define GL_UNSIGNED_INT_VEC3                             0x8DC7
-#define GL_UNSIGNED_INT_VEC4                             0x8DC8
-#define GL_INT_SAMPLER_2D                                0x8DCA
-#define GL_INT_SAMPLER_3D                                0x8DCB
-#define GL_INT_SAMPLER_CUBE                              0x8DCC
-#define GL_INT_SAMPLER_2D_ARRAY                          0x8DCF
-#define GL_UNSIGNED_INT_SAMPLER_2D                       0x8DD2
-#define GL_UNSIGNED_INT_SAMPLER_3D                       0x8DD3
-#define GL_UNSIGNED_INT_SAMPLER_CUBE                     0x8DD4
-#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY                 0x8DD7
-#define GL_BUFFER_ACCESS_FLAGS                           0x911F
-#define GL_BUFFER_MAP_LENGTH                             0x9120
-#define GL_BUFFER_MAP_OFFSET                             0x9121
-#define GL_DEPTH_COMPONENT32F                            0x8CAC
-#define GL_DEPTH32F_STENCIL8                             0x8CAD
-#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV                0x8DAD
-#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING         0x8210
-#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE         0x8211
-#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE               0x8212
-#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE             0x8213
-#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE              0x8214
-#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE             0x8215
-#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE             0x8216
-#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE           0x8217
-#define GL_FRAMEBUFFER_DEFAULT                           0x8218
-#define GL_FRAMEBUFFER_UNDEFINED                         0x8219
-#define GL_DEPTH_STENCIL_ATTACHMENT                      0x821A
-#define GL_DEPTH_STENCIL                                 0x84F9
-#define GL_UNSIGNED_INT_24_8                             0x84FA
-#define GL_DEPTH24_STENCIL8                              0x88F0
-#define GL_UNSIGNED_NORMALIZED                           0x8C17
-#define GL_DRAW_FRAMEBUFFER_BINDING                      GL_FRAMEBUFFER_BINDING
-#define GL_READ_FRAMEBUFFER                              0x8CA8
-#define GL_DRAW_FRAMEBUFFER                              0x8CA9
-#define GL_READ_FRAMEBUFFER_BINDING                      0x8CAA
-#define GL_RENDERBUFFER_SAMPLES                          0x8CAB
-#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER          0x8CD4
-#define GL_MAX_COLOR_ATTACHMENTS                         0x8CDF
-#define GL_COLOR_ATTACHMENT1                             0x8CE1
-#define GL_COLOR_ATTACHMENT2                             0x8CE2
-#define GL_COLOR_ATTACHMENT3                             0x8CE3
-#define GL_COLOR_ATTACHMENT4                             0x8CE4
-#define GL_COLOR_ATTACHMENT5                             0x8CE5
-#define GL_COLOR_ATTACHMENT6                             0x8CE6
-#define GL_COLOR_ATTACHMENT7                             0x8CE7
-#define GL_COLOR_ATTACHMENT8                             0x8CE8
-#define GL_COLOR_ATTACHMENT9                             0x8CE9
-#define GL_COLOR_ATTACHMENT10                            0x8CEA
-#define GL_COLOR_ATTACHMENT11                            0x8CEB
-#define GL_COLOR_ATTACHMENT12                            0x8CEC
-#define GL_COLOR_ATTACHMENT13                            0x8CED
-#define GL_COLOR_ATTACHMENT14                            0x8CEE
-#define GL_COLOR_ATTACHMENT15                            0x8CEF
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE            0x8D56
-#define GL_MAX_SAMPLES                                   0x8D57
-#define GL_HALF_FLOAT                                    0x140B
-#define GL_MAP_READ_BIT                                  0x0001
-#define GL_MAP_WRITE_BIT                                 0x0002
-#define GL_MAP_INVALIDATE_RANGE_BIT                      0x0004
-#define GL_MAP_INVALIDATE_BUFFER_BIT                     0x0008
-#define GL_MAP_FLUSH_EXPLICIT_BIT                        0x0010
-#define GL_MAP_UNSYNCHRONIZED_BIT                        0x0020
-#define GL_RG                                            0x8227
-#define GL_RG_INTEGER                                    0x8228
-#define GL_R8                                            0x8229
-#define GL_RG8                                           0x822B
-#define GL_R16F                                          0x822D
-#define GL_R32F                                          0x822E
-#define GL_RG16F                                         0x822F
-#define GL_RG32F                                         0x8230
-#define GL_R8I                                           0x8231
-#define GL_R8UI                                          0x8232
-#define GL_R16I                                          0x8233
-#define GL_R16UI                                         0x8234
-#define GL_R32I                                          0x8235
-#define GL_R32UI                                         0x8236
-#define GL_RG8I                                          0x8237
-#define GL_RG8UI                                         0x8238
-#define GL_RG16I                                         0x8239
-#define GL_RG16UI                                        0x823A
-#define GL_RG32I                                         0x823B
-#define GL_RG32UI                                        0x823C
-#define GL_VERTEX_ARRAY_BINDING                          0x85B5
-#define GL_R8_SNORM                                      0x8F94
-#define GL_RG8_SNORM                                     0x8F95
-#define GL_RGB8_SNORM                                    0x8F96
-#define GL_RGBA8_SNORM                                   0x8F97
-#define GL_SIGNED_NORMALIZED                             0x8F9C
-#define GL_PRIMITIVE_RESTART_FIXED_INDEX                 0x8D69
-#define GL_COPY_READ_BUFFER                              0x8F36
-#define GL_COPY_WRITE_BUFFER                             0x8F37
-#define GL_COPY_READ_BUFFER_BINDING                      GL_COPY_READ_BUFFER
-#define GL_COPY_WRITE_BUFFER_BINDING                     GL_COPY_WRITE_BUFFER
-#define GL_UNIFORM_BUFFER                                0x8A11
-#define GL_UNIFORM_BUFFER_BINDING                        0x8A28
-#define GL_UNIFORM_BUFFER_START                          0x8A29
-#define GL_UNIFORM_BUFFER_SIZE                           0x8A2A
-#define GL_MAX_VERTEX_UNIFORM_BLOCKS                     0x8A2B
-#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS                   0x8A2D
-#define GL_MAX_COMBINED_UNIFORM_BLOCKS                   0x8A2E
-#define GL_MAX_UNIFORM_BUFFER_BINDINGS                   0x8A2F
-#define GL_MAX_UNIFORM_BLOCK_SIZE                        0x8A30
-#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS        0x8A31
-#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS      0x8A33
-#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT               0x8A34
-#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH          0x8A35
-#define GL_ACTIVE_UNIFORM_BLOCKS                         0x8A36
-#define GL_UNIFORM_TYPE                                  0x8A37
-#define GL_UNIFORM_SIZE                                  0x8A38
-#define GL_UNIFORM_NAME_LENGTH                           0x8A39
-#define GL_UNIFORM_BLOCK_INDEX                           0x8A3A
-#define GL_UNIFORM_OFFSET                                0x8A3B
-#define GL_UNIFORM_ARRAY_STRIDE                          0x8A3C
-#define GL_UNIFORM_MATRIX_STRIDE                         0x8A3D
-#define GL_UNIFORM_IS_ROW_MAJOR                          0x8A3E
-#define GL_UNIFORM_BLOCK_BINDING                         0x8A3F
-#define GL_UNIFORM_BLOCK_DATA_SIZE                       0x8A40
-#define GL_UNIFORM_BLOCK_NAME_LENGTH                     0x8A41
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS                 0x8A42
-#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES          0x8A43
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER     0x8A44
-#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER   0x8A46
-#define GL_INVALID_INDEX                                 0xFFFFFFFFu
-#define GL_MAX_VERTEX_OUTPUT_COMPONENTS                  0x9122
-#define GL_MAX_FRAGMENT_INPUT_COMPONENTS                 0x9125
-#define GL_MAX_SERVER_WAIT_TIMEOUT                       0x9111
-#define GL_OBJECT_TYPE                                   0x9112
-#define GL_SYNC_CONDITION                                0x9113
-#define GL_SYNC_STATUS                                   0x9114
-#define GL_SYNC_FLAGS                                    0x9115
-#define GL_SYNC_FENCE                                    0x9116
-#define GL_SYNC_GPU_COMMANDS_COMPLETE                    0x9117
-#define GL_UNSIGNALED                                    0x9118
-#define GL_SIGNALED                                      0x9119
-#define GL_ALREADY_SIGNALED                              0x911A
-#define GL_TIMEOUT_EXPIRED                               0x911B
-#define GL_CONDITION_SATISFIED                           0x911C
-#define GL_WAIT_FAILED                                   0x911D
-#define GL_SYNC_FLUSH_COMMANDS_BIT                       0x00000001
-#define GL_TIMEOUT_IGNORED                               0xFFFFFFFFFFFFFFFFull
-#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR                   0x88FE
-#define GL_ANY_SAMPLES_PASSED                            0x8C2F
-#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE               0x8D6A
-#define GL_SAMPLER_BINDING                               0x8919
-#define GL_RGB10_A2UI                                    0x906F
-#define GL_TEXTURE_SWIZZLE_R                             0x8E42
-#define GL_TEXTURE_SWIZZLE_G                             0x8E43
-#define GL_TEXTURE_SWIZZLE_B                             0x8E44
-#define GL_TEXTURE_SWIZZLE_A                             0x8E45
-#define GL_GREEN                                         0x1904
-#define GL_BLUE                                          0x1905
-#define GL_INT_2_10_10_10_REV                            0x8D9F
-#define GL_TRANSFORM_FEEDBACK                            0x8E22
-#define GL_TRANSFORM_FEEDBACK_PAUSED                     0x8E23
-#define GL_TRANSFORM_FEEDBACK_ACTIVE                     0x8E24
-#define GL_TRANSFORM_FEEDBACK_BINDING                    0x8E25
-#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT               0x8257
-#define GL_PROGRAM_BINARY_LENGTH                         0x8741
-#define GL_NUM_PROGRAM_BINARY_FORMATS                    0x87FE
-#define GL_PROGRAM_BINARY_FORMATS                        0x87FF
-#define GL_COMPRESSED_R11_EAC                            0x9270
-#define GL_COMPRESSED_SIGNED_R11_EAC                     0x9271
-#define GL_COMPRESSED_RG11_EAC                           0x9272
-#define GL_COMPRESSED_SIGNED_RG11_EAC                    0x9273
-#define GL_COMPRESSED_RGB8_ETC2                          0x9274
-#define GL_COMPRESSED_SRGB8_ETC2                         0x9275
-#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2      0x9276
-#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2     0x9277
-#define GL_COMPRESSED_RGBA8_ETC2_EAC                     0x9278
-#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC              0x9279
-#define GL_TEXTURE_IMMUTABLE_FORMAT                      0x912F
-#define GL_MAX_ELEMENT_INDEX                             0x8D6B
-#define GL_NUM_SAMPLE_COUNTS                             0x9380
-#define GL_TEXTURE_IMMUTABLE_LEVELS                      0x82DF
-
-/*-------------------------------------------------------------------------
- * Entrypoint definitions
- *-----------------------------------------------------------------------*/
-
-/* OpenGL ES 2.0 */
-
-GL_APICALL void           GL_APIENTRY glActiveTexture (GLenum texture);
-GL_APICALL void           GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void           GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
-GL_APICALL void           GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
-GL_APICALL void           GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
-GL_APICALL void           GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
-GL_APICALL void           GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
-GL_APICALL void           GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void           GL_APIENTRY glBlendEquation (GLenum mode);
-GL_APICALL void           GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
-GL_APICALL void           GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
-GL_APICALL void           GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void           GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-GL_APICALL void           GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
-GL_APICALL GLenum         GL_APIENTRY glCheckFramebufferStatus (GLenum target);
-GL_APICALL void           GL_APIENTRY glClear (GLbitfield mask);
-GL_APICALL void           GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-GL_APICALL void           GL_APIENTRY glClearDepthf (GLfloat depth);
-GL_APICALL void           GL_APIENTRY glClearStencil (GLint s);
-GL_APICALL void           GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-GL_APICALL void           GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void           GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void           GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void           GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-GL_APICALL void           GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL GLuint         GL_APIENTRY glCreateProgram (void);
-GL_APICALL GLuint         GL_APIENTRY glCreateShader (GLenum type);
-GL_APICALL void           GL_APIENTRY glCullFace (GLenum mode);
-GL_APICALL void           GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
-GL_APICALL void           GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
-GL_APICALL void           GL_APIENTRY glDeleteProgram (GLuint program);
-GL_APICALL void           GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
-GL_APICALL void           GL_APIENTRY glDeleteShader (GLuint shader);
-GL_APICALL void           GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
-GL_APICALL void           GL_APIENTRY glDepthFunc (GLenum func);
-GL_APICALL void           GL_APIENTRY glDepthMask (GLboolean flag);
-GL_APICALL void           GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
-GL_APICALL void           GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
-GL_APICALL void           GL_APIENTRY glDisable (GLenum cap);
-GL_APICALL void           GL_APIENTRY glDisableVertexAttribArray (GLuint index);
-GL_APICALL void           GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void           GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void           GL_APIENTRY glEnable (GLenum cap);
-GL_APICALL void           GL_APIENTRY glEnableVertexAttribArray (GLuint index);
-GL_APICALL void           GL_APIENTRY glFinish (void);
-GL_APICALL void           GL_APIENTRY glFlush (void);
-GL_APICALL void           GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
-GL_APICALL void           GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-GL_APICALL void           GL_APIENTRY glFrontFace (GLenum mode);
-GL_APICALL void           GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
-GL_APICALL void           GL_APIENTRY glGenerateMipmap (GLenum target);
-GL_APICALL void           GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
-GL_APICALL void           GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
-GL_APICALL void           GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void           GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void           GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-GL_APICALL void           GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL GLint          GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
-GL_APICALL void           GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
-GL_APICALL void           GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL GLenum         GL_APIENTRY glGetError (void);
-GL_APICALL void           GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
-GL_APICALL void           GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void           GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-GL_APICALL void           GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void           GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
-GL_APICALL void           GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
-GL_APICALL void           GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
-GL_APICALL void           GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL GLint          GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
-GL_APICALL void           GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
-GL_APICALL void           GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
-GL_APICALL void           GL_APIENTRY glHint (GLenum target, GLenum mode);
-GL_APICALL GLboolean      GL_APIENTRY glIsBuffer (GLuint buffer);
-GL_APICALL GLboolean      GL_APIENTRY glIsEnabled (GLenum cap);
-GL_APICALL GLboolean      GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
-GL_APICALL GLboolean      GL_APIENTRY glIsProgram (GLuint program);
-GL_APICALL GLboolean      GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
-GL_APICALL GLboolean      GL_APIENTRY glIsShader (GLuint shader);
-GL_APICALL GLboolean      GL_APIENTRY glIsTexture (GLuint texture);
-GL_APICALL void           GL_APIENTRY glLineWidth (GLfloat width);
-GL_APICALL void           GL_APIENTRY glLinkProgram (GLuint program);
-GL_APICALL void           GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
-GL_APICALL void           GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void           GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
-GL_APICALL void           GL_APIENTRY glReleaseShaderCompiler (void);
-GL_APICALL void           GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void           GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
-GL_APICALL void           GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void           GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-GL_APICALL void           GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
-GL_APICALL void           GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
-GL_APICALL void           GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
-GL_APICALL void           GL_APIENTRY glStencilMask (GLuint mask);
-GL_APICALL void           GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
-GL_APICALL void           GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void           GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void           GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void           GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
-GL_APICALL void           GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
-GL_APICALL void           GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
-GL_APICALL void           GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void           GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void           GL_APIENTRY glUniform1f (GLint location, GLfloat x);
-GL_APICALL void           GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void           GL_APIENTRY glUniform1i (GLint location, GLint x);
-GL_APICALL void           GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void           GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
-GL_APICALL void           GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void           GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
-GL_APICALL void           GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void           GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void           GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void           GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
-GL_APICALL void           GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void           GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void           GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
-GL_APICALL void           GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void           GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
-GL_APICALL void           GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUseProgram (GLuint program);
-GL_APICALL void           GL_APIENTRY glValidateProgram (GLuint program);
-GL_APICALL void           GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
-GL_APICALL void           GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
-GL_APICALL void           GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
-GL_APICALL void           GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
-GL_APICALL void           GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-GL_APICALL void           GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
-GL_APICALL void           GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-GL_APICALL void           GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void           GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
-GL_APICALL void           GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-
-/* OpenGL ES 3.0 */
-
-GL_APICALL void           GL_APIENTRY glReadBuffer (GLenum mode);
-GL_APICALL void           GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices);
-GL_APICALL void           GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void           GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
-GL_APICALL void           GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void           GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void           GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-GL_APICALL void           GL_APIENTRY glGenQueries (GLsizei n, GLuint* ids);
-GL_APICALL void           GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint* ids);
-GL_APICALL GLboolean      GL_APIENTRY glIsQuery (GLuint id);
-GL_APICALL void           GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
-GL_APICALL void           GL_APIENTRY glEndQuery (GLenum target);
-GL_APICALL void           GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint* params);
-GL_APICALL GLboolean      GL_APIENTRY glUnmapBuffer (GLenum target);
-GL_APICALL void           GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid** params);
-GL_APICALL void           GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum* bufs);
-GL_APICALL void           GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
-GL_APICALL void           GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void           GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GL_APICALL GLvoid*        GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
-GL_APICALL void           GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
-GL_APICALL void           GL_APIENTRY glBindVertexArray (GLuint array);
-GL_APICALL void           GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint* arrays);
-GL_APICALL void           GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint* arrays);
-GL_APICALL GLboolean      GL_APIENTRY glIsVertexArray (GLuint array);
-GL_APICALL void           GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint* data);
-GL_APICALL void           GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
-GL_APICALL void           GL_APIENTRY glEndTransformFeedback (void);
-GL_APICALL void           GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
-GL_APICALL void           GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
-GL_APICALL void           GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode);
-GL_APICALL void           GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name);
-GL_APICALL void           GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer);
-GL_APICALL void           GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params);
-GL_APICALL void           GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
-GL_APICALL void           GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-GL_APICALL void           GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint* v);
-GL_APICALL void           GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint* v);
-GL_APICALL void           GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint* params);
-GL_APICALL GLint          GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
-GL_APICALL void           GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
-GL_APICALL void           GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
-GL_APICALL void           GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
-GL_APICALL void           GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-GL_APICALL void           GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void           GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void           GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void           GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint* value);
-GL_APICALL void           GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint* value);
-GL_APICALL void           GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value);
-GL_APICALL void           GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value);
-GL_APICALL void           GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-GL_APICALL const GLubyte* GL_APIENTRY glGetStringi (GLenum name, GLuint index);
-GL_APICALL void           GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-GL_APICALL void           GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices);
-GL_APICALL void           GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
-GL_APICALL GLuint         GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar* uniformBlockName);
-GL_APICALL void           GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName);
-GL_APICALL void           GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-GL_APICALL void           GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
-GL_APICALL void           GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount);
-GL_APICALL GLsync         GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
-GL_APICALL GLboolean      GL_APIENTRY glIsSync (GLsync sync);
-GL_APICALL void           GL_APIENTRY glDeleteSync (GLsync sync);
-GL_APICALL GLenum         GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void           GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
-GL_APICALL void           GL_APIENTRY glGetInteger64v (GLenum pname, GLint64* params);
-GL_APICALL void           GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
-GL_APICALL void           GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64* data);
-GL_APICALL void           GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64* params);
-GL_APICALL void           GL_APIENTRY glGenSamplers (GLsizei count, GLuint* samplers);
-GL_APICALL void           GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint* samplers);
-GL_APICALL GLboolean      GL_APIENTRY glIsSampler (GLuint sampler);
-GL_APICALL void           GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
-GL_APICALL void           GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
-GL_APICALL void           GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint* param);
-GL_APICALL void           GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
-GL_APICALL void           GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat* param);
-GL_APICALL void           GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint* params);
-GL_APICALL void           GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat* params);
-GL_APICALL void           GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
-GL_APICALL void           GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
-GL_APICALL void           GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint* ids);
-GL_APICALL void           GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint* ids);
-GL_APICALL GLboolean      GL_APIENTRY glIsTransformFeedback (GLuint id);
-GL_APICALL void           GL_APIENTRY glPauseTransformFeedback (void);
-GL_APICALL void           GL_APIENTRY glResumeTransformFeedback (void);
-GL_APICALL void           GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary);
-GL_APICALL void           GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length);
-GL_APICALL void           GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
-GL_APICALL void           GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments);
-GL_APICALL void           GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void           GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
-GL_APICALL void           GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-GL_APICALL void           GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS            0x8C8C
+#define GL_SEPARATE_ATTRIBS               0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_RGBA32UI                       0x8D70
+#define GL_RGB32UI                        0x8D71
+#define GL_RGBA16UI                       0x8D76
+#define GL_RGB16UI                        0x8D77
+#define GL_RGBA8UI                        0x8D7C
+#define GL_RGB8UI                         0x8D7D
+#define GL_RGBA32I                        0x8D82
+#define GL_RGB32I                         0x8D83
+#define GL_RGBA16I                        0x8D88
+#define GL_RGB16I                         0x8D89
+#define GL_RGBA8I                         0x8D8E
+#define GL_RGB8I                          0x8D8F
+#define GL_RED_INTEGER                    0x8D94
+#define GL_RGB_INTEGER                    0x8D98
+#define GL_RGBA_INTEGER                   0x8D99
+#define GL_SAMPLER_2D_ARRAY               0x8DC1
+#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW            0x8DC5
+#define GL_UNSIGNED_INT_VEC2              0x8DC6
+#define GL_UNSIGNED_INT_VEC3              0x8DC7
+#define GL_UNSIGNED_INT_VEC4              0x8DC8
+#define GL_INT_SAMPLER_2D                 0x8DCA
+#define GL_INT_SAMPLER_3D                 0x8DCB
+#define GL_INT_SAMPLER_CUBE               0x8DCC
+#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF
+#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7
+#define GL_BUFFER_ACCESS_FLAGS            0x911F
+#define GL_BUFFER_MAP_LENGTH              0x9120
+#define GL_BUFFER_MAP_OFFSET              0x9121
+#define GL_DEPTH_COMPONENT32F             0x8CAC
+#define GL_DEPTH32F_STENCIL8              0x8CAD
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_DEFAULT            0x8218
+#define GL_FRAMEBUFFER_UNDEFINED          0x8219
+#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A
+#define GL_DEPTH_STENCIL                  0x84F9
+#define GL_UNSIGNED_INT_24_8              0x84FA
+#define GL_DEPTH24_STENCIL8               0x88F0
+#define GL_UNSIGNED_NORMALIZED            0x8C17
+#define GL_DRAW_FRAMEBUFFER_BINDING       0x8CA6
+#define GL_READ_FRAMEBUFFER               0x8CA8
+#define GL_DRAW_FRAMEBUFFER               0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA
+#define GL_RENDERBUFFER_SAMPLES           0x8CAB
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF
+#define GL_COLOR_ATTACHMENT1              0x8CE1
+#define GL_COLOR_ATTACHMENT2              0x8CE2
+#define GL_COLOR_ATTACHMENT3              0x8CE3
+#define GL_COLOR_ATTACHMENT4              0x8CE4
+#define GL_COLOR_ATTACHMENT5              0x8CE5
+#define GL_COLOR_ATTACHMENT6              0x8CE6
+#define GL_COLOR_ATTACHMENT7              0x8CE7
+#define GL_COLOR_ATTACHMENT8              0x8CE8
+#define GL_COLOR_ATTACHMENT9              0x8CE9
+#define GL_COLOR_ATTACHMENT10             0x8CEA
+#define GL_COLOR_ATTACHMENT11             0x8CEB
+#define GL_COLOR_ATTACHMENT12             0x8CEC
+#define GL_COLOR_ATTACHMENT13             0x8CED
+#define GL_COLOR_ATTACHMENT14             0x8CEE
+#define GL_COLOR_ATTACHMENT15             0x8CEF
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_MAX_SAMPLES                    0x8D57
+#define GL_HALF_FLOAT                     0x140B
+#define GL_MAP_READ_BIT                   0x0001
+#define GL_MAP_WRITE_BIT                  0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020
+#define GL_RG                             0x8227
+#define GL_RG_INTEGER                     0x8228
+#define GL_R8                             0x8229
+#define GL_RG8                            0x822B
+#define GL_R16F                           0x822D
+#define GL_R32F                           0x822E
+#define GL_RG16F                          0x822F
+#define GL_RG32F                          0x8230
+#define GL_R8I                            0x8231
+#define GL_R8UI                           0x8232
+#define GL_R16I                           0x8233
+#define GL_R16UI                          0x8234
+#define GL_R32I                           0x8235
+#define GL_R32UI                          0x8236
+#define GL_RG8I                           0x8237
+#define GL_RG8UI                          0x8238
+#define GL_RG16I                          0x8239
+#define GL_RG16UI                         0x823A
+#define GL_RG32I                          0x823B
+#define GL_RG32UI                         0x823C
+#define GL_VERTEX_ARRAY_BINDING           0x85B5
+#define GL_R8_SNORM                       0x8F94
+#define GL_RG8_SNORM                      0x8F95
+#define GL_RGB8_SNORM                     0x8F96
+#define GL_RGBA8_SNORM                    0x8F97
+#define GL_SIGNED_NORMALIZED              0x8F9C
+#define GL_PRIMITIVE_RESTART_FIXED_INDEX  0x8D69
+#define GL_COPY_READ_BUFFER               0x8F36
+#define GL_COPY_WRITE_BUFFER              0x8F37
+#define GL_COPY_READ_BUFFER_BINDING       0x8F36
+#define GL_COPY_WRITE_BUFFER_BINDING      0x8F37
+#define GL_UNIFORM_BUFFER                 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING         0x8A28
+#define GL_UNIFORM_BUFFER_START           0x8A29
+#define GL_UNIFORM_BUFFER_SIZE            0x8A2A
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F
+#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36
+#define GL_UNIFORM_TYPE                   0x8A37
+#define GL_UNIFORM_SIZE                   0x8A38
+#define GL_UNIFORM_NAME_LENGTH            0x8A39
+#define GL_UNIFORM_BLOCK_INDEX            0x8A3A
+#define GL_UNIFORM_OFFSET                 0x8A3B
+#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C
+#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D
+#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E
+#define GL_UNIFORM_BLOCK_BINDING          0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40
+#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_INVALID_INDEX                  0xFFFFFFFFu
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125
+#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111
+#define GL_OBJECT_TYPE                    0x9112
+#define GL_SYNC_CONDITION                 0x9113
+#define GL_SYNC_STATUS                    0x9114
+#define GL_SYNC_FLAGS                     0x9115
+#define GL_SYNC_FENCE                     0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117
+#define GL_UNSIGNALED                     0x9118
+#define GL_SIGNALED                       0x9119
+#define GL_ALREADY_SIGNALED               0x911A
+#define GL_TIMEOUT_EXPIRED                0x911B
+#define GL_CONDITION_SATISFIED            0x911C
+#define GL_WAIT_FAILED                    0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001
+#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE
+#define GL_ANY_SAMPLES_PASSED             0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
+#define GL_SAMPLER_BINDING                0x8919
+#define GL_RGB10_A2UI                     0x906F
+#define GL_TEXTURE_SWIZZLE_R              0x8E42
+#define GL_TEXTURE_SWIZZLE_G              0x8E43
+#define GL_TEXTURE_SWIZZLE_B              0x8E44
+#define GL_TEXTURE_SWIZZLE_A              0x8E45
+#define GL_GREEN                          0x1904
+#define GL_BLUE                           0x1905
+#define GL_INT_2_10_10_10_REV             0x8D9F
+#define GL_TRANSFORM_FEEDBACK             0x8E22
+#define GL_TRANSFORM_FEEDBACK_PAUSED      0x8E23
+#define GL_TRANSFORM_FEEDBACK_ACTIVE      0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25
+#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#define GL_PROGRAM_BINARY_LENGTH          0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE
+#define GL_PROGRAM_BINARY_FORMATS         0x87FF
+#define GL_COMPRESSED_R11_EAC             0x9270
+#define GL_COMPRESSED_SIGNED_R11_EAC      0x9271
+#define GL_COMPRESSED_RG11_EAC            0x9272
+#define GL_COMPRESSED_SIGNED_RG11_EAC     0x9273
+#define GL_COMPRESSED_RGB8_ETC2           0x9274
+#define GL_COMPRESSED_SRGB8_ETC2          0x9275
+#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
+#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
+#define GL_COMPRESSED_RGBA8_ETC2_EAC      0x9278
+#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
+#define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F
+#define GL_MAX_ELEMENT_INDEX              0x8D6B
+#define GL_NUM_SAMPLE_COUNTS              0x9380
+#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF
+GL_APICALL void GL_APIENTRY glReadBuffer (GLenum mode);
+GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id);
+GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glEndQuery (GLenum target);
+GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
+GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
+GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array);
+GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array);
+GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
+GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
+GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
+GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
+GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
+GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
+GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
+GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
+GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
+GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
+GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
+GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
+GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
+GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index);
+GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
+GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
+GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync);
+GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync);
+GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
+GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
+GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
+GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
+GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
+GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
+GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
+GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
+GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
+GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id);
+GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void);
+GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
+GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#endif /* GL_ES_VERSION_3_0 */
 
 #ifdef __cplusplus
 }
diff --git a/opengl/include/GLES3/gl31.h b/opengl/include/GLES3/gl31.h
new file mode 100644
index 0000000..cfb9069
--- /dev/null
+++ b/opengl/include/GLES3/gl31.h
@@ -0,0 +1,1184 @@
+#ifndef __gl31_h_
+#define __gl31_h_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2013-2014 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.
+*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision$ on $Date$
+*/
+
+#include <GLES3/gl3platform.h>
+
+/* Generated on date 20140517 */
+
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2.[0-9]|3.[01]
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
+
+#ifndef GL_ES_VERSION_2_0
+#define GL_ES_VERSION_2_0 1
+#include <KHR/khrplatform.h>
+typedef khronos_int8_t GLbyte;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef short GLshort;
+typedef unsigned short GLushort;
+typedef void GLvoid;
+typedef struct __GLsync *GLsync;
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef unsigned int GLenum;
+typedef unsigned int GLuint;
+typedef char GLchar;
+typedef khronos_float_t GLfloat;
+typedef khronos_ssize_t GLsizeiptr;
+typedef khronos_intptr_t GLintptr;
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+#define GL_DEPTH_BUFFER_BIT               0x00000100
+#define GL_STENCIL_BUFFER_BIT             0x00000400
+#define GL_COLOR_BUFFER_BIT               0x00004000
+#define GL_FALSE                          0
+#define GL_TRUE                           1
+#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_ZERO                           0
+#define GL_ONE                            1
+#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
+#define GL_FUNC_ADD                       0x8006
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_BLEND_EQUATION_RGB             0x8009
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+#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_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_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_DYNAMIC_DRAW                   0x88E8
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+#define GL_FRONT                          0x0404
+#define GL_BACK                           0x0405
+#define GL_FRONT_AND_BACK                 0x0408
+#define GL_TEXTURE_2D                     0x0DE1
+#define GL_CULL_FACE                      0x0B44
+#define GL_BLEND                          0x0BE2
+#define GL_DITHER                         0x0BD0
+#define GL_STENCIL_TEST                   0x0B90
+#define GL_DEPTH_TEST                     0x0B71
+#define GL_SCISSOR_TEST                   0x0C11
+#define GL_POLYGON_OFFSET_FILL            0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_COVERAGE                0x80A0
+#define GL_NO_ERROR                       0
+#define GL_INVALID_ENUM                   0x0500
+#define GL_INVALID_VALUE                  0x0501
+#define GL_INVALID_OPERATION              0x0502
+#define GL_OUT_OF_MEMORY                  0x0505
+#define GL_CW                             0x0900
+#define GL_CCW                            0x0901
+#define GL_LINE_WIDTH                     0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#define GL_CULL_FACE_MODE                 0x0B45
+#define GL_FRONT_FACE                     0x0B46
+#define GL_DEPTH_RANGE                    0x0B70
+#define GL_DEPTH_WRITEMASK                0x0B72
+#define GL_DEPTH_CLEAR_VALUE              0x0B73
+#define GL_DEPTH_FUNC                     0x0B74
+#define GL_STENCIL_CLEAR_VALUE            0x0B91
+#define GL_STENCIL_FUNC                   0x0B92
+#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_VALUE_MASK             0x0B93
+#define GL_STENCIL_WRITEMASK              0x0B98
+#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_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#define GL_VIEWPORT                       0x0BA2
+#define GL_SCISSOR_BOX                    0x0C10
+#define GL_COLOR_CLEAR_VALUE              0x0C22
+#define GL_COLOR_WRITEMASK                0x0C23
+#define GL_UNPACK_ALIGNMENT               0x0CF5
+#define GL_PACK_ALIGNMENT                 0x0D05
+#define GL_MAX_TEXTURE_SIZE               0x0D33
+#define GL_MAX_VIEWPORT_DIMS              0x0D3A
+#define GL_SUBPIXEL_BITS                  0x0D50
+#define GL_RED_BITS                       0x0D52
+#define GL_GREEN_BITS                     0x0D53
+#define GL_BLUE_BITS                      0x0D54
+#define GL_ALPHA_BITS                     0x0D55
+#define GL_DEPTH_BITS                     0x0D56
+#define GL_STENCIL_BITS                   0x0D57
+#define GL_POLYGON_OFFSET_UNITS           0x2A00
+#define GL_POLYGON_OFFSET_FACTOR          0x8038
+#define GL_TEXTURE_BINDING_2D             0x8069
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+#define GL_DONT_CARE                      0x1100
+#define GL_FASTEST                        0x1101
+#define GL_NICEST                         0x1102
+#define GL_GENERATE_MIPMAP_HINT           0x8192
+#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_FIXED                          0x140C
+#define GL_DEPTH_COMPONENT                0x1902
+#define GL_ALPHA                          0x1906
+#define GL_RGB                            0x1907
+#define GL_RGBA                           0x1908
+#define GL_LUMINANCE                      0x1909
+#define GL_LUMINANCE_ALPHA                0x190A
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+#define GL_FRAGMENT_SHADER                0x8B30
+#define GL_VERTEX_SHADER                  0x8B31
+#define GL_MAX_VERTEX_ATTRIBS             0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB
+#define GL_MAX_VARYING_VECTORS            0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD
+#define GL_SHADER_TYPE                    0x8B4F
+#define GL_DELETE_STATUS                  0x8B80
+#define GL_LINK_STATUS                    0x8B82
+#define GL_VALIDATE_STATUS                0x8B83
+#define GL_ATTACHED_SHADERS               0x8B85
+#define GL_ACTIVE_UNIFORMS                0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87
+#define GL_ACTIVE_ATTRIBUTES              0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION       0x8B8C
+#define GL_CURRENT_PROGRAM                0x8B8D
+#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_KEEP                           0x1E00
+#define GL_REPLACE                        0x1E01
+#define GL_INCR                           0x1E02
+#define GL_DECR                           0x1E03
+#define GL_INVERT                         0x150A
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+#define GL_VENDOR                         0x1F00
+#define GL_RENDERER                       0x1F01
+#define GL_VERSION                        0x1F02
+#define GL_EXTENSIONS                     0x1F03
+#define GL_NEAREST                        0x2600
+#define GL_LINEAR                         0x2601
+#define GL_NEAREST_MIPMAP_NEAREST         0x2700
+#define GL_LINEAR_MIPMAP_NEAREST          0x2701
+#define GL_NEAREST_MIPMAP_LINEAR          0x2702
+#define GL_LINEAR_MIPMAP_LINEAR           0x2703
+#define GL_TEXTURE_MAG_FILTER             0x2800
+#define GL_TEXTURE_MIN_FILTER             0x2801
+#define GL_TEXTURE_WRAP_S                 0x2802
+#define GL_TEXTURE_WRAP_T                 0x2803
+#define GL_TEXTURE                        0x1702
+#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_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+#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_REPEAT                         0x2901
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_MIRRORED_REPEAT                0x8370
+#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_2D                     0x8B5E
+#define GL_SAMPLER_CUBE                   0x8B60
+#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_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_SHADER_COMPILER                0x8DFA
+#define GL_SHADER_BINARY_FORMATS          0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+#define GL_RGBA4                          0x8056
+#define GL_RGB5_A1                        0x8057
+#define GL_RGB565                         0x8D62
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_STENCIL_INDEX8                 0x8D48
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+#define GL_NONE                           0
+#define GL_FRAMEBUFFER_COMPLETE           0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
+GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode);
+GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
+GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
+GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glFinish (void);
+GL_APICALL void GL_APIENTRY glFlush (void);
+GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
+GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
+GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
+GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL GLenum GL_APIENTRY glGetError (void);
+GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
+GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
+GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
+GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
+GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);
+GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GL_ES_VERSION_2_0 */
+
+#ifndef GL_ES_VERSION_3_0
+#define GL_ES_VERSION_3_0 1
+typedef unsigned short GLhalf;
+#define GL_READ_BUFFER                    0x0C02
+#define GL_UNPACK_ROW_LENGTH              0x0CF2
+#define GL_UNPACK_SKIP_ROWS               0x0CF3
+#define GL_UNPACK_SKIP_PIXELS             0x0CF4
+#define GL_PACK_ROW_LENGTH                0x0D02
+#define GL_PACK_SKIP_ROWS                 0x0D03
+#define GL_PACK_SKIP_PIXELS               0x0D04
+#define GL_COLOR                          0x1800
+#define GL_DEPTH                          0x1801
+#define GL_STENCIL                        0x1802
+#define GL_RED                            0x1903
+#define GL_RGB8                           0x8051
+#define GL_RGBA8                          0x8058
+#define GL_RGB10_A2                       0x8059
+#define GL_TEXTURE_BINDING_3D             0x806A
+#define GL_UNPACK_SKIP_IMAGES             0x806D
+#define GL_UNPACK_IMAGE_HEIGHT            0x806E
+#define GL_TEXTURE_3D                     0x806F
+#define GL_TEXTURE_WRAP_R                 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE            0x8073
+#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368
+#define GL_MAX_ELEMENTS_VERTICES          0x80E8
+#define GL_MAX_ELEMENTS_INDICES           0x80E9
+#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_MIN                            0x8007
+#define GL_MAX                            0x8008
+#define GL_DEPTH_COMPONENT24              0x81A6
+#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD
+#define GL_TEXTURE_COMPARE_MODE           0x884C
+#define GL_TEXTURE_COMPARE_FUNC           0x884D
+#define GL_CURRENT_QUERY                  0x8865
+#define GL_QUERY_RESULT                   0x8866
+#define GL_QUERY_RESULT_AVAILABLE         0x8867
+#define GL_BUFFER_MAPPED                  0x88BC
+#define GL_BUFFER_MAP_POINTER             0x88BD
+#define GL_STREAM_READ                    0x88E1
+#define GL_STREAM_COPY                    0x88E2
+#define GL_STATIC_READ                    0x88E5
+#define GL_STATIC_COPY                    0x88E6
+#define GL_DYNAMIC_READ                   0x88E9
+#define GL_DYNAMIC_COPY                   0x88EA
+#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_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A
+#define GL_SAMPLER_3D                     0x8B5F
+#define GL_SAMPLER_2D_SHADOW              0x8B62
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#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_SRGB8_ALPHA8                   0x8C43
+#define GL_COMPARE_REF_TO_TEXTURE         0x884E
+#define GL_MAJOR_VERSION                  0x821B
+#define GL_MINOR_VERSION                  0x821C
+#define GL_NUM_EXTENSIONS                 0x821D
+#define GL_RGBA32F                        0x8814
+#define GL_RGB32F                         0x8815
+#define GL_RGBA16F                        0x881A
+#define GL_RGB16F                         0x881B
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD
+#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF
+#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905
+#define GL_MAX_VARYING_COMPONENTS         0x8B4B
+#define GL_TEXTURE_2D_ARRAY               0x8C1A
+#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D
+#define GL_R11F_G11F_B10F                 0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B
+#define GL_RGB9_E5                        0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_RASTERIZER_DISCARD             0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS            0x8C8C
+#define GL_SEPARATE_ATTRIBS               0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_RGBA32UI                       0x8D70
+#define GL_RGB32UI                        0x8D71
+#define GL_RGBA16UI                       0x8D76
+#define GL_RGB16UI                        0x8D77
+#define GL_RGBA8UI                        0x8D7C
+#define GL_RGB8UI                         0x8D7D
+#define GL_RGBA32I                        0x8D82
+#define GL_RGB32I                         0x8D83
+#define GL_RGBA16I                        0x8D88
+#define GL_RGB16I                         0x8D89
+#define GL_RGBA8I                         0x8D8E
+#define GL_RGB8I                          0x8D8F
+#define GL_RED_INTEGER                    0x8D94
+#define GL_RGB_INTEGER                    0x8D98
+#define GL_RGBA_INTEGER                   0x8D99
+#define GL_SAMPLER_2D_ARRAY               0x8DC1
+#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW            0x8DC5
+#define GL_UNSIGNED_INT_VEC2              0x8DC6
+#define GL_UNSIGNED_INT_VEC3              0x8DC7
+#define GL_UNSIGNED_INT_VEC4              0x8DC8
+#define GL_INT_SAMPLER_2D                 0x8DCA
+#define GL_INT_SAMPLER_3D                 0x8DCB
+#define GL_INT_SAMPLER_CUBE               0x8DCC
+#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF
+#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7
+#define GL_BUFFER_ACCESS_FLAGS            0x911F
+#define GL_BUFFER_MAP_LENGTH              0x9120
+#define GL_BUFFER_MAP_OFFSET              0x9121
+#define GL_DEPTH_COMPONENT32F             0x8CAC
+#define GL_DEPTH32F_STENCIL8              0x8CAD
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_DEFAULT            0x8218
+#define GL_FRAMEBUFFER_UNDEFINED          0x8219
+#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A
+#define GL_DEPTH_STENCIL                  0x84F9
+#define GL_UNSIGNED_INT_24_8              0x84FA
+#define GL_DEPTH24_STENCIL8               0x88F0
+#define GL_UNSIGNED_NORMALIZED            0x8C17
+#define GL_DRAW_FRAMEBUFFER_BINDING       0x8CA6
+#define GL_READ_FRAMEBUFFER               0x8CA8
+#define GL_DRAW_FRAMEBUFFER               0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA
+#define GL_RENDERBUFFER_SAMPLES           0x8CAB
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF
+#define GL_COLOR_ATTACHMENT1              0x8CE1
+#define GL_COLOR_ATTACHMENT2              0x8CE2
+#define GL_COLOR_ATTACHMENT3              0x8CE3
+#define GL_COLOR_ATTACHMENT4              0x8CE4
+#define GL_COLOR_ATTACHMENT5              0x8CE5
+#define GL_COLOR_ATTACHMENT6              0x8CE6
+#define GL_COLOR_ATTACHMENT7              0x8CE7
+#define GL_COLOR_ATTACHMENT8              0x8CE8
+#define GL_COLOR_ATTACHMENT9              0x8CE9
+#define GL_COLOR_ATTACHMENT10             0x8CEA
+#define GL_COLOR_ATTACHMENT11             0x8CEB
+#define GL_COLOR_ATTACHMENT12             0x8CEC
+#define GL_COLOR_ATTACHMENT13             0x8CED
+#define GL_COLOR_ATTACHMENT14             0x8CEE
+#define GL_COLOR_ATTACHMENT15             0x8CEF
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_MAX_SAMPLES                    0x8D57
+#define GL_HALF_FLOAT                     0x140B
+#define GL_MAP_READ_BIT                   0x0001
+#define GL_MAP_WRITE_BIT                  0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020
+#define GL_RG                             0x8227
+#define GL_RG_INTEGER                     0x8228
+#define GL_R8                             0x8229
+#define GL_RG8                            0x822B
+#define GL_R16F                           0x822D
+#define GL_R32F                           0x822E
+#define GL_RG16F                          0x822F
+#define GL_RG32F                          0x8230
+#define GL_R8I                            0x8231
+#define GL_R8UI                           0x8232
+#define GL_R16I                           0x8233
+#define GL_R16UI                          0x8234
+#define GL_R32I                           0x8235
+#define GL_R32UI                          0x8236
+#define GL_RG8I                           0x8237
+#define GL_RG8UI                          0x8238
+#define GL_RG16I                          0x8239
+#define GL_RG16UI                         0x823A
+#define GL_RG32I                          0x823B
+#define GL_RG32UI                         0x823C
+#define GL_VERTEX_ARRAY_BINDING           0x85B5
+#define GL_R8_SNORM                       0x8F94
+#define GL_RG8_SNORM                      0x8F95
+#define GL_RGB8_SNORM                     0x8F96
+#define GL_RGBA8_SNORM                    0x8F97
+#define GL_SIGNED_NORMALIZED              0x8F9C
+#define GL_PRIMITIVE_RESTART_FIXED_INDEX  0x8D69
+#define GL_COPY_READ_BUFFER               0x8F36
+#define GL_COPY_WRITE_BUFFER              0x8F37
+#define GL_COPY_READ_BUFFER_BINDING       0x8F36
+#define GL_COPY_WRITE_BUFFER_BINDING      0x8F37
+#define GL_UNIFORM_BUFFER                 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING         0x8A28
+#define GL_UNIFORM_BUFFER_START           0x8A29
+#define GL_UNIFORM_BUFFER_SIZE            0x8A2A
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F
+#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36
+#define GL_UNIFORM_TYPE                   0x8A37
+#define GL_UNIFORM_SIZE                   0x8A38
+#define GL_UNIFORM_NAME_LENGTH            0x8A39
+#define GL_UNIFORM_BLOCK_INDEX            0x8A3A
+#define GL_UNIFORM_OFFSET                 0x8A3B
+#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C
+#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D
+#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E
+#define GL_UNIFORM_BLOCK_BINDING          0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40
+#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_INVALID_INDEX                  0xFFFFFFFFu
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125
+#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111
+#define GL_OBJECT_TYPE                    0x9112
+#define GL_SYNC_CONDITION                 0x9113
+#define GL_SYNC_STATUS                    0x9114
+#define GL_SYNC_FLAGS                     0x9115
+#define GL_SYNC_FENCE                     0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117
+#define GL_UNSIGNALED                     0x9118
+#define GL_SIGNALED                       0x9119
+#define GL_ALREADY_SIGNALED               0x911A
+#define GL_TIMEOUT_EXPIRED                0x911B
+#define GL_CONDITION_SATISFIED            0x911C
+#define GL_WAIT_FAILED                    0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001
+#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE
+#define GL_ANY_SAMPLES_PASSED             0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
+#define GL_SAMPLER_BINDING                0x8919
+#define GL_RGB10_A2UI                     0x906F
+#define GL_TEXTURE_SWIZZLE_R              0x8E42
+#define GL_TEXTURE_SWIZZLE_G              0x8E43
+#define GL_TEXTURE_SWIZZLE_B              0x8E44
+#define GL_TEXTURE_SWIZZLE_A              0x8E45
+#define GL_GREEN                          0x1904
+#define GL_BLUE                           0x1905
+#define GL_INT_2_10_10_10_REV             0x8D9F
+#define GL_TRANSFORM_FEEDBACK             0x8E22
+#define GL_TRANSFORM_FEEDBACK_PAUSED      0x8E23
+#define GL_TRANSFORM_FEEDBACK_ACTIVE      0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25
+#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#define GL_PROGRAM_BINARY_LENGTH          0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE
+#define GL_PROGRAM_BINARY_FORMATS         0x87FF
+#define GL_COMPRESSED_R11_EAC             0x9270
+#define GL_COMPRESSED_SIGNED_R11_EAC      0x9271
+#define GL_COMPRESSED_RG11_EAC            0x9272
+#define GL_COMPRESSED_SIGNED_RG11_EAC     0x9273
+#define GL_COMPRESSED_RGB8_ETC2           0x9274
+#define GL_COMPRESSED_SRGB8_ETC2          0x9275
+#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
+#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
+#define GL_COMPRESSED_RGBA8_ETC2_EAC      0x9278
+#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
+#define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F
+#define GL_MAX_ELEMENT_INDEX              0x8D6B
+#define GL_NUM_SAMPLE_COUNTS              0x9380
+#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF
+GL_APICALL void GL_APIENTRY glReadBuffer (GLenum mode);
+GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id);
+GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glEndQuery (GLenum target);
+GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);
+GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
+GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array);
+GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array);
+GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
+GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
+GL_APICALL void GL_APIENTRY glEndTransformFeedback (void);
+GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
+GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
+GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
+GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
+GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
+GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
+GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0);
+GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
+GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
+GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
+GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
+GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index);
+GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
+GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
+GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
+GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync);
+GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync);
+GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);
+GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
+GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
+GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
+GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
+GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler);
+GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler);
+GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
+GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
+GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
+GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id);
+GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void);
+GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void);
+GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#endif /* GL_ES_VERSION_3_0 */
+
+#ifndef GL_ES_VERSION_3_1
+#define GL_ES_VERSION_3_1 1
+#define GL_COMPUTE_SHADER                 0x91B9
+#define GL_MAX_COMPUTE_UNIFORM_BLOCKS     0x91BB
+#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
+#define GL_MAX_COMPUTE_IMAGE_UNIFORMS     0x91BD
+#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
+#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
+#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
+#define GL_MAX_COMPUTE_ATOMIC_COUNTERS    0x8265
+#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
+#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
+#define GL_MAX_COMPUTE_WORK_GROUP_COUNT   0x91BE
+#define GL_MAX_COMPUTE_WORK_GROUP_SIZE    0x91BF
+#define GL_COMPUTE_WORK_GROUP_SIZE        0x8267
+#define GL_DISPATCH_INDIRECT_BUFFER       0x90EE
+#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
+#define GL_COMPUTE_SHADER_BIT             0x00000020
+#define GL_DRAW_INDIRECT_BUFFER           0x8F3F
+#define GL_DRAW_INDIRECT_BUFFER_BINDING   0x8F43
+#define GL_MAX_UNIFORM_LOCATIONS          0x826E
+#define GL_FRAMEBUFFER_DEFAULT_WIDTH      0x9310
+#define GL_FRAMEBUFFER_DEFAULT_HEIGHT     0x9311
+#define GL_FRAMEBUFFER_DEFAULT_SAMPLES    0x9313
+#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
+#define GL_MAX_FRAMEBUFFER_WIDTH          0x9315
+#define GL_MAX_FRAMEBUFFER_HEIGHT         0x9316
+#define GL_MAX_FRAMEBUFFER_SAMPLES        0x9318
+#define GL_UNIFORM                        0x92E1
+#define GL_UNIFORM_BLOCK                  0x92E2
+#define GL_PROGRAM_INPUT                  0x92E3
+#define GL_PROGRAM_OUTPUT                 0x92E4
+#define GL_BUFFER_VARIABLE                0x92E5
+#define GL_SHADER_STORAGE_BLOCK           0x92E6
+#define GL_ATOMIC_COUNTER_BUFFER          0x92C0
+#define GL_TRANSFORM_FEEDBACK_VARYING     0x92F4
+#define GL_ACTIVE_RESOURCES               0x92F5
+#define GL_MAX_NAME_LENGTH                0x92F6
+#define GL_MAX_NUM_ACTIVE_VARIABLES       0x92F7
+#define GL_NAME_LENGTH                    0x92F9
+#define GL_TYPE                           0x92FA
+#define GL_ARRAY_SIZE                     0x92FB
+#define GL_OFFSET                         0x92FC
+#define GL_BLOCK_INDEX                    0x92FD
+#define GL_ARRAY_STRIDE                   0x92FE
+#define GL_MATRIX_STRIDE                  0x92FF
+#define GL_IS_ROW_MAJOR                   0x9300
+#define GL_ATOMIC_COUNTER_BUFFER_INDEX    0x9301
+#define GL_BUFFER_BINDING                 0x9302
+#define GL_BUFFER_DATA_SIZE               0x9303
+#define GL_NUM_ACTIVE_VARIABLES           0x9304
+#define GL_ACTIVE_VARIABLES               0x9305
+#define GL_REFERENCED_BY_VERTEX_SHADER    0x9306
+#define GL_REFERENCED_BY_FRAGMENT_SHADER  0x930A
+#define GL_REFERENCED_BY_COMPUTE_SHADER   0x930B
+#define GL_TOP_LEVEL_ARRAY_SIZE           0x930C
+#define GL_TOP_LEVEL_ARRAY_STRIDE         0x930D
+#define GL_LOCATION                       0x930E
+#define GL_VERTEX_SHADER_BIT              0x00000001
+#define GL_FRAGMENT_SHADER_BIT            0x00000002
+#define GL_ALL_SHADER_BITS                0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE              0x8258
+#define GL_ACTIVE_PROGRAM                 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING       0x825A
+#define GL_ATOMIC_COUNTER_BUFFER_BINDING  0x92C1
+#define GL_ATOMIC_COUNTER_BUFFER_START    0x92C2
+#define GL_ATOMIC_COUNTER_BUFFER_SIZE     0x92C3
+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
+#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
+#define GL_MAX_VERTEX_ATOMIC_COUNTERS     0x92D2
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS   0x92D6
+#define GL_MAX_COMBINED_ATOMIC_COUNTERS   0x92D7
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
+#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS  0x92D9
+#define GL_UNSIGNED_INT_ATOMIC_COUNTER    0x92DB
+#define GL_MAX_IMAGE_UNITS                0x8F38
+#define GL_MAX_VERTEX_IMAGE_UNIFORMS      0x90CA
+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS    0x90CE
+#define GL_MAX_COMBINED_IMAGE_UNIFORMS    0x90CF
+#define GL_IMAGE_BINDING_NAME             0x8F3A
+#define GL_IMAGE_BINDING_LEVEL            0x8F3B
+#define GL_IMAGE_BINDING_LAYERED          0x8F3C
+#define GL_IMAGE_BINDING_LAYER            0x8F3D
+#define GL_IMAGE_BINDING_ACCESS           0x8F3E
+#define GL_IMAGE_BINDING_FORMAT           0x906E
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
+#define GL_ELEMENT_ARRAY_BARRIER_BIT      0x00000002
+#define GL_UNIFORM_BARRIER_BIT            0x00000004
+#define GL_TEXTURE_FETCH_BARRIER_BIT      0x00000008
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
+#define GL_COMMAND_BARRIER_BIT            0x00000040
+#define GL_PIXEL_BUFFER_BARRIER_BIT       0x00000080
+#define GL_TEXTURE_UPDATE_BARRIER_BIT     0x00000100
+#define GL_BUFFER_UPDATE_BARRIER_BIT      0x00000200
+#define GL_FRAMEBUFFER_BARRIER_BIT        0x00000400
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
+#define GL_ATOMIC_COUNTER_BARRIER_BIT     0x00001000
+#define GL_ALL_BARRIER_BITS               0xFFFFFFFF
+#define GL_IMAGE_2D                       0x904D
+#define GL_IMAGE_3D                       0x904E
+#define GL_IMAGE_CUBE                     0x9050
+#define GL_IMAGE_2D_ARRAY                 0x9053
+#define GL_INT_IMAGE_2D                   0x9058
+#define GL_INT_IMAGE_3D                   0x9059
+#define GL_INT_IMAGE_CUBE                 0x905B
+#define GL_INT_IMAGE_2D_ARRAY             0x905E
+#define GL_UNSIGNED_INT_IMAGE_2D          0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D          0x9064
+#define GL_UNSIGNED_INT_IMAGE_CUBE        0x9066
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY    0x9069
+#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
+#define GL_READ_ONLY                      0x88B8
+#define GL_WRITE_ONLY                     0x88B9
+#define GL_READ_WRITE                     0x88BA
+#define GL_SHADER_STORAGE_BUFFER          0x90D2
+#define GL_SHADER_STORAGE_BUFFER_BINDING  0x90D3
+#define GL_SHADER_STORAGE_BUFFER_START    0x90D4
+#define GL_SHADER_STORAGE_BUFFER_SIZE     0x90D5
+#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
+#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
+#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
+#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
+#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
+#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE  0x90DE
+#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
+#define GL_SHADER_STORAGE_BARRIER_BIT     0x00002000
+#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39
+#define GL_DEPTH_STENCIL_TEXTURE_MODE     0x90EA
+#define GL_STENCIL_INDEX                  0x1901
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
+#define GL_SAMPLE_POSITION                0x8E50
+#define GL_SAMPLE_MASK                    0x8E51
+#define GL_SAMPLE_MASK_VALUE              0x8E52
+#define GL_TEXTURE_2D_MULTISAMPLE         0x9100
+#define GL_MAX_SAMPLE_MASK_WORDS          0x8E59
+#define GL_MAX_COLOR_TEXTURE_SAMPLES      0x910E
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES      0x910F
+#define GL_MAX_INTEGER_SAMPLES            0x9110
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_SAMPLES                0x9106
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_TEXTURE_WIDTH                  0x1000
+#define GL_TEXTURE_HEIGHT                 0x1001
+#define GL_TEXTURE_DEPTH                  0x8071
+#define GL_TEXTURE_INTERNAL_FORMAT        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_DEPTH_SIZE             0x884A
+#define GL_TEXTURE_STENCIL_SIZE           0x88F1
+#define GL_TEXTURE_SHARED_SIZE            0x8C3F
+#define GL_TEXTURE_RED_TYPE               0x8C10
+#define GL_TEXTURE_GREEN_TYPE             0x8C11
+#define GL_TEXTURE_BLUE_TYPE              0x8C12
+#define GL_TEXTURE_ALPHA_TYPE             0x8C13
+#define GL_TEXTURE_DEPTH_TYPE             0x8C16
+#define GL_TEXTURE_COMPRESSED             0x86A1
+#define GL_SAMPLER_2D_MULTISAMPLE         0x9108
+#define GL_INT_SAMPLER_2D_MULTISAMPLE     0x9109
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_VERTEX_ATTRIB_BINDING          0x82D4
+#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET  0x82D5
+#define GL_VERTEX_BINDING_DIVISOR         0x82D6
+#define GL_VERTEX_BINDING_OFFSET          0x82D7
+#define GL_VERTEX_BINDING_STRIDE          0x82D8
+#define GL_VERTEX_BINDING_BUFFER          0x8F4F
+#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
+#define GL_MAX_VERTEX_ATTRIB_BINDINGS     0x82DA
+#define GL_MAX_VERTEX_ATTRIB_STRIDE       0x82E5
+GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect);
+GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);
+GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);
+GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
+GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
+GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
+GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
+GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
+GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers);
+GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
+GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
+GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
+GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
+GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
+GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
+#endif /* GL_ES_VERSION_3_1 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 22990f3..6e77e45 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -408,9 +408,11 @@
     if (dp) {
         EGLDisplay iDpy = dp->disp.dpy;
 
-        if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
-            ALOGE("EGLNativeWindowType %p already connected to another API",
-                    window);
+        int result = native_window_api_connect(window, NATIVE_WINDOW_API_EGL);
+        if (result != OK) {
+            ALOGE("eglCreateWindowSurface: native_window_api_connect (win=%p) "
+                    "failed (%#x) (already connected to another API?)",
+                    window, result);
             return setError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
         }
 
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
index 3e228e4..4f07053 100644
--- a/opengl/libs/EGL/trace.cpp
+++ b/opengl/libs/EGL/trace.cpp
@@ -360,25 +360,6 @@
 #undef TRACE_GL_VOID
 #undef TRACE_GL
 
-// define the ES 1.0 Debug_gl* functions as Tracing_gl functions
-#define TRACE_GL_VOID(_api, _args, _argList, ...)                         \
-static void Debug_ ## _api _args {                                      \
-    TraceGL(#_api, __VA_ARGS__);                                          \
-    gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl;  \
-    _c->_api _argList;                                                    \
-}
-
-#define TRACE_GL(_type, _api, _args, _argList, ...)                       \
-static _type Debug_ ## _api _args {                                     \
-    TraceGL(#_api, __VA_ARGS__);                                        \
-    gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl;  \
-    return _c->_api _argList;                                             \
-}
-
-extern "C" {
-#include "../debug.in"
-}
-
 ///////////////////////////////////////////////////////////////////////////
 // Systrace
 ///////////////////////////////////////////////////////////////////////////
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index e112fec..b07228f 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -20,10 +20,6 @@
 
 #include <sys/ioctl.h>
 
-#include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
-#include <GLES2/gl2ext.h>
-
 #include <cutils/log.h>
 #include <cutils/properties.h>
 
@@ -163,9 +159,10 @@
 
 
 extern "C" {
-#include "gl3_api.in"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#include "gl2_api.in"
 #include "gl2ext_api.in"
-#include "gl3ext_api.in"
+#pragma GCC diagnostic warning "-Wunused-parameter"
 }
 
 #undef API_ENTRY
diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in
index 89c8b8d..8363960 100644
--- a/opengl/libs/GLES2/gl2_api.in
+++ b/opengl/libs/GLES2/gl2_api.in
@@ -4,7 +4,7 @@
 void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) {
     CALL_GL_API(glAttachShader, program, shader);
 }
-void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) {
+void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar * name) {
     CALL_GL_API(glBindAttribLocation, program, index, name);
 }
 void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
@@ -19,10 +19,10 @@
 void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) {
     CALL_GL_API(glBindTexture, target, texture);
 }
-void API_ENTRY(glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
+void API_ENTRY(glBlendColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
     CALL_GL_API(glBlendColor, red, green, blue, alpha);
 }
-void API_ENTRY(glBlendEquation)( GLenum mode ) {
+void API_ENTRY(glBlendEquation)(GLenum mode) {
     CALL_GL_API(glBlendEquation, mode);
 }
 void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) {
@@ -31,13 +31,13 @@
 void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) {
     CALL_GL_API(glBlendFunc, sfactor, dfactor);
 }
-void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
-    CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha);
+void API_ENTRY(glBlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {
+    CALL_GL_API(glBlendFuncSeparate, sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
 }
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
+void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const void * data, GLenum usage) {
     CALL_GL_API(glBufferData, target, size, data, usage);
 }
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
+void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data) {
     CALL_GL_API(glBufferSubData, target, offset, size, data);
 }
 GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) {
@@ -46,11 +46,11 @@
 void API_ENTRY(glClear)(GLbitfield mask) {
     CALL_GL_API(glClear, mask);
 }
-void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
+void API_ENTRY(glClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
     CALL_GL_API(glClearColor, red, green, blue, alpha);
 }
-void API_ENTRY(glClearDepthf)(GLclampf depth) {
-    CALL_GL_API(glClearDepthf, depth);
+void API_ENTRY(glClearDepthf)(GLfloat d) {
+    CALL_GL_API(glClearDepthf, d);
 }
 void API_ENTRY(glClearStencil)(GLint s) {
     CALL_GL_API(glClearStencil, s);
@@ -61,10 +61,10 @@
 void API_ENTRY(glCompileShader)(GLuint shader) {
     CALL_GL_API(glCompileShader, shader);
 }
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
+void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data) {
     CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
 }
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
+void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data) {
     CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
 }
 void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
@@ -82,22 +82,22 @@
 void API_ENTRY(glCullFace)(GLenum mode) {
     CALL_GL_API(glCullFace, mode);
 }
-void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint* buffers) {
+void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint * buffers) {
     CALL_GL_API(glDeleteBuffers, n, buffers);
 }
-void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) {
+void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint * framebuffers) {
     CALL_GL_API(glDeleteFramebuffers, n, framebuffers);
 }
 void API_ENTRY(glDeleteProgram)(GLuint program) {
     CALL_GL_API(glDeleteProgram, program);
 }
-void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) {
+void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint * renderbuffers) {
     CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers);
 }
 void API_ENTRY(glDeleteShader)(GLuint shader) {
     CALL_GL_API(glDeleteShader, shader);
 }
-void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint* textures) {
+void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint * textures) {
     CALL_GL_API(glDeleteTextures, n, textures);
 }
 void API_ENTRY(glDepthFunc)(GLenum func) {
@@ -106,8 +106,8 @@
 void API_ENTRY(glDepthMask)(GLboolean flag) {
     CALL_GL_API(glDepthMask, flag);
 }
-void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) {
-    CALL_GL_API(glDepthRangef, zNear, zFar);
+void API_ENTRY(glDepthRangef)(GLfloat n, GLfloat f) {
+    CALL_GL_API(glDepthRangef, n, f);
 }
 void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) {
     CALL_GL_API(glDetachShader, program, shader);
@@ -121,7 +121,7 @@
 void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
     CALL_GL_API(glDrawArrays, mode, first, count);
 }
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
+void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void * indices) {
     CALL_GL_API(glDrawElements, mode, count, type, indices);
 }
 void API_ENTRY(glEnable)(GLenum cap) {
@@ -145,97 +145,97 @@
 void API_ENTRY(glFrontFace)(GLenum mode) {
     CALL_GL_API(glFrontFace, mode);
 }
-void API_ENTRY(glGenBuffers)(GLsizei n, GLuint* buffers) {
+void API_ENTRY(glGenBuffers)(GLsizei n, GLuint * buffers) {
     CALL_GL_API(glGenBuffers, n, buffers);
 }
 void API_ENTRY(glGenerateMipmap)(GLenum target) {
     CALL_GL_API(glGenerateMipmap, target);
 }
-void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint* framebuffers) {
+void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint * framebuffers) {
     CALL_GL_API(glGenFramebuffers, n, framebuffers);
 }
-void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) {
+void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint * renderbuffers) {
     CALL_GL_API(glGenRenderbuffers, n, renderbuffers);
 }
-void API_ENTRY(glGenTextures)(GLsizei n, GLuint* textures) {
+void API_ENTRY(glGenTextures)(GLsizei n, GLuint * textures) {
     CALL_GL_API(glGenTextures, n, textures);
 }
-void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
-    CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name);
+void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) {
+    CALL_GL_API(glGetActiveAttrib, program, index, bufSize, length, size, type, name);
 }
-void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
-    CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name);
+void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) {
+    CALL_GL_API(glGetActiveUniform, program, index, bufSize, length, size, type, name);
 }
-void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
-    CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders);
+void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders) {
+    CALL_GL_API(glGetAttachedShaders, program, maxCount, count, shaders);
 }
-GLint API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar* name) {
+GLint API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar * name) {
     CALL_GL_API_RETURN(glGetAttribLocation, program, name);
 }
-void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) {
-    CALL_GL_API(glGetBooleanv, pname, params);
+void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean * data) {
+    CALL_GL_API(glGetBooleanv, pname, data);
 }
-void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
+void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetBufferParameteriv, target, pname, params);
 }
 GLenum API_ENTRY(glGetError)(void) {
     CALL_GL_API_RETURN(glGetError);
 }
-void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) {
-    CALL_GL_API(glGetFloatv, pname, params);
+void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat * data) {
+    CALL_GL_API(glGetFloatv, pname, data);
 }
-void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
+void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint * params) {
     CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params);
 }
-void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) {
-    CALL_GL_API(glGetIntegerv, pname, params);
+void API_ENTRY(glGetIntegerv)(GLenum pname, GLint * data) {
+    CALL_GL_API(glGetIntegerv, pname, data);
 }
-void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint* params) {
+void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint * params) {
     CALL_GL_API(glGetProgramiv, program, pname, params);
 }
-void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
-    CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog);
+void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
+    CALL_GL_API(glGetProgramInfoLog, program, bufSize, length, infoLog);
 }
-void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
+void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params);
 }
-void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) {
+void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint * params) {
     CALL_GL_API(glGetShaderiv, shader, pname, params);
 }
-void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
-    CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog);
+void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
+    CALL_GL_API(glGetShaderInfoLog, shader, bufSize, length, infoLog);
 }
-void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
+void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision) {
     CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision);
 }
-void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
-    CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
+void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) {
+    CALL_GL_API(glGetShaderSource, shader, bufSize, length, source);
 }
-const GLubyte* API_ENTRY(__glGetString)(GLenum name) {
+const GLubyte * API_ENTRY(__glGetString)(GLenum name) {
     CALL_GL_API_RETURN(glGetString, name);
 }
-void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) {
+void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params) {
     CALL_GL_API(glGetTexParameterfv, target, pname, params);
 }
-void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) {
+void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetTexParameteriv, target, pname, params);
 }
-void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) {
+void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat * params) {
     CALL_GL_API(glGetUniformfv, program, location, params);
 }
-void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) {
+void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint * params) {
     CALL_GL_API(glGetUniformiv, program, location, params);
 }
-GLint API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar* name) {
+GLint API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar * name) {
     CALL_GL_API_RETURN(glGetUniformLocation, program, name);
 }
-void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) {
+void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat * params) {
     CALL_GL_API(glGetVertexAttribfv, index, pname, params);
 }
-void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) {
+void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint * params) {
     CALL_GL_API(glGetVertexAttribiv, index, pname, params);
 }
-void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) {
+void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, void ** pointer) {
     CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer);
 }
 void API_ENTRY(glHint)(GLenum target, GLenum mode) {
@@ -274,7 +274,7 @@
 void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) {
     CALL_GL_API(glPolygonOffset, factor, units);
 }
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
+void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels) {
     CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
 }
 void API_ENTRY(glReleaseShaderCompiler)(void) {
@@ -283,16 +283,16 @@
 void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height);
 }
-void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) {
+void API_ENTRY(glSampleCoverage)(GLfloat value, GLboolean invert) {
     CALL_GL_API(glSampleCoverage, value, invert);
 }
 void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) {
     CALL_GL_API(glScissor, x, y, width, height);
 }
-void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
-    CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length);
+void API_ENTRY(glShaderBinary)(GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length) {
+    CALL_GL_API(glShaderBinary, count, shaders, binaryformat, binary, length);
 }
-void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) {
+void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length) {
     CALL_GL_API(glShaderSource, shader, count, string, length);
 }
 void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {
@@ -310,82 +310,82 @@
 void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) {
     CALL_GL_API(glStencilOp, fail, zfail, zpass);
 }
-void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
-    CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass);
+void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) {
+    CALL_GL_API(glStencilOpSeparate, face, sfail, dpfail, dppass);
 }
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) {
     CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
 }
 void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
     CALL_GL_API(glTexParameterf, target, pname, param);
 }
-void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) {
+void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat * params) {
     CALL_GL_API(glTexParameterfv, target, pname, params);
 }
 void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) {
     CALL_GL_API(glTexParameteri, target, pname, param);
 }
-void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) {
+void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint * params) {
     CALL_GL_API(glTexParameteriv, target, pname, params);
 }
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
+void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) {
     CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
 }
-void API_ENTRY(glUniform1f)(GLint location, GLfloat x) {
-    CALL_GL_API(glUniform1f, location, x);
+void API_ENTRY(glUniform1f)(GLint location, GLfloat v0) {
+    CALL_GL_API(glUniform1f, location, v0);
 }
-void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform1fv, location, count, v);
+void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glUniform1fv, location, count, value);
 }
-void API_ENTRY(glUniform1i)(GLint location, GLint x) {
-    CALL_GL_API(glUniform1i, location, x);
+void API_ENTRY(glUniform1i)(GLint location, GLint v0) {
+    CALL_GL_API(glUniform1i, location, v0);
 }
-void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform1iv, location, count, v);
+void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glUniform1iv, location, count, value);
 }
-void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) {
-    CALL_GL_API(glUniform2f, location, x, y);
+void API_ENTRY(glUniform2f)(GLint location, GLfloat v0, GLfloat v1) {
+    CALL_GL_API(glUniform2f, location, v0, v1);
 }
-void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform2fv, location, count, v);
+void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glUniform2fv, location, count, value);
 }
-void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) {
-    CALL_GL_API(glUniform2i, location, x, y);
+void API_ENTRY(glUniform2i)(GLint location, GLint v0, GLint v1) {
+    CALL_GL_API(glUniform2i, location, v0, v1);
 }
-void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform2iv, location, count, v);
+void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glUniform2iv, location, count, value);
 }
-void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) {
-    CALL_GL_API(glUniform3f, location, x, y, z);
+void API_ENTRY(glUniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
+    CALL_GL_API(glUniform3f, location, v0, v1, v2);
 }
-void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform3fv, location, count, v);
+void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glUniform3fv, location, count, value);
 }
-void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) {
-    CALL_GL_API(glUniform3i, location, x, y, z);
+void API_ENTRY(glUniform3i)(GLint location, GLint v0, GLint v1, GLint v2) {
+    CALL_GL_API(glUniform3i, location, v0, v1, v2);
 }
-void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform3iv, location, count, v);
+void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glUniform3iv, location, count, value);
 }
-void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
-    CALL_GL_API(glUniform4f, location, x, y, z, w);
+void API_ENTRY(glUniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
+    CALL_GL_API(glUniform4f, location, v0, v1, v2, v3);
 }
-void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform4fv, location, count, v);
+void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glUniform4fv, location, count, value);
 }
-void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) {
-    CALL_GL_API(glUniform4i, location, x, y, z, w);
+void API_ENTRY(glUniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
+    CALL_GL_API(glUniform4i, location, v0, v1, v2, v3);
 }
-void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform4iv, location, count, v);
+void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glUniform4iv, location, count, value);
 }
-void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value);
 }
-void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value);
 }
-void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value);
 }
 void API_ENTRY(glUseProgram)(GLuint program) {
@@ -394,33 +394,549 @@
 void API_ENTRY(glValidateProgram)(GLuint program) {
     CALL_GL_API(glValidateProgram, program);
 }
-void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) {
-    CALL_GL_API(glVertexAttrib1f, indx, x);
+void API_ENTRY(glVertexAttrib1f)(GLuint index, GLfloat x) {
+    CALL_GL_API(glVertexAttrib1f, index, x);
 }
-void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib1fv, indx, values);
+void API_ENTRY(glVertexAttrib1fv)(GLuint index, const GLfloat * v) {
+    CALL_GL_API(glVertexAttrib1fv, index, v);
 }
-void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) {
-    CALL_GL_API(glVertexAttrib2f, indx, x, y);
+void API_ENTRY(glVertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) {
+    CALL_GL_API(glVertexAttrib2f, index, x, y);
 }
-void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib2fv, indx, values);
+void API_ENTRY(glVertexAttrib2fv)(GLuint index, const GLfloat * v) {
+    CALL_GL_API(glVertexAttrib2fv, index, v);
 }
-void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
-    CALL_GL_API(glVertexAttrib3f, indx, x, y, z);
+void API_ENTRY(glVertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) {
+    CALL_GL_API(glVertexAttrib3f, index, x, y, z);
 }
-void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib3fv, indx, values);
+void API_ENTRY(glVertexAttrib3fv)(GLuint index, const GLfloat * v) {
+    CALL_GL_API(glVertexAttrib3fv, index, v);
 }
-void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
-    CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w);
+void API_ENTRY(glVertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+    CALL_GL_API(glVertexAttrib4f, index, x, y, z, w);
 }
-void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib4fv, indx, values);
+void API_ENTRY(glVertexAttrib4fv)(GLuint index, const GLfloat * v) {
+    CALL_GL_API(glVertexAttrib4fv, index, v);
 }
-void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
-    CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr);
+void API_ENTRY(glVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer) {
+    CALL_GL_API(glVertexAttribPointer, index, size, type, normalized, stride, pointer);
 }
 void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
     CALL_GL_API(glViewport, x, y, width, height);
 }
+void API_ENTRY(glReadBuffer)(GLenum mode) {
+    CALL_GL_API(glReadBuffer, mode);
+}
+void API_ENTRY(glDrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices) {
+    CALL_GL_API(glDrawRangeElements, mode, start, end, count, type, indices);
+}
+void API_ENTRY(glTexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) {
+    CALL_GL_API(glTexImage3D, target, level, internalformat, width, height, depth, border, format, type, pixels);
+}
+void API_ENTRY(glTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) {
+    CALL_GL_API(glTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+}
+void API_ENTRY(glCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
+    CALL_GL_API(glCopyTexSubImage3D, target, level, xoffset, yoffset, zoffset, x, y, width, height);
+}
+void API_ENTRY(glCompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) {
+    CALL_GL_API(glCompressedTexImage3D, target, level, internalformat, width, height, depth, border, imageSize, data);
+}
+void API_ENTRY(glCompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) {
+    CALL_GL_API(glCompressedTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
+}
+void API_ENTRY(glGenQueries)(GLsizei n, GLuint * ids) {
+    CALL_GL_API(glGenQueries, n, ids);
+}
+void API_ENTRY(glDeleteQueries)(GLsizei n, const GLuint * ids) {
+    CALL_GL_API(glDeleteQueries, n, ids);
+}
+GLboolean API_ENTRY(glIsQuery)(GLuint id) {
+    CALL_GL_API_RETURN(glIsQuery, id);
+}
+void API_ENTRY(glBeginQuery)(GLenum target, GLuint id) {
+    CALL_GL_API(glBeginQuery, target, id);
+}
+void API_ENTRY(glEndQuery)(GLenum target) {
+    CALL_GL_API(glEndQuery, target);
+}
+void API_ENTRY(glGetQueryiv)(GLenum target, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetQueryiv, target, pname, params);
+}
+void API_ENTRY(glGetQueryObjectuiv)(GLuint id, GLenum pname, GLuint * params) {
+    CALL_GL_API(glGetQueryObjectuiv, id, pname, params);
+}
+GLboolean API_ENTRY(glUnmapBuffer)(GLenum target) {
+    CALL_GL_API_RETURN(glUnmapBuffer, target);
+}
+void API_ENTRY(glGetBufferPointerv)(GLenum target, GLenum pname, void ** params) {
+    CALL_GL_API(glGetBufferPointerv, target, pname, params);
+}
+void API_ENTRY(glDrawBuffers)(GLsizei n, const GLenum * bufs) {
+    CALL_GL_API(glDrawBuffers, n, bufs);
+}
+void API_ENTRY(glUniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix2x3fv, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix3x2fv, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix2x4fv, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix4x2fv, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix3x4fv, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix4x3fv, location, count, transpose, value);
+}
+void API_ENTRY(glBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
+    CALL_GL_API(glBlitFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+void API_ENTRY(glRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    CALL_GL_API(glRenderbufferStorageMultisample, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) {
+    CALL_GL_API(glFramebufferTextureLayer, target, attachment, texture, level, layer);
+}
+void * API_ENTRY(glMapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
+    CALL_GL_API_RETURN(glMapBufferRange, target, offset, length, access);
+}
+void API_ENTRY(glFlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) {
+    CALL_GL_API(glFlushMappedBufferRange, target, offset, length);
+}
+void API_ENTRY(glBindVertexArray)(GLuint array) {
+    CALL_GL_API(glBindVertexArray, array);
+}
+void API_ENTRY(glDeleteVertexArrays)(GLsizei n, const GLuint * arrays) {
+    CALL_GL_API(glDeleteVertexArrays, n, arrays);
+}
+void API_ENTRY(glGenVertexArrays)(GLsizei n, GLuint * arrays) {
+    CALL_GL_API(glGenVertexArrays, n, arrays);
+}
+GLboolean API_ENTRY(glIsVertexArray)(GLuint array) {
+    CALL_GL_API_RETURN(glIsVertexArray, array);
+}
+void API_ENTRY(glGetIntegeri_v)(GLenum target, GLuint index, GLint * data) {
+    CALL_GL_API(glGetIntegeri_v, target, index, data);
+}
+void API_ENTRY(glBeginTransformFeedback)(GLenum primitiveMode) {
+    CALL_GL_API(glBeginTransformFeedback, primitiveMode);
+}
+void API_ENTRY(glEndTransformFeedback)(void) {
+    CALL_GL_API(glEndTransformFeedback);
+}
+void API_ENTRY(glBindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) {
+    CALL_GL_API(glBindBufferRange, target, index, buffer, offset, size);
+}
+void API_ENTRY(glBindBufferBase)(GLenum target, GLuint index, GLuint buffer) {
+    CALL_GL_API(glBindBufferBase, target, index, buffer);
+}
+void API_ENTRY(glTransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode) {
+    CALL_GL_API(glTransformFeedbackVaryings, program, count, varyings, bufferMode);
+}
+void API_ENTRY(glGetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) {
+    CALL_GL_API(glGetTransformFeedbackVarying, program, index, bufSize, length, size, type, name);
+}
+void API_ENTRY(glVertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer) {
+    CALL_GL_API(glVertexAttribIPointer, index, size, type, stride, pointer);
+}
+void API_ENTRY(glGetVertexAttribIiv)(GLuint index, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetVertexAttribIiv, index, pname, params);
+}
+void API_ENTRY(glGetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint * params) {
+    CALL_GL_API(glGetVertexAttribIuiv, index, pname, params);
+}
+void API_ENTRY(glVertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) {
+    CALL_GL_API(glVertexAttribI4i, index, x, y, z, w);
+}
+void API_ENTRY(glVertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) {
+    CALL_GL_API(glVertexAttribI4ui, index, x, y, z, w);
+}
+void API_ENTRY(glVertexAttribI4iv)(GLuint index, const GLint * v) {
+    CALL_GL_API(glVertexAttribI4iv, index, v);
+}
+void API_ENTRY(glVertexAttribI4uiv)(GLuint index, const GLuint * v) {
+    CALL_GL_API(glVertexAttribI4uiv, index, v);
+}
+void API_ENTRY(glGetUniformuiv)(GLuint program, GLint location, GLuint * params) {
+    CALL_GL_API(glGetUniformuiv, program, location, params);
+}
+GLint API_ENTRY(glGetFragDataLocation)(GLuint program, const GLchar * name) {
+    CALL_GL_API_RETURN(glGetFragDataLocation, program, name);
+}
+void API_ENTRY(glUniform1ui)(GLint location, GLuint v0) {
+    CALL_GL_API(glUniform1ui, location, v0);
+}
+void API_ENTRY(glUniform2ui)(GLint location, GLuint v0, GLuint v1) {
+    CALL_GL_API(glUniform2ui, location, v0, v1);
+}
+void API_ENTRY(glUniform3ui)(GLint location, GLuint v0, GLuint v1, GLuint v2) {
+    CALL_GL_API(glUniform3ui, location, v0, v1, v2);
+}
+void API_ENTRY(glUniform4ui)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
+    CALL_GL_API(glUniform4ui, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glUniform1uiv)(GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glUniform1uiv, location, count, value);
+}
+void API_ENTRY(glUniform2uiv)(GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glUniform2uiv, location, count, value);
+}
+void API_ENTRY(glUniform3uiv)(GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glUniform3uiv, location, count, value);
+}
+void API_ENTRY(glUniform4uiv)(GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glUniform4uiv, location, count, value);
+}
+void API_ENTRY(glClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint * value) {
+    CALL_GL_API(glClearBufferiv, buffer, drawbuffer, value);
+}
+void API_ENTRY(glClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint * value) {
+    CALL_GL_API(glClearBufferuiv, buffer, drawbuffer, value);
+}
+void API_ENTRY(glClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat * value) {
+    CALL_GL_API(glClearBufferfv, buffer, drawbuffer, value);
+}
+void API_ENTRY(glClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) {
+    CALL_GL_API(glClearBufferfi, buffer, drawbuffer, depth, stencil);
+}
+const GLubyte * API_ENTRY(glGetStringi)(GLenum name, GLuint index) {
+    CALL_GL_API_RETURN(glGetStringi, name, index);
+}
+void API_ENTRY(glCopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) {
+    CALL_GL_API(glCopyBufferSubData, readTarget, writeTarget, readOffset, writeOffset, size);
+}
+void API_ENTRY(glGetUniformIndices)(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices) {
+    CALL_GL_API(glGetUniformIndices, program, uniformCount, uniformNames, uniformIndices);
+}
+void API_ENTRY(glGetActiveUniformsiv)(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetActiveUniformsiv, program, uniformCount, uniformIndices, pname, params);
+}
+GLuint API_ENTRY(glGetUniformBlockIndex)(GLuint program, const GLchar * uniformBlockName) {
+    CALL_GL_API_RETURN(glGetUniformBlockIndex, program, uniformBlockName);
+}
+void API_ENTRY(glGetActiveUniformBlockiv)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetActiveUniformBlockiv, program, uniformBlockIndex, pname, params);
+}
+void API_ENTRY(glGetActiveUniformBlockName)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName) {
+    CALL_GL_API(glGetActiveUniformBlockName, program, uniformBlockIndex, bufSize, length, uniformBlockName);
+}
+void API_ENTRY(glUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
+    CALL_GL_API(glUniformBlockBinding, program, uniformBlockIndex, uniformBlockBinding);
+}
+void API_ENTRY(glDrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) {
+    CALL_GL_API(glDrawArraysInstanced, mode, first, count, instancecount);
+}
+void API_ENTRY(glDrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount) {
+    CALL_GL_API(glDrawElementsInstanced, mode, count, type, indices, instancecount);
+}
+GLsync API_ENTRY(glFenceSync)(GLenum condition, GLbitfield flags) {
+    CALL_GL_API_RETURN(glFenceSync, condition, flags);
+}
+GLboolean API_ENTRY(glIsSync)(GLsync sync) {
+    CALL_GL_API_RETURN(glIsSync, sync);
+}
+void API_ENTRY(glDeleteSync)(GLsync sync) {
+    CALL_GL_API(glDeleteSync, sync);
+}
+GLenum API_ENTRY(glClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    CALL_GL_API_RETURN(glClientWaitSync, sync, flags, timeout);
+}
+void API_ENTRY(glWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    CALL_GL_API(glWaitSync, sync, flags, timeout);
+}
+void API_ENTRY(glGetInteger64v)(GLenum pname, GLint64 * data) {
+    CALL_GL_API(glGetInteger64v, pname, data);
+}
+void API_ENTRY(glGetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) {
+    CALL_GL_API(glGetSynciv, sync, pname, bufSize, length, values);
+}
+void API_ENTRY(glGetInteger64i_v)(GLenum target, GLuint index, GLint64 * data) {
+    CALL_GL_API(glGetInteger64i_v, target, index, data);
+}
+void API_ENTRY(glGetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 * params) {
+    CALL_GL_API(glGetBufferParameteri64v, target, pname, params);
+}
+void API_ENTRY(glGenSamplers)(GLsizei count, GLuint * samplers) {
+    CALL_GL_API(glGenSamplers, count, samplers);
+}
+void API_ENTRY(glDeleteSamplers)(GLsizei count, const GLuint * samplers) {
+    CALL_GL_API(glDeleteSamplers, count, samplers);
+}
+GLboolean API_ENTRY(glIsSampler)(GLuint sampler) {
+    CALL_GL_API_RETURN(glIsSampler, sampler);
+}
+void API_ENTRY(glBindSampler)(GLuint unit, GLuint sampler) {
+    CALL_GL_API(glBindSampler, unit, sampler);
+}
+void API_ENTRY(glSamplerParameteri)(GLuint sampler, GLenum pname, GLint param) {
+    CALL_GL_API(glSamplerParameteri, sampler, pname, param);
+}
+void API_ENTRY(glSamplerParameteriv)(GLuint sampler, GLenum pname, const GLint * param) {
+    CALL_GL_API(glSamplerParameteriv, sampler, pname, param);
+}
+void API_ENTRY(glSamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) {
+    CALL_GL_API(glSamplerParameterf, sampler, pname, param);
+}
+void API_ENTRY(glSamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat * param) {
+    CALL_GL_API(glSamplerParameterfv, sampler, pname, param);
+}
+void API_ENTRY(glGetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetSamplerParameteriv, sampler, pname, params);
+}
+void API_ENTRY(glGetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat * params) {
+    CALL_GL_API(glGetSamplerParameterfv, sampler, pname, params);
+}
+void API_ENTRY(glVertexAttribDivisor)(GLuint index, GLuint divisor) {
+    CALL_GL_API(glVertexAttribDivisor, index, divisor);
+}
+void API_ENTRY(glBindTransformFeedback)(GLenum target, GLuint id) {
+    CALL_GL_API(glBindTransformFeedback, target, id);
+}
+void API_ENTRY(glDeleteTransformFeedbacks)(GLsizei n, const GLuint * ids) {
+    CALL_GL_API(glDeleteTransformFeedbacks, n, ids);
+}
+void API_ENTRY(glGenTransformFeedbacks)(GLsizei n, GLuint * ids) {
+    CALL_GL_API(glGenTransformFeedbacks, n, ids);
+}
+GLboolean API_ENTRY(glIsTransformFeedback)(GLuint id) {
+    CALL_GL_API_RETURN(glIsTransformFeedback, id);
+}
+void API_ENTRY(glPauseTransformFeedback)(void) {
+    CALL_GL_API(glPauseTransformFeedback);
+}
+void API_ENTRY(glResumeTransformFeedback)(void) {
+    CALL_GL_API(glResumeTransformFeedback);
+}
+void API_ENTRY(glGetProgramBinary)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) {
+    CALL_GL_API(glGetProgramBinary, program, bufSize, length, binaryFormat, binary);
+}
+void API_ENTRY(glProgramBinary)(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length) {
+    CALL_GL_API(glProgramBinary, program, binaryFormat, binary, length);
+}
+void API_ENTRY(glProgramParameteri)(GLuint program, GLenum pname, GLint value) {
+    CALL_GL_API(glProgramParameteri, program, pname, value);
+}
+void API_ENTRY(glInvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum * attachments) {
+    CALL_GL_API(glInvalidateFramebuffer, target, numAttachments, attachments);
+}
+void API_ENTRY(glInvalidateSubFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height) {
+    CALL_GL_API(glInvalidateSubFramebuffer, target, numAttachments, attachments, x, y, width, height);
+}
+void API_ENTRY(glTexStorage2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+    CALL_GL_API(glTexStorage2D, target, levels, internalformat, width, height);
+}
+void API_ENTRY(glTexStorage3D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+    CALL_GL_API(glTexStorage3D, target, levels, internalformat, width, height, depth);
+}
+void API_ENTRY(glGetInternalformativ)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params) {
+    CALL_GL_API(glGetInternalformativ, target, internalformat, pname, bufSize, params);
+}
+void API_ENTRY(glDispatchCompute)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) {
+    CALL_GL_API(glDispatchCompute, num_groups_x, num_groups_y, num_groups_z);
+}
+void API_ENTRY(glDispatchComputeIndirect)(GLintptr indirect) {
+    CALL_GL_API(glDispatchComputeIndirect, indirect);
+}
+void API_ENTRY(glDrawArraysIndirect)(GLenum mode, const void * indirect) {
+    CALL_GL_API(glDrawArraysIndirect, mode, indirect);
+}
+void API_ENTRY(glDrawElementsIndirect)(GLenum mode, GLenum type, const void * indirect) {
+    CALL_GL_API(glDrawElementsIndirect, mode, type, indirect);
+}
+void API_ENTRY(glFramebufferParameteri)(GLenum target, GLenum pname, GLint param) {
+    CALL_GL_API(glFramebufferParameteri, target, pname, param);
+}
+void API_ENTRY(glGetFramebufferParameteriv)(GLenum target, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetFramebufferParameteriv, target, pname, params);
+}
+void API_ENTRY(glGetProgramInterfaceiv)(GLuint program, GLenum programInterface, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetProgramInterfaceiv, program, programInterface, pname, params);
+}
+GLuint API_ENTRY(glGetProgramResourceIndex)(GLuint program, GLenum programInterface, const GLchar * name) {
+    CALL_GL_API_RETURN(glGetProgramResourceIndex, program, programInterface, name);
+}
+void API_ENTRY(glGetProgramResourceName)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name) {
+    CALL_GL_API(glGetProgramResourceName, program, programInterface, index, bufSize, length, name);
+}
+void API_ENTRY(glGetProgramResourceiv)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) {
+    CALL_GL_API(glGetProgramResourceiv, program, programInterface, index, propCount, props, bufSize, length, params);
+}
+GLint API_ENTRY(glGetProgramResourceLocation)(GLuint program, GLenum programInterface, const GLchar * name) {
+    CALL_GL_API_RETURN(glGetProgramResourceLocation, program, programInterface, name);
+}
+void API_ENTRY(glUseProgramStages)(GLuint pipeline, GLbitfield stages, GLuint program) {
+    CALL_GL_API(glUseProgramStages, pipeline, stages, program);
+}
+void API_ENTRY(glActiveShaderProgram)(GLuint pipeline, GLuint program) {
+    CALL_GL_API(glActiveShaderProgram, pipeline, program);
+}
+GLuint API_ENTRY(glCreateShaderProgramv)(GLenum type, GLsizei count, const GLchar *const* strings) {
+    CALL_GL_API_RETURN(glCreateShaderProgramv, type, count, strings);
+}
+void API_ENTRY(glBindProgramPipeline)(GLuint pipeline) {
+    CALL_GL_API(glBindProgramPipeline, pipeline);
+}
+void API_ENTRY(glDeleteProgramPipelines)(GLsizei n, const GLuint * pipelines) {
+    CALL_GL_API(glDeleteProgramPipelines, n, pipelines);
+}
+void API_ENTRY(glGenProgramPipelines)(GLsizei n, GLuint * pipelines) {
+    CALL_GL_API(glGenProgramPipelines, n, pipelines);
+}
+GLboolean API_ENTRY(glIsProgramPipeline)(GLuint pipeline) {
+    CALL_GL_API_RETURN(glIsProgramPipeline, pipeline);
+}
+void API_ENTRY(glGetProgramPipelineiv)(GLuint pipeline, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetProgramPipelineiv, pipeline, pname, params);
+}
+void API_ENTRY(glProgramUniform1i)(GLuint program, GLint location, GLint v0) {
+    CALL_GL_API(glProgramUniform1i, program, location, v0);
+}
+void API_ENTRY(glProgramUniform2i)(GLuint program, GLint location, GLint v0, GLint v1) {
+    CALL_GL_API(glProgramUniform2i, program, location, v0, v1);
+}
+void API_ENTRY(glProgramUniform3i)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) {
+    CALL_GL_API(glProgramUniform3i, program, location, v0, v1, v2);
+}
+void API_ENTRY(glProgramUniform4i)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
+    CALL_GL_API(glProgramUniform4i, program, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glProgramUniform1ui)(GLuint program, GLint location, GLuint v0) {
+    CALL_GL_API(glProgramUniform1ui, program, location, v0);
+}
+void API_ENTRY(glProgramUniform2ui)(GLuint program, GLint location, GLuint v0, GLuint v1) {
+    CALL_GL_API(glProgramUniform2ui, program, location, v0, v1);
+}
+void API_ENTRY(glProgramUniform3ui)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) {
+    CALL_GL_API(glProgramUniform3ui, program, location, v0, v1, v2);
+}
+void API_ENTRY(glProgramUniform4ui)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
+    CALL_GL_API(glProgramUniform4ui, program, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glProgramUniform1f)(GLuint program, GLint location, GLfloat v0) {
+    CALL_GL_API(glProgramUniform1f, program, location, v0);
+}
+void API_ENTRY(glProgramUniform2f)(GLuint program, GLint location, GLfloat v0, GLfloat v1) {
+    CALL_GL_API(glProgramUniform2f, program, location, v0, v1);
+}
+void API_ENTRY(glProgramUniform3f)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
+    CALL_GL_API(glProgramUniform3f, program, location, v0, v1, v2);
+}
+void API_ENTRY(glProgramUniform4f)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
+    CALL_GL_API(glProgramUniform4f, program, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glProgramUniform1iv)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform1iv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2iv)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform2iv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3iv)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform3iv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4iv)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform4iv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform1uiv)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform1uiv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2uiv)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform2uiv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3uiv)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform3uiv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4uiv)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform4uiv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform1fv)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glProgramUniform1fv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2fv)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glProgramUniform2fv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3fv)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glProgramUniform3fv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4fv)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    CALL_GL_API(glProgramUniform4fv, program, location, count, value);
+}
+void API_ENTRY(glProgramUniformMatrix2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix2fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix3fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix4fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix2x3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix2x3fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix3x2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix3x2fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix2x4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix2x4fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix4x2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix4x2fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix3x4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix3x4fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix4x3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix4x3fv, program, location, count, transpose, value);
+}
+void API_ENTRY(glValidateProgramPipeline)(GLuint pipeline) {
+    CALL_GL_API(glValidateProgramPipeline, pipeline);
+}
+void API_ENTRY(glGetProgramPipelineInfoLog)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
+    CALL_GL_API(glGetProgramPipelineInfoLog, pipeline, bufSize, length, infoLog);
+}
+void API_ENTRY(glBindImageTexture)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) {
+    CALL_GL_API(glBindImageTexture, unit, texture, level, layered, layer, access, format);
+}
+void API_ENTRY(glGetBooleani_v)(GLenum target, GLuint index, GLboolean * data) {
+    CALL_GL_API(glGetBooleani_v, target, index, data);
+}
+void API_ENTRY(glMemoryBarrier)(GLbitfield barriers) {
+    CALL_GL_API(glMemoryBarrier, barriers);
+}
+void API_ENTRY(glMemoryBarrierByRegion)(GLbitfield barriers) {
+    CALL_GL_API(glMemoryBarrierByRegion, barriers);
+}
+void API_ENTRY(glTexStorage2DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) {
+    CALL_GL_API(glTexStorage2DMultisample, target, samples, internalformat, width, height, fixedsamplelocations);
+}
+void API_ENTRY(glGetMultisamplefv)(GLenum pname, GLuint index, GLfloat * val) {
+    CALL_GL_API(glGetMultisamplefv, pname, index, val);
+}
+void API_ENTRY(glSampleMaski)(GLuint maskNumber, GLbitfield mask) {
+    CALL_GL_API(glSampleMaski, maskNumber, mask);
+}
+void API_ENTRY(glGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetTexLevelParameteriv, target, level, pname, params);
+}
+void API_ENTRY(glGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params) {
+    CALL_GL_API(glGetTexLevelParameterfv, target, level, pname, params);
+}
+void API_ENTRY(glBindVertexBuffer)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) {
+    CALL_GL_API(glBindVertexBuffer, bindingindex, buffer, offset, stride);
+}
+void API_ENTRY(glVertexAttribFormat)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) {
+    CALL_GL_API(glVertexAttribFormat, attribindex, size, type, normalized, relativeoffset);
+}
+void API_ENTRY(glVertexAttribIFormat)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) {
+    CALL_GL_API(glVertexAttribIFormat, attribindex, size, type, relativeoffset);
+}
+void API_ENTRY(glVertexAttribBinding)(GLuint attribindex, GLuint bindingindex) {
+    CALL_GL_API(glVertexAttribBinding, attribindex, bindingindex);
+}
+void API_ENTRY(glVertexBindingDivisor)(GLuint bindingindex, GLuint divisor) {
+    CALL_GL_API(glVertexBindingDivisor, bindingindex, divisor);
+}
diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in
index c381075..745590d 100644
--- a/opengl/libs/GLES2/gl2ext_api.in
+++ b/opengl/libs/GLES2/gl2ext_api.in
@@ -1,77 +1,119 @@
+void API_ENTRY(glBlendBarrierKHR)(void) {
+    CALL_GL_API(glBlendBarrierKHR);
+}
+void API_ENTRY(glDebugMessageControlKHR)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled) {
+    CALL_GL_API(glDebugMessageControlKHR, source, type, severity, count, ids, enabled);
+}
+void API_ENTRY(glDebugMessageInsertKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf) {
+    CALL_GL_API(glDebugMessageInsertKHR, source, type, id, severity, length, buf);
+}
+void API_ENTRY(glDebugMessageCallbackKHR)(GLDEBUGPROCKHR callback, const void * userParam) {
+    CALL_GL_API(glDebugMessageCallbackKHR, callback, userParam);
+}
+GLuint API_ENTRY(glGetDebugMessageLogKHR)(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog) {
+    CALL_GL_API_RETURN(glGetDebugMessageLogKHR, count, bufSize, sources, types, ids, severities, lengths, messageLog);
+}
+void API_ENTRY(glPushDebugGroupKHR)(GLenum source, GLuint id, GLsizei length, const GLchar * message) {
+    CALL_GL_API(glPushDebugGroupKHR, source, id, length, message);
+}
+void API_ENTRY(glPopDebugGroupKHR)(void) {
+    CALL_GL_API(glPopDebugGroupKHR);
+}
+void API_ENTRY(glObjectLabelKHR)(GLenum identifier, GLuint name, GLsizei length, const GLchar * label) {
+    CALL_GL_API(glObjectLabelKHR, identifier, name, length, label);
+}
+void API_ENTRY(glGetObjectLabelKHR)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label) {
+    CALL_GL_API(glGetObjectLabelKHR, identifier, name, bufSize, length, label);
+}
+void API_ENTRY(glObjectPtrLabelKHR)(const void * ptr, GLsizei length, const GLchar * label) {
+    CALL_GL_API(glObjectPtrLabelKHR, ptr, length, label);
+}
+void API_ENTRY(glGetObjectPtrLabelKHR)(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label) {
+    CALL_GL_API(glGetObjectPtrLabelKHR, ptr, bufSize, length, label);
+}
+void API_ENTRY(glGetPointervKHR)(GLenum pname, void ** params) {
+    CALL_GL_API(glGetPointervKHR, pname, params);
+}
 void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
     CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
 }
 void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
     CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
 }
-void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
+void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) {
     CALL_GL_API(glGetProgramBinaryOES, program, bufSize, length, binaryFormat, binary);
 }
-void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
+void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const void * binary, GLint length) {
     CALL_GL_API(glProgramBinaryOES, program, binaryFormat, binary, length);
 }
-void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
+void * API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
     CALL_GL_API_RETURN(glMapBufferOES, target, access);
 }
 GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) {
     CALL_GL_API_RETURN(glUnmapBufferOES, target);
 }
-void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid** params) {
+void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, void ** params) {
     CALL_GL_API(glGetBufferPointervOES, target, pname, params);
 }
-void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+void API_ENTRY(glMinSampleShadingOES)(GLfloat value) {
+    CALL_GL_API(glMinSampleShadingOES, value);
+}
+void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) {
     CALL_GL_API(glTexImage3DOES, target, level, internalformat, width, height, depth, border, format, type, pixels);
 }
-void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
+void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) {
     CALL_GL_API(glTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
 }
 void API_ENTRY(glCopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
     CALL_GL_API(glCopyTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, x, y, width, height);
 }
-void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
+void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) {
     CALL_GL_API(glCompressedTexImage3DOES, target, level, internalformat, width, height, depth, border, imageSize, data);
 }
-void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
+void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) {
     CALL_GL_API(glCompressedTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
 }
 void API_ENTRY(glFramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
     CALL_GL_API(glFramebufferTexture3DOES, target, attachment, textarget, texture, level, zoffset);
 }
+void API_ENTRY(glTexStorage3DMultisampleOES)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) {
+    CALL_GL_API(glTexStorage3DMultisampleOES, target, samples, internalformat, width, height, depth, fixedsamplelocations);
+}
 void API_ENTRY(glBindVertexArrayOES)(GLuint array) {
     CALL_GL_API(glBindVertexArrayOES, array);
 }
-void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) {
+void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint * arrays) {
     CALL_GL_API(glDeleteVertexArraysOES, n, arrays);
 }
-void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
+void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint * arrays) {
     CALL_GL_API(glGenVertexArraysOES, n, arrays);
 }
 GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
     CALL_GL_API_RETURN(glIsVertexArrayOES, array);
 }
-void API_ENTRY(glGetPerfMonitorGroupsAMD)(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
+void API_ENTRY(glGetPerfMonitorGroupsAMD)(GLint * numGroups, GLsizei groupsSize, GLuint * groups) {
     CALL_GL_API(glGetPerfMonitorGroupsAMD, numGroups, groupsSize, groups);
 }
-void API_ENTRY(glGetPerfMonitorCountersAMD)(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
+void API_ENTRY(glGetPerfMonitorCountersAMD)(GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters) {
     CALL_GL_API(glGetPerfMonitorCountersAMD, group, numCounters, maxActiveCounters, counterSize, counters);
 }
-void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
+void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString) {
     CALL_GL_API(glGetPerfMonitorGroupStringAMD, group, bufSize, length, groupString);
 }
-void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
+void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString) {
     CALL_GL_API(glGetPerfMonitorCounterStringAMD, group, counter, bufSize, length, counterString);
 }
-void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
+void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, void * data) {
     CALL_GL_API(glGetPerfMonitorCounterInfoAMD, group, counter, pname, data);
 }
-void API_ENTRY(glGenPerfMonitorsAMD)(GLsizei n, GLuint *monitors) {
+void API_ENTRY(glGenPerfMonitorsAMD)(GLsizei n, GLuint * monitors) {
     CALL_GL_API(glGenPerfMonitorsAMD, n, monitors);
 }
-void API_ENTRY(glDeletePerfMonitorsAMD)(GLsizei n, GLuint *monitors) {
+void API_ENTRY(glDeletePerfMonitorsAMD)(GLsizei n, GLuint * monitors) {
     CALL_GL_API(glDeletePerfMonitorsAMD, n, monitors);
 }
-void API_ENTRY(glSelectPerfMonitorCountersAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
-    CALL_GL_API(glSelectPerfMonitorCountersAMD, monitor, enable, group, numCounters, countersList);
+void API_ENTRY(glSelectPerfMonitorCountersAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList) {
+    CALL_GL_API(glSelectPerfMonitorCountersAMD, monitor, enable, group, numCounters, counterList);
 }
 void API_ENTRY(glBeginPerfMonitorAMD)(GLuint monitor) {
     CALL_GL_API(glBeginPerfMonitorAMD, monitor);
@@ -79,7 +121,7 @@
 void API_ENTRY(glEndPerfMonitorAMD)(GLuint monitor) {
     CALL_GL_API(glEndPerfMonitorAMD, monitor);
 }
-void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
+void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten) {
     CALL_GL_API(glGetPerfMonitorCounterDataAMD, monitor, pname, dataSize, data, bytesWritten);
 }
 void API_ENTRY(glBlitFramebufferANGLE)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
@@ -88,46 +130,73 @@
 void API_ENTRY(glRenderbufferStorageMultisampleANGLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageMultisampleANGLE, target, samples, internalformat, width, height);
 }
+void API_ENTRY(glDrawArraysInstancedANGLE)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) {
+    CALL_GL_API(glDrawArraysInstancedANGLE, mode, first, count, primcount);
+}
+void API_ENTRY(glDrawElementsInstancedANGLE)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) {
+    CALL_GL_API(glDrawElementsInstancedANGLE, mode, count, type, indices, primcount);
+}
+void API_ENTRY(glVertexAttribDivisorANGLE)(GLuint index, GLuint divisor) {
+    CALL_GL_API(glVertexAttribDivisorANGLE, index, divisor);
+}
+void API_ENTRY(glGetTranslatedShaderSourceANGLE)(GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source) {
+    CALL_GL_API(glGetTranslatedShaderSourceANGLE, shader, bufsize, length, source);
+}
+void API_ENTRY(glCopyTextureLevelsAPPLE)(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount) {
+    CALL_GL_API(glCopyTextureLevelsAPPLE, destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount);
+}
 void API_ENTRY(glRenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageMultisampleAPPLE, target, samples, internalformat, width, height);
 }
 void API_ENTRY(glResolveMultisampleFramebufferAPPLE)(void) {
     CALL_GL_API(glResolveMultisampleFramebufferAPPLE);
 }
-void API_ENTRY(glLabelObjectEXT)(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
+GLsync API_ENTRY(glFenceSyncAPPLE)(GLenum condition, GLbitfield flags) {
+    CALL_GL_API_RETURN(glFenceSyncAPPLE, condition, flags);
+}
+GLboolean API_ENTRY(glIsSyncAPPLE)(GLsync sync) {
+    CALL_GL_API_RETURN(glIsSyncAPPLE, sync);
+}
+void API_ENTRY(glDeleteSyncAPPLE)(GLsync sync) {
+    CALL_GL_API(glDeleteSyncAPPLE, sync);
+}
+GLenum API_ENTRY(glClientWaitSyncAPPLE)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    CALL_GL_API_RETURN(glClientWaitSyncAPPLE, sync, flags, timeout);
+}
+void API_ENTRY(glWaitSyncAPPLE)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    CALL_GL_API(glWaitSyncAPPLE, sync, flags, timeout);
+}
+void API_ENTRY(glGetInteger64vAPPLE)(GLenum pname, GLint64 * params) {
+    CALL_GL_API(glGetInteger64vAPPLE, pname, params);
+}
+void API_ENTRY(glGetSyncivAPPLE)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) {
+    CALL_GL_API(glGetSyncivAPPLE, sync, pname, bufSize, length, values);
+}
+void API_ENTRY(glCopyImageSubDataEXT)(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) {
+    CALL_GL_API(glCopyImageSubDataEXT, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
+}
+void API_ENTRY(glLabelObjectEXT)(GLenum type, GLuint object, GLsizei length, const GLchar * label) {
     CALL_GL_API(glLabelObjectEXT, type, object, length, label);
 }
-void API_ENTRY(glGetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
+void API_ENTRY(glGetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label) {
     CALL_GL_API(glGetObjectLabelEXT, type, object, bufSize, length, label);
 }
-void API_ENTRY(glInsertEventMarkerEXT)(GLsizei length, const GLchar *marker) {
+void API_ENTRY(glInsertEventMarkerEXT)(GLsizei length, const GLchar * marker) {
     CALL_GL_API(glInsertEventMarkerEXT, length, marker);
 }
-void API_ENTRY(glPushGroupMarkerEXT)(GLsizei length, const GLchar *marker) {
+void API_ENTRY(glPushGroupMarkerEXT)(GLsizei length, const GLchar * marker) {
     CALL_GL_API(glPushGroupMarkerEXT, length, marker);
 }
 void API_ENTRY(glPopGroupMarkerEXT)(void) {
     CALL_GL_API(glPopGroupMarkerEXT);
 }
-void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
+void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum * attachments) {
     CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
 }
-void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
-    CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
-    CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
-}
-void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
-    CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
-}
-void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
-    CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
-}
-void API_ENTRY(glGenQueriesEXT)(GLsizei n, GLuint *ids) {
+void API_ENTRY(glGenQueriesEXT)(GLsizei n, GLuint * ids) {
     CALL_GL_API(glGenQueriesEXT, n, ids);
 }
-void API_ENTRY(glDeleteQueriesEXT)(GLsizei n, const GLuint *ids) {
+void API_ENTRY(glDeleteQueriesEXT)(GLsizei n, const GLuint * ids) {
     CALL_GL_API(glDeleteQueriesEXT, n, ids);
 }
 GLboolean API_ENTRY(glIsQueryEXT)(GLuint id) {
@@ -139,113 +208,269 @@
 void API_ENTRY(glEndQueryEXT)(GLenum target) {
     CALL_GL_API(glEndQueryEXT, target);
 }
-void API_ENTRY(glGetQueryivEXT)(GLenum target, GLenum pname, GLint *params) {
+void API_ENTRY(glQueryCounterEXT)(GLuint id, GLenum target) {
+    CALL_GL_API(glQueryCounterEXT, id, target);
+}
+void API_ENTRY(glGetQueryivEXT)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetQueryivEXT, target, pname, params);
 }
-void API_ENTRY(glGetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint *params) {
+void API_ENTRY(glGetQueryObjectivEXT)(GLuint id, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetQueryObjectivEXT, id, pname, params);
+}
+void API_ENTRY(glGetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint * params) {
     CALL_GL_API(glGetQueryObjectuivEXT, id, pname, params);
 }
+void API_ENTRY(glGetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64 * params) {
+    CALL_GL_API(glGetQueryObjecti64vEXT, id, pname, params);
+}
+void API_ENTRY(glGetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64 * params) {
+    CALL_GL_API(glGetQueryObjectui64vEXT, id, pname, params);
+}
+void API_ENTRY(glDrawBuffersEXT)(GLsizei n, const GLenum * bufs) {
+    CALL_GL_API(glDrawBuffersEXT, n, bufs);
+}
+void API_ENTRY(glEnableiEXT)(GLenum target, GLuint index) {
+    CALL_GL_API(glEnableiEXT, target, index);
+}
+void API_ENTRY(glDisableiEXT)(GLenum target, GLuint index) {
+    CALL_GL_API(glDisableiEXT, target, index);
+}
+void API_ENTRY(glBlendEquationiEXT)(GLuint buf, GLenum mode) {
+    CALL_GL_API(glBlendEquationiEXT, buf, mode);
+}
+void API_ENTRY(glBlendEquationSeparateiEXT)(GLuint buf, GLenum modeRGB, GLenum modeAlpha) {
+    CALL_GL_API(glBlendEquationSeparateiEXT, buf, modeRGB, modeAlpha);
+}
+void API_ENTRY(glBlendFunciEXT)(GLuint buf, GLenum src, GLenum dst) {
+    CALL_GL_API(glBlendFunciEXT, buf, src, dst);
+}
+void API_ENTRY(glBlendFuncSeparateiEXT)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
+    CALL_GL_API(glBlendFuncSeparateiEXT, buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
+}
+void API_ENTRY(glColorMaskiEXT)(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) {
+    CALL_GL_API(glColorMaskiEXT, index, r, g, b, a);
+}
+GLboolean API_ENTRY(glIsEnablediEXT)(GLenum target, GLuint index) {
+    CALL_GL_API_RETURN(glIsEnablediEXT, target, index);
+}
+void API_ENTRY(glDrawArraysInstancedEXT)(GLenum mode, GLint start, GLsizei count, GLsizei primcount) {
+    CALL_GL_API(glDrawArraysInstancedEXT, mode, start, count, primcount);
+}
+void API_ENTRY(glDrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) {
+    CALL_GL_API(glDrawElementsInstancedEXT, mode, count, type, indices, primcount);
+}
+void API_ENTRY(glFramebufferTextureEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level) {
+    CALL_GL_API(glFramebufferTextureEXT, target, attachment, texture, level);
+}
+void API_ENTRY(glVertexAttribDivisorEXT)(GLuint index, GLuint divisor) {
+    CALL_GL_API(glVertexAttribDivisorEXT, index, divisor);
+}
+void * API_ENTRY(glMapBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
+    CALL_GL_API_RETURN(glMapBufferRangeEXT, target, offset, length, access);
+}
+void API_ENTRY(glFlushMappedBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length) {
+    CALL_GL_API(glFlushMappedBufferRangeEXT, target, offset, length);
+}
+void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
+}
+void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
+}
+void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+    CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
+}
+void API_ENTRY(glReadBufferIndexedEXT)(GLenum src, GLint index) {
+    CALL_GL_API(glReadBufferIndexedEXT, src, index);
+}
+void API_ENTRY(glDrawBuffersIndexedEXT)(GLint n, const GLenum * location, const GLint * indices) {
+    CALL_GL_API(glDrawBuffersIndexedEXT, n, location, indices);
+}
+void API_ENTRY(glGetIntegeri_vEXT)(GLenum target, GLuint index, GLint * data) {
+    CALL_GL_API(glGetIntegeri_vEXT, target, index, data);
+}
+void API_ENTRY(glPrimitiveBoundingBoxEXT)(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) {
+    CALL_GL_API(glPrimitiveBoundingBoxEXT, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW);
+}
 GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) {
     CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT);
 }
-void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
+void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) {
     CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data);
 }
-void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float *params) {
+void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params) {
     CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params);
 }
-void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
+void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint * params) {
     CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params);
 }
-void API_ENTRY(glUseProgramStagesEXT)(GLuint pipeline, GLbitfield stages, GLuint program) {
-    CALL_GL_API(glUseProgramStagesEXT, pipeline, stages, program);
-}
 void API_ENTRY(glActiveShaderProgramEXT)(GLuint pipeline, GLuint program) {
     CALL_GL_API(glActiveShaderProgramEXT, pipeline, program);
 }
-GLuint API_ENTRY(glCreateShaderProgramvEXT)(GLenum type, GLsizei count, const GLchar **strings) {
-    CALL_GL_API_RETURN(glCreateShaderProgramvEXT, type, count, strings);
-}
 void API_ENTRY(glBindProgramPipelineEXT)(GLuint pipeline) {
     CALL_GL_API(glBindProgramPipelineEXT, pipeline);
 }
-void API_ENTRY(glDeleteProgramPipelinesEXT)(GLsizei n, const GLuint *pipelines) {
+GLuint API_ENTRY(glCreateShaderProgramvEXT)(GLenum type, GLsizei count, const GLchar ** strings) {
+    CALL_GL_API_RETURN(glCreateShaderProgramvEXT, type, count, strings);
+}
+void API_ENTRY(glDeleteProgramPipelinesEXT)(GLsizei n, const GLuint * pipelines) {
     CALL_GL_API(glDeleteProgramPipelinesEXT, n, pipelines);
 }
-void API_ENTRY(glGenProgramPipelinesEXT)(GLsizei n, GLuint *pipelines) {
+void API_ENTRY(glGenProgramPipelinesEXT)(GLsizei n, GLuint * pipelines) {
     CALL_GL_API(glGenProgramPipelinesEXT, n, pipelines);
 }
+void API_ENTRY(glGetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
+    CALL_GL_API(glGetProgramPipelineInfoLogEXT, pipeline, bufSize, length, infoLog);
+}
+void API_ENTRY(glGetProgramPipelineivEXT)(GLuint pipeline, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetProgramPipelineivEXT, pipeline, pname, params);
+}
 GLboolean API_ENTRY(glIsProgramPipelineEXT)(GLuint pipeline) {
     CALL_GL_API_RETURN(glIsProgramPipelineEXT, pipeline);
 }
 void API_ENTRY(glProgramParameteriEXT)(GLuint program, GLenum pname, GLint value) {
     CALL_GL_API(glProgramParameteriEXT, program, pname, value);
 }
-void API_ENTRY(glGetProgramPipelineivEXT)(GLuint pipeline, GLenum pname, GLint *params) {
-    CALL_GL_API(glGetProgramPipelineivEXT, pipeline, pname, params);
+void API_ENTRY(glProgramUniform1fEXT)(GLuint program, GLint location, GLfloat v0) {
+    CALL_GL_API(glProgramUniform1fEXT, program, location, v0);
 }
-void API_ENTRY(glProgramUniform1iEXT)(GLuint program, GLint location, GLint x) {
-    CALL_GL_API(glProgramUniform1iEXT, program, location, x);
-}
-void API_ENTRY(glProgramUniform2iEXT)(GLuint program, GLint location, GLint x, GLint y) {
-    CALL_GL_API(glProgramUniform2iEXT, program, location, x, y);
-}
-void API_ENTRY(glProgramUniform3iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z) {
-    CALL_GL_API(glProgramUniform3iEXT, program, location, x, y, z);
-}
-void API_ENTRY(glProgramUniform4iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
-    CALL_GL_API(glProgramUniform4iEXT, program, location, x, y, z, w);
-}
-void API_ENTRY(glProgramUniform1fEXT)(GLuint program, GLint location, GLfloat x) {
-    CALL_GL_API(glProgramUniform1fEXT, program, location, x);
-}
-void API_ENTRY(glProgramUniform2fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y) {
-    CALL_GL_API(glProgramUniform2fEXT, program, location, x, y);
-}
-void API_ENTRY(glProgramUniform3fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
-    CALL_GL_API(glProgramUniform3fEXT, program, location, x, y, z);
-}
-void API_ENTRY(glProgramUniform4fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
-    CALL_GL_API(glProgramUniform4fEXT, program, location, x, y, z, w);
-}
-void API_ENTRY(glProgramUniform1ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    CALL_GL_API(glProgramUniform1ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform2ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    CALL_GL_API(glProgramUniform2ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform3ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    CALL_GL_API(glProgramUniform3ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform4ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    CALL_GL_API(glProgramUniform4ivEXT, program, location, count, value);
-}
-void API_ENTRY(glProgramUniform1fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void API_ENTRY(glProgramUniform1fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     CALL_GL_API(glProgramUniform1fvEXT, program, location, count, value);
 }
-void API_ENTRY(glProgramUniform2fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void API_ENTRY(glProgramUniform1iEXT)(GLuint program, GLint location, GLint v0) {
+    CALL_GL_API(glProgramUniform1iEXT, program, location, v0);
+}
+void API_ENTRY(glProgramUniform1ivEXT)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform1ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2fEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1) {
+    CALL_GL_API(glProgramUniform2fEXT, program, location, v0, v1);
+}
+void API_ENTRY(glProgramUniform2fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     CALL_GL_API(glProgramUniform2fvEXT, program, location, count, value);
 }
-void API_ENTRY(glProgramUniform3fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void API_ENTRY(glProgramUniform2iEXT)(GLuint program, GLint location, GLint v0, GLint v1) {
+    CALL_GL_API(glProgramUniform2iEXT, program, location, v0, v1);
+}
+void API_ENTRY(glProgramUniform2ivEXT)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform2ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3fEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
+    CALL_GL_API(glProgramUniform3fEXT, program, location, v0, v1, v2);
+}
+void API_ENTRY(glProgramUniform3fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     CALL_GL_API(glProgramUniform3fvEXT, program, location, count, value);
 }
-void API_ENTRY(glProgramUniform4fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void API_ENTRY(glProgramUniform3iEXT)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) {
+    CALL_GL_API(glProgramUniform3iEXT, program, location, v0, v1, v2);
+}
+void API_ENTRY(glProgramUniform3ivEXT)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform3ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4fEXT)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
+    CALL_GL_API(glProgramUniform4fEXT, program, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glProgramUniform4fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     CALL_GL_API(glProgramUniform4fvEXT, program, location, count, value);
 }
-void API_ENTRY(glProgramUniformMatrix2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+void API_ENTRY(glProgramUniform4iEXT)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
+    CALL_GL_API(glProgramUniform4iEXT, program, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glProgramUniform4ivEXT)(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    CALL_GL_API(glProgramUniform4ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniformMatrix2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     CALL_GL_API(glProgramUniformMatrix2fvEXT, program, location, count, transpose, value);
 }
-void API_ENTRY(glProgramUniformMatrix3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+void API_ENTRY(glProgramUniformMatrix3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     CALL_GL_API(glProgramUniformMatrix3fvEXT, program, location, count, transpose, value);
 }
-void API_ENTRY(glProgramUniformMatrix4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+void API_ENTRY(glProgramUniformMatrix4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     CALL_GL_API(glProgramUniformMatrix4fvEXT, program, location, count, transpose, value);
 }
+void API_ENTRY(glUseProgramStagesEXT)(GLuint pipeline, GLbitfield stages, GLuint program) {
+    CALL_GL_API(glUseProgramStagesEXT, pipeline, stages, program);
+}
 void API_ENTRY(glValidateProgramPipelineEXT)(GLuint pipeline) {
     CALL_GL_API(glValidateProgramPipelineEXT, pipeline);
 }
-void API_ENTRY(glGetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
-    CALL_GL_API(glGetProgramPipelineInfoLogEXT, pipeline, bufSize, length, infoLog);
+void API_ENTRY(glProgramUniform1uiEXT)(GLuint program, GLint location, GLuint v0) {
+    CALL_GL_API(glProgramUniform1uiEXT, program, location, v0);
+}
+void API_ENTRY(glProgramUniform2uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1) {
+    CALL_GL_API(glProgramUniform2uiEXT, program, location, v0, v1);
+}
+void API_ENTRY(glProgramUniform3uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) {
+    CALL_GL_API(glProgramUniform3uiEXT, program, location, v0, v1, v2);
+}
+void API_ENTRY(glProgramUniform4uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
+    CALL_GL_API(glProgramUniform4uiEXT, program, location, v0, v1, v2, v3);
+}
+void API_ENTRY(glProgramUniform1uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform1uivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform2uivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform3uivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    CALL_GL_API(glProgramUniform4uivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniformMatrix2x3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix2x3fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix3x2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix3x2fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix2x4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix2x4fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix4x2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix4x2fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix3x4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix3x4fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix4x3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glProgramUniformMatrix4x3fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glPatchParameteriEXT)(GLenum pname, GLint value) {
+    CALL_GL_API(glPatchParameteriEXT, pname, value);
+}
+void API_ENTRY(glTexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params) {
+    CALL_GL_API(glTexParameterIivEXT, target, pname, params);
+}
+void API_ENTRY(glTexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params) {
+    CALL_GL_API(glTexParameterIuivEXT, target, pname, params);
+}
+void API_ENTRY(glGetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetTexParameterIivEXT, target, pname, params);
+}
+void API_ENTRY(glGetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params) {
+    CALL_GL_API(glGetTexParameterIuivEXT, target, pname, params);
+}
+void API_ENTRY(glSamplerParameterIivEXT)(GLuint sampler, GLenum pname, const GLint * param) {
+    CALL_GL_API(glSamplerParameterIivEXT, sampler, pname, param);
+}
+void API_ENTRY(glSamplerParameterIuivEXT)(GLuint sampler, GLenum pname, const GLuint * param) {
+    CALL_GL_API(glSamplerParameterIuivEXT, sampler, pname, param);
+}
+void API_ENTRY(glGetSamplerParameterIivEXT)(GLuint sampler, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetSamplerParameterIivEXT, sampler, pname, params);
+}
+void API_ENTRY(glGetSamplerParameterIuivEXT)(GLuint sampler, GLenum pname, GLuint * params) {
+    CALL_GL_API(glGetSamplerParameterIuivEXT, sampler, pname, params);
+}
+void API_ENTRY(glTexBufferEXT)(GLenum target, GLenum internalformat, GLuint buffer) {
+    CALL_GL_API(glTexBufferEXT, target, internalformat, buffer);
+}
+void API_ENTRY(glTexBufferRangeEXT)(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) {
+    CALL_GL_API(glTexBufferRangeEXT, target, internalformat, buffer, offset, size);
 }
 void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
     CALL_GL_API(glTexStorage1DEXT, target, levels, internalformat, width);
@@ -265,25 +490,73 @@
 void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
     CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth);
 }
+void API_ENTRY(glTextureViewEXT)(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) {
+    CALL_GL_API(glTextureViewEXT, texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
+}
 void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
 }
 void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
     CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
 }
+void API_ENTRY(glBeginPerfQueryINTEL)(GLuint queryHandle) {
+    CALL_GL_API(glBeginPerfQueryINTEL, queryHandle);
+}
+void API_ENTRY(glCreatePerfQueryINTEL)(GLuint queryId, GLuint * queryHandle) {
+    CALL_GL_API(glCreatePerfQueryINTEL, queryId, queryHandle);
+}
+void API_ENTRY(glDeletePerfQueryINTEL)(GLuint queryHandle) {
+    CALL_GL_API(glDeletePerfQueryINTEL, queryHandle);
+}
+void API_ENTRY(glEndPerfQueryINTEL)(GLuint queryHandle) {
+    CALL_GL_API(glEndPerfQueryINTEL, queryHandle);
+}
+void API_ENTRY(glGetFirstPerfQueryIdINTEL)(GLuint * queryId) {
+    CALL_GL_API(glGetFirstPerfQueryIdINTEL, queryId);
+}
+void API_ENTRY(glGetNextPerfQueryIdINTEL)(GLuint queryId, GLuint * nextQueryId) {
+    CALL_GL_API(glGetNextPerfQueryIdINTEL, queryId, nextQueryId);
+}
+void API_ENTRY(glGetPerfCounterInfoINTEL)(GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue) {
+    CALL_GL_API(glGetPerfCounterInfoINTEL, queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue);
+}
+void API_ENTRY(glGetPerfQueryDataINTEL)(GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid * data, GLuint * bytesWritten) {
+    CALL_GL_API(glGetPerfQueryDataINTEL, queryHandle, flags, dataSize, data, bytesWritten);
+}
+void API_ENTRY(glGetPerfQueryIdByNameINTEL)(GLchar * queryName, GLuint * queryId) {
+    CALL_GL_API(glGetPerfQueryIdByNameINTEL, queryName, queryId);
+}
+void API_ENTRY(glGetPerfQueryInfoINTEL)(GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask) {
+    CALL_GL_API(glGetPerfQueryInfoINTEL, queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask);
+}
+void API_ENTRY(glBlendParameteriNV)(GLenum pname, GLint value) {
+    CALL_GL_API(glBlendParameteriNV, pname, value);
+}
+void API_ENTRY(glBlendBarrierNV)(void) {
+    CALL_GL_API(glBlendBarrierNV);
+}
+void API_ENTRY(glCopyBufferSubDataNV)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) {
+    CALL_GL_API(glCopyBufferSubDataNV, readTarget, writeTarget, readOffset, writeOffset, size);
+}
 void API_ENTRY(glCoverageMaskNV)(GLboolean mask) {
     CALL_GL_API(glCoverageMaskNV, mask);
 }
 void API_ENTRY(glCoverageOperationNV)(GLenum operation) {
     CALL_GL_API(glCoverageOperationNV, operation);
 }
-void API_ENTRY(glDrawBuffersNV)(GLsizei n, const GLenum *bufs) {
+void API_ENTRY(glDrawBuffersNV)(GLsizei n, const GLenum * bufs) {
     CALL_GL_API(glDrawBuffersNV, n, bufs);
 }
-void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
+void API_ENTRY(glDrawArraysInstancedNV)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) {
+    CALL_GL_API(glDrawArraysInstancedNV, mode, first, count, primcount);
+}
+void API_ENTRY(glDrawElementsInstancedNV)(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) {
+    CALL_GL_API(glDrawElementsInstancedNV, mode, count, type, indices, primcount);
+}
+void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint * fences) {
     CALL_GL_API(glDeleteFencesNV, n, fences);
 }
-void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) {
+void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint * fences) {
     CALL_GL_API(glGenFencesNV, n, fences);
 }
 GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) {
@@ -292,7 +565,7 @@
 GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) {
     CALL_GL_API_RETURN(glTestFenceNV, fence);
 }
-void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) {
+void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint * params) {
     CALL_GL_API(glGetFenceivNV, fence, pname, params);
 }
 void API_ENTRY(glFinishFenceNV)(GLuint fence) {
@@ -301,16 +574,43 @@
 void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
     CALL_GL_API(glSetFenceNV, fence, condition);
 }
+void API_ENTRY(glBlitFramebufferNV)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
+    CALL_GL_API(glBlitFramebufferNV, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+void API_ENTRY(glRenderbufferStorageMultisampleNV)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    CALL_GL_API(glRenderbufferStorageMultisampleNV, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glVertexAttribDivisorNV)(GLuint index, GLuint divisor) {
+    CALL_GL_API(glVertexAttribDivisorNV, index, divisor);
+}
+void API_ENTRY(glUniformMatrix2x3fvNV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix2x3fvNV, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix3x2fvNV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix3x2fvNV, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix2x4fvNV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix2x4fvNV, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix4x2fvNV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix4x2fvNV, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix3x4fvNV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix3x4fvNV, location, count, transpose, value);
+}
+void API_ENTRY(glUniformMatrix4x3fvNV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    CALL_GL_API(glUniformMatrix4x3fvNV, location, count, transpose, value);
+}
 void API_ENTRY(glReadBufferNV)(GLenum mode) {
     CALL_GL_API(glReadBufferNV, mode);
 }
 void API_ENTRY(glAlphaFuncQCOM)(GLenum func, GLclampf ref) {
     CALL_GL_API(glAlphaFuncQCOM, func, ref);
 }
-void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
+void API_ENTRY(glGetDriverControlsQCOM)(GLint * num, GLsizei size, GLuint * driverControls) {
     CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
 }
-void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
+void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString) {
     CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString);
 }
 void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) {
@@ -319,40 +619,40 @@
 void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
     CALL_GL_API(glDisableDriverControlQCOM, driverControl);
 }
-void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) {
+void API_ENTRY(glExtGetTexturesQCOM)(GLuint * textures, GLint maxTextures, GLint * numTextures) {
     CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures);
 }
-void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
+void API_ENTRY(glExtGetBuffersQCOM)(GLuint * buffers, GLint maxBuffers, GLint * numBuffers) {
     CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers);
 }
-void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
+void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers) {
     CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers);
 }
-void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
+void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers) {
     CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers);
 }
-void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
+void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params) {
     CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params);
 }
 void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) {
     CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param);
 }
-void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
+void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels) {
     CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
 }
-void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) {
+void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, void ** params) {
     CALL_GL_API(glExtGetBufferPointervQCOM, target, params);
 }
-void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
+void API_ENTRY(glExtGetShadersQCOM)(GLuint * shaders, GLint maxShaders, GLint * numShaders) {
     CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders);
 }
-void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
+void API_ENTRY(glExtGetProgramsQCOM)(GLuint * programs, GLint maxPrograms, GLint * numPrograms) {
     CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms);
 }
 GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) {
     CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program);
 }
-void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
+void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar * source, GLint * length) {
     CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length);
 }
 void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
diff --git a/opengl/libs/GLES2/gl3_api.in b/opengl/libs/GLES2/gl3_api.in
deleted file mode 100644
index 76f4e23..0000000
--- a/opengl/libs/GLES2/gl3_api.in
+++ /dev/null
@@ -1,738 +0,0 @@
-void API_ENTRY(glActiveTexture)(GLenum texture) {
-    CALL_GL_API(glActiveTexture, texture);
-}
-void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) {
-    CALL_GL_API(glAttachShader, program, shader);
-}
-void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) {
-    CALL_GL_API(glBindAttribLocation, program, index, name);
-}
-void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
-    CALL_GL_API(glBindBuffer, target, buffer);
-}
-void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) {
-    CALL_GL_API(glBindFramebuffer, target, framebuffer);
-}
-void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) {
-    CALL_GL_API(glBindRenderbuffer, target, renderbuffer);
-}
-void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) {
-    CALL_GL_API(glBindTexture, target, texture);
-}
-void API_ENTRY(glBlendColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
-    CALL_GL_API(glBlendColor, red, green, blue, alpha);
-}
-void API_ENTRY(glBlendEquation)(GLenum mode) {
-    CALL_GL_API(glBlendEquation, mode);
-}
-void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) {
-    CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha);
-}
-void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) {
-    CALL_GL_API(glBlendFunc, sfactor, dfactor);
-}
-void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
-    CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha);
-}
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
-    CALL_GL_API(glBufferData, target, size, data, usage);
-}
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
-    CALL_GL_API(glBufferSubData, target, offset, size, data);
-}
-GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) {
-    CALL_GL_API_RETURN(glCheckFramebufferStatus, target);
-}
-void API_ENTRY(glClear)(GLbitfield mask) {
-    CALL_GL_API(glClear, mask);
-}
-void API_ENTRY(glClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
-    CALL_GL_API(glClearColor, red, green, blue, alpha);
-}
-void API_ENTRY(glClearDepthf)(GLfloat depth) {
-    CALL_GL_API(glClearDepthf, depth);
-}
-void API_ENTRY(glClearStencil)(GLint s) {
-    CALL_GL_API(glClearStencil, s);
-}
-void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
-    CALL_GL_API(glColorMask, red, green, blue, alpha);
-}
-void API_ENTRY(glCompileShader)(GLuint shader) {
-    CALL_GL_API(glCompileShader, shader);
-}
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
-    CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
-}
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
-    CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
-}
-void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
-    CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border);
-}
-void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
-    CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height);
-}
-GLuint API_ENTRY(glCreateProgram)(void) {
-    CALL_GL_API_RETURN(glCreateProgram);
-}
-GLuint API_ENTRY(glCreateShader)(GLenum type) {
-    CALL_GL_API_RETURN(glCreateShader, type);
-}
-void API_ENTRY(glCullFace)(GLenum mode) {
-    CALL_GL_API(glCullFace, mode);
-}
-void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint* buffers) {
-    CALL_GL_API(glDeleteBuffers, n, buffers);
-}
-void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) {
-    CALL_GL_API(glDeleteFramebuffers, n, framebuffers);
-}
-void API_ENTRY(glDeleteProgram)(GLuint program) {
-    CALL_GL_API(glDeleteProgram, program);
-}
-void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) {
-    CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers);
-}
-void API_ENTRY(glDeleteShader)(GLuint shader) {
-    CALL_GL_API(glDeleteShader, shader);
-}
-void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint* textures) {
-    CALL_GL_API(glDeleteTextures, n, textures);
-}
-void API_ENTRY(glDepthFunc)(GLenum func) {
-    CALL_GL_API(glDepthFunc, func);
-}
-void API_ENTRY(glDepthMask)(GLboolean flag) {
-    CALL_GL_API(glDepthMask, flag);
-}
-void API_ENTRY(glDepthRangef)(GLfloat n, GLfloat f) {
-    CALL_GL_API(glDepthRangef, n, f);
-}
-void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) {
-    CALL_GL_API(glDetachShader, program, shader);
-}
-void API_ENTRY(glDisable)(GLenum cap) {
-    CALL_GL_API(glDisable, cap);
-}
-void API_ENTRY(glDisableVertexAttribArray)(GLuint index) {
-    CALL_GL_API(glDisableVertexAttribArray, index);
-}
-void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
-    CALL_GL_API(glDrawArrays, mode, first, count);
-}
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
-    CALL_GL_API(glDrawElements, mode, count, type, indices);
-}
-void API_ENTRY(glEnable)(GLenum cap) {
-    CALL_GL_API(glEnable, cap);
-}
-void API_ENTRY(glEnableVertexAttribArray)(GLuint index) {
-    CALL_GL_API(glEnableVertexAttribArray, index);
-}
-void API_ENTRY(glFinish)(void) {
-    CALL_GL_API(glFinish);
-}
-void API_ENTRY(glFlush)(void) {
-    CALL_GL_API(glFlush);
-}
-void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
-    CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer);
-}
-void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
-    CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level);
-}
-void API_ENTRY(glFrontFace)(GLenum mode) {
-    CALL_GL_API(glFrontFace, mode);
-}
-void API_ENTRY(glGenBuffers)(GLsizei n, GLuint* buffers) {
-    CALL_GL_API(glGenBuffers, n, buffers);
-}
-void API_ENTRY(glGenerateMipmap)(GLenum target) {
-    CALL_GL_API(glGenerateMipmap, target);
-}
-void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint* framebuffers) {
-    CALL_GL_API(glGenFramebuffers, n, framebuffers);
-}
-void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) {
-    CALL_GL_API(glGenRenderbuffers, n, renderbuffers);
-}
-void API_ENTRY(glGenTextures)(GLsizei n, GLuint* textures) {
-    CALL_GL_API(glGenTextures, n, textures);
-}
-void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
-    CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name);
-}
-void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
-    CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name);
-}
-void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
-    CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders);
-}
-GLint API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar* name) {
-    CALL_GL_API_RETURN(glGetAttribLocation, program, name);
-}
-void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) {
-    CALL_GL_API(glGetBooleanv, pname, params);
-}
-void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetBufferParameteriv, target, pname, params);
-}
-GLenum API_ENTRY(glGetError)(void) {
-    CALL_GL_API_RETURN(glGetError);
-}
-void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) {
-    CALL_GL_API(glGetFloatv, pname, params);
-}
-void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params);
-}
-void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) {
-    CALL_GL_API(glGetIntegerv, pname, params);
-}
-void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetProgramiv, program, pname, params);
-}
-void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
-    CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog);
-}
-void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetShaderiv, shader, pname, params);
-}
-void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
-    CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog);
-}
-void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
-    CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision);
-}
-void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
-    CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
-}
-const GLubyte* API_ENTRY(__glGetString)(GLenum name) {
-    CALL_GL_API_RETURN(glGetString, name);
-}
-void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) {
-    CALL_GL_API(glGetTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) {
-    CALL_GL_API(glGetUniformfv, program, location, params);
-}
-void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) {
-    CALL_GL_API(glGetUniformiv, program, location, params);
-}
-GLint API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar* name) {
-    CALL_GL_API_RETURN(glGetUniformLocation, program, name);
-}
-void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) {
-    CALL_GL_API(glGetVertexAttribfv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetVertexAttribiv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) {
-    CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer);
-}
-void API_ENTRY(glHint)(GLenum target, GLenum mode) {
-    CALL_GL_API(glHint, target, mode);
-}
-GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) {
-    CALL_GL_API_RETURN(glIsBuffer, buffer);
-}
-GLboolean API_ENTRY(glIsEnabled)(GLenum cap) {
-    CALL_GL_API_RETURN(glIsEnabled, cap);
-}
-GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) {
-    CALL_GL_API_RETURN(glIsFramebuffer, framebuffer);
-}
-GLboolean API_ENTRY(glIsProgram)(GLuint program) {
-    CALL_GL_API_RETURN(glIsProgram, program);
-}
-GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) {
-    CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer);
-}
-GLboolean API_ENTRY(glIsShader)(GLuint shader) {
-    CALL_GL_API_RETURN(glIsShader, shader);
-}
-GLboolean API_ENTRY(glIsTexture)(GLuint texture) {
-    CALL_GL_API_RETURN(glIsTexture, texture);
-}
-void API_ENTRY(glLineWidth)(GLfloat width) {
-    CALL_GL_API(glLineWidth, width);
-}
-void API_ENTRY(glLinkProgram)(GLuint program) {
-    CALL_GL_API(glLinkProgram, program);
-}
-void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) {
-    CALL_GL_API(glPixelStorei, pname, param);
-}
-void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) {
-    CALL_GL_API(glPolygonOffset, factor, units);
-}
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
-    CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
-}
-void API_ENTRY(glReleaseShaderCompiler)(void) {
-    CALL_GL_API(glReleaseShaderCompiler);
-}
-void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
-    CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height);
-}
-void API_ENTRY(glSampleCoverage)(GLfloat value, GLboolean invert) {
-    CALL_GL_API(glSampleCoverage, value, invert);
-}
-void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) {
-    CALL_GL_API(glScissor, x, y, width, height);
-}
-void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
-    CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length);
-}
-void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) {
-    CALL_GL_API(glShaderSource, shader, count, string, length);
-}
-void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {
-    CALL_GL_API(glStencilFunc, func, ref, mask);
-}
-void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) {
-    CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask);
-}
-void API_ENTRY(glStencilMask)(GLuint mask) {
-    CALL_GL_API(glStencilMask, mask);
-}
-void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) {
-    CALL_GL_API(glStencilMaskSeparate, face, mask);
-}
-void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) {
-    CALL_GL_API(glStencilOp, fail, zfail, zpass);
-}
-void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
-    CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass);
-}
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
-    CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
-}
-void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
-    CALL_GL_API(glTexParameterf, target, pname, param);
-}
-void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) {
-    CALL_GL_API(glTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) {
-    CALL_GL_API(glTexParameteri, target, pname, param);
-}
-void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) {
-    CALL_GL_API(glTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
-    CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
-}
-void API_ENTRY(glUniform1f)(GLint location, GLfloat x) {
-    CALL_GL_API(glUniform1f, location, x);
-}
-void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform1fv, location, count, v);
-}
-void API_ENTRY(glUniform1i)(GLint location, GLint x) {
-    CALL_GL_API(glUniform1i, location, x);
-}
-void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform1iv, location, count, v);
-}
-void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) {
-    CALL_GL_API(glUniform2f, location, x, y);
-}
-void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform2fv, location, count, v);
-}
-void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) {
-    CALL_GL_API(glUniform2i, location, x, y);
-}
-void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform2iv, location, count, v);
-}
-void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) {
-    CALL_GL_API(glUniform3f, location, x, y, z);
-}
-void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform3fv, location, count, v);
-}
-void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) {
-    CALL_GL_API(glUniform3i, location, x, y, z);
-}
-void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform3iv, location, count, v);
-}
-void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
-    CALL_GL_API(glUniform4f, location, x, y, z, w);
-}
-void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) {
-    CALL_GL_API(glUniform4fv, location, count, v);
-}
-void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) {
-    CALL_GL_API(glUniform4i, location, x, y, z, w);
-}
-void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint* v) {
-    CALL_GL_API(glUniform4iv, location, count, v);
-}
-void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value);
-}
-void API_ENTRY(glUseProgram)(GLuint program) {
-    CALL_GL_API(glUseProgram, program);
-}
-void API_ENTRY(glValidateProgram)(GLuint program) {
-    CALL_GL_API(glValidateProgram, program);
-}
-void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) {
-    CALL_GL_API(glVertexAttrib1f, indx, x);
-}
-void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib1fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) {
-    CALL_GL_API(glVertexAttrib2f, indx, x, y);
-}
-void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib2fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
-    CALL_GL_API(glVertexAttrib3f, indx, x, y, z);
-}
-void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib3fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
-    CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w);
-}
-void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat* values) {
-    CALL_GL_API(glVertexAttrib4fv, indx, values);
-}
-void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
-    CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr);
-}
-void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
-    CALL_GL_API(glViewport, x, y, width, height);
-}
-void API_ENTRY(glReadBuffer)(GLenum mode) {
-    CALL_GL_API(glReadBuffer, mode);
-}
-void API_ENTRY(glDrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) {
-    CALL_GL_API(glDrawRangeElements, mode, start, end, count, type, indices);
-}
-void API_ENTRY(glTexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
-    CALL_GL_API(glTexImage3D, target, level, internalformat, width, height, depth, border, format, type, pixels);
-}
-void API_ENTRY(glTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
-    CALL_GL_API(glTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
-}
-void API_ENTRY(glCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
-    CALL_GL_API(glCopyTexSubImage3D, target, level, xoffset, yoffset, zoffset, x, y, width, height);
-}
-void API_ENTRY(glCompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
-    CALL_GL_API(glCompressedTexImage3D, target, level, internalformat, width, height, depth, border, imageSize, data);
-}
-void API_ENTRY(glCompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
-    CALL_GL_API(glCompressedTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
-}
-void API_ENTRY(glGenQueries)(GLsizei n, GLuint* ids) {
-    CALL_GL_API(glGenQueries, n, ids);
-}
-void API_ENTRY(glDeleteQueries)(GLsizei n, const GLuint* ids) {
-    CALL_GL_API(glDeleteQueries, n, ids);
-}
-GLboolean API_ENTRY(glIsQuery)(GLuint id) {
-    CALL_GL_API_RETURN(glIsQuery, id);
-}
-void API_ENTRY(glBeginQuery)(GLenum target, GLuint id) {
-    CALL_GL_API(glBeginQuery, target, id);
-}
-void API_ENTRY(glEndQuery)(GLenum target) {
-    CALL_GL_API(glEndQuery, target);
-}
-void API_ENTRY(glGetQueryiv)(GLenum target, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetQueryiv, target, pname, params);
-}
-void API_ENTRY(glGetQueryObjectuiv)(GLuint id, GLenum pname, GLuint* params) {
-    CALL_GL_API(glGetQueryObjectuiv, id, pname, params);
-}
-GLboolean API_ENTRY(glUnmapBuffer)(GLenum target) {
-    CALL_GL_API_RETURN(glUnmapBuffer, target);
-}
-void API_ENTRY(glGetBufferPointerv)(GLenum target, GLenum pname, GLvoid** params) {
-    CALL_GL_API(glGetBufferPointerv, target, pname, params);
-}
-void API_ENTRY(glDrawBuffers)(GLsizei n, const GLenum* bufs) {
-    CALL_GL_API(glDrawBuffers, n, bufs);
-}
-void API_ENTRY(glUniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix2x3fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix3x2fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix2x4fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix4x2fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix3x4fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
-    CALL_GL_API(glUniformMatrix4x3fv, location, count, transpose, value);
-}
-void API_ENTRY(glBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
-    CALL_GL_API(glBlitFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
-}
-void API_ENTRY(glRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
-    CALL_GL_API(glRenderbufferStorageMultisample, target, samples, internalformat, width, height);
-}
-void API_ENTRY(glFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) {
-    CALL_GL_API(glFramebufferTextureLayer, target, attachment, texture, level, layer);
-}
-GLvoid* API_ENTRY(glMapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
-    CALL_GL_API_RETURN(glMapBufferRange, target, offset, length, access);
-}
-void API_ENTRY(glFlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) {
-    CALL_GL_API(glFlushMappedBufferRange, target, offset, length);
-}
-void API_ENTRY(glBindVertexArray)(GLuint array) {
-    CALL_GL_API(glBindVertexArray, array);
-}
-void API_ENTRY(glDeleteVertexArrays)(GLsizei n, const GLuint* arrays) {
-    CALL_GL_API(glDeleteVertexArrays, n, arrays);
-}
-void API_ENTRY(glGenVertexArrays)(GLsizei n, GLuint* arrays) {
-    CALL_GL_API(glGenVertexArrays, n, arrays);
-}
-GLboolean API_ENTRY(glIsVertexArray)(GLuint array) {
-    CALL_GL_API_RETURN(glIsVertexArray, array);
-}
-void API_ENTRY(glGetIntegeri_v)(GLenum target, GLuint index, GLint* data) {
-    CALL_GL_API(glGetIntegeri_v, target, index, data);
-}
-void API_ENTRY(glBeginTransformFeedback)(GLenum primitiveMode) {
-    CALL_GL_API(glBeginTransformFeedback, primitiveMode);
-}
-void API_ENTRY(glEndTransformFeedback)(void) {
-    CALL_GL_API(glEndTransformFeedback);
-}
-void API_ENTRY(glBindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) {
-    CALL_GL_API(glBindBufferRange, target, index, buffer, offset, size);
-}
-void API_ENTRY(glBindBufferBase)(GLenum target, GLuint index, GLuint buffer) {
-    CALL_GL_API(glBindBufferBase, target, index, buffer);
-}
-void API_ENTRY(glTransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) {
-    CALL_GL_API(glTransformFeedbackVaryings, program, count, varyings, bufferMode);
-}
-void API_ENTRY(glGetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) {
-    CALL_GL_API(glGetTransformFeedbackVarying, program, index, bufSize, length, size, type, name);
-}
-void API_ENTRY(glVertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) {
-    CALL_GL_API(glVertexAttribIPointer, index, size, type, stride, pointer);
-}
-void API_ENTRY(glGetVertexAttribIiv)(GLuint index, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetVertexAttribIiv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint* params) {
-    CALL_GL_API(glGetVertexAttribIuiv, index, pname, params);
-}
-void API_ENTRY(glVertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) {
-    CALL_GL_API(glVertexAttribI4i, index, x, y, z, w);
-}
-void API_ENTRY(glVertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) {
-    CALL_GL_API(glVertexAttribI4ui, index, x, y, z, w);
-}
-void API_ENTRY(glVertexAttribI4iv)(GLuint index, const GLint* v) {
-    CALL_GL_API(glVertexAttribI4iv, index, v);
-}
-void API_ENTRY(glVertexAttribI4uiv)(GLuint index, const GLuint* v) {
-    CALL_GL_API(glVertexAttribI4uiv, index, v);
-}
-void API_ENTRY(glGetUniformuiv)(GLuint program, GLint location, GLuint* params) {
-    CALL_GL_API(glGetUniformuiv, program, location, params);
-}
-GLint API_ENTRY(glGetFragDataLocation)(GLuint program, const GLchar *name) {
-    CALL_GL_API_RETURN(glGetFragDataLocation, program, name);
-}
-void API_ENTRY(glUniform1ui)(GLint location, GLuint v0) {
-    CALL_GL_API(glUniform1ui, location, v0);
-}
-void API_ENTRY(glUniform2ui)(GLint location, GLuint v0, GLuint v1) {
-    CALL_GL_API(glUniform2ui, location, v0, v1);
-}
-void API_ENTRY(glUniform3ui)(GLint location, GLuint v0, GLuint v1, GLuint v2) {
-    CALL_GL_API(glUniform3ui, location, v0, v1, v2);
-}
-void API_ENTRY(glUniform4ui)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
-    CALL_GL_API(glUniform4ui, location, v0, v1, v2, v3);
-}
-void API_ENTRY(glUniform1uiv)(GLint location, GLsizei count, const GLuint* value) {
-    CALL_GL_API(glUniform1uiv, location, count, value);
-}
-void API_ENTRY(glUniform2uiv)(GLint location, GLsizei count, const GLuint* value) {
-    CALL_GL_API(glUniform2uiv, location, count, value);
-}
-void API_ENTRY(glUniform3uiv)(GLint location, GLsizei count, const GLuint* value) {
-    CALL_GL_API(glUniform3uiv, location, count, value);
-}
-void API_ENTRY(glUniform4uiv)(GLint location, GLsizei count, const GLuint* value) {
-    CALL_GL_API(glUniform4uiv, location, count, value);
-}
-void API_ENTRY(glClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint* value) {
-    CALL_GL_API(glClearBufferiv, buffer, drawbuffer, value);
-}
-void API_ENTRY(glClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint* value) {
-    CALL_GL_API(glClearBufferuiv, buffer, drawbuffer, value);
-}
-void API_ENTRY(glClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat* value) {
-    CALL_GL_API(glClearBufferfv, buffer, drawbuffer, value);
-}
-void API_ENTRY(glClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) {
-    CALL_GL_API(glClearBufferfi, buffer, drawbuffer, depth, stencil);
-}
-const GLubyte* API_ENTRY(glGetStringi)(GLenum name, GLuint index) {
-    CALL_GL_API_RETURN(glGetStringi, name, index);
-}
-void API_ENTRY(glCopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) {
-    CALL_GL_API(glCopyBufferSubData, readTarget, writeTarget, readOffset, writeOffset, size);
-}
-void API_ENTRY(glGetUniformIndices)(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) {
-    CALL_GL_API(glGetUniformIndices, program, uniformCount, uniformNames, uniformIndices);
-}
-void API_ENTRY(glGetActiveUniformsiv)(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetActiveUniformsiv, program, uniformCount, uniformIndices, pname, params);
-}
-GLuint API_ENTRY(glGetUniformBlockIndex)(GLuint program, const GLchar* uniformBlockName) {
-    CALL_GL_API_RETURN(glGetUniformBlockIndex, program, uniformBlockName);
-}
-void API_ENTRY(glGetActiveUniformBlockiv)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetActiveUniformBlockiv, program, uniformBlockIndex, pname, params);
-}
-void API_ENTRY(glGetActiveUniformBlockName)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) {
-    CALL_GL_API(glGetActiveUniformBlockName, program, uniformBlockIndex, bufSize, length, uniformBlockName);
-}
-void API_ENTRY(glUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
-    CALL_GL_API(glUniformBlockBinding, program, uniformBlockIndex, uniformBlockBinding);
-}
-void API_ENTRY(glDrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) {
-    CALL_GL_API(glDrawArraysInstanced, mode, first, count, instanceCount);
-}
-void API_ENTRY(glDrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) {
-    CALL_GL_API(glDrawElementsInstanced, mode, count, type, indices, instanceCount);
-}
-GLsync API_ENTRY(glFenceSync)(GLenum condition, GLbitfield flags) {
-    CALL_GL_API_RETURN(glFenceSync, condition, flags);
-}
-GLboolean API_ENTRY(glIsSync)(GLsync sync) {
-    CALL_GL_API_RETURN(glIsSync, sync);
-}
-void API_ENTRY(glDeleteSync)(GLsync sync) {
-    CALL_GL_API(glDeleteSync, sync);
-}
-GLenum API_ENTRY(glClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
-    CALL_GL_API_RETURN(glClientWaitSync, sync, flags, timeout);
-}
-void API_ENTRY(glWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
-    CALL_GL_API(glWaitSync, sync, flags, timeout);
-}
-void API_ENTRY(glGetInteger64v)(GLenum pname, GLint64* params) {
-    CALL_GL_API(glGetInteger64v, pname, params);
-}
-void API_ENTRY(glGetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) {
-    CALL_GL_API(glGetSynciv, sync, pname, bufSize, length, values);
-}
-void API_ENTRY(glGetInteger64i_v)(GLenum target, GLuint index, GLint64* data) {
-    CALL_GL_API(glGetInteger64i_v, target, index, data);
-}
-void API_ENTRY(glGetBufferParameteri64v)(GLenum target, GLenum pname, GLint64* params) {
-    CALL_GL_API(glGetBufferParameteri64v, target, pname, params);
-}
-void API_ENTRY(glGenSamplers)(GLsizei count, GLuint* samplers) {
-    CALL_GL_API(glGenSamplers, count, samplers);
-}
-void API_ENTRY(glDeleteSamplers)(GLsizei count, const GLuint* samplers) {
-    CALL_GL_API(glDeleteSamplers, count, samplers);
-}
-GLboolean API_ENTRY(glIsSampler)(GLuint sampler) {
-    CALL_GL_API_RETURN(glIsSampler, sampler);
-}
-void API_ENTRY(glBindSampler)(GLuint unit, GLuint sampler) {
-    CALL_GL_API(glBindSampler, unit, sampler);
-}
-void API_ENTRY(glSamplerParameteri)(GLuint sampler, GLenum pname, GLint param) {
-    CALL_GL_API(glSamplerParameteri, sampler, pname, param);
-}
-void API_ENTRY(glSamplerParameteriv)(GLuint sampler, GLenum pname, const GLint* param) {
-    CALL_GL_API(glSamplerParameteriv, sampler, pname, param);
-}
-void API_ENTRY(glSamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) {
-    CALL_GL_API(glSamplerParameterf, sampler, pname, param);
-}
-void API_ENTRY(glSamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat* param) {
-    CALL_GL_API(glSamplerParameterfv, sampler, pname, param);
-}
-void API_ENTRY(glGetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint* params) {
-    CALL_GL_API(glGetSamplerParameteriv, sampler, pname, params);
-}
-void API_ENTRY(glGetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat* params) {
-    CALL_GL_API(glGetSamplerParameterfv, sampler, pname, params);
-}
-void API_ENTRY(glVertexAttribDivisor)(GLuint index, GLuint divisor) {
-    CALL_GL_API(glVertexAttribDivisor, index, divisor);
-}
-void API_ENTRY(glBindTransformFeedback)(GLenum target, GLuint id) {
-    CALL_GL_API(glBindTransformFeedback, target, id);
-}
-void API_ENTRY(glDeleteTransformFeedbacks)(GLsizei n, const GLuint* ids) {
-    CALL_GL_API(glDeleteTransformFeedbacks, n, ids);
-}
-void API_ENTRY(glGenTransformFeedbacks)(GLsizei n, GLuint* ids) {
-    CALL_GL_API(glGenTransformFeedbacks, n, ids);
-}
-GLboolean API_ENTRY(glIsTransformFeedback)(GLuint id) {
-    CALL_GL_API_RETURN(glIsTransformFeedback, id);
-}
-void API_ENTRY(glPauseTransformFeedback)(void) {
-    CALL_GL_API(glPauseTransformFeedback);
-}
-void API_ENTRY(glResumeTransformFeedback)(void) {
-    CALL_GL_API(glResumeTransformFeedback);
-}
-void API_ENTRY(glGetProgramBinary)(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) {
-    CALL_GL_API(glGetProgramBinary, program, bufSize, length, binaryFormat, binary);
-}
-void API_ENTRY(glProgramBinary)(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) {
-    CALL_GL_API(glProgramBinary, program, binaryFormat, binary, length);
-}
-void API_ENTRY(glProgramParameteri)(GLuint program, GLenum pname, GLint value) {
-    CALL_GL_API(glProgramParameteri, program, pname, value);
-}
-void API_ENTRY(glInvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum* attachments) {
-    CALL_GL_API(glInvalidateFramebuffer, target, numAttachments, attachments);
-}
-void API_ENTRY(glInvalidateSubFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) {
-    CALL_GL_API(glInvalidateSubFramebuffer, target, numAttachments, attachments, x, y, width, height);
-}
-void API_ENTRY(glTexStorage2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
-    CALL_GL_API(glTexStorage2D, target, levels, internalformat, width, height);
-}
-void API_ENTRY(glTexStorage3D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
-    CALL_GL_API(glTexStorage3D, target, levels, internalformat, width, height, depth);
-}
-void API_ENTRY(glGetInternalformativ)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) {
-    CALL_GL_API(glGetInternalformativ, target, internalformat, pname, bufSize, params);
-}
diff --git a/opengl/libs/GLES2/gl3ext_api.in b/opengl/libs/GLES2/gl3ext_api.in
deleted file mode 100644
index e69de29..0000000
--- a/opengl/libs/GLES2/gl3ext_api.in
+++ /dev/null
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index 71fbed1..f05983c 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -214,8 +214,10 @@
 
 
 extern "C" {
+#pragma GCC diagnostic ignored "-Wunused-parameter"
 #include "gl_api.in"
 #include "glext_api.in"
+#pragma GCC diagnostic warning "-Wunused-parameter"
 }
 
 #undef API_ENTRY
diff --git a/opengl/libs/GLES_CM/gl_api.in b/opengl/libs/GLES_CM/gl_api.in
index c8f6b0c..fa975ed 100644
--- a/opengl/libs/GLES_CM/gl_api.in
+++ b/opengl/libs/GLES_CM/gl_api.in
@@ -1,73 +1,73 @@
-void API_ENTRY(glAlphaFunc)(GLenum func, GLclampf ref) {
+void API_ENTRY(glAlphaFunc)(GLenum func, GLfloat ref) {
     CALL_GL_API(glAlphaFunc, func, ref);
 }
-void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
+void API_ENTRY(glClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
     CALL_GL_API(glClearColor, red, green, blue, alpha);
 }
-void API_ENTRY(glClearDepthf)(GLclampf depth) {
-    CALL_GL_API(glClearDepthf, depth);
+void API_ENTRY(glClearDepthf)(GLfloat d) {
+    CALL_GL_API(glClearDepthf, d);
 }
-void API_ENTRY(glClipPlanef)(GLenum plane, const GLfloat *equation) {
-    CALL_GL_API(glClipPlanef, plane, equation);
+void API_ENTRY(glClipPlanef)(GLenum p, const GLfloat * eqn) {
+    CALL_GL_API(glClipPlanef, p, eqn);
 }
 void API_ENTRY(glColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
     CALL_GL_API(glColor4f, red, green, blue, alpha);
 }
-void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) {
-    CALL_GL_API(glDepthRangef, zNear, zFar);
+void API_ENTRY(glDepthRangef)(GLfloat n, GLfloat f) {
+    CALL_GL_API(glDepthRangef, n, f);
 }
 void API_ENTRY(glFogf)(GLenum pname, GLfloat param) {
     CALL_GL_API(glFogf, pname, param);
 }
-void API_ENTRY(glFogfv)(GLenum pname, const GLfloat *params) {
+void API_ENTRY(glFogfv)(GLenum pname, const GLfloat * params) {
     CALL_GL_API(glFogfv, pname, params);
 }
-void API_ENTRY(glFrustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
-    CALL_GL_API(glFrustumf, left, right, bottom, top, zNear, zFar);
+void API_ENTRY(glFrustumf)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
+    CALL_GL_API(glFrustumf, l, r, b, t, n, f);
 }
-void API_ENTRY(glGetClipPlanef)(GLenum pname, GLfloat eqn[4]) {
-    CALL_GL_API(glGetClipPlanef, pname, eqn);
+void API_ENTRY(glGetClipPlanef)(GLenum plane, GLfloat * equation) {
+    CALL_GL_API(glGetClipPlanef, plane, equation);
 }
-void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat *params) {
-    CALL_GL_API(glGetFloatv, pname, params);
+void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat * data) {
+    CALL_GL_API(glGetFloatv, pname, data);
 }
-void API_ENTRY(glGetLightfv)(GLenum light, GLenum pname, GLfloat *params) {
+void API_ENTRY(glGetLightfv)(GLenum light, GLenum pname, GLfloat * params) {
     CALL_GL_API(glGetLightfv, light, pname, params);
 }
-void API_ENTRY(glGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) {
+void API_ENTRY(glGetMaterialfv)(GLenum face, GLenum pname, GLfloat * params) {
     CALL_GL_API(glGetMaterialfv, face, pname, params);
 }
-void API_ENTRY(glGetTexEnvfv)(GLenum env, GLenum pname, GLfloat *params) {
-    CALL_GL_API(glGetTexEnvfv, env, pname, params);
+void API_ENTRY(glGetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params) {
+    CALL_GL_API(glGetTexEnvfv, target, pname, params);
 }
-void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) {
+void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params) {
     CALL_GL_API(glGetTexParameterfv, target, pname, params);
 }
 void API_ENTRY(glLightModelf)(GLenum pname, GLfloat param) {
     CALL_GL_API(glLightModelf, pname, param);
 }
-void API_ENTRY(glLightModelfv)(GLenum pname, const GLfloat *params) {
+void API_ENTRY(glLightModelfv)(GLenum pname, const GLfloat * params) {
     CALL_GL_API(glLightModelfv, pname, params);
 }
 void API_ENTRY(glLightf)(GLenum light, GLenum pname, GLfloat param) {
     CALL_GL_API(glLightf, light, pname, param);
 }
-void API_ENTRY(glLightfv)(GLenum light, GLenum pname, const GLfloat *params) {
+void API_ENTRY(glLightfv)(GLenum light, GLenum pname, const GLfloat * params) {
     CALL_GL_API(glLightfv, light, pname, params);
 }
 void API_ENTRY(glLineWidth)(GLfloat width) {
     CALL_GL_API(glLineWidth, width);
 }
-void API_ENTRY(glLoadMatrixf)(const GLfloat *m) {
+void API_ENTRY(glLoadMatrixf)(const GLfloat * m) {
     CALL_GL_API(glLoadMatrixf, m);
 }
 void API_ENTRY(glMaterialf)(GLenum face, GLenum pname, GLfloat param) {
     CALL_GL_API(glMaterialf, face, pname, param);
 }
-void API_ENTRY(glMaterialfv)(GLenum face, GLenum pname, const GLfloat *params) {
+void API_ENTRY(glMaterialfv)(GLenum face, GLenum pname, const GLfloat * params) {
     CALL_GL_API(glMaterialfv, face, pname, params);
 }
-void API_ENTRY(glMultMatrixf)(const GLfloat *m) {
+void API_ENTRY(glMultMatrixf)(const GLfloat * m) {
     CALL_GL_API(glMultMatrixf, m);
 }
 void API_ENTRY(glMultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
@@ -76,13 +76,13 @@
 void API_ENTRY(glNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz) {
     CALL_GL_API(glNormal3f, nx, ny, nz);
 }
-void API_ENTRY(glOrthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
-    CALL_GL_API(glOrthof, left, right, bottom, top, zNear, zFar);
+void API_ENTRY(glOrthof)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
+    CALL_GL_API(glOrthof, l, r, b, t, n, f);
 }
 void API_ENTRY(glPointParameterf)(GLenum pname, GLfloat param) {
     CALL_GL_API(glPointParameterf, pname, param);
 }
-void API_ENTRY(glPointParameterfv)(GLenum pname, const GLfloat *params) {
+void API_ENTRY(glPointParameterfv)(GLenum pname, const GLfloat * params) {
     CALL_GL_API(glPointParameterfv, pname, params);
 }
 void API_ENTRY(glPointSize)(GLfloat size) {
@@ -100,13 +100,13 @@
 void API_ENTRY(glTexEnvf)(GLenum target, GLenum pname, GLfloat param) {
     CALL_GL_API(glTexEnvf, target, pname, param);
 }
-void API_ENTRY(glTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) {
+void API_ENTRY(glTexEnvfv)(GLenum target, GLenum pname, const GLfloat * params) {
     CALL_GL_API(glTexEnvfv, target, pname, params);
 }
 void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
     CALL_GL_API(glTexParameterf, target, pname, param);
 }
-void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) {
+void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat * params) {
     CALL_GL_API(glTexParameterfv, target, pname, params);
 }
 void API_ENTRY(glTranslatef)(GLfloat x, GLfloat y, GLfloat z) {
@@ -115,7 +115,7 @@
 void API_ENTRY(glActiveTexture)(GLenum texture) {
     CALL_GL_API(glActiveTexture, texture);
 }
-void API_ENTRY(glAlphaFuncx)(GLenum func, GLclampx ref) {
+void API_ENTRY(glAlphaFuncx)(GLenum func, GLfixed ref) {
     CALL_GL_API(glAlphaFuncx, func, ref);
 }
 void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
@@ -127,19 +127,19 @@
 void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) {
     CALL_GL_API(glBlendFunc, sfactor, dfactor);
 }
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) {
+void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const void * data, GLenum usage) {
     CALL_GL_API(glBufferData, target, size, data, usage);
 }
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) {
+void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void * data) {
     CALL_GL_API(glBufferSubData, target, offset, size, data);
 }
 void API_ENTRY(glClear)(GLbitfield mask) {
     CALL_GL_API(glClear, mask);
 }
-void API_ENTRY(glClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
+void API_ENTRY(glClearColorx)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
     CALL_GL_API(glClearColorx, red, green, blue, alpha);
 }
-void API_ENTRY(glClearDepthx)(GLclampx depth) {
+void API_ENTRY(glClearDepthx)(GLfixed depth) {
     CALL_GL_API(glClearDepthx, depth);
 }
 void API_ENTRY(glClearStencil)(GLint s) {
@@ -148,7 +148,7 @@
 void API_ENTRY(glClientActiveTexture)(GLenum texture) {
     CALL_GL_API(glClientActiveTexture, texture);
 }
-void API_ENTRY(glClipPlanex)(GLenum plane, const GLfixed *equation) {
+void API_ENTRY(glClipPlanex)(GLenum plane, const GLfixed * equation) {
     CALL_GL_API(glClipPlanex, plane, equation);
 }
 void API_ENTRY(glColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
@@ -160,13 +160,13 @@
 void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
     CALL_GL_API(glColorMask, red, green, blue, alpha);
 }
-void API_ENTRY(glColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void API_ENTRY(glColorPointer)(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     CALL_GL_API(glColorPointer, size, type, stride, pointer);
 }
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) {
+void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data) {
     CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
 }
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) {
+void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data) {
     CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
 }
 void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
@@ -178,10 +178,10 @@
 void API_ENTRY(glCullFace)(GLenum mode) {
     CALL_GL_API(glCullFace, mode);
 }
-void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint *buffers) {
+void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint * buffers) {
     CALL_GL_API(glDeleteBuffers, n, buffers);
 }
-void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint *textures) {
+void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint * textures) {
     CALL_GL_API(glDeleteTextures, n, textures);
 }
 void API_ENTRY(glDepthFunc)(GLenum func) {
@@ -190,8 +190,8 @@
 void API_ENTRY(glDepthMask)(GLboolean flag) {
     CALL_GL_API(glDepthMask, flag);
 }
-void API_ENTRY(glDepthRangex)(GLclampx zNear, GLclampx zFar) {
-    CALL_GL_API(glDepthRangex, zNear, zFar);
+void API_ENTRY(glDepthRangex)(GLfixed n, GLfixed f) {
+    CALL_GL_API(glDepthRangex, n, f);
 }
 void API_ENTRY(glDisable)(GLenum cap) {
     CALL_GL_API(glDisable, cap);
@@ -202,7 +202,7 @@
 void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
     CALL_GL_API(glDrawArrays, mode, first, count);
 }
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) {
+void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const void * indices) {
     CALL_GL_API(glDrawElements, mode, count, type, indices);
 }
 void API_ENTRY(glEnable)(GLenum cap) {
@@ -220,61 +220,61 @@
 void API_ENTRY(glFogx)(GLenum pname, GLfixed param) {
     CALL_GL_API(glFogx, pname, param);
 }
-void API_ENTRY(glFogxv)(GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glFogxv, pname, params);
+void API_ENTRY(glFogxv)(GLenum pname, const GLfixed * param) {
+    CALL_GL_API(glFogxv, pname, param);
 }
 void API_ENTRY(glFrontFace)(GLenum mode) {
     CALL_GL_API(glFrontFace, mode);
 }
-void API_ENTRY(glFrustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
-    CALL_GL_API(glFrustumx, left, right, bottom, top, zNear, zFar);
+void API_ENTRY(glFrustumx)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
+    CALL_GL_API(glFrustumx, l, r, b, t, n, f);
 }
-void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean *params) {
-    CALL_GL_API(glGetBooleanv, pname, params);
+void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean * data) {
+    CALL_GL_API(glGetBooleanv, pname, data);
 }
-void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint *params) {
+void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetBufferParameteriv, target, pname, params);
 }
-void API_ENTRY(glGetClipPlanex)(GLenum pname, GLfixed eqn[4]) {
-    CALL_GL_API(glGetClipPlanex, pname, eqn);
+void API_ENTRY(glGetClipPlanex)(GLenum plane, GLfixed * equation) {
+    CALL_GL_API(glGetClipPlanex, plane, equation);
 }
-void API_ENTRY(glGenBuffers)(GLsizei n, GLuint *buffers) {
+void API_ENTRY(glGenBuffers)(GLsizei n, GLuint * buffers) {
     CALL_GL_API(glGenBuffers, n, buffers);
 }
-void API_ENTRY(glGenTextures)(GLsizei n, GLuint *textures) {
+void API_ENTRY(glGenTextures)(GLsizei n, GLuint * textures) {
     CALL_GL_API(glGenTextures, n, textures);
 }
 GLenum API_ENTRY(glGetError)(void) {
     CALL_GL_API_RETURN(glGetError);
 }
-void API_ENTRY(glGetFixedv)(GLenum pname, GLfixed *params) {
+void API_ENTRY(glGetFixedv)(GLenum pname, GLfixed * params) {
     CALL_GL_API(glGetFixedv, pname, params);
 }
-void API_ENTRY(glGetIntegerv)(GLenum pname, GLint *params) {
-    CALL_GL_API(glGetIntegerv, pname, params);
+void API_ENTRY(glGetIntegerv)(GLenum pname, GLint * data) {
+    CALL_GL_API(glGetIntegerv, pname, data);
 }
-void API_ENTRY(glGetLightxv)(GLenum light, GLenum pname, GLfixed *params) {
+void API_ENTRY(glGetLightxv)(GLenum light, GLenum pname, GLfixed * params) {
     CALL_GL_API(glGetLightxv, light, pname, params);
 }
-void API_ENTRY(glGetMaterialxv)(GLenum face, GLenum pname, GLfixed *params) {
+void API_ENTRY(glGetMaterialxv)(GLenum face, GLenum pname, GLfixed * params) {
     CALL_GL_API(glGetMaterialxv, face, pname, params);
 }
-void API_ENTRY(glGetPointerv)(GLenum pname, GLvoid **params) {
+void API_ENTRY(glGetPointerv)(GLenum pname, void ** params) {
     CALL_GL_API(glGetPointerv, pname, params);
 }
 const GLubyte * API_ENTRY(__glGetString)(GLenum name) {
     CALL_GL_API_RETURN(glGetString, name);
 }
-void API_ENTRY(glGetTexEnviv)(GLenum env, GLenum pname, GLint *params) {
-    CALL_GL_API(glGetTexEnviv, env, pname, params);
+void API_ENTRY(glGetTexEnviv)(GLenum target, GLenum pname, GLint * params) {
+    CALL_GL_API(glGetTexEnviv, target, pname, params);
 }
-void API_ENTRY(glGetTexEnvxv)(GLenum env, GLenum pname, GLfixed *params) {
-    CALL_GL_API(glGetTexEnvxv, env, pname, params);
+void API_ENTRY(glGetTexEnvxv)(GLenum target, GLenum pname, GLfixed * params) {
+    CALL_GL_API(glGetTexEnvxv, target, pname, params);
 }
-void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) {
+void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetTexParameteriv, target, pname, params);
 }
-void API_ENTRY(glGetTexParameterxv)(GLenum target, GLenum pname, GLfixed *params) {
+void API_ENTRY(glGetTexParameterxv)(GLenum target, GLenum pname, GLfixed * params) {
     CALL_GL_API(glGetTexParameterxv, target, pname, params);
 }
 void API_ENTRY(glHint)(GLenum target, GLenum mode) {
@@ -292,13 +292,13 @@
 void API_ENTRY(glLightModelx)(GLenum pname, GLfixed param) {
     CALL_GL_API(glLightModelx, pname, param);
 }
-void API_ENTRY(glLightModelxv)(GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glLightModelxv, pname, params);
+void API_ENTRY(glLightModelxv)(GLenum pname, const GLfixed * param) {
+    CALL_GL_API(glLightModelxv, pname, param);
 }
 void API_ENTRY(glLightx)(GLenum light, GLenum pname, GLfixed param) {
     CALL_GL_API(glLightx, light, pname, param);
 }
-void API_ENTRY(glLightxv)(GLenum light, GLenum pname, const GLfixed *params) {
+void API_ENTRY(glLightxv)(GLenum light, GLenum pname, const GLfixed * params) {
     CALL_GL_API(glLightxv, light, pname, params);
 }
 void API_ENTRY(glLineWidthx)(GLfixed width) {
@@ -307,7 +307,7 @@
 void API_ENTRY(glLoadIdentity)(void) {
     CALL_GL_API(glLoadIdentity);
 }
-void API_ENTRY(glLoadMatrixx)(const GLfixed *m) {
+void API_ENTRY(glLoadMatrixx)(const GLfixed * m) {
     CALL_GL_API(glLoadMatrixx, m);
 }
 void API_ENTRY(glLogicOp)(GLenum opcode) {
@@ -316,26 +316,26 @@
 void API_ENTRY(glMaterialx)(GLenum face, GLenum pname, GLfixed param) {
     CALL_GL_API(glMaterialx, face, pname, param);
 }
-void API_ENTRY(glMaterialxv)(GLenum face, GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glMaterialxv, face, pname, params);
+void API_ENTRY(glMaterialxv)(GLenum face, GLenum pname, const GLfixed * param) {
+    CALL_GL_API(glMaterialxv, face, pname, param);
 }
 void API_ENTRY(glMatrixMode)(GLenum mode) {
     CALL_GL_API(glMatrixMode, mode);
 }
-void API_ENTRY(glMultMatrixx)(const GLfixed *m) {
+void API_ENTRY(glMultMatrixx)(const GLfixed * m) {
     CALL_GL_API(glMultMatrixx, m);
 }
-void API_ENTRY(glMultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
-    CALL_GL_API(glMultiTexCoord4x, target, s, t, r, q);
+void API_ENTRY(glMultiTexCoord4x)(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
+    CALL_GL_API(glMultiTexCoord4x, texture, s, t, r, q);
 }
 void API_ENTRY(glNormal3x)(GLfixed nx, GLfixed ny, GLfixed nz) {
     CALL_GL_API(glNormal3x, nx, ny, nz);
 }
-void API_ENTRY(glNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) {
+void API_ENTRY(glNormalPointer)(GLenum type, GLsizei stride, const void * pointer) {
     CALL_GL_API(glNormalPointer, type, stride, pointer);
 }
-void API_ENTRY(glOrthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
-    CALL_GL_API(glOrthox, left, right, bottom, top, zNear, zFar);
+void API_ENTRY(glOrthox)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
+    CALL_GL_API(glOrthox, l, r, b, t, n, f);
 }
 void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) {
     CALL_GL_API(glPixelStorei, pname, param);
@@ -343,7 +343,7 @@
 void API_ENTRY(glPointParameterx)(GLenum pname, GLfixed param) {
     CALL_GL_API(glPointParameterx, pname, param);
 }
-void API_ENTRY(glPointParameterxv)(GLenum pname, const GLfixed *params) {
+void API_ENTRY(glPointParameterxv)(GLenum pname, const GLfixed * params) {
     CALL_GL_API(glPointParameterxv, pname, params);
 }
 void API_ENTRY(glPointSizex)(GLfixed size) {
@@ -358,13 +358,13 @@
 void API_ENTRY(glPushMatrix)(void) {
     CALL_GL_API(glPushMatrix);
 }
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) {
+void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels) {
     CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
 }
 void API_ENTRY(glRotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
     CALL_GL_API(glRotatex, angle, x, y, z);
 }
-void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) {
+void API_ENTRY(glSampleCoverage)(GLfloat value, GLboolean invert) {
     CALL_GL_API(glSampleCoverage, value, invert);
 }
 void API_ENTRY(glSampleCoveragex)(GLclampx value, GLboolean invert) {
@@ -388,7 +388,7 @@
 void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) {
     CALL_GL_API(glStencilOp, fail, zfail, zpass);
 }
-void API_ENTRY(glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void API_ENTRY(glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     CALL_GL_API(glTexCoordPointer, size, type, stride, pointer);
 }
 void API_ENTRY(glTexEnvi)(GLenum target, GLenum pname, GLint param) {
@@ -397,13 +397,13 @@
 void API_ENTRY(glTexEnvx)(GLenum target, GLenum pname, GLfixed param) {
     CALL_GL_API(glTexEnvx, target, pname, param);
 }
-void API_ENTRY(glTexEnviv)(GLenum target, GLenum pname, const GLint *params) {
+void API_ENTRY(glTexEnviv)(GLenum target, GLenum pname, const GLint * params) {
     CALL_GL_API(glTexEnviv, target, pname, params);
 }
-void API_ENTRY(glTexEnvxv)(GLenum target, GLenum pname, const GLfixed *params) {
+void API_ENTRY(glTexEnvxv)(GLenum target, GLenum pname, const GLfixed * params) {
     CALL_GL_API(glTexEnvxv, target, pname, params);
 }
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) {
+void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) {
     CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
 }
 void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) {
@@ -412,24 +412,21 @@
 void API_ENTRY(glTexParameterx)(GLenum target, GLenum pname, GLfixed param) {
     CALL_GL_API(glTexParameterx, target, pname, param);
 }
-void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint *params) {
+void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint * params) {
     CALL_GL_API(glTexParameteriv, target, pname, params);
 }
-void API_ENTRY(glTexParameterxv)(GLenum target, GLenum pname, const GLfixed *params) {
+void API_ENTRY(glTexParameterxv)(GLenum target, GLenum pname, const GLfixed * params) {
     CALL_GL_API(glTexParameterxv, target, pname, params);
 }
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) {
+void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) {
     CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
 }
 void API_ENTRY(glTranslatex)(GLfixed x, GLfixed y, GLfixed z) {
     CALL_GL_API(glTranslatex, x, y, z);
 }
-void API_ENTRY(glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void API_ENTRY(glVertexPointer)(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     CALL_GL_API(glVertexPointer, size, type, stride, pointer);
 }
 void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
     CALL_GL_API(glViewport, x, y, width, height);
 }
-void API_ENTRY(glPointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid *pointer) {
-    CALL_GL_API(glPointSizePointerOES, type, stride, pointer);
-}
diff --git a/opengl/libs/GLES_CM/glext_api.in b/opengl/libs/GLES_CM/glext_api.in
index 7cd6cb5..c8fba6b 100644
--- a/opengl/libs/GLES_CM/glext_api.in
+++ b/opengl/libs/GLES_CM/glext_api.in
@@ -1,3 +1,9 @@
+void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
+    CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
+}
+void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
+    CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
+}
 void API_ENTRY(glBlendEquationSeparateOES)(GLenum modeRGB, GLenum modeAlpha) {
     CALL_GL_API(glBlendEquationSeparateOES, modeRGB, modeAlpha);
 }
@@ -7,6 +13,72 @@
 void API_ENTRY(glBlendEquationOES)(GLenum mode) {
     CALL_GL_API(glBlendEquationOES, mode);
 }
+void API_ENTRY(glMultiTexCoord1bOES)(GLenum texture, GLbyte s) {
+    CALL_GL_API(glMultiTexCoord1bOES, texture, s);
+}
+void API_ENTRY(glMultiTexCoord1bvOES)(GLenum texture, const GLbyte * coords) {
+    CALL_GL_API(glMultiTexCoord1bvOES, texture, coords);
+}
+void API_ENTRY(glMultiTexCoord2bOES)(GLenum texture, GLbyte s, GLbyte t) {
+    CALL_GL_API(glMultiTexCoord2bOES, texture, s, t);
+}
+void API_ENTRY(glMultiTexCoord2bvOES)(GLenum texture, const GLbyte * coords) {
+    CALL_GL_API(glMultiTexCoord2bvOES, texture, coords);
+}
+void API_ENTRY(glMultiTexCoord3bOES)(GLenum texture, GLbyte s, GLbyte t, GLbyte r) {
+    CALL_GL_API(glMultiTexCoord3bOES, texture, s, t, r);
+}
+void API_ENTRY(glMultiTexCoord3bvOES)(GLenum texture, const GLbyte * coords) {
+    CALL_GL_API(glMultiTexCoord3bvOES, texture, coords);
+}
+void API_ENTRY(glMultiTexCoord4bOES)(GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q) {
+    CALL_GL_API(glMultiTexCoord4bOES, texture, s, t, r, q);
+}
+void API_ENTRY(glMultiTexCoord4bvOES)(GLenum texture, const GLbyte * coords) {
+    CALL_GL_API(glMultiTexCoord4bvOES, texture, coords);
+}
+void API_ENTRY(glTexCoord1bOES)(GLbyte s) {
+    CALL_GL_API(glTexCoord1bOES, s);
+}
+void API_ENTRY(glTexCoord1bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glTexCoord1bvOES, coords);
+}
+void API_ENTRY(glTexCoord2bOES)(GLbyte s, GLbyte t) {
+    CALL_GL_API(glTexCoord2bOES, s, t);
+}
+void API_ENTRY(glTexCoord2bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glTexCoord2bvOES, coords);
+}
+void API_ENTRY(glTexCoord3bOES)(GLbyte s, GLbyte t, GLbyte r) {
+    CALL_GL_API(glTexCoord3bOES, s, t, r);
+}
+void API_ENTRY(glTexCoord3bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glTexCoord3bvOES, coords);
+}
+void API_ENTRY(glTexCoord4bOES)(GLbyte s, GLbyte t, GLbyte r, GLbyte q) {
+    CALL_GL_API(glTexCoord4bOES, s, t, r, q);
+}
+void API_ENTRY(glTexCoord4bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glTexCoord4bvOES, coords);
+}
+void API_ENTRY(glVertex2bOES)(GLbyte x) {
+    CALL_GL_API(glVertex2bOES, x);
+}
+void API_ENTRY(glVertex2bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glVertex2bvOES, coords);
+}
+void API_ENTRY(glVertex3bOES)(GLbyte x, GLbyte y) {
+    CALL_GL_API(glVertex3bOES, x, y);
+}
+void API_ENTRY(glVertex3bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glVertex3bvOES, coords);
+}
+void API_ENTRY(glVertex4bOES)(GLbyte x, GLbyte y, GLbyte z) {
+    CALL_GL_API(glVertex4bOES, x, y, z);
+}
+void API_ENTRY(glVertex4bvOES)(const GLbyte * coords) {
+    CALL_GL_API(glVertex4bvOES, coords);
+}
 void API_ENTRY(glDrawTexsOES)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
     CALL_GL_API(glDrawTexsOES, x, y, z, width, height);
 }
@@ -16,112 +88,97 @@
 void API_ENTRY(glDrawTexxOES)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) {
     CALL_GL_API(glDrawTexxOES, x, y, z, width, height);
 }
-void API_ENTRY(glDrawTexsvOES)(const GLshort *coords) {
+void API_ENTRY(glDrawTexsvOES)(const GLshort * coords) {
     CALL_GL_API(glDrawTexsvOES, coords);
 }
-void API_ENTRY(glDrawTexivOES)(const GLint *coords) {
+void API_ENTRY(glDrawTexivOES)(const GLint * coords) {
     CALL_GL_API(glDrawTexivOES, coords);
 }
-void API_ENTRY(glDrawTexxvOES)(const GLfixed *coords) {
+void API_ENTRY(glDrawTexxvOES)(const GLfixed * coords) {
     CALL_GL_API(glDrawTexxvOES, coords);
 }
 void API_ENTRY(glDrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
     CALL_GL_API(glDrawTexfOES, x, y, z, width, height);
 }
-void API_ENTRY(glDrawTexfvOES)(const GLfloat *coords) {
+void API_ENTRY(glDrawTexfvOES)(const GLfloat * coords) {
     CALL_GL_API(glDrawTexfvOES, coords);
 }
-void API_ENTRY(glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) {
-    CALL_GL_API(glEGLImageTargetTexture2DOES, target, image);
-}
-void API_ENTRY(glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) {
-    CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image);
-}
-void API_ENTRY(glAlphaFuncxOES)(GLenum func, GLclampx ref) {
+void API_ENTRY(glAlphaFuncxOES)(GLenum func, GLfixed ref) {
     CALL_GL_API(glAlphaFuncxOES, func, ref);
 }
-void API_ENTRY(glClearColorxOES)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
+void API_ENTRY(glClearColorxOES)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
     CALL_GL_API(glClearColorxOES, red, green, blue, alpha);
 }
-void API_ENTRY(glClearDepthxOES)(GLclampx depth) {
+void API_ENTRY(glClearDepthxOES)(GLfixed depth) {
     CALL_GL_API(glClearDepthxOES, depth);
 }
-void API_ENTRY(glClipPlanexOES)(GLenum plane, const GLfixed *equation) {
+void API_ENTRY(glClipPlanexOES)(GLenum plane, const GLfixed * equation) {
     CALL_GL_API(glClipPlanexOES, plane, equation);
 }
 void API_ENTRY(glColor4xOES)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
     CALL_GL_API(glColor4xOES, red, green, blue, alpha);
 }
-void API_ENTRY(glDepthRangexOES)(GLclampx zNear, GLclampx zFar) {
-    CALL_GL_API(glDepthRangexOES, zNear, zFar);
+void API_ENTRY(glDepthRangexOES)(GLfixed n, GLfixed f) {
+    CALL_GL_API(glDepthRangexOES, n, f);
 }
 void API_ENTRY(glFogxOES)(GLenum pname, GLfixed param) {
     CALL_GL_API(glFogxOES, pname, param);
 }
-void API_ENTRY(glFogxvOES)(GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glFogxvOES, pname, params);
+void API_ENTRY(glFogxvOES)(GLenum pname, const GLfixed * param) {
+    CALL_GL_API(glFogxvOES, pname, param);
 }
-void API_ENTRY(glFrustumxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
-    CALL_GL_API(glFrustumxOES, left, right, bottom, top, zNear, zFar);
+void API_ENTRY(glFrustumxOES)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
+    CALL_GL_API(glFrustumxOES, l, r, b, t, n, f);
 }
-void API_ENTRY(glGetClipPlanexOES)(GLenum pname, GLfixed eqn[4]) {
-    CALL_GL_API(glGetClipPlanexOES, pname, eqn);
+void API_ENTRY(glGetClipPlanexOES)(GLenum plane, GLfixed * equation) {
+    CALL_GL_API(glGetClipPlanexOES, plane, equation);
 }
-void API_ENTRY(glGetFixedvOES)(GLenum pname, GLfixed *params) {
+void API_ENTRY(glGetFixedvOES)(GLenum pname, GLfixed * params) {
     CALL_GL_API(glGetFixedvOES, pname, params);
 }
-void API_ENTRY(glGetLightxvOES)(GLenum light, GLenum pname, GLfixed *params) {
-    CALL_GL_API(glGetLightxvOES, light, pname, params);
+void API_ENTRY(glGetTexEnvxvOES)(GLenum target, GLenum pname, GLfixed * params) {
+    CALL_GL_API(glGetTexEnvxvOES, target, pname, params);
 }
-void API_ENTRY(glGetMaterialxvOES)(GLenum face, GLenum pname, GLfixed *params) {
-    CALL_GL_API(glGetMaterialxvOES, face, pname, params);
-}
-void API_ENTRY(glGetTexEnvxvOES)(GLenum env, GLenum pname, GLfixed *params) {
-    CALL_GL_API(glGetTexEnvxvOES, env, pname, params);
-}
-void API_ENTRY(glGetTexParameterxvOES)(GLenum target, GLenum pname, GLfixed *params) {
+void API_ENTRY(glGetTexParameterxvOES)(GLenum target, GLenum pname, GLfixed * params) {
     CALL_GL_API(glGetTexParameterxvOES, target, pname, params);
 }
 void API_ENTRY(glLightModelxOES)(GLenum pname, GLfixed param) {
     CALL_GL_API(glLightModelxOES, pname, param);
 }
-void API_ENTRY(glLightModelxvOES)(GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glLightModelxvOES, pname, params);
+void API_ENTRY(glLightModelxvOES)(GLenum pname, const GLfixed * param) {
+    CALL_GL_API(glLightModelxvOES, pname, param);
 }
 void API_ENTRY(glLightxOES)(GLenum light, GLenum pname, GLfixed param) {
     CALL_GL_API(glLightxOES, light, pname, param);
 }
-void API_ENTRY(glLightxvOES)(GLenum light, GLenum pname, const GLfixed *params) {
+void API_ENTRY(glLightxvOES)(GLenum light, GLenum pname, const GLfixed * params) {
     CALL_GL_API(glLightxvOES, light, pname, params);
 }
 void API_ENTRY(glLineWidthxOES)(GLfixed width) {
     CALL_GL_API(glLineWidthxOES, width);
 }
-void API_ENTRY(glLoadMatrixxOES)(const GLfixed *m) {
+void API_ENTRY(glLoadMatrixxOES)(const GLfixed * m) {
     CALL_GL_API(glLoadMatrixxOES, m);
 }
 void API_ENTRY(glMaterialxOES)(GLenum face, GLenum pname, GLfixed param) {
     CALL_GL_API(glMaterialxOES, face, pname, param);
 }
-void API_ENTRY(glMaterialxvOES)(GLenum face, GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glMaterialxvOES, face, pname, params);
+void API_ENTRY(glMaterialxvOES)(GLenum face, GLenum pname, const GLfixed * param) {
+    CALL_GL_API(glMaterialxvOES, face, pname, param);
 }
-void API_ENTRY(glMultMatrixxOES)(const GLfixed *m) {
+void API_ENTRY(glMultMatrixxOES)(const GLfixed * m) {
     CALL_GL_API(glMultMatrixxOES, m);
 }
-void API_ENTRY(glMultiTexCoord4xOES)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
-    CALL_GL_API(glMultiTexCoord4xOES, target, s, t, r, q);
+void API_ENTRY(glMultiTexCoord4xOES)(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
+    CALL_GL_API(glMultiTexCoord4xOES, texture, s, t, r, q);
 }
 void API_ENTRY(glNormal3xOES)(GLfixed nx, GLfixed ny, GLfixed nz) {
     CALL_GL_API(glNormal3xOES, nx, ny, nz);
 }
-void API_ENTRY(glOrthoxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
-    CALL_GL_API(glOrthoxOES, left, right, bottom, top, zNear, zFar);
+void API_ENTRY(glOrthoxOES)(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
+    CALL_GL_API(glOrthoxOES, l, r, b, t, n, f);
 }
-void API_ENTRY(glPointParameterxOES)(GLenum pname, GLfixed param) {
-    CALL_GL_API(glPointParameterxOES, pname, param);
-}
-void API_ENTRY(glPointParameterxvOES)(GLenum pname, const GLfixed *params) {
+void API_ENTRY(glPointParameterxvOES)(GLenum pname, const GLfixed * params) {
     CALL_GL_API(glPointParameterxvOES, pname, params);
 }
 void API_ENTRY(glPointSizexOES)(GLfixed size) {
@@ -133,8 +190,8 @@
 void API_ENTRY(glRotatexOES)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
     CALL_GL_API(glRotatexOES, angle, x, y, z);
 }
-void API_ENTRY(glSampleCoveragexOES)(GLclampx value, GLboolean invert) {
-    CALL_GL_API(glSampleCoveragexOES, value, invert);
+void API_ENTRY(glSampleCoverageOES)(GLfixed value, GLboolean invert) {
+    CALL_GL_API(glSampleCoverageOES, value, invert);
 }
 void API_ENTRY(glScalexOES)(GLfixed x, GLfixed y, GLfixed z) {
     CALL_GL_API(glScalexOES, x, y, z);
@@ -142,34 +199,55 @@
 void API_ENTRY(glTexEnvxOES)(GLenum target, GLenum pname, GLfixed param) {
     CALL_GL_API(glTexEnvxOES, target, pname, param);
 }
-void API_ENTRY(glTexEnvxvOES)(GLenum target, GLenum pname, const GLfixed *params) {
+void API_ENTRY(glTexEnvxvOES)(GLenum target, GLenum pname, const GLfixed * params) {
     CALL_GL_API(glTexEnvxvOES, target, pname, params);
 }
 void API_ENTRY(glTexParameterxOES)(GLenum target, GLenum pname, GLfixed param) {
     CALL_GL_API(glTexParameterxOES, target, pname, param);
 }
-void API_ENTRY(glTexParameterxvOES)(GLenum target, GLenum pname, const GLfixed *params) {
+void API_ENTRY(glTexParameterxvOES)(GLenum target, GLenum pname, const GLfixed * params) {
     CALL_GL_API(glTexParameterxvOES, target, pname, params);
 }
 void API_ENTRY(glTranslatexOES)(GLfixed x, GLfixed y, GLfixed z) {
     CALL_GL_API(glTranslatexOES, x, y, z);
 }
+void API_ENTRY(glGetLightxvOES)(GLenum light, GLenum pname, GLfixed * params) {
+    CALL_GL_API(glGetLightxvOES, light, pname, params);
+}
+void API_ENTRY(glGetMaterialxvOES)(GLenum face, GLenum pname, GLfixed * params) {
+    CALL_GL_API(glGetMaterialxvOES, face, pname, params);
+}
+void API_ENTRY(glPointParameterxOES)(GLenum pname, GLfixed param) {
+    CALL_GL_API(glPointParameterxOES, pname, param);
+}
+void API_ENTRY(glSampleCoveragexOES)(GLclampx value, GLboolean invert) {
+    CALL_GL_API(glSampleCoveragexOES, value, invert);
+}
+void API_ENTRY(glGetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed * params) {
+    CALL_GL_API(glGetTexGenxvOES, coord, pname, params);
+}
+void API_ENTRY(glTexGenxOES)(GLenum coord, GLenum pname, GLfixed param) {
+    CALL_GL_API(glTexGenxOES, coord, pname, param);
+}
+void API_ENTRY(glTexGenxvOES)(GLenum coord, GLenum pname, const GLfixed * params) {
+    CALL_GL_API(glTexGenxvOES, coord, pname, params);
+}
 GLboolean API_ENTRY(glIsRenderbufferOES)(GLuint renderbuffer) {
     CALL_GL_API_RETURN(glIsRenderbufferOES, renderbuffer);
 }
 void API_ENTRY(glBindRenderbufferOES)(GLenum target, GLuint renderbuffer) {
     CALL_GL_API(glBindRenderbufferOES, target, renderbuffer);
 }
-void API_ENTRY(glDeleteRenderbuffersOES)(GLsizei n, const GLuint* renderbuffers) {
+void API_ENTRY(glDeleteRenderbuffersOES)(GLsizei n, const GLuint * renderbuffers) {
     CALL_GL_API(glDeleteRenderbuffersOES, n, renderbuffers);
 }
-void API_ENTRY(glGenRenderbuffersOES)(GLsizei n, GLuint* renderbuffers) {
+void API_ENTRY(glGenRenderbuffersOES)(GLsizei n, GLuint * renderbuffers) {
     CALL_GL_API(glGenRenderbuffersOES, n, renderbuffers);
 }
 void API_ENTRY(glRenderbufferStorageOES)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageOES, target, internalformat, width, height);
 }
-void API_ENTRY(glGetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint* params) {
+void API_ENTRY(glGetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint * params) {
     CALL_GL_API(glGetRenderbufferParameterivOES, target, pname, params);
 }
 GLboolean API_ENTRY(glIsFramebufferOES)(GLuint framebuffer) {
@@ -178,10 +256,10 @@
 void API_ENTRY(glBindFramebufferOES)(GLenum target, GLuint framebuffer) {
     CALL_GL_API(glBindFramebufferOES, target, framebuffer);
 }
-void API_ENTRY(glDeleteFramebuffersOES)(GLsizei n, const GLuint* framebuffers) {
+void API_ENTRY(glDeleteFramebuffersOES)(GLsizei n, const GLuint * framebuffers) {
     CALL_GL_API(glDeleteFramebuffersOES, n, framebuffers);
 }
-void API_ENTRY(glGenFramebuffersOES)(GLsizei n, GLuint* framebuffers) {
+void API_ENTRY(glGenFramebuffersOES)(GLsizei n, GLuint * framebuffers) {
     CALL_GL_API(glGenFramebuffersOES, n, framebuffers);
 }
 GLenum API_ENTRY(glCheckFramebufferStatusOES)(GLenum target) {
@@ -193,19 +271,19 @@
 void API_ENTRY(glFramebufferTexture2DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
     CALL_GL_API(glFramebufferTexture2DOES, target, attachment, textarget, texture, level);
 }
-void API_ENTRY(glGetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
+void API_ENTRY(glGetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint * params) {
     CALL_GL_API(glGetFramebufferAttachmentParameterivOES, target, attachment, pname, params);
 }
 void API_ENTRY(glGenerateMipmapOES)(GLenum target) {
     CALL_GL_API(glGenerateMipmapOES, target);
 }
-void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
+void * API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) {
     CALL_GL_API_RETURN(glMapBufferOES, target, access);
 }
 GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) {
     CALL_GL_API_RETURN(glUnmapBufferOES, target);
 }
-void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params) {
+void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, void ** params) {
     CALL_GL_API(glGetBufferPointervOES, target, pname, params);
 }
 void API_ENTRY(glCurrentPaletteMatrixOES)(GLuint matrixpaletteindex) {
@@ -214,103 +292,127 @@
 void API_ENTRY(glLoadPaletteFromModelViewMatrixOES)(void) {
     CALL_GL_API(glLoadPaletteFromModelViewMatrixOES);
 }
-void API_ENTRY(glMatrixIndexPointerOES)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void API_ENTRY(glMatrixIndexPointerOES)(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     CALL_GL_API(glMatrixIndexPointerOES, size, type, stride, pointer);
 }
-void API_ENTRY(glWeightPointerOES)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void API_ENTRY(glWeightPointerOES)(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     CALL_GL_API(glWeightPointerOES, size, type, stride, pointer);
 }
-GLbitfield API_ENTRY(glQueryMatrixxOES)(GLfixed mantissa[16], GLint exponent[16]) {
+void API_ENTRY(glPointSizePointerOES)(GLenum type, GLsizei stride, const void * pointer) {
+    CALL_GL_API(glPointSizePointerOES, type, stride, pointer);
+}
+GLbitfield API_ENTRY(glQueryMatrixxOES)(GLfixed * mantissa, GLint * exponent) {
     CALL_GL_API_RETURN(glQueryMatrixxOES, mantissa, exponent);
 }
-void API_ENTRY(glDepthRangefOES)(GLclampf zNear, GLclampf zFar) {
-    CALL_GL_API(glDepthRangefOES, zNear, zFar);
-}
-void API_ENTRY(glFrustumfOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
-    CALL_GL_API(glFrustumfOES, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glOrthofOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
-    CALL_GL_API(glOrthofOES, left, right, bottom, top, zNear, zFar);
-}
-void API_ENTRY(glClipPlanefOES)(GLenum plane, const GLfloat *equation) {
-    CALL_GL_API(glClipPlanefOES, plane, equation);
-}
-void API_ENTRY(glGetClipPlanefOES)(GLenum pname, GLfloat eqn[4]) {
-    CALL_GL_API(glGetClipPlanefOES, pname, eqn);
-}
 void API_ENTRY(glClearDepthfOES)(GLclampf depth) {
     CALL_GL_API(glClearDepthfOES, depth);
 }
+void API_ENTRY(glClipPlanefOES)(GLenum plane, const GLfloat * equation) {
+    CALL_GL_API(glClipPlanefOES, plane, equation);
+}
+void API_ENTRY(glDepthRangefOES)(GLclampf n, GLclampf f) {
+    CALL_GL_API(glDepthRangefOES, n, f);
+}
+void API_ENTRY(glFrustumfOES)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
+    CALL_GL_API(glFrustumfOES, l, r, b, t, n, f);
+}
+void API_ENTRY(glGetClipPlanefOES)(GLenum plane, GLfloat * equation) {
+    CALL_GL_API(glGetClipPlanefOES, plane, equation);
+}
+void API_ENTRY(glOrthofOES)(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
+    CALL_GL_API(glOrthofOES, l, r, b, t, n, f);
+}
 void API_ENTRY(glTexGenfOES)(GLenum coord, GLenum pname, GLfloat param) {
     CALL_GL_API(glTexGenfOES, coord, pname, param);
 }
-void API_ENTRY(glTexGenfvOES)(GLenum coord, GLenum pname, const GLfloat *params) {
+void API_ENTRY(glTexGenfvOES)(GLenum coord, GLenum pname, const GLfloat * params) {
     CALL_GL_API(glTexGenfvOES, coord, pname, params);
 }
 void API_ENTRY(glTexGeniOES)(GLenum coord, GLenum pname, GLint param) {
     CALL_GL_API(glTexGeniOES, coord, pname, param);
 }
-void API_ENTRY(glTexGenivOES)(GLenum coord, GLenum pname, const GLint *params) {
+void API_ENTRY(glTexGenivOES)(GLenum coord, GLenum pname, const GLint * params) {
     CALL_GL_API(glTexGenivOES, coord, pname, params);
 }
-void API_ENTRY(glTexGenxOES)(GLenum coord, GLenum pname, GLfixed param) {
-    CALL_GL_API(glTexGenxOES, coord, pname, param);
-}
-void API_ENTRY(glTexGenxvOES)(GLenum coord, GLenum pname, const GLfixed *params) {
-    CALL_GL_API(glTexGenxvOES, coord, pname, params);
-}
-void API_ENTRY(glGetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat *params) {
+void API_ENTRY(glGetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat * params) {
     CALL_GL_API(glGetTexGenfvOES, coord, pname, params);
 }
-void API_ENTRY(glGetTexGenivOES)(GLenum coord, GLenum pname, GLint *params) {
+void API_ENTRY(glGetTexGenivOES)(GLenum coord, GLenum pname, GLint * params) {
     CALL_GL_API(glGetTexGenivOES, coord, pname, params);
 }
-void API_ENTRY(glGetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed *params) {
-    CALL_GL_API(glGetTexGenxvOES, coord, pname, params);
-}
 void API_ENTRY(glBindVertexArrayOES)(GLuint array) {
     CALL_GL_API(glBindVertexArrayOES, array);
 }
-void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) {
+void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint * arrays) {
     CALL_GL_API(glDeleteVertexArraysOES, n, arrays);
 }
-void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
+void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint * arrays) {
     CALL_GL_API(glGenVertexArraysOES, n, arrays);
 }
 GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
     CALL_GL_API_RETURN(glIsVertexArrayOES, array);
 }
+void API_ENTRY(glCopyTextureLevelsAPPLE)(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount) {
+    CALL_GL_API(glCopyTextureLevelsAPPLE, destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount);
+}
 void API_ENTRY(glRenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageMultisampleAPPLE, target, samples, internalformat, width, height);
 }
 void API_ENTRY(glResolveMultisampleFramebufferAPPLE)(void) {
     CALL_GL_API(glResolveMultisampleFramebufferAPPLE);
 }
-void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
+GLsync API_ENTRY(glFenceSyncAPPLE)(GLenum condition, GLbitfield flags) {
+    CALL_GL_API_RETURN(glFenceSyncAPPLE, condition, flags);
+}
+GLboolean API_ENTRY(glIsSyncAPPLE)(GLsync sync) {
+    CALL_GL_API_RETURN(glIsSyncAPPLE, sync);
+}
+void API_ENTRY(glDeleteSyncAPPLE)(GLsync sync) {
+    CALL_GL_API(glDeleteSyncAPPLE, sync);
+}
+GLenum API_ENTRY(glClientWaitSyncAPPLE)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    CALL_GL_API_RETURN(glClientWaitSyncAPPLE, sync, flags, timeout);
+}
+void API_ENTRY(glWaitSyncAPPLE)(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    CALL_GL_API(glWaitSyncAPPLE, sync, flags, timeout);
+}
+void API_ENTRY(glGetInteger64vAPPLE)(GLenum pname, GLint64 * params) {
+    CALL_GL_API(glGetInteger64vAPPLE, pname, params);
+}
+void API_ENTRY(glGetSyncivAPPLE)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) {
+    CALL_GL_API(glGetSyncivAPPLE, sync, pname, bufSize, length, values);
+}
+void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum * attachments) {
     CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
 }
+void * API_ENTRY(glMapBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
+    CALL_GL_API_RETURN(glMapBufferRangeEXT, target, offset, length, access);
+}
+void API_ENTRY(glFlushMappedBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length) {
+    CALL_GL_API(glFlushMappedBufferRangeEXT, target, offset, length);
+}
+void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
+}
+void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount) {
+    CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
+}
 void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
 }
 void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
     CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
 }
-void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
-    CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
-}
-void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
-    CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
-}
 GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) {
     CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT);
 }
-void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
+void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) {
     CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data);
 }
-void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float *params) {
+void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, GLfloat * params) {
     CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params);
 }
-void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
+void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint * params) {
     CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params);
 }
 void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
@@ -331,22 +433,22 @@
 void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
     CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth);
 }
-void API_ENTRY(glClipPlanefIMG)(GLenum p, const GLfloat *eqn) {
-    CALL_GL_API(glClipPlanefIMG, p, eqn);
-}
-void API_ENTRY(glClipPlanexIMG)(GLenum p, const GLfixed *eqn) {
-    CALL_GL_API(glClipPlanexIMG, p, eqn);
-}
 void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
 }
 void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
     CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
 }
-void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
+void API_ENTRY(glClipPlanefIMG)(GLenum p, const GLfloat * eqn) {
+    CALL_GL_API(glClipPlanefIMG, p, eqn);
+}
+void API_ENTRY(glClipPlanexIMG)(GLenum p, const GLfixed * eqn) {
+    CALL_GL_API(glClipPlanexIMG, p, eqn);
+}
+void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint * fences) {
     CALL_GL_API(glDeleteFencesNV, n, fences);
 }
-void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) {
+void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint * fences) {
     CALL_GL_API(glGenFencesNV, n, fences);
 }
 GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) {
@@ -355,7 +457,7 @@
 GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) {
     CALL_GL_API_RETURN(glTestFenceNV, fence);
 }
-void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) {
+void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint * params) {
     CALL_GL_API(glGetFenceivNV, fence, pname, params);
 }
 void API_ENTRY(glFinishFenceNV)(GLuint fence) {
@@ -364,10 +466,10 @@
 void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
     CALL_GL_API(glSetFenceNV, fence, condition);
 }
-void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
+void API_ENTRY(glGetDriverControlsQCOM)(GLint * num, GLsizei size, GLuint * driverControls) {
     CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
 }
-void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
+void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString) {
     CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString);
 }
 void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) {
@@ -376,40 +478,40 @@
 void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) {
     CALL_GL_API(glDisableDriverControlQCOM, driverControl);
 }
-void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) {
+void API_ENTRY(glExtGetTexturesQCOM)(GLuint * textures, GLint maxTextures, GLint * numTextures) {
     CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures);
 }
-void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
+void API_ENTRY(glExtGetBuffersQCOM)(GLuint * buffers, GLint maxBuffers, GLint * numBuffers) {
     CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers);
 }
-void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
+void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers) {
     CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers);
 }
-void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
+void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers) {
     CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers);
 }
-void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
+void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params) {
     CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params);
 }
 void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) {
     CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param);
 }
-void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
+void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels) {
     CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
 }
-void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) {
+void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, void ** params) {
     CALL_GL_API(glExtGetBufferPointervQCOM, target, params);
 }
-void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
+void API_ENTRY(glExtGetShadersQCOM)(GLuint * shaders, GLint maxShaders, GLint * numShaders) {
     CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders);
 }
-void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
+void API_ENTRY(glExtGetProgramsQCOM)(GLuint * programs, GLint maxPrograms, GLint * numPrograms) {
     CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms);
 }
 GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) {
     CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program);
 }
-void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
+void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar * source, GLint * length) {
     CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length);
 }
 void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
diff --git a/opengl/libs/GLES_trace/gltrace.proto b/opengl/libs/GLES_trace/gltrace.proto
index f8f4938..00303c2 100644
--- a/opengl/libs/GLES_trace/gltrace.proto
+++ b/opengl/libs/GLES_trace/gltrace.proto
@@ -503,7 +503,28 @@
         glTexStorage2D = 477;
         glTexStorage3D = 478;
         glGetInternalformativ = 479;
-
+        glBeginPerfQueryINTEL = 480;
+        glCreatePerfQueryINTEL = 481;
+        glDeletePerfQueryINTEL = 482;
+        glEndPerfQueryINTEL = 483;
+        glGetFirstPerfQueryIdINTEL = 484;
+        glGetNextPerfQueryIdINTEL = 485;
+        glGetPerfCounterInfoINTEL = 486;
+        glGetPerfQueryDataINTEL = 487;
+        glGetPerfQueryIdByNameINTEL = 488;
+        glGetPerfQueryInfoINTEL = 489;
+        glBlendBarrierKHR = 490;
+        glBlendBarrierNV = 491;
+        glBlendParameteriNV = 492;
+        glBlitFramebufferNV = 493;
+        glFenceSyncAPPLE = 494;
+        glIsSyncAPPLE = 495;
+        glDeleteSyncAPPLE = 496;
+        glClientWaitSyncAPPLE = 497;
+        glWaitSyncAPPLE = 498;
+        glGetInteger64vAPPLE = 499;
+        glGetSyncivAPPLE = 500;
+        glCopyBufferSubDataNV = 501;
         glActiveShaderProgramEXT = 502;
         glAlphaFuncQCOM = 503;
         glBeginQueryEXT = 504;
@@ -565,6 +586,175 @@
         glTextureStorage3DEXT = 559;
         glUseProgramStagesEXT = 560;
         glValidateProgramPipelineEXT = 561;
+        glCopyTextureLevelsAPPLE = 562;
+        glDebugMessageControlKHR = 563;
+        glDebugMessageInsertKHR = 564;
+        glDebugMessageCallbackKHR = 565;
+        glGetDebugMessageLogKHR = 566;
+        glPushDebugGroupKHR = 567;
+        glPopDebugGroupKHR = 568;
+        glObjectLabelKHR = 569;
+        glGetObjectLabelKHR = 570;
+        glObjectPtrLabelKHR = 571;
+        glGetObjectPtrLabelKHR = 572;
+        glGetPointervKHR = 573;
+        glDrawArraysInstancedANGLE = 574;
+        glDrawElementsInstancedANGLE = 575;
+        glVertexAttribDivisorANGLE = 576;
+        glDrawArraysInstancedEXT = 577;
+        glDrawElementsInstancedEXT = 578;
+        glVertexAttribDivisorEXT = 579;
+        glDrawArraysInstancedNV = 580;
+        glDrawElementsInstancedNV = 581;
+        glVertexAttribDivisorNV = 582;
+        glDrawBuffersEXT = 583;
+        glReadBufferIndexedEXT = 584;
+        glDrawBuffersIndexedEXT = 585;
+        glGetIntegeri_vEXT = 586;
+        glMapBufferRangeEXT = 587;
+        glFlushMappedBufferRangeEXT = 588;
+        glQueryCounterEXT = 589;
+        glGetQueryObjecti64vEXT = 590;
+        glGetQueryObjectivEXT = 591;
+        glGetQueryObjectui64vEXT = 592;
+        glGetTranslatedShaderSourceANGLE = 593;
+        glMinSampleShadingOES = 594;
+        glMultiTexCoord1bOES = 595;
+        glMultiTexCoord1bvOES = 596;
+        glMultiTexCoord2bOES = 597;
+        glMultiTexCoord2bvOES = 598;
+        glMultiTexCoord3bOES = 599;
+        glMultiTexCoord3bvOES = 600;
+        glMultiTexCoord4bOES = 601;
+        glMultiTexCoord4bvOES = 602;
+        glTexCoord1bOES = 603;
+        glTexCoord1bvOES = 604;
+        glTexCoord2bOES = 605;
+        glTexCoord2bvOES = 606;
+        glTexCoord3bOES = 607;
+        glTexCoord3bvOES = 608;
+        glTexCoord4bOES = 609;
+        glTexCoord4bvOES = 610;
+        glVertex2bOES = 611;
+        glVertex2bvOES = 612;
+        glVertex3bOES = 613;
+        glVertex3bvOES = 614;
+        glVertex4bOES = 615;
+        glVertex4bvOES = 616;
+        glProgramUniform1uiEXT = 617;
+        glProgramUniform2uiEXT = 618;
+        glProgramUniform3uiEXT = 619;
+        glProgramUniform4uiEXT = 620;
+        glProgramUniform1uivEXT = 621;
+        glProgramUniform2uivEXT = 622;
+        glProgramUniform3uivEXT = 623;
+        glProgramUniform4uivEXT = 624;
+        glProgramUniformMatrix2x3fvEXT = 625;
+        glProgramUniformMatrix3x2fvEXT = 626;
+        glProgramUniformMatrix2x4fvEXT = 627;
+        glProgramUniformMatrix4x2fvEXT = 628;
+        glProgramUniformMatrix3x4fvEXT = 629;
+        glProgramUniformMatrix4x3fvEXT = 630;
+        glRenderbufferStorageMultisampleNV = 631;
+        glSampleCoverageOES = 632;
+        glTexStorage3DMultisampleOES = 633;
+        glUniformMatrix2x3fvNV = 634;
+        glUniformMatrix3x2fvNV = 635;
+        glUniformMatrix2x4fvNV = 636;
+        glUniformMatrix4x2fvNV = 637;
+        glUniformMatrix3x4fvNV = 638;
+        glUniformMatrix4x3fvNV = 639;
+        glActiveShaderProgram = 640;
+        glBindImageTexture = 641;
+        glBindProgramPipeline = 642;
+        glBindVertexBuffer = 643;
+        glCreateShaderProgramv = 644;
+        glDeleteProgramPipelines = 645;
+        glDispatchCompute = 646;
+        glDispatchComputeIndirect = 647;
+        glDrawArraysIndirect = 648;
+        glDrawElementsIndirect = 649;
+        glFramebufferParameteri = 650;
+        glGenProgramPipelines = 651;
+        glGetBooleani_v = 652;
+        glGetFramebufferParameteriv = 653;
+        glGetMultisamplefv = 654;
+        glGetProgramInterfaceiv = 655;
+        glGetProgramPipelineInfoLog = 656;
+        glGetProgramPipelineiv = 657;
+        glGetProgramResourceIndex = 658;
+        glGetProgramResourceLocation = 659;
+        glGetProgramResourceName = 660;
+        glGetProgramResourceiv = 661;
+        glGetTexLevelParameterfv = 662;
+        glGetTexLevelParameteriv = 663;
+        glIsProgramPipeline = 664;
+        glMemoryBarrier = 665;
+        glMemoryBarrierByRegion = 666;
+        glProgramUniform1f = 667;
+        glProgramUniform1fv = 668;
+        glProgramUniform1i = 669;
+        glProgramUniform1iv = 670;
+        glProgramUniform1ui = 671;
+        glProgramUniform1uiv = 672;
+        glProgramUniform2f = 673;
+        glProgramUniform2fv = 674;
+        glProgramUniform2i = 675;
+        glProgramUniform2iv = 676;
+        glProgramUniform2ui = 677;
+        glProgramUniform2uiv = 678;
+        glProgramUniform3f = 679;
+        glProgramUniform3fv = 680;
+        glProgramUniform3i = 681;
+        glProgramUniform3iv = 682;
+        glProgramUniform3ui = 683;
+        glProgramUniform3uiv = 684;
+        glProgramUniform4f = 685;
+        glProgramUniform4fv = 686;
+        glProgramUniform4i = 687;
+        glProgramUniform4iv = 688;
+        glProgramUniform4ui = 689;
+        glProgramUniform4uiv = 690;
+        glProgramUniformMatrix2fv = 691;
+        glProgramUniformMatrix2x3fv = 692;
+        glProgramUniformMatrix2x4fv = 693;
+        glProgramUniformMatrix3fv = 694;
+        glProgramUniformMatrix3x2fv = 695;
+        glProgramUniformMatrix3x4fv = 696;
+        glProgramUniformMatrix4fv = 697;
+        glProgramUniformMatrix4x2fv = 698;
+        glProgramUniformMatrix4x3fv = 699;
+        glSampleMaski = 700;
+        glTexStorage2DMultisample = 701;
+        glUseProgramStages = 702;
+        glValidateProgramPipeline = 703;
+        glVertexAttribBinding = 704;
+        glVertexAttribFormat = 705;
+        glVertexAttribIFormat = 706;
+        glVertexBindingDivisor = 707;
+        glBlendEquationSeparateiEXT = 708;
+        glBlendEquationiEXT = 709;
+        glBlendFuncSeparateiEXT = 710;
+        glBlendFunciEXT = 711;
+        glColorMaskiEXT = 712;
+        glCopyImageSubDataEXT = 713;
+        glDisableiEXT = 714;
+        glEnableiEXT = 715;
+        glFramebufferTextureEXT = 716;
+        glGetSamplerParameterIivEXT = 717;
+        glGetSamplerParameterIuivEXT = 718;
+        glGetTexParameterIivEXT = 719;
+        glGetTexParameterIuivEXT = 720;
+        glIsEnablediEXT = 721;
+        glPatchParameteriEXT = 722;
+        glPrimitiveBoundingBoxEXT = 723;
+        glSamplerParameterIivEXT = 724;
+        glSamplerParameterIuivEXT = 725;
+        glTexBufferEXT = 726;
+        glTexBufferRangeEXT = 727;
+        glTexParameterIivEXT = 728;
+        glTexParameterIuivEXT = 729;
+        glTextureViewEXT = 730;
 
         eglGetDisplay = 2000;
         eglInitialize = 2001;
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.cpp b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
index ed9a457..c0867cd 100644
--- a/opengl/libs/GLES_trace/src/gltrace.pb.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
@@ -523,6 +523,28 @@
     case 477:
     case 478:
     case 479:
+    case 480:
+    case 481:
+    case 482:
+    case 483:
+    case 484:
+    case 485:
+    case 486:
+    case 487:
+    case 488:
+    case 489:
+    case 490:
+    case 491:
+    case 492:
+    case 493:
+    case 494:
+    case 495:
+    case 496:
+    case 497:
+    case 498:
+    case 499:
+    case 500:
+    case 501:
     case 502:
     case 503:
     case 504:
@@ -583,6 +605,175 @@
     case 559:
     case 560:
     case 561:
+    case 562:
+    case 563:
+    case 564:
+    case 565:
+    case 566:
+    case 567:
+    case 568:
+    case 569:
+    case 570:
+    case 571:
+    case 572:
+    case 573:
+    case 574:
+    case 575:
+    case 576:
+    case 577:
+    case 578:
+    case 579:
+    case 580:
+    case 581:
+    case 582:
+    case 583:
+    case 584:
+    case 585:
+    case 586:
+    case 587:
+    case 588:
+    case 589:
+    case 590:
+    case 591:
+    case 592:
+    case 593:
+    case 594:
+    case 595:
+    case 596:
+    case 597:
+    case 598:
+    case 599:
+    case 600:
+    case 601:
+    case 602:
+    case 603:
+    case 604:
+    case 605:
+    case 606:
+    case 607:
+    case 608:
+    case 609:
+    case 610:
+    case 611:
+    case 612:
+    case 613:
+    case 614:
+    case 615:
+    case 616:
+    case 617:
+    case 618:
+    case 619:
+    case 620:
+    case 621:
+    case 622:
+    case 623:
+    case 624:
+    case 625:
+    case 626:
+    case 627:
+    case 628:
+    case 629:
+    case 630:
+    case 631:
+    case 632:
+    case 633:
+    case 634:
+    case 635:
+    case 636:
+    case 637:
+    case 638:
+    case 639:
+    case 640:
+    case 641:
+    case 642:
+    case 643:
+    case 644:
+    case 645:
+    case 646:
+    case 647:
+    case 648:
+    case 649:
+    case 650:
+    case 651:
+    case 652:
+    case 653:
+    case 654:
+    case 655:
+    case 656:
+    case 657:
+    case 658:
+    case 659:
+    case 660:
+    case 661:
+    case 662:
+    case 663:
+    case 664:
+    case 665:
+    case 666:
+    case 667:
+    case 668:
+    case 669:
+    case 670:
+    case 671:
+    case 672:
+    case 673:
+    case 674:
+    case 675:
+    case 676:
+    case 677:
+    case 678:
+    case 679:
+    case 680:
+    case 681:
+    case 682:
+    case 683:
+    case 684:
+    case 685:
+    case 686:
+    case 687:
+    case 688:
+    case 689:
+    case 690:
+    case 691:
+    case 692:
+    case 693:
+    case 694:
+    case 695:
+    case 696:
+    case 697:
+    case 698:
+    case 699:
+    case 700:
+    case 701:
+    case 702:
+    case 703:
+    case 704:
+    case 705:
+    case 706:
+    case 707:
+    case 708:
+    case 709:
+    case 710:
+    case 711:
+    case 712:
+    case 713:
+    case 714:
+    case 715:
+    case 716:
+    case 717:
+    case 718:
+    case 719:
+    case 720:
+    case 721:
+    case 722:
+    case 723:
+    case 724:
+    case 725:
+    case 726:
+    case 727:
+    case 728:
+    case 729:
+    case 730:
     case 2000:
     case 2001:
     case 2002:
@@ -1118,6 +1309,28 @@
 const GLMessage_Function GLMessage::glTexStorage2D;
 const GLMessage_Function GLMessage::glTexStorage3D;
 const GLMessage_Function GLMessage::glGetInternalformativ;
+const GLMessage_Function GLMessage::glBeginPerfQueryINTEL;
+const GLMessage_Function GLMessage::glCreatePerfQueryINTEL;
+const GLMessage_Function GLMessage::glDeletePerfQueryINTEL;
+const GLMessage_Function GLMessage::glEndPerfQueryINTEL;
+const GLMessage_Function GLMessage::glGetFirstPerfQueryIdINTEL;
+const GLMessage_Function GLMessage::glGetNextPerfQueryIdINTEL;
+const GLMessage_Function GLMessage::glGetPerfCounterInfoINTEL;
+const GLMessage_Function GLMessage::glGetPerfQueryDataINTEL;
+const GLMessage_Function GLMessage::glGetPerfQueryIdByNameINTEL;
+const GLMessage_Function GLMessage::glGetPerfQueryInfoINTEL;
+const GLMessage_Function GLMessage::glBlendBarrierKHR;
+const GLMessage_Function GLMessage::glBlendBarrierNV;
+const GLMessage_Function GLMessage::glBlendParameteriNV;
+const GLMessage_Function GLMessage::glBlitFramebufferNV;
+const GLMessage_Function GLMessage::glFenceSyncAPPLE;
+const GLMessage_Function GLMessage::glIsSyncAPPLE;
+const GLMessage_Function GLMessage::glDeleteSyncAPPLE;
+const GLMessage_Function GLMessage::glClientWaitSyncAPPLE;
+const GLMessage_Function GLMessage::glWaitSyncAPPLE;
+const GLMessage_Function GLMessage::glGetInteger64vAPPLE;
+const GLMessage_Function GLMessage::glGetSyncivAPPLE;
+const GLMessage_Function GLMessage::glCopyBufferSubDataNV;
 const GLMessage_Function GLMessage::glActiveShaderProgramEXT;
 const GLMessage_Function GLMessage::glAlphaFuncQCOM;
 const GLMessage_Function GLMessage::glBeginQueryEXT;
@@ -1179,6 +1392,175 @@
 const GLMessage_Function GLMessage::glTextureStorage3DEXT;
 const GLMessage_Function GLMessage::glUseProgramStagesEXT;
 const GLMessage_Function GLMessage::glValidateProgramPipelineEXT;
+const GLMessage_Function GLMessage::glCopyTextureLevelsAPPLE;
+const GLMessage_Function GLMessage::glDebugMessageControlKHR;
+const GLMessage_Function GLMessage::glDebugMessageInsertKHR;
+const GLMessage_Function GLMessage::glDebugMessageCallbackKHR;
+const GLMessage_Function GLMessage::glGetDebugMessageLogKHR;
+const GLMessage_Function GLMessage::glPushDebugGroupKHR;
+const GLMessage_Function GLMessage::glPopDebugGroupKHR;
+const GLMessage_Function GLMessage::glObjectLabelKHR;
+const GLMessage_Function GLMessage::glGetObjectLabelKHR;
+const GLMessage_Function GLMessage::glObjectPtrLabelKHR;
+const GLMessage_Function GLMessage::glGetObjectPtrLabelKHR;
+const GLMessage_Function GLMessage::glGetPointervKHR;
+const GLMessage_Function GLMessage::glDrawArraysInstancedANGLE;
+const GLMessage_Function GLMessage::glDrawElementsInstancedANGLE;
+const GLMessage_Function GLMessage::glVertexAttribDivisorANGLE;
+const GLMessage_Function GLMessage::glDrawArraysInstancedEXT;
+const GLMessage_Function GLMessage::glDrawElementsInstancedEXT;
+const GLMessage_Function GLMessage::glVertexAttribDivisorEXT;
+const GLMessage_Function GLMessage::glDrawArraysInstancedNV;
+const GLMessage_Function GLMessage::glDrawElementsInstancedNV;
+const GLMessage_Function GLMessage::glVertexAttribDivisorNV;
+const GLMessage_Function GLMessage::glDrawBuffersEXT;
+const GLMessage_Function GLMessage::glReadBufferIndexedEXT;
+const GLMessage_Function GLMessage::glDrawBuffersIndexedEXT;
+const GLMessage_Function GLMessage::glGetIntegeri_vEXT;
+const GLMessage_Function GLMessage::glMapBufferRangeEXT;
+const GLMessage_Function GLMessage::glFlushMappedBufferRangeEXT;
+const GLMessage_Function GLMessage::glQueryCounterEXT;
+const GLMessage_Function GLMessage::glGetQueryObjecti64vEXT;
+const GLMessage_Function GLMessage::glGetQueryObjectivEXT;
+const GLMessage_Function GLMessage::glGetQueryObjectui64vEXT;
+const GLMessage_Function GLMessage::glGetTranslatedShaderSourceANGLE;
+const GLMessage_Function GLMessage::glMinSampleShadingOES;
+const GLMessage_Function GLMessage::glMultiTexCoord1bOES;
+const GLMessage_Function GLMessage::glMultiTexCoord1bvOES;
+const GLMessage_Function GLMessage::glMultiTexCoord2bOES;
+const GLMessage_Function GLMessage::glMultiTexCoord2bvOES;
+const GLMessage_Function GLMessage::glMultiTexCoord3bOES;
+const GLMessage_Function GLMessage::glMultiTexCoord3bvOES;
+const GLMessage_Function GLMessage::glMultiTexCoord4bOES;
+const GLMessage_Function GLMessage::glMultiTexCoord4bvOES;
+const GLMessage_Function GLMessage::glTexCoord1bOES;
+const GLMessage_Function GLMessage::glTexCoord1bvOES;
+const GLMessage_Function GLMessage::glTexCoord2bOES;
+const GLMessage_Function GLMessage::glTexCoord2bvOES;
+const GLMessage_Function GLMessage::glTexCoord3bOES;
+const GLMessage_Function GLMessage::glTexCoord3bvOES;
+const GLMessage_Function GLMessage::glTexCoord4bOES;
+const GLMessage_Function GLMessage::glTexCoord4bvOES;
+const GLMessage_Function GLMessage::glVertex2bOES;
+const GLMessage_Function GLMessage::glVertex2bvOES;
+const GLMessage_Function GLMessage::glVertex3bOES;
+const GLMessage_Function GLMessage::glVertex3bvOES;
+const GLMessage_Function GLMessage::glVertex4bOES;
+const GLMessage_Function GLMessage::glVertex4bvOES;
+const GLMessage_Function GLMessage::glProgramUniform1uiEXT;
+const GLMessage_Function GLMessage::glProgramUniform2uiEXT;
+const GLMessage_Function GLMessage::glProgramUniform3uiEXT;
+const GLMessage_Function GLMessage::glProgramUniform4uiEXT;
+const GLMessage_Function GLMessage::glProgramUniform1uivEXT;
+const GLMessage_Function GLMessage::glProgramUniform2uivEXT;
+const GLMessage_Function GLMessage::glProgramUniform3uivEXT;
+const GLMessage_Function GLMessage::glProgramUniform4uivEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix2x3fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix3x2fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix2x4fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix4x2fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix3x4fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix4x3fvEXT;
+const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleNV;
+const GLMessage_Function GLMessage::glSampleCoverageOES;
+const GLMessage_Function GLMessage::glTexStorage3DMultisampleOES;
+const GLMessage_Function GLMessage::glUniformMatrix2x3fvNV;
+const GLMessage_Function GLMessage::glUniformMatrix3x2fvNV;
+const GLMessage_Function GLMessage::glUniformMatrix2x4fvNV;
+const GLMessage_Function GLMessage::glUniformMatrix4x2fvNV;
+const GLMessage_Function GLMessage::glUniformMatrix3x4fvNV;
+const GLMessage_Function GLMessage::glUniformMatrix4x3fvNV;
+const GLMessage_Function GLMessage::glActiveShaderProgram;
+const GLMessage_Function GLMessage::glBindImageTexture;
+const GLMessage_Function GLMessage::glBindProgramPipeline;
+const GLMessage_Function GLMessage::glBindVertexBuffer;
+const GLMessage_Function GLMessage::glCreateShaderProgramv;
+const GLMessage_Function GLMessage::glDeleteProgramPipelines;
+const GLMessage_Function GLMessage::glDispatchCompute;
+const GLMessage_Function GLMessage::glDispatchComputeIndirect;
+const GLMessage_Function GLMessage::glDrawArraysIndirect;
+const GLMessage_Function GLMessage::glDrawElementsIndirect;
+const GLMessage_Function GLMessage::glFramebufferParameteri;
+const GLMessage_Function GLMessage::glGenProgramPipelines;
+const GLMessage_Function GLMessage::glGetBooleani_v;
+const GLMessage_Function GLMessage::glGetFramebufferParameteriv;
+const GLMessage_Function GLMessage::glGetMultisamplefv;
+const GLMessage_Function GLMessage::glGetProgramInterfaceiv;
+const GLMessage_Function GLMessage::glGetProgramPipelineInfoLog;
+const GLMessage_Function GLMessage::glGetProgramPipelineiv;
+const GLMessage_Function GLMessage::glGetProgramResourceIndex;
+const GLMessage_Function GLMessage::glGetProgramResourceLocation;
+const GLMessage_Function GLMessage::glGetProgramResourceName;
+const GLMessage_Function GLMessage::glGetProgramResourceiv;
+const GLMessage_Function GLMessage::glGetTexLevelParameterfv;
+const GLMessage_Function GLMessage::glGetTexLevelParameteriv;
+const GLMessage_Function GLMessage::glIsProgramPipeline;
+const GLMessage_Function GLMessage::glMemoryBarrier;
+const GLMessage_Function GLMessage::glMemoryBarrierByRegion;
+const GLMessage_Function GLMessage::glProgramUniform1f;
+const GLMessage_Function GLMessage::glProgramUniform1fv;
+const GLMessage_Function GLMessage::glProgramUniform1i;
+const GLMessage_Function GLMessage::glProgramUniform1iv;
+const GLMessage_Function GLMessage::glProgramUniform1ui;
+const GLMessage_Function GLMessage::glProgramUniform1uiv;
+const GLMessage_Function GLMessage::glProgramUniform2f;
+const GLMessage_Function GLMessage::glProgramUniform2fv;
+const GLMessage_Function GLMessage::glProgramUniform2i;
+const GLMessage_Function GLMessage::glProgramUniform2iv;
+const GLMessage_Function GLMessage::glProgramUniform2ui;
+const GLMessage_Function GLMessage::glProgramUniform2uiv;
+const GLMessage_Function GLMessage::glProgramUniform3f;
+const GLMessage_Function GLMessage::glProgramUniform3fv;
+const GLMessage_Function GLMessage::glProgramUniform3i;
+const GLMessage_Function GLMessage::glProgramUniform3iv;
+const GLMessage_Function GLMessage::glProgramUniform3ui;
+const GLMessage_Function GLMessage::glProgramUniform3uiv;
+const GLMessage_Function GLMessage::glProgramUniform4f;
+const GLMessage_Function GLMessage::glProgramUniform4fv;
+const GLMessage_Function GLMessage::glProgramUniform4i;
+const GLMessage_Function GLMessage::glProgramUniform4iv;
+const GLMessage_Function GLMessage::glProgramUniform4ui;
+const GLMessage_Function GLMessage::glProgramUniform4uiv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix2fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix2x3fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix2x4fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix3fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix3x2fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix3x4fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix4fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix4x2fv;
+const GLMessage_Function GLMessage::glProgramUniformMatrix4x3fv;
+const GLMessage_Function GLMessage::glSampleMaski;
+const GLMessage_Function GLMessage::glTexStorage2DMultisample;
+const GLMessage_Function GLMessage::glUseProgramStages;
+const GLMessage_Function GLMessage::glValidateProgramPipeline;
+const GLMessage_Function GLMessage::glVertexAttribBinding;
+const GLMessage_Function GLMessage::glVertexAttribFormat;
+const GLMessage_Function GLMessage::glVertexAttribIFormat;
+const GLMessage_Function GLMessage::glVertexBindingDivisor;
+const GLMessage_Function GLMessage::glBlendEquationSeparateiEXT;
+const GLMessage_Function GLMessage::glBlendEquationiEXT;
+const GLMessage_Function GLMessage::glBlendFuncSeparateiEXT;
+const GLMessage_Function GLMessage::glBlendFunciEXT;
+const GLMessage_Function GLMessage::glColorMaskiEXT;
+const GLMessage_Function GLMessage::glCopyImageSubDataEXT;
+const GLMessage_Function GLMessage::glDisableiEXT;
+const GLMessage_Function GLMessage::glEnableiEXT;
+const GLMessage_Function GLMessage::glFramebufferTextureEXT;
+const GLMessage_Function GLMessage::glGetSamplerParameterIivEXT;
+const GLMessage_Function GLMessage::glGetSamplerParameterIuivEXT;
+const GLMessage_Function GLMessage::glGetTexParameterIivEXT;
+const GLMessage_Function GLMessage::glGetTexParameterIuivEXT;
+const GLMessage_Function GLMessage::glIsEnablediEXT;
+const GLMessage_Function GLMessage::glPatchParameteriEXT;
+const GLMessage_Function GLMessage::glPrimitiveBoundingBoxEXT;
+const GLMessage_Function GLMessage::glSamplerParameterIivEXT;
+const GLMessage_Function GLMessage::glSamplerParameterIuivEXT;
+const GLMessage_Function GLMessage::glTexBufferEXT;
+const GLMessage_Function GLMessage::glTexBufferRangeEXT;
+const GLMessage_Function GLMessage::glTexParameterIivEXT;
+const GLMessage_Function GLMessage::glTexParameterIuivEXT;
+const GLMessage_Function GLMessage::glTextureViewEXT;
 const GLMessage_Function GLMessage::eglGetDisplay;
 const GLMessage_Function GLMessage::eglInitialize;
 const GLMessage_Function GLMessage::eglTerminate;
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.h b/opengl/libs/GLES_trace/src/gltrace.pb.h
index 9eae26c..9bc7c58 100644
--- a/opengl/libs/GLES_trace/src/gltrace.pb.h
+++ b/opengl/libs/GLES_trace/src/gltrace.pb.h
@@ -532,6 +532,28 @@
   GLMessage_Function_glTexStorage2D = 477,
   GLMessage_Function_glTexStorage3D = 478,
   GLMessage_Function_glGetInternalformativ = 479,
+  GLMessage_Function_glBeginPerfQueryINTEL = 480,
+  GLMessage_Function_glCreatePerfQueryINTEL = 481,
+  GLMessage_Function_glDeletePerfQueryINTEL = 482,
+  GLMessage_Function_glEndPerfQueryINTEL = 483,
+  GLMessage_Function_glGetFirstPerfQueryIdINTEL = 484,
+  GLMessage_Function_glGetNextPerfQueryIdINTEL = 485,
+  GLMessage_Function_glGetPerfCounterInfoINTEL = 486,
+  GLMessage_Function_glGetPerfQueryDataINTEL = 487,
+  GLMessage_Function_glGetPerfQueryIdByNameINTEL = 488,
+  GLMessage_Function_glGetPerfQueryInfoINTEL = 489,
+  GLMessage_Function_glBlendBarrierKHR = 490,
+  GLMessage_Function_glBlendBarrierNV = 491,
+  GLMessage_Function_glBlendParameteriNV = 492,
+  GLMessage_Function_glBlitFramebufferNV = 493,
+  GLMessage_Function_glFenceSyncAPPLE = 494,
+  GLMessage_Function_glIsSyncAPPLE = 495,
+  GLMessage_Function_glDeleteSyncAPPLE = 496,
+  GLMessage_Function_glClientWaitSyncAPPLE = 497,
+  GLMessage_Function_glWaitSyncAPPLE = 498,
+  GLMessage_Function_glGetInteger64vAPPLE = 499,
+  GLMessage_Function_glGetSyncivAPPLE = 500,
+  GLMessage_Function_glCopyBufferSubDataNV = 501,
   GLMessage_Function_glActiveShaderProgramEXT = 502,
   GLMessage_Function_glAlphaFuncQCOM = 503,
   GLMessage_Function_glBeginQueryEXT = 504,
@@ -593,6 +615,175 @@
   GLMessage_Function_glTextureStorage3DEXT = 559,
   GLMessage_Function_glUseProgramStagesEXT = 560,
   GLMessage_Function_glValidateProgramPipelineEXT = 561,
+  GLMessage_Function_glCopyTextureLevelsAPPLE = 562,
+  GLMessage_Function_glDebugMessageControlKHR = 563,
+  GLMessage_Function_glDebugMessageInsertKHR = 564,
+  GLMessage_Function_glDebugMessageCallbackKHR = 565,
+  GLMessage_Function_glGetDebugMessageLogKHR = 566,
+  GLMessage_Function_glPushDebugGroupKHR = 567,
+  GLMessage_Function_glPopDebugGroupKHR = 568,
+  GLMessage_Function_glObjectLabelKHR = 569,
+  GLMessage_Function_glGetObjectLabelKHR = 570,
+  GLMessage_Function_glObjectPtrLabelKHR = 571,
+  GLMessage_Function_glGetObjectPtrLabelKHR = 572,
+  GLMessage_Function_glGetPointervKHR = 573,
+  GLMessage_Function_glDrawArraysInstancedANGLE = 574,
+  GLMessage_Function_glDrawElementsInstancedANGLE = 575,
+  GLMessage_Function_glVertexAttribDivisorANGLE = 576,
+  GLMessage_Function_glDrawArraysInstancedEXT = 577,
+  GLMessage_Function_glDrawElementsInstancedEXT = 578,
+  GLMessage_Function_glVertexAttribDivisorEXT = 579,
+  GLMessage_Function_glDrawArraysInstancedNV = 580,
+  GLMessage_Function_glDrawElementsInstancedNV = 581,
+  GLMessage_Function_glVertexAttribDivisorNV = 582,
+  GLMessage_Function_glDrawBuffersEXT = 583,
+  GLMessage_Function_glReadBufferIndexedEXT = 584,
+  GLMessage_Function_glDrawBuffersIndexedEXT = 585,
+  GLMessage_Function_glGetIntegeri_vEXT = 586,
+  GLMessage_Function_glMapBufferRangeEXT = 587,
+  GLMessage_Function_glFlushMappedBufferRangeEXT = 588,
+  GLMessage_Function_glQueryCounterEXT = 589,
+  GLMessage_Function_glGetQueryObjecti64vEXT = 590,
+  GLMessage_Function_glGetQueryObjectivEXT = 591,
+  GLMessage_Function_glGetQueryObjectui64vEXT = 592,
+  GLMessage_Function_glGetTranslatedShaderSourceANGLE = 593,
+  GLMessage_Function_glMinSampleShadingOES = 594,
+  GLMessage_Function_glMultiTexCoord1bOES = 595,
+  GLMessage_Function_glMultiTexCoord1bvOES = 596,
+  GLMessage_Function_glMultiTexCoord2bOES = 597,
+  GLMessage_Function_glMultiTexCoord2bvOES = 598,
+  GLMessage_Function_glMultiTexCoord3bOES = 599,
+  GLMessage_Function_glMultiTexCoord3bvOES = 600,
+  GLMessage_Function_glMultiTexCoord4bOES = 601,
+  GLMessage_Function_glMultiTexCoord4bvOES = 602,
+  GLMessage_Function_glTexCoord1bOES = 603,
+  GLMessage_Function_glTexCoord1bvOES = 604,
+  GLMessage_Function_glTexCoord2bOES = 605,
+  GLMessage_Function_glTexCoord2bvOES = 606,
+  GLMessage_Function_glTexCoord3bOES = 607,
+  GLMessage_Function_glTexCoord3bvOES = 608,
+  GLMessage_Function_glTexCoord4bOES = 609,
+  GLMessage_Function_glTexCoord4bvOES = 610,
+  GLMessage_Function_glVertex2bOES = 611,
+  GLMessage_Function_glVertex2bvOES = 612,
+  GLMessage_Function_glVertex3bOES = 613,
+  GLMessage_Function_glVertex3bvOES = 614,
+  GLMessage_Function_glVertex4bOES = 615,
+  GLMessage_Function_glVertex4bvOES = 616,
+  GLMessage_Function_glProgramUniform1uiEXT = 617,
+  GLMessage_Function_glProgramUniform2uiEXT = 618,
+  GLMessage_Function_glProgramUniform3uiEXT = 619,
+  GLMessage_Function_glProgramUniform4uiEXT = 620,
+  GLMessage_Function_glProgramUniform1uivEXT = 621,
+  GLMessage_Function_glProgramUniform2uivEXT = 622,
+  GLMessage_Function_glProgramUniform3uivEXT = 623,
+  GLMessage_Function_glProgramUniform4uivEXT = 624,
+  GLMessage_Function_glProgramUniformMatrix2x3fvEXT = 625,
+  GLMessage_Function_glProgramUniformMatrix3x2fvEXT = 626,
+  GLMessage_Function_glProgramUniformMatrix2x4fvEXT = 627,
+  GLMessage_Function_glProgramUniformMatrix4x2fvEXT = 628,
+  GLMessage_Function_glProgramUniformMatrix3x4fvEXT = 629,
+  GLMessage_Function_glProgramUniformMatrix4x3fvEXT = 630,
+  GLMessage_Function_glRenderbufferStorageMultisampleNV = 631,
+  GLMessage_Function_glSampleCoverageOES = 632,
+  GLMessage_Function_glTexStorage3DMultisampleOES = 633,
+  GLMessage_Function_glUniformMatrix2x3fvNV = 634,
+  GLMessage_Function_glUniformMatrix3x2fvNV = 635,
+  GLMessage_Function_glUniformMatrix2x4fvNV = 636,
+  GLMessage_Function_glUniformMatrix4x2fvNV = 637,
+  GLMessage_Function_glUniformMatrix3x4fvNV = 638,
+  GLMessage_Function_glUniformMatrix4x3fvNV = 639,
+  GLMessage_Function_glActiveShaderProgram = 640,
+  GLMessage_Function_glBindImageTexture = 641,
+  GLMessage_Function_glBindProgramPipeline = 642,
+  GLMessage_Function_glBindVertexBuffer = 643,
+  GLMessage_Function_glCreateShaderProgramv = 644,
+  GLMessage_Function_glDeleteProgramPipelines = 645,
+  GLMessage_Function_glDispatchCompute = 646,
+  GLMessage_Function_glDispatchComputeIndirect = 647,
+  GLMessage_Function_glDrawArraysIndirect = 648,
+  GLMessage_Function_glDrawElementsIndirect = 649,
+  GLMessage_Function_glFramebufferParameteri = 650,
+  GLMessage_Function_glGenProgramPipelines = 651,
+  GLMessage_Function_glGetBooleani_v = 652,
+  GLMessage_Function_glGetFramebufferParameteriv = 653,
+  GLMessage_Function_glGetMultisamplefv = 654,
+  GLMessage_Function_glGetProgramInterfaceiv = 655,
+  GLMessage_Function_glGetProgramPipelineInfoLog = 656,
+  GLMessage_Function_glGetProgramPipelineiv = 657,
+  GLMessage_Function_glGetProgramResourceIndex = 658,
+  GLMessage_Function_glGetProgramResourceLocation = 659,
+  GLMessage_Function_glGetProgramResourceName = 660,
+  GLMessage_Function_glGetProgramResourceiv = 661,
+  GLMessage_Function_glGetTexLevelParameterfv = 662,
+  GLMessage_Function_glGetTexLevelParameteriv = 663,
+  GLMessage_Function_glIsProgramPipeline = 664,
+  GLMessage_Function_glMemoryBarrier = 665,
+  GLMessage_Function_glMemoryBarrierByRegion = 666,
+  GLMessage_Function_glProgramUniform1f = 667,
+  GLMessage_Function_glProgramUniform1fv = 668,
+  GLMessage_Function_glProgramUniform1i = 669,
+  GLMessage_Function_glProgramUniform1iv = 670,
+  GLMessage_Function_glProgramUniform1ui = 671,
+  GLMessage_Function_glProgramUniform1uiv = 672,
+  GLMessage_Function_glProgramUniform2f = 673,
+  GLMessage_Function_glProgramUniform2fv = 674,
+  GLMessage_Function_glProgramUniform2i = 675,
+  GLMessage_Function_glProgramUniform2iv = 676,
+  GLMessage_Function_glProgramUniform2ui = 677,
+  GLMessage_Function_glProgramUniform2uiv = 678,
+  GLMessage_Function_glProgramUniform3f = 679,
+  GLMessage_Function_glProgramUniform3fv = 680,
+  GLMessage_Function_glProgramUniform3i = 681,
+  GLMessage_Function_glProgramUniform3iv = 682,
+  GLMessage_Function_glProgramUniform3ui = 683,
+  GLMessage_Function_glProgramUniform3uiv = 684,
+  GLMessage_Function_glProgramUniform4f = 685,
+  GLMessage_Function_glProgramUniform4fv = 686,
+  GLMessage_Function_glProgramUniform4i = 687,
+  GLMessage_Function_glProgramUniform4iv = 688,
+  GLMessage_Function_glProgramUniform4ui = 689,
+  GLMessage_Function_glProgramUniform4uiv = 690,
+  GLMessage_Function_glProgramUniformMatrix2fv = 691,
+  GLMessage_Function_glProgramUniformMatrix2x3fv = 692,
+  GLMessage_Function_glProgramUniformMatrix2x4fv = 693,
+  GLMessage_Function_glProgramUniformMatrix3fv = 694,
+  GLMessage_Function_glProgramUniformMatrix3x2fv = 695,
+  GLMessage_Function_glProgramUniformMatrix3x4fv = 696,
+  GLMessage_Function_glProgramUniformMatrix4fv = 697,
+  GLMessage_Function_glProgramUniformMatrix4x2fv = 698,
+  GLMessage_Function_glProgramUniformMatrix4x3fv = 699,
+  GLMessage_Function_glSampleMaski = 700,
+  GLMessage_Function_glTexStorage2DMultisample = 701,
+  GLMessage_Function_glUseProgramStages = 702,
+  GLMessage_Function_glValidateProgramPipeline = 703,
+  GLMessage_Function_glVertexAttribBinding = 704,
+  GLMessage_Function_glVertexAttribFormat = 705,
+  GLMessage_Function_glVertexAttribIFormat = 706,
+  GLMessage_Function_glVertexBindingDivisor = 707,
+  GLMessage_Function_glBlendEquationSeparateiEXT = 708,
+  GLMessage_Function_glBlendEquationiEXT = 709,
+  GLMessage_Function_glBlendFuncSeparateiEXT = 710,
+  GLMessage_Function_glBlendFunciEXT = 711,
+  GLMessage_Function_glColorMaskiEXT = 712,
+  GLMessage_Function_glCopyImageSubDataEXT = 713,
+  GLMessage_Function_glDisableiEXT = 714,
+  GLMessage_Function_glEnableiEXT = 715,
+  GLMessage_Function_glFramebufferTextureEXT = 716,
+  GLMessage_Function_glGetSamplerParameterIivEXT = 717,
+  GLMessage_Function_glGetSamplerParameterIuivEXT = 718,
+  GLMessage_Function_glGetTexParameterIivEXT = 719,
+  GLMessage_Function_glGetTexParameterIuivEXT = 720,
+  GLMessage_Function_glIsEnablediEXT = 721,
+  GLMessage_Function_glPatchParameteriEXT = 722,
+  GLMessage_Function_glPrimitiveBoundingBoxEXT = 723,
+  GLMessage_Function_glSamplerParameterIivEXT = 724,
+  GLMessage_Function_glSamplerParameterIuivEXT = 725,
+  GLMessage_Function_glTexBufferEXT = 726,
+  GLMessage_Function_glTexBufferRangeEXT = 727,
+  GLMessage_Function_glTexParameterIivEXT = 728,
+  GLMessage_Function_glTexParameterIuivEXT = 729,
+  GLMessage_Function_glTextureViewEXT = 730,
   GLMessage_Function_eglGetDisplay = 2000,
   GLMessage_Function_eglInitialize = 2001,
   GLMessage_Function_eglTerminate = 2002,
@@ -1466,6 +1657,28 @@
   static const Function glTexStorage2D = GLMessage_Function_glTexStorage2D;
   static const Function glTexStorage3D = GLMessage_Function_glTexStorage3D;
   static const Function glGetInternalformativ = GLMessage_Function_glGetInternalformativ;
+  static const Function glBeginPerfQueryINTEL = GLMessage_Function_glBeginPerfQueryINTEL;
+  static const Function glCreatePerfQueryINTEL = GLMessage_Function_glCreatePerfQueryINTEL;
+  static const Function glDeletePerfQueryINTEL = GLMessage_Function_glDeletePerfQueryINTEL;
+  static const Function glEndPerfQueryINTEL = GLMessage_Function_glEndPerfQueryINTEL;
+  static const Function glGetFirstPerfQueryIdINTEL = GLMessage_Function_glGetFirstPerfQueryIdINTEL;
+  static const Function glGetNextPerfQueryIdINTEL = GLMessage_Function_glGetNextPerfQueryIdINTEL;
+  static const Function glGetPerfCounterInfoINTEL = GLMessage_Function_glGetPerfCounterInfoINTEL;
+  static const Function glGetPerfQueryDataINTEL = GLMessage_Function_glGetPerfQueryDataINTEL;
+  static const Function glGetPerfQueryIdByNameINTEL = GLMessage_Function_glGetPerfQueryIdByNameINTEL;
+  static const Function glGetPerfQueryInfoINTEL = GLMessage_Function_glGetPerfQueryInfoINTEL;
+  static const Function glBlendBarrierKHR = GLMessage_Function_glBlendBarrierKHR;
+  static const Function glBlendBarrierNV = GLMessage_Function_glBlendBarrierNV;
+  static const Function glBlendParameteriNV = GLMessage_Function_glBlendParameteriNV;
+  static const Function glBlitFramebufferNV = GLMessage_Function_glBlitFramebufferNV;
+  static const Function glFenceSyncAPPLE = GLMessage_Function_glFenceSyncAPPLE;
+  static const Function glIsSyncAPPLE = GLMessage_Function_glIsSyncAPPLE;
+  static const Function glDeleteSyncAPPLE = GLMessage_Function_glDeleteSyncAPPLE;
+  static const Function glClientWaitSyncAPPLE = GLMessage_Function_glClientWaitSyncAPPLE;
+  static const Function glWaitSyncAPPLE = GLMessage_Function_glWaitSyncAPPLE;
+  static const Function glGetInteger64vAPPLE = GLMessage_Function_glGetInteger64vAPPLE;
+  static const Function glGetSyncivAPPLE = GLMessage_Function_glGetSyncivAPPLE;
+  static const Function glCopyBufferSubDataNV = GLMessage_Function_glCopyBufferSubDataNV;
   static const Function glActiveShaderProgramEXT = GLMessage_Function_glActiveShaderProgramEXT;
   static const Function glAlphaFuncQCOM = GLMessage_Function_glAlphaFuncQCOM;
   static const Function glBeginQueryEXT = GLMessage_Function_glBeginQueryEXT;
@@ -1527,6 +1740,175 @@
   static const Function glTextureStorage3DEXT = GLMessage_Function_glTextureStorage3DEXT;
   static const Function glUseProgramStagesEXT = GLMessage_Function_glUseProgramStagesEXT;
   static const Function glValidateProgramPipelineEXT = GLMessage_Function_glValidateProgramPipelineEXT;
+  static const Function glCopyTextureLevelsAPPLE = GLMessage_Function_glCopyTextureLevelsAPPLE;
+  static const Function glDebugMessageControlKHR = GLMessage_Function_glDebugMessageControlKHR;
+  static const Function glDebugMessageInsertKHR = GLMessage_Function_glDebugMessageInsertKHR;
+  static const Function glDebugMessageCallbackKHR = GLMessage_Function_glDebugMessageCallbackKHR;
+  static const Function glGetDebugMessageLogKHR = GLMessage_Function_glGetDebugMessageLogKHR;
+  static const Function glPushDebugGroupKHR = GLMessage_Function_glPushDebugGroupKHR;
+  static const Function glPopDebugGroupKHR = GLMessage_Function_glPopDebugGroupKHR;
+  static const Function glObjectLabelKHR = GLMessage_Function_glObjectLabelKHR;
+  static const Function glGetObjectLabelKHR = GLMessage_Function_glGetObjectLabelKHR;
+  static const Function glObjectPtrLabelKHR = GLMessage_Function_glObjectPtrLabelKHR;
+  static const Function glGetObjectPtrLabelKHR = GLMessage_Function_glGetObjectPtrLabelKHR;
+  static const Function glGetPointervKHR = GLMessage_Function_glGetPointervKHR;
+  static const Function glDrawArraysInstancedANGLE = GLMessage_Function_glDrawArraysInstancedANGLE;
+  static const Function glDrawElementsInstancedANGLE = GLMessage_Function_glDrawElementsInstancedANGLE;
+  static const Function glVertexAttribDivisorANGLE = GLMessage_Function_glVertexAttribDivisorANGLE;
+  static const Function glDrawArraysInstancedEXT = GLMessage_Function_glDrawArraysInstancedEXT;
+  static const Function glDrawElementsInstancedEXT = GLMessage_Function_glDrawElementsInstancedEXT;
+  static const Function glVertexAttribDivisorEXT = GLMessage_Function_glVertexAttribDivisorEXT;
+  static const Function glDrawArraysInstancedNV = GLMessage_Function_glDrawArraysInstancedNV;
+  static const Function glDrawElementsInstancedNV = GLMessage_Function_glDrawElementsInstancedNV;
+  static const Function glVertexAttribDivisorNV = GLMessage_Function_glVertexAttribDivisorNV;
+  static const Function glDrawBuffersEXT = GLMessage_Function_glDrawBuffersEXT;
+  static const Function glReadBufferIndexedEXT = GLMessage_Function_glReadBufferIndexedEXT;
+  static const Function glDrawBuffersIndexedEXT = GLMessage_Function_glDrawBuffersIndexedEXT;
+  static const Function glGetIntegeri_vEXT = GLMessage_Function_glGetIntegeri_vEXT;
+  static const Function glMapBufferRangeEXT = GLMessage_Function_glMapBufferRangeEXT;
+  static const Function glFlushMappedBufferRangeEXT = GLMessage_Function_glFlushMappedBufferRangeEXT;
+  static const Function glQueryCounterEXT = GLMessage_Function_glQueryCounterEXT;
+  static const Function glGetQueryObjecti64vEXT = GLMessage_Function_glGetQueryObjecti64vEXT;
+  static const Function glGetQueryObjectivEXT = GLMessage_Function_glGetQueryObjectivEXT;
+  static const Function glGetQueryObjectui64vEXT = GLMessage_Function_glGetQueryObjectui64vEXT;
+  static const Function glGetTranslatedShaderSourceANGLE = GLMessage_Function_glGetTranslatedShaderSourceANGLE;
+  static const Function glMinSampleShadingOES = GLMessage_Function_glMinSampleShadingOES;
+  static const Function glMultiTexCoord1bOES = GLMessage_Function_glMultiTexCoord1bOES;
+  static const Function glMultiTexCoord1bvOES = GLMessage_Function_glMultiTexCoord1bvOES;
+  static const Function glMultiTexCoord2bOES = GLMessage_Function_glMultiTexCoord2bOES;
+  static const Function glMultiTexCoord2bvOES = GLMessage_Function_glMultiTexCoord2bvOES;
+  static const Function glMultiTexCoord3bOES = GLMessage_Function_glMultiTexCoord3bOES;
+  static const Function glMultiTexCoord3bvOES = GLMessage_Function_glMultiTexCoord3bvOES;
+  static const Function glMultiTexCoord4bOES = GLMessage_Function_glMultiTexCoord4bOES;
+  static const Function glMultiTexCoord4bvOES = GLMessage_Function_glMultiTexCoord4bvOES;
+  static const Function glTexCoord1bOES = GLMessage_Function_glTexCoord1bOES;
+  static const Function glTexCoord1bvOES = GLMessage_Function_glTexCoord1bvOES;
+  static const Function glTexCoord2bOES = GLMessage_Function_glTexCoord2bOES;
+  static const Function glTexCoord2bvOES = GLMessage_Function_glTexCoord2bvOES;
+  static const Function glTexCoord3bOES = GLMessage_Function_glTexCoord3bOES;
+  static const Function glTexCoord3bvOES = GLMessage_Function_glTexCoord3bvOES;
+  static const Function glTexCoord4bOES = GLMessage_Function_glTexCoord4bOES;
+  static const Function glTexCoord4bvOES = GLMessage_Function_glTexCoord4bvOES;
+  static const Function glVertex2bOES = GLMessage_Function_glVertex2bOES;
+  static const Function glVertex2bvOES = GLMessage_Function_glVertex2bvOES;
+  static const Function glVertex3bOES = GLMessage_Function_glVertex3bOES;
+  static const Function glVertex3bvOES = GLMessage_Function_glVertex3bvOES;
+  static const Function glVertex4bOES = GLMessage_Function_glVertex4bOES;
+  static const Function glVertex4bvOES = GLMessage_Function_glVertex4bvOES;
+  static const Function glProgramUniform1uiEXT = GLMessage_Function_glProgramUniform1uiEXT;
+  static const Function glProgramUniform2uiEXT = GLMessage_Function_glProgramUniform2uiEXT;
+  static const Function glProgramUniform3uiEXT = GLMessage_Function_glProgramUniform3uiEXT;
+  static const Function glProgramUniform4uiEXT = GLMessage_Function_glProgramUniform4uiEXT;
+  static const Function glProgramUniform1uivEXT = GLMessage_Function_glProgramUniform1uivEXT;
+  static const Function glProgramUniform2uivEXT = GLMessage_Function_glProgramUniform2uivEXT;
+  static const Function glProgramUniform3uivEXT = GLMessage_Function_glProgramUniform3uivEXT;
+  static const Function glProgramUniform4uivEXT = GLMessage_Function_glProgramUniform4uivEXT;
+  static const Function glProgramUniformMatrix2x3fvEXT = GLMessage_Function_glProgramUniformMatrix2x3fvEXT;
+  static const Function glProgramUniformMatrix3x2fvEXT = GLMessage_Function_glProgramUniformMatrix3x2fvEXT;
+  static const Function glProgramUniformMatrix2x4fvEXT = GLMessage_Function_glProgramUniformMatrix2x4fvEXT;
+  static const Function glProgramUniformMatrix4x2fvEXT = GLMessage_Function_glProgramUniformMatrix4x2fvEXT;
+  static const Function glProgramUniformMatrix3x4fvEXT = GLMessage_Function_glProgramUniformMatrix3x4fvEXT;
+  static const Function glProgramUniformMatrix4x3fvEXT = GLMessage_Function_glProgramUniformMatrix4x3fvEXT;
+  static const Function glRenderbufferStorageMultisampleNV = GLMessage_Function_glRenderbufferStorageMultisampleNV;
+  static const Function glSampleCoverageOES = GLMessage_Function_glSampleCoverageOES;
+  static const Function glTexStorage3DMultisampleOES = GLMessage_Function_glTexStorage3DMultisampleOES;
+  static const Function glUniformMatrix2x3fvNV = GLMessage_Function_glUniformMatrix2x3fvNV;
+  static const Function glUniformMatrix3x2fvNV = GLMessage_Function_glUniformMatrix3x2fvNV;
+  static const Function glUniformMatrix2x4fvNV = GLMessage_Function_glUniformMatrix2x4fvNV;
+  static const Function glUniformMatrix4x2fvNV = GLMessage_Function_glUniformMatrix4x2fvNV;
+  static const Function glUniformMatrix3x4fvNV = GLMessage_Function_glUniformMatrix3x4fvNV;
+  static const Function glUniformMatrix4x3fvNV = GLMessage_Function_glUniformMatrix4x3fvNV;
+  static const Function glActiveShaderProgram = GLMessage_Function_glActiveShaderProgram;
+  static const Function glBindImageTexture = GLMessage_Function_glBindImageTexture;
+  static const Function glBindProgramPipeline = GLMessage_Function_glBindProgramPipeline;
+  static const Function glBindVertexBuffer = GLMessage_Function_glBindVertexBuffer;
+  static const Function glCreateShaderProgramv = GLMessage_Function_glCreateShaderProgramv;
+  static const Function glDeleteProgramPipelines = GLMessage_Function_glDeleteProgramPipelines;
+  static const Function glDispatchCompute = GLMessage_Function_glDispatchCompute;
+  static const Function glDispatchComputeIndirect = GLMessage_Function_glDispatchComputeIndirect;
+  static const Function glDrawArraysIndirect = GLMessage_Function_glDrawArraysIndirect;
+  static const Function glDrawElementsIndirect = GLMessage_Function_glDrawElementsIndirect;
+  static const Function glFramebufferParameteri = GLMessage_Function_glFramebufferParameteri;
+  static const Function glGenProgramPipelines = GLMessage_Function_glGenProgramPipelines;
+  static const Function glGetBooleani_v = GLMessage_Function_glGetBooleani_v;
+  static const Function glGetFramebufferParameteriv = GLMessage_Function_glGetFramebufferParameteriv;
+  static const Function glGetMultisamplefv = GLMessage_Function_glGetMultisamplefv;
+  static const Function glGetProgramInterfaceiv = GLMessage_Function_glGetProgramInterfaceiv;
+  static const Function glGetProgramPipelineInfoLog = GLMessage_Function_glGetProgramPipelineInfoLog;
+  static const Function glGetProgramPipelineiv = GLMessage_Function_glGetProgramPipelineiv;
+  static const Function glGetProgramResourceIndex = GLMessage_Function_glGetProgramResourceIndex;
+  static const Function glGetProgramResourceLocation = GLMessage_Function_glGetProgramResourceLocation;
+  static const Function glGetProgramResourceName = GLMessage_Function_glGetProgramResourceName;
+  static const Function glGetProgramResourceiv = GLMessage_Function_glGetProgramResourceiv;
+  static const Function glGetTexLevelParameterfv = GLMessage_Function_glGetTexLevelParameterfv;
+  static const Function glGetTexLevelParameteriv = GLMessage_Function_glGetTexLevelParameteriv;
+  static const Function glIsProgramPipeline = GLMessage_Function_glIsProgramPipeline;
+  static const Function glMemoryBarrier = GLMessage_Function_glMemoryBarrier;
+  static const Function glMemoryBarrierByRegion = GLMessage_Function_glMemoryBarrierByRegion;
+  static const Function glProgramUniform1f = GLMessage_Function_glProgramUniform1f;
+  static const Function glProgramUniform1fv = GLMessage_Function_glProgramUniform1fv;
+  static const Function glProgramUniform1i = GLMessage_Function_glProgramUniform1i;
+  static const Function glProgramUniform1iv = GLMessage_Function_glProgramUniform1iv;
+  static const Function glProgramUniform1ui = GLMessage_Function_glProgramUniform1ui;
+  static const Function glProgramUniform1uiv = GLMessage_Function_glProgramUniform1uiv;
+  static const Function glProgramUniform2f = GLMessage_Function_glProgramUniform2f;
+  static const Function glProgramUniform2fv = GLMessage_Function_glProgramUniform2fv;
+  static const Function glProgramUniform2i = GLMessage_Function_glProgramUniform2i;
+  static const Function glProgramUniform2iv = GLMessage_Function_glProgramUniform2iv;
+  static const Function glProgramUniform2ui = GLMessage_Function_glProgramUniform2ui;
+  static const Function glProgramUniform2uiv = GLMessage_Function_glProgramUniform2uiv;
+  static const Function glProgramUniform3f = GLMessage_Function_glProgramUniform3f;
+  static const Function glProgramUniform3fv = GLMessage_Function_glProgramUniform3fv;
+  static const Function glProgramUniform3i = GLMessage_Function_glProgramUniform3i;
+  static const Function glProgramUniform3iv = GLMessage_Function_glProgramUniform3iv;
+  static const Function glProgramUniform3ui = GLMessage_Function_glProgramUniform3ui;
+  static const Function glProgramUniform3uiv = GLMessage_Function_glProgramUniform3uiv;
+  static const Function glProgramUniform4f = GLMessage_Function_glProgramUniform4f;
+  static const Function glProgramUniform4fv = GLMessage_Function_glProgramUniform4fv;
+  static const Function glProgramUniform4i = GLMessage_Function_glProgramUniform4i;
+  static const Function glProgramUniform4iv = GLMessage_Function_glProgramUniform4iv;
+  static const Function glProgramUniform4ui = GLMessage_Function_glProgramUniform4ui;
+  static const Function glProgramUniform4uiv = GLMessage_Function_glProgramUniform4uiv;
+  static const Function glProgramUniformMatrix2fv = GLMessage_Function_glProgramUniformMatrix2fv;
+  static const Function glProgramUniformMatrix2x3fv = GLMessage_Function_glProgramUniformMatrix2x3fv;
+  static const Function glProgramUniformMatrix2x4fv = GLMessage_Function_glProgramUniformMatrix2x4fv;
+  static const Function glProgramUniformMatrix3fv = GLMessage_Function_glProgramUniformMatrix3fv;
+  static const Function glProgramUniformMatrix3x2fv = GLMessage_Function_glProgramUniformMatrix3x2fv;
+  static const Function glProgramUniformMatrix3x4fv = GLMessage_Function_glProgramUniformMatrix3x4fv;
+  static const Function glProgramUniformMatrix4fv = GLMessage_Function_glProgramUniformMatrix4fv;
+  static const Function glProgramUniformMatrix4x2fv = GLMessage_Function_glProgramUniformMatrix4x2fv;
+  static const Function glProgramUniformMatrix4x3fv = GLMessage_Function_glProgramUniformMatrix4x3fv;
+  static const Function glSampleMaski = GLMessage_Function_glSampleMaski;
+  static const Function glTexStorage2DMultisample = GLMessage_Function_glTexStorage2DMultisample;
+  static const Function glUseProgramStages = GLMessage_Function_glUseProgramStages;
+  static const Function glValidateProgramPipeline = GLMessage_Function_glValidateProgramPipeline;
+  static const Function glVertexAttribBinding = GLMessage_Function_glVertexAttribBinding;
+  static const Function glVertexAttribFormat = GLMessage_Function_glVertexAttribFormat;
+  static const Function glVertexAttribIFormat = GLMessage_Function_glVertexAttribIFormat;
+  static const Function glVertexBindingDivisor = GLMessage_Function_glVertexBindingDivisor;
+  static const Function glBlendEquationSeparateiEXT = GLMessage_Function_glBlendEquationSeparateiEXT;
+  static const Function glBlendEquationiEXT = GLMessage_Function_glBlendEquationiEXT;
+  static const Function glBlendFuncSeparateiEXT = GLMessage_Function_glBlendFuncSeparateiEXT;
+  static const Function glBlendFunciEXT = GLMessage_Function_glBlendFunciEXT;
+  static const Function glColorMaskiEXT = GLMessage_Function_glColorMaskiEXT;
+  static const Function glCopyImageSubDataEXT = GLMessage_Function_glCopyImageSubDataEXT;
+  static const Function glDisableiEXT = GLMessage_Function_glDisableiEXT;
+  static const Function glEnableiEXT = GLMessage_Function_glEnableiEXT;
+  static const Function glFramebufferTextureEXT = GLMessage_Function_glFramebufferTextureEXT;
+  static const Function glGetSamplerParameterIivEXT = GLMessage_Function_glGetSamplerParameterIivEXT;
+  static const Function glGetSamplerParameterIuivEXT = GLMessage_Function_glGetSamplerParameterIuivEXT;
+  static const Function glGetTexParameterIivEXT = GLMessage_Function_glGetTexParameterIivEXT;
+  static const Function glGetTexParameterIuivEXT = GLMessage_Function_glGetTexParameterIuivEXT;
+  static const Function glIsEnablediEXT = GLMessage_Function_glIsEnablediEXT;
+  static const Function glPatchParameteriEXT = GLMessage_Function_glPatchParameteriEXT;
+  static const Function glPrimitiveBoundingBoxEXT = GLMessage_Function_glPrimitiveBoundingBoxEXT;
+  static const Function glSamplerParameterIivEXT = GLMessage_Function_glSamplerParameterIivEXT;
+  static const Function glSamplerParameterIuivEXT = GLMessage_Function_glSamplerParameterIuivEXT;
+  static const Function glTexBufferEXT = GLMessage_Function_glTexBufferEXT;
+  static const Function glTexBufferRangeEXT = GLMessage_Function_glTexBufferRangeEXT;
+  static const Function glTexParameterIivEXT = GLMessage_Function_glTexParameterIivEXT;
+  static const Function glTexParameterIuivEXT = GLMessage_Function_glTexParameterIuivEXT;
+  static const Function glTextureViewEXT = GLMessage_Function_glTextureViewEXT;
   static const Function eglGetDisplay = GLMessage_Function_eglGetDisplay;
   static const Function eglInitialize = GLMessage_Function_eglInitialize;
   static const Function eglTerminate = GLMessage_Function_eglTerminate;
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
index e2cd0d8..eed3ccf 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -18,7 +18,6 @@
 
 #include <cutils/log.h>
 #include <utils/Timers.h>
-#include <GLES3/gl3.h>
 
 #include "gltrace.pb.h"
 #include "gltrace_context.h"
@@ -28,7 +27,7 @@
 namespace android {
 namespace gltrace {
 
-// Definitions for GL3 APIs
+// Definitions for GL2 APIs
 
 void GLTrace_glActiveTexture(GLenum texture) {
     GLMessage glmsg;
@@ -92,7 +91,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) {
+void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -411,40 +410,40 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
+void GLTrace_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glBlendFuncSeparate);
 
-    // copy argument srcRGB
-    GLMessage_DataType *arg_srcRGB = glmsg.add_args();
-    arg_srcRGB->set_isarray(false);
-    arg_srcRGB->set_type(GLMessage::DataType::ENUM);
-    arg_srcRGB->add_intvalue((int)srcRGB);
+    // copy argument sfactorRGB
+    GLMessage_DataType *arg_sfactorRGB = glmsg.add_args();
+    arg_sfactorRGB->set_isarray(false);
+    arg_sfactorRGB->set_type(GLMessage::DataType::ENUM);
+    arg_sfactorRGB->add_intvalue((int)sfactorRGB);
 
-    // copy argument dstRGB
-    GLMessage_DataType *arg_dstRGB = glmsg.add_args();
-    arg_dstRGB->set_isarray(false);
-    arg_dstRGB->set_type(GLMessage::DataType::ENUM);
-    arg_dstRGB->add_intvalue((int)dstRGB);
+    // copy argument dfactorRGB
+    GLMessage_DataType *arg_dfactorRGB = glmsg.add_args();
+    arg_dfactorRGB->set_isarray(false);
+    arg_dfactorRGB->set_type(GLMessage::DataType::ENUM);
+    arg_dfactorRGB->add_intvalue((int)dfactorRGB);
 
-    // copy argument srcAlpha
-    GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
-    arg_srcAlpha->set_isarray(false);
-    arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
-    arg_srcAlpha->add_intvalue((int)srcAlpha);
+    // copy argument sfactorAlpha
+    GLMessage_DataType *arg_sfactorAlpha = glmsg.add_args();
+    arg_sfactorAlpha->set_isarray(false);
+    arg_sfactorAlpha->set_type(GLMessage::DataType::ENUM);
+    arg_sfactorAlpha->add_intvalue((int)sfactorAlpha);
 
-    // copy argument dstAlpha
-    GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
-    arg_dstAlpha->set_isarray(false);
-    arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
-    arg_dstAlpha->add_intvalue((int)dstAlpha);
+    // copy argument dfactorAlpha
+    GLMessage_DataType *arg_dfactorAlpha = glmsg.add_args();
+    arg_dfactorAlpha->set_isarray(false);
+    arg_dfactorAlpha->set_type(GLMessage::DataType::ENUM);
+    arg_dfactorAlpha->add_intvalue((int)dfactorAlpha);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+    glContext->hooks->gl.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -457,7 +456,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
+void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const void * data, GLenum usage) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -504,7 +503,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
+void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -661,22 +660,22 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearDepthf(GLfloat depth) {
+void GLTrace_glClearDepthf(GLfloat d) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glClearDepthf);
 
-    // copy argument depth
-    GLMessage_DataType *arg_depth = glmsg.add_args();
-    arg_depth->set_isarray(false);
-    arg_depth->set_type(GLMessage::DataType::FLOAT);
-    arg_depth->add_floatvalue(depth);
+    // copy argument d
+    GLMessage_DataType *arg_d = glmsg.add_args();
+    arg_d->set_isarray(false);
+    arg_d->set_type(GLMessage::DataType::FLOAT);
+    arg_d->add_floatvalue(d);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glClearDepthf(depth);
+    glContext->hooks->gl.glClearDepthf(d);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -791,7 +790,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
+void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -862,7 +861,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
+void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1173,7 +1172,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
+void GLTrace_glDeleteBuffers(GLsizei n, const GLuint * buffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1208,7 +1207,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
+void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1271,7 +1270,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
+void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1334,7 +1333,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures) {
+void GLTrace_glDeleteTextures(GLsizei n, const GLuint * textures) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1589,7 +1588,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
+void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void * indices) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1862,7 +1861,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers) {
+void GLTrace_glGenBuffers(GLsizei n, GLuint * buffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1925,7 +1924,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
+void GLTrace_glGenFramebuffers(GLsizei n, GLuint * framebuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1960,7 +1959,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
+void GLTrace_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -1995,7 +1994,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenTextures(GLsizei n, GLuint* textures) {
+void GLTrace_glGenTextures(GLsizei n, GLuint * textures) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2030,7 +2029,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
+void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2048,11 +2047,11 @@
     arg_index->set_type(GLMessage::DataType::INT);
     arg_index->add_intvalue(index);
 
-    // copy argument bufsize
-    GLMessage_DataType *arg_bufsize = glmsg.add_args();
-    arg_bufsize->set_isarray(false);
-    arg_bufsize->set_type(GLMessage::DataType::INT);
-    arg_bufsize->add_intvalue(bufsize);
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -2081,7 +2080,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetActiveAttrib(program, index, bufsize, length, size, type, name);
+    glContext->hooks->gl.glGetActiveAttrib(program, index, bufSize, length, size, type, name);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -2098,7 +2097,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
+void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2116,11 +2115,11 @@
     arg_index->set_type(GLMessage::DataType::INT);
     arg_index->add_intvalue(index);
 
-    // copy argument bufsize
-    GLMessage_DataType *arg_bufsize = glmsg.add_args();
-    arg_bufsize->set_isarray(false);
-    arg_bufsize->set_type(GLMessage::DataType::INT);
-    arg_bufsize->add_intvalue(bufsize);
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -2149,7 +2148,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetActiveUniform(program, index, bufsize, length, size, type, name);
+    glContext->hooks->gl.glGetActiveUniform(program, index, bufSize, length, size, type, name);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -2166,7 +2165,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
+void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2178,11 +2177,11 @@
     arg_program->set_type(GLMessage::DataType::INT);
     arg_program->add_intvalue(program);
 
-    // copy argument maxcount
-    GLMessage_DataType *arg_maxcount = glmsg.add_args();
-    arg_maxcount->set_isarray(false);
-    arg_maxcount->set_type(GLMessage::DataType::INT);
-    arg_maxcount->add_intvalue(maxcount);
+    // copy argument maxCount
+    GLMessage_DataType *arg_maxCount = glmsg.add_args();
+    arg_maxCount->set_isarray(false);
+    arg_maxCount->set_type(GLMessage::DataType::INT);
+    arg_maxCount->add_intvalue(maxCount);
 
     // copy argument count
     GLMessage_DataType *arg_count = glmsg.add_args();
@@ -2199,7 +2198,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetAttachedShaders(program, maxcount, count, shaders);
+    glContext->hooks->gl.glGetAttachedShaders(program, maxCount, count, shaders);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -2214,7 +2213,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) {
+GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2257,7 +2256,7 @@
     return retValue;
 }
 
-void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params) {
+void GLTrace_glGetBooleanv(GLenum pname, GLboolean * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2269,21 +2268,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetBooleanv(pname, params);
+    glContext->hooks->gl.glGetBooleanv(pname, data);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) data,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -2292,7 +2291,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
+void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2363,7 +2362,7 @@
     return retValue;
 }
 
-void GLTrace_glGetFloatv(GLenum pname, GLfloat* params) {
+void GLTrace_glGetFloatv(GLenum pname, GLfloat * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2375,21 +2374,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetFloatv(pname, params);
+    glContext->hooks->gl.glGetFloatv(pname, data);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) data,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -2398,7 +2397,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
+void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2445,7 +2444,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetIntegerv(GLenum pname, GLint* params) {
+void GLTrace_glGetIntegerv(GLenum pname, GLint * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2457,21 +2456,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetIntegerv(pname, params);
+    glContext->hooks->gl.glGetIntegerv(pname, data);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) data,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -2480,7 +2479,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
+void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2521,7 +2520,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
+void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2533,11 +2532,11 @@
     arg_program->set_type(GLMessage::DataType::INT);
     arg_program->add_intvalue(program);
 
-    // copy argument bufsize
-    GLMessage_DataType *arg_bufsize = glmsg.add_args();
-    arg_bufsize->set_isarray(false);
-    arg_bufsize->set_type(GLMessage::DataType::INT);
-    arg_bufsize->add_intvalue(bufsize);
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -2545,22 +2544,22 @@
     arg_length->set_type(GLMessage::DataType::INT64);
     arg_length->add_int64value((uintptr_t)length);
 
-    // copy argument infolog
-    GLMessage_DataType *arg_infolog = glmsg.add_args();
-    arg_infolog->set_isarray(false);
-    arg_infolog->set_type(GLMessage::DataType::INT64);
-    arg_infolog->add_int64value((uintptr_t)infolog);
+    // copy argument infoLog
+    GLMessage_DataType *arg_infoLog = glmsg.add_args();
+    arg_infoLog->set_isarray(false);
+    arg_infoLog->set_type(GLMessage::DataType::INT64);
+    arg_infoLog->add_int64value((uintptr_t)infoLog);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetProgramInfoLog(program, bufsize, length, infolog);
+    glContext->hooks->gl.glGetProgramInfoLog(program, bufSize, length, infoLog);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
         (void *) length,
-        (void *) infolog,
+        (void *) infoLog,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -2569,7 +2568,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
+void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2610,7 +2609,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
+void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2651,7 +2650,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
+void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2663,11 +2662,11 @@
     arg_shader->set_type(GLMessage::DataType::INT);
     arg_shader->add_intvalue(shader);
 
-    // copy argument bufsize
-    GLMessage_DataType *arg_bufsize = glmsg.add_args();
-    arg_bufsize->set_isarray(false);
-    arg_bufsize->set_type(GLMessage::DataType::INT);
-    arg_bufsize->add_intvalue(bufsize);
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -2675,22 +2674,22 @@
     arg_length->set_type(GLMessage::DataType::INT64);
     arg_length->add_int64value((uintptr_t)length);
 
-    // copy argument infolog
-    GLMessage_DataType *arg_infolog = glmsg.add_args();
-    arg_infolog->set_isarray(false);
-    arg_infolog->set_type(GLMessage::DataType::INT64);
-    arg_infolog->add_int64value((uintptr_t)infolog);
+    // copy argument infoLog
+    GLMessage_DataType *arg_infoLog = glmsg.add_args();
+    arg_infoLog->set_isarray(false);
+    arg_infoLog->set_type(GLMessage::DataType::INT64);
+    arg_infoLog->add_int64value((uintptr_t)infoLog);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetShaderInfoLog(shader, bufsize, length, infolog);
+    glContext->hooks->gl.glGetShaderInfoLog(shader, bufSize, length, infoLog);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
         (void *) length,
-        (void *) infolog,
+        (void *) infoLog,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -2699,7 +2698,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
+void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2747,7 +2746,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
+void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2759,11 +2758,11 @@
     arg_shader->set_type(GLMessage::DataType::INT);
     arg_shader->add_intvalue(shader);
 
-    // copy argument bufsize
-    GLMessage_DataType *arg_bufsize = glmsg.add_args();
-    arg_bufsize->set_isarray(false);
-    arg_bufsize->set_type(GLMessage::DataType::INT);
-    arg_bufsize->add_intvalue(bufsize);
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
 
     // copy argument length
     GLMessage_DataType *arg_length = glmsg.add_args();
@@ -2780,7 +2779,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetShaderSource(shader, bufsize, length, source);
+    glContext->hooks->gl.glGetShaderSource(shader, bufSize, length, source);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -2795,7 +2794,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-const GLubyte* GLTrace_glGetString(GLenum name) {
+const GLubyte * GLTrace_glGetString(GLenum name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2810,7 +2809,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    const GLubyte* retValue = glContext->hooks->gl.glGetString(name);
+    const GLubyte * retValue = glContext->hooks->gl.glGetString(name);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -2832,7 +2831,7 @@
     return retValue;
 }
 
-void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
+void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2873,7 +2872,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
+void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2914,7 +2913,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
+void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2955,7 +2954,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params) {
+void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -2996,7 +2995,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) {
+GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -3039,7 +3038,7 @@
     return retValue;
 }
 
-void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
+void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -3080,7 +3079,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
+void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -3121,7 +3120,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) {
+void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, void ** pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -3572,7 +3571,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
+void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -3785,17 +3784,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
+void GLTrace_glShaderBinary(GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glShaderBinary);
 
-    // copy argument n
-    GLMessage_DataType *arg_n = glmsg.add_args();
-    arg_n->set_isarray(false);
-    arg_n->set_type(GLMessage::DataType::INT);
-    arg_n->add_intvalue(n);
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
 
     // copy argument shaders
     GLMessage_DataType *arg_shaders = glmsg.add_args();
@@ -3824,7 +3823,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glShaderBinary(n, shaders, binaryformat, binary, length);
+    glContext->hooks->gl.glShaderBinary(count, shaders, binaryformat, binary, length);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -3839,7 +3838,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) {
+void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4075,7 +4074,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
+void GLTrace_glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4087,28 +4086,28 @@
     arg_face->set_type(GLMessage::DataType::ENUM);
     arg_face->add_intvalue((int)face);
 
-    // copy argument fail
-    GLMessage_DataType *arg_fail = glmsg.add_args();
-    arg_fail->set_isarray(false);
-    arg_fail->set_type(GLMessage::DataType::ENUM);
-    arg_fail->add_intvalue((int)fail);
+    // copy argument sfail
+    GLMessage_DataType *arg_sfail = glmsg.add_args();
+    arg_sfail->set_isarray(false);
+    arg_sfail->set_type(GLMessage::DataType::ENUM);
+    arg_sfail->add_intvalue((int)sfail);
 
-    // copy argument zfail
-    GLMessage_DataType *arg_zfail = glmsg.add_args();
-    arg_zfail->set_isarray(false);
-    arg_zfail->set_type(GLMessage::DataType::ENUM);
-    arg_zfail->add_intvalue((int)zfail);
+    // copy argument dpfail
+    GLMessage_DataType *arg_dpfail = glmsg.add_args();
+    arg_dpfail->set_isarray(false);
+    arg_dpfail->set_type(GLMessage::DataType::ENUM);
+    arg_dpfail->add_intvalue((int)dpfail);
 
-    // copy argument zpass
-    GLMessage_DataType *arg_zpass = glmsg.add_args();
-    arg_zpass->set_isarray(false);
-    arg_zpass->set_type(GLMessage::DataType::ENUM);
-    arg_zpass->add_intvalue((int)zpass);
+    // copy argument dppass
+    GLMessage_DataType *arg_dppass = glmsg.add_args();
+    arg_dppass->set_isarray(false);
+    arg_dppass->set_type(GLMessage::DataType::ENUM);
+    arg_dppass->add_intvalue((int)dppass);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glStencilOpSeparate(face, fail, zfail, zpass);
+    glContext->hooks->gl.glStencilOpSeparate(face, sfail, dpfail, dppass);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4121,7 +4120,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4238,7 +4237,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
+void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4319,7 +4318,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
+void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4360,7 +4359,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
+void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4437,7 +4436,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform1f(GLint location, GLfloat x) {
+void GLTrace_glUniform1f(GLint location, GLfloat v0) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4449,16 +4448,16 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform1f(location, x);
+    glContext->hooks->gl.glUniform1f(location, v0);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4471,7 +4470,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
+void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4489,21 +4488,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform1fv(location, count, v);
+    glContext->hooks->gl.glUniform1fv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -4512,7 +4511,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform1i(GLint location, GLint x) {
+void GLTrace_glUniform1i(GLint location, GLint v0) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4524,16 +4523,16 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform1i(location, x);
+    glContext->hooks->gl.glUniform1i(location, v0);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4546,7 +4545,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v) {
+void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4564,21 +4563,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform1iv(location, count, v);
+    glContext->hooks->gl.glUniform1iv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -4587,7 +4586,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y) {
+void GLTrace_glUniform2f(GLint location, GLfloat v0, GLfloat v1) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4599,22 +4598,22 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
 
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::FLOAT);
-    arg_y->add_floatvalue(y);
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform2f(location, x, y);
+    glContext->hooks->gl.glUniform2f(location, v0, v1);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4627,7 +4626,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
+void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4645,21 +4644,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform2fv(location, count, v);
+    glContext->hooks->gl.glUniform2fv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -4668,7 +4667,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform2i(GLint location, GLint x, GLint y) {
+void GLTrace_glUniform2i(GLint location, GLint v0, GLint v1) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4680,22 +4679,22 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
 
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::INT);
-    arg_y->add_intvalue(y);
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform2i(location, x, y);
+    glContext->hooks->gl.glUniform2i(location, v0, v1);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4708,7 +4707,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v) {
+void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4726,21 +4725,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform2iv(location, count, v);
+    glContext->hooks->gl.glUniform2iv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -4749,7 +4748,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
+void GLTrace_glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4761,28 +4760,28 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
 
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::FLOAT);
-    arg_y->add_floatvalue(y);
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
 
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::FLOAT);
-    arg_z->add_floatvalue(z);
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::FLOAT);
+    arg_v2->add_floatvalue(v2);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform3f(location, x, y, z);
+    glContext->hooks->gl.glUniform3f(location, v0, v1, v2);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4795,7 +4794,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
+void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4813,21 +4812,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform3fv(location, count, v);
+    glContext->hooks->gl.glUniform3fv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -4836,7 +4835,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
+void GLTrace_glUniform3i(GLint location, GLint v0, GLint v1, GLint v2) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4848,28 +4847,28 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
 
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::INT);
-    arg_y->add_intvalue(y);
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
 
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::INT);
-    arg_z->add_intvalue(z);
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform3i(location, x, y, z);
+    glContext->hooks->gl.glUniform3i(location, v0, v1, v2);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4882,7 +4881,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v) {
+void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4900,21 +4899,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform3iv(location, count, v);
+    glContext->hooks->gl.glUniform3iv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -4923,7 +4922,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+void GLTrace_glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4935,34 +4934,34 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
 
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::FLOAT);
-    arg_y->add_floatvalue(y);
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
 
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::FLOAT);
-    arg_z->add_floatvalue(z);
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::FLOAT);
+    arg_v2->add_floatvalue(v2);
 
-    // copy argument w
-    GLMessage_DataType *arg_w = glmsg.add_args();
-    arg_w->set_isarray(false);
-    arg_w->set_type(GLMessage::DataType::FLOAT);
-    arg_w->add_floatvalue(w);
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::FLOAT);
+    arg_v3->add_floatvalue(v3);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform4f(location, x, y, z, w);
+    glContext->hooks->gl.glUniform4f(location, v0, v1, v2, v3);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -4975,7 +4974,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
+void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -4993,21 +4992,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform4fv(location, count, v);
+    glContext->hooks->gl.glUniform4fv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5016,7 +5015,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
+void GLTrace_glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5028,34 +5027,34 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
 
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::INT);
-    arg_y->add_intvalue(y);
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
 
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::INT);
-    arg_z->add_intvalue(z);
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
 
-    // copy argument w
-    GLMessage_DataType *arg_w = glmsg.add_args();
-    arg_w->set_isarray(false);
-    arg_w->set_type(GLMessage::DataType::INT);
-    arg_w->add_intvalue(w);
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::INT);
+    arg_v3->add_intvalue(v3);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform4i(location, x, y, z, w);
+    glContext->hooks->gl.glUniform4i(location, v0, v1, v2, v3);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -5068,7 +5067,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v) {
+void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5086,21 +5085,21 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument v
-    GLMessage_DataType *arg_v = glmsg.add_args();
-    arg_v->set_isarray(false);
-    arg_v->set_type(GLMessage::DataType::INT64);
-    arg_v->add_int64value((uintptr_t)v);
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUniform4iv(location, count, v);
+    glContext->hooks->gl.glUniform4iv(location, count, value);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) v,
+        (void *) value,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5109,7 +5108,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5156,7 +5155,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5203,7 +5202,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5306,17 +5305,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x) {
+void GLTrace_glVertexAttrib1f(GLuint index, GLfloat x) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib1f);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
     // copy argument x
     GLMessage_DataType *arg_x = glmsg.add_args();
@@ -5327,7 +5326,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib1f(indx, x);
+    glContext->hooks->gl.glVertexAttrib1f(index, x);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -5340,33 +5339,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
+void GLTrace_glVertexAttrib1fv(GLuint index, const GLfloat * v) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib1fv);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
-    // copy argument values
-    GLMessage_DataType *arg_values = glmsg.add_args();
-    arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT64);
-    arg_values->add_int64value((uintptr_t)values);
+    // copy argument v
+    GLMessage_DataType *arg_v = glmsg.add_args();
+    arg_v->set_isarray(false);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib1fv(indx, values);
+    glContext->hooks->gl.glVertexAttrib1fv(index, v);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) values,
+        (void *) v,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5375,17 +5374,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
+void GLTrace_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib2f);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
     // copy argument x
     GLMessage_DataType *arg_x = glmsg.add_args();
@@ -5402,7 +5401,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib2f(indx, x, y);
+    glContext->hooks->gl.glVertexAttrib2f(index, x, y);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -5415,33 +5414,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
+void GLTrace_glVertexAttrib2fv(GLuint index, const GLfloat * v) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib2fv);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
-    // copy argument values
-    GLMessage_DataType *arg_values = glmsg.add_args();
-    arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT64);
-    arg_values->add_int64value((uintptr_t)values);
+    // copy argument v
+    GLMessage_DataType *arg_v = glmsg.add_args();
+    arg_v->set_isarray(false);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib2fv(indx, values);
+    glContext->hooks->gl.glVertexAttrib2fv(index, v);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) values,
+        (void *) v,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5450,17 +5449,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
+void GLTrace_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib3f);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
     // copy argument x
     GLMessage_DataType *arg_x = glmsg.add_args();
@@ -5483,7 +5482,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib3f(indx, x, y, z);
+    glContext->hooks->gl.glVertexAttrib3f(index, x, y, z);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -5496,33 +5495,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
+void GLTrace_glVertexAttrib3fv(GLuint index, const GLfloat * v) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib3fv);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
-    // copy argument values
-    GLMessage_DataType *arg_values = glmsg.add_args();
-    arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT64);
-    arg_values->add_int64value((uintptr_t)values);
+    // copy argument v
+    GLMessage_DataType *arg_v = glmsg.add_args();
+    arg_v->set_isarray(false);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib3fv(indx, values);
+    glContext->hooks->gl.glVertexAttrib3fv(index, v);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) values,
+        (void *) v,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5531,17 +5530,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+void GLTrace_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib4f);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
     // copy argument x
     GLMessage_DataType *arg_x = glmsg.add_args();
@@ -5570,7 +5569,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib4f(indx, x, y, z, w);
+    glContext->hooks->gl.glVertexAttrib4f(index, x, y, z, w);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -5583,33 +5582,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
+void GLTrace_glVertexAttrib4fv(GLuint index, const GLfloat * v) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttrib4fv);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
-    // copy argument values
-    GLMessage_DataType *arg_values = glmsg.add_args();
-    arg_values->set_isarray(false);
-    arg_values->set_type(GLMessage::DataType::INT64);
-    arg_values->add_int64value((uintptr_t)values);
+    // copy argument v
+    GLMessage_DataType *arg_v = glmsg.add_args();
+    arg_v->set_isarray(false);
+    arg_v->set_type(GLMessage::DataType::INT64);
+    arg_v->add_int64value((uintptr_t)v);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttrib4fv(indx, values);
+    glContext->hooks->gl.glVertexAttrib4fv(index, v);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) values,
+        (void *) v,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5618,17 +5617,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
+void GLTrace_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glVertexAttribPointer);
 
-    // copy argument indx
-    GLMessage_DataType *arg_indx = glmsg.add_args();
-    arg_indx->set_isarray(false);
-    arg_indx->set_type(GLMessage::DataType::INT);
-    arg_indx->add_intvalue(indx);
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
 
     // copy argument size
     GLMessage_DataType *arg_size = glmsg.add_args();
@@ -5654,21 +5653,21 @@
     arg_stride->set_type(GLMessage::DataType::INT);
     arg_stride->add_intvalue(stride);
 
-    // copy argument ptr
-    GLMessage_DataType *arg_ptr = glmsg.add_args();
-    arg_ptr->set_isarray(false);
-    arg_ptr->set_type(GLMessage::DataType::INT64);
-    arg_ptr->add_int64value((uintptr_t)ptr);
+    // copy argument pointer
+    GLMessage_DataType *arg_pointer = glmsg.add_args();
+    arg_pointer->set_isarray(false);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
+    glContext->hooks->gl.glVertexAttribPointer(index, size, type, normalized, stride, pointer);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) ptr,
+        (void *) pointer,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -5751,7 +5750,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) {
+void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5810,7 +5809,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -5893,7 +5892,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
+void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6058,7 +6057,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
+void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6135,7 +6134,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
+void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6224,7 +6223,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenQueries(GLsizei n, GLuint* ids) {
+void GLTrace_glGenQueries(GLsizei n, GLuint * ids) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6259,7 +6258,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteQueries(GLsizei n, const GLuint* ids) {
+void GLTrace_glDeleteQueries(GLsizei n, const GLuint * ids) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6392,7 +6391,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint* params) {
+void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6433,7 +6432,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) {
+void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6510,7 +6509,7 @@
     return retValue;
 }
 
-void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) {
+void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, void ** params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6551,7 +6550,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawBuffers(GLsizei n, const GLenum* bufs) {
+void GLTrace_glDrawBuffers(GLsizei n, const GLenum * bufs) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6586,7 +6585,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6633,7 +6632,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6680,7 +6679,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6727,7 +6726,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6774,7 +6773,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -6821,7 +6820,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
+void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7054,7 +7053,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLvoid* GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
+void * GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7087,7 +7086,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    GLvoid* retValue = glContext->hooks->gl.glMapBufferRange(target, offset, length, access);
+    void * retValue = glContext->hooks->gl.glMapBufferRange(target, offset, length, access);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -7177,7 +7176,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) {
+void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint * arrays) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7212,7 +7211,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenVertexArrays(GLsizei n, GLuint* arrays) {
+void GLTrace_glGenVertexArrays(GLsizei n, GLuint * arrays) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7283,7 +7282,7 @@
     return retValue;
 }
 
-void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) {
+void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7466,7 +7465,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) {
+void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7513,7 +7512,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) {
+void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7581,7 +7580,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) {
+void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7634,7 +7633,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) {
+void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7675,7 +7674,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) {
+void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7820,7 +7819,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttribI4iv(GLuint index, const GLint* v) {
+void GLTrace_glVertexAttribI4iv(GLuint index, const GLint * v) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7855,7 +7854,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint* v) {
+void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint * v) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7890,7 +7889,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint* params) {
+void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -7931,7 +7930,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar *name) {
+GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar * name) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8146,7 +8145,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint* value) {
+void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8187,7 +8186,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint* value) {
+void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8228,7 +8227,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint* value) {
+void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8269,7 +8268,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint* value) {
+void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8310,7 +8309,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) {
+void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8351,7 +8350,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) {
+void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8392,7 +8391,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) {
+void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8479,7 +8478,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-const GLubyte* GLTrace_glGetStringi(GLenum name, GLuint index) {
+const GLubyte * GLTrace_glGetStringi(GLenum name, GLuint index) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8500,7 +8499,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    const GLubyte* retValue = glContext->hooks->gl.glGetStringi(name, index);
+    const GLubyte * retValue = glContext->hooks->gl.glGetStringi(name, index);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -8574,7 +8573,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) {
+void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8622,7 +8621,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) {
+void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8676,7 +8675,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) {
+GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar * uniformBlockName) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8719,7 +8718,7 @@
     return retValue;
 }
 
-void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) {
+void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8766,7 +8765,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) {
+void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8860,7 +8859,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) {
+void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8884,16 +8883,16 @@
     arg_count->set_type(GLMessage::DataType::INT);
     arg_count->add_intvalue(count);
 
-    // copy argument instanceCount
-    GLMessage_DataType *arg_instanceCount = glmsg.add_args();
-    arg_instanceCount->set_isarray(false);
-    arg_instanceCount->set_type(GLMessage::DataType::INT);
-    arg_instanceCount->add_intvalue(instanceCount);
+    // copy argument instancecount
+    GLMessage_DataType *arg_instancecount = glmsg.add_args();
+    arg_instancecount->set_isarray(false);
+    arg_instancecount->set_type(GLMessage::DataType::INT);
+    arg_instancecount->add_intvalue(instancecount);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glDrawArraysInstanced(mode, first, count, instanceCount);
+    glContext->hooks->gl.glDrawArraysInstanced(mode, first, count, instancecount);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -8906,7 +8905,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) {
+void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -8936,16 +8935,16 @@
     arg_indices->set_type(GLMessage::DataType::INT64);
     arg_indices->add_int64value((uintptr_t)indices);
 
-    // copy argument instanceCount
-    GLMessage_DataType *arg_instanceCount = glmsg.add_args();
-    arg_instanceCount->set_isarray(false);
-    arg_instanceCount->set_type(GLMessage::DataType::INT);
-    arg_instanceCount->add_intvalue(instanceCount);
+    // copy argument instancecount
+    GLMessage_DataType *arg_instancecount = glmsg.add_args();
+    arg_instancecount->set_isarray(false);
+    arg_instancecount->set_type(GLMessage::DataType::INT);
+    arg_instancecount->add_intvalue(instancecount);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glDrawElementsInstanced(mode, count, type, indices, instanceCount);
+    glContext->hooks->gl.glDrawElementsInstanced(mode, count, type, indices, instancecount);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -9158,7 +9157,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetInteger64v(GLenum pname, GLint64* params) {
+void GLTrace_glGetInteger64v(GLenum pname, GLint64 * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9170,21 +9169,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetInteger64v(pname, params);
+    glContext->hooks->gl.glGetInteger64v(pname, data);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) data,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -9193,7 +9192,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) {
+void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9248,7 +9247,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) {
+void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64 * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9289,7 +9288,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) {
+void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9330,7 +9329,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenSamplers(GLsizei count, GLuint* samplers) {
+void GLTrace_glGenSamplers(GLsizei count, GLuint * samplers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9365,7 +9364,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteSamplers(GLsizei count, const GLuint* samplers) {
+void GLTrace_glDeleteSamplers(GLsizei count, const GLuint * samplers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9510,7 +9509,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) {
+void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9591,7 +9590,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) {
+void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9632,7 +9631,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) {
+void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9673,7 +9672,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) {
+void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9782,7 +9781,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) {
+void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint * ids) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9817,7 +9816,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint* ids) {
+void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint * ids) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9932,7 +9931,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) {
+void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -9987,7 +9986,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) {
+void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10074,7 +10073,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) {
+void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10115,7 +10114,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) {
+void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10290,7 +10289,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) {
+void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10343,9 +10342,3671 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDispatchCompute);
+
+    // copy argument num_groups_x
+    GLMessage_DataType *arg_num_groups_x = glmsg.add_args();
+    arg_num_groups_x->set_isarray(false);
+    arg_num_groups_x->set_type(GLMessage::DataType::INT);
+    arg_num_groups_x->add_intvalue(num_groups_x);
+
+    // copy argument num_groups_y
+    GLMessage_DataType *arg_num_groups_y = glmsg.add_args();
+    arg_num_groups_y->set_isarray(false);
+    arg_num_groups_y->set_type(GLMessage::DataType::INT);
+    arg_num_groups_y->add_intvalue(num_groups_y);
+
+    // copy argument num_groups_z
+    GLMessage_DataType *arg_num_groups_z = glmsg.add_args();
+    arg_num_groups_z->set_isarray(false);
+    arg_num_groups_z->set_type(GLMessage::DataType::INT);
+    arg_num_groups_z->add_intvalue(num_groups_z);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDispatchComputeIndirect(GLintptr indirect) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDispatchComputeIndirect);
+
+    // copy argument indirect
+    GLMessage_DataType *arg_indirect = glmsg.add_args();
+    arg_indirect->set_isarray(false);
+    arg_indirect->set_type(GLMessage::DataType::INT);
+    arg_indirect->add_intvalue(indirect);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDispatchComputeIndirect(indirect);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawArraysIndirect(GLenum mode, const void * indirect) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawArraysIndirect);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument indirect
+    GLMessage_DataType *arg_indirect = glmsg.add_args();
+    arg_indirect->set_isarray(false);
+    arg_indirect->set_type(GLMessage::DataType::INT64);
+    arg_indirect->add_int64value((uintptr_t)indirect);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawArraysIndirect(mode, indirect);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) indirect,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawElementsIndirect(GLenum mode, GLenum type, const void * indirect) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawElementsIndirect);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument indirect
+    GLMessage_DataType *arg_indirect = glmsg.add_args();
+    arg_indirect->set_isarray(false);
+    arg_indirect->set_type(GLMessage::DataType::INT64);
+    arg_indirect->add_int64value((uintptr_t)indirect);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawElementsIndirect(mode, type, indirect);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) indirect,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glFramebufferParameteri);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT);
+    arg_param->add_intvalue(param);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glFramebufferParameteri(target, pname, param);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetFramebufferParameteriv);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetFramebufferParameteriv(target, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramInterfaceiv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument programInterface
+    GLMessage_DataType *arg_programInterface = glmsg.add_args();
+    arg_programInterface->set_isarray(false);
+    arg_programInterface->set_type(GLMessage::DataType::ENUM);
+    arg_programInterface->add_intvalue((int)programInterface);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramInterfaceiv(program, programInterface, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLuint GLTrace_glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar * name) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramResourceIndex);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument programInterface
+    GLMessage_DataType *arg_programInterface = glmsg.add_args();
+    arg_programInterface->set_isarray(false);
+    arg_programInterface->set_type(GLMessage::DataType::ENUM);
+    arg_programInterface->add_intvalue((int)programInterface);
+
+    // copy argument name
+    GLMessage_DataType *arg_name = glmsg.add_args();
+    arg_name->set_isarray(false);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLuint retValue = glContext->hooks->gl.glGetProgramResourceIndex(program, programInterface, name);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::INT);
+    rt->add_intvalue(retValue);
+
+    void *pointerArgs[] = {
+        (void *) name,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramResourceName);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument programInterface
+    GLMessage_DataType *arg_programInterface = glmsg.add_args();
+    arg_programInterface->set_isarray(false);
+    arg_programInterface->set_type(GLMessage::DataType::ENUM);
+    arg_programInterface->add_intvalue((int)programInterface);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument name
+    GLMessage_DataType *arg_name = glmsg.add_args();
+    arg_name->set_isarray(false);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramResourceName(program, programInterface, index, bufSize, length, name);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) length,
+        (void *) name,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramResourceiv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument programInterface
+    GLMessage_DataType *arg_programInterface = glmsg.add_args();
+    arg_programInterface->set_isarray(false);
+    arg_programInterface->set_type(GLMessage::DataType::ENUM);
+    arg_programInterface->add_intvalue((int)programInterface);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument propCount
+    GLMessage_DataType *arg_propCount = glmsg.add_args();
+    arg_propCount->set_isarray(false);
+    arg_propCount->set_type(GLMessage::DataType::INT);
+    arg_propCount->add_intvalue(propCount);
+
+    // copy argument props
+    GLMessage_DataType *arg_props = glmsg.add_args();
+    arg_props->set_isarray(false);
+    arg_props->set_type(GLMessage::DataType::INT64);
+    arg_props->add_int64value((uintptr_t)props);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) props,
+        (void *) length,
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLint GLTrace_glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar * name) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramResourceLocation);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument programInterface
+    GLMessage_DataType *arg_programInterface = glmsg.add_args();
+    arg_programInterface->set_isarray(false);
+    arg_programInterface->set_type(GLMessage::DataType::ENUM);
+    arg_programInterface->add_intvalue((int)programInterface);
+
+    // copy argument name
+    GLMessage_DataType *arg_name = glmsg.add_args();
+    arg_name->set_isarray(false);
+    arg_name->set_type(GLMessage::DataType::INT64);
+    arg_name->add_int64value((uintptr_t)name);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLint retValue = glContext->hooks->gl.glGetProgramResourceLocation(program, programInterface, name);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::INT);
+    rt->add_intvalue(retValue);
+
+    void *pointerArgs[] = {
+        (void *) name,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUseProgramStages);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument stages
+    GLMessage_DataType *arg_stages = glmsg.add_args();
+    arg_stages->set_isarray(false);
+    arg_stages->set_type(GLMessage::DataType::INT);
+    arg_stages->add_intvalue(stages);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUseProgramStages(pipeline, stages, program);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glActiveShaderProgram(GLuint pipeline, GLuint program) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glActiveShaderProgram);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glActiveShaderProgram(pipeline, program);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLuint GLTrace_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const* strings) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glCreateShaderProgramv);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument strings
+    GLMessage_DataType *arg_strings = glmsg.add_args();
+    arg_strings->set_isarray(false);
+    arg_strings->set_type(GLMessage::DataType::INT64);
+    arg_strings->add_int64value((uintptr_t)strings);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLuint retValue = glContext->hooks->gl.glCreateShaderProgramv(type, count, strings);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::INT);
+    rt->add_intvalue(retValue);
+
+    void *pointerArgs[] = {
+        (void *) strings,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glBindProgramPipeline(GLuint pipeline) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBindProgramPipeline);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBindProgramPipeline(pipeline);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteProgramPipelines(GLsizei n, const GLuint * pipelines) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDeleteProgramPipelines);
+
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
+
+    // copy argument pipelines
+    GLMessage_DataType *arg_pipelines = glmsg.add_args();
+    arg_pipelines->set_isarray(false);
+    arg_pipelines->set_type(GLMessage::DataType::INT64);
+    arg_pipelines->add_int64value((uintptr_t)pipelines);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDeleteProgramPipelines(n, pipelines);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) pipelines,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenProgramPipelines(GLsizei n, GLuint * pipelines) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGenProgramPipelines);
+
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
+
+    // copy argument pipelines
+    GLMessage_DataType *arg_pipelines = glmsg.add_args();
+    arg_pipelines->set_isarray(false);
+    arg_pipelines->set_type(GLMessage::DataType::INT64);
+    arg_pipelines->add_int64value((uintptr_t)pipelines);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGenProgramPipelines(n, pipelines);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) pipelines,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsProgramPipeline(GLuint pipeline) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glIsProgramPipeline);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLboolean retValue = glContext->hooks->gl.glIsProgramPipeline(pipeline);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::BOOL);
+    rt->add_boolvalue(retValue);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramPipelineiv);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramPipelineiv(pipeline, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1i(GLuint program, GLint location, GLint v0) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1i);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1i(program, location, v0);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2i);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2i(program, location, v0, v1);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3i);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3i(program, location, v0, v1, v2);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4i);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::INT);
+    arg_v3->add_intvalue(v3);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4i(program, location, v0, v1, v2, v3);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1ui(GLuint program, GLint location, GLuint v0) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1ui);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1ui(program, location, v0);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2ui);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2ui(program, location, v0, v1);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3ui);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3ui(program, location, v0, v1, v2);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4ui);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::INT);
+    arg_v3->add_intvalue(v3);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4ui(program, location, v0, v1, v2, v3);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1f(GLuint program, GLint location, GLfloat v0) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1f);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1f(program, location, v0);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2f);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2f(program, location, v0, v1);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3f);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::FLOAT);
+    arg_v2->add_floatvalue(v2);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3f(program, location, v0, v1, v2);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4f);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::FLOAT);
+    arg_v2->add_floatvalue(v2);
+
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::FLOAT);
+    arg_v3->add_floatvalue(v3);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4f(program, location, v0, v1, v2, v3);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1iv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1iv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2iv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2iv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3iv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3iv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4iv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4iv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1uiv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1uiv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2uiv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2uiv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3uiv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3uiv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4uiv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4uiv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1fv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2fv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3fv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4fv(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix2fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix2fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix3fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix3fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix4fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix4fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix2x3fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix2x3fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix3x2fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix3x2fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix2x4fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix2x4fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix4x2fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix4x2fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix3x4fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix3x4fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix4x3fv);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix4x3fv(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glValidateProgramPipeline(GLuint pipeline) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glValidateProgramPipeline);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glValidateProgramPipeline(pipeline);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramPipelineInfoLog);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument infoLog
+    GLMessage_DataType *arg_infoLog = glmsg.add_args();
+    arg_infoLog->set_isarray(false);
+    arg_infoLog->set_type(GLMessage::DataType::INT64);
+    arg_infoLog->add_int64value((uintptr_t)infoLog);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) length,
+        (void *) infoLog,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBindImageTexture);
+
+    // copy argument unit
+    GLMessage_DataType *arg_unit = glmsg.add_args();
+    arg_unit->set_isarray(false);
+    arg_unit->set_type(GLMessage::DataType::INT);
+    arg_unit->add_intvalue(unit);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::INT);
+    arg_texture->add_intvalue(texture);
+
+    // copy argument level
+    GLMessage_DataType *arg_level = glmsg.add_args();
+    arg_level->set_isarray(false);
+    arg_level->set_type(GLMessage::DataType::INT);
+    arg_level->add_intvalue(level);
+
+    // copy argument layered
+    GLMessage_DataType *arg_layered = glmsg.add_args();
+    arg_layered->set_isarray(false);
+    arg_layered->set_type(GLMessage::DataType::BOOL);
+    arg_layered->add_boolvalue(layered);
+
+    // copy argument layer
+    GLMessage_DataType *arg_layer = glmsg.add_args();
+    arg_layer->set_isarray(false);
+    arg_layer->set_type(GLMessage::DataType::INT);
+    arg_layer->add_intvalue(layer);
+
+    // copy argument access
+    GLMessage_DataType *arg_access = glmsg.add_args();
+    arg_access->set_isarray(false);
+    arg_access->set_type(GLMessage::DataType::ENUM);
+    arg_access->add_intvalue((int)access);
+
+    // copy argument format
+    GLMessage_DataType *arg_format = glmsg.add_args();
+    arg_format->set_isarray(false);
+    arg_format->set_type(GLMessage::DataType::ENUM);
+    arg_format->add_intvalue((int)format);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBindImageTexture(unit, texture, level, layered, layer, access, format);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetBooleani_v(GLenum target, GLuint index, GLboolean * data) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetBooleani_v);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetBooleani_v(target, index, data);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) data,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMemoryBarrier(GLbitfield barriers) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMemoryBarrier);
+
+    // copy argument barriers
+    GLMessage_DataType *arg_barriers = glmsg.add_args();
+    arg_barriers->set_isarray(false);
+    arg_barriers->set_type(GLMessage::DataType::INT);
+    arg_barriers->add_intvalue(barriers);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMemoryBarrier(barriers);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMemoryBarrierByRegion(GLbitfield barriers) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMemoryBarrierByRegion);
+
+    // copy argument barriers
+    GLMessage_DataType *arg_barriers = glmsg.add_args();
+    arg_barriers->set_isarray(false);
+    arg_barriers->set_type(GLMessage::DataType::INT);
+    arg_barriers->add_intvalue(barriers);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMemoryBarrierByRegion(barriers);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexStorage2DMultisample);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument samples
+    GLMessage_DataType *arg_samples = glmsg.add_args();
+    arg_samples->set_isarray(false);
+    arg_samples->set_type(GLMessage::DataType::INT);
+    arg_samples->add_intvalue(samples);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument width
+    GLMessage_DataType *arg_width = glmsg.add_args();
+    arg_width->set_isarray(false);
+    arg_width->set_type(GLMessage::DataType::INT);
+    arg_width->add_intvalue(width);
+
+    // copy argument height
+    GLMessage_DataType *arg_height = glmsg.add_args();
+    arg_height->set_isarray(false);
+    arg_height->set_type(GLMessage::DataType::INT);
+    arg_height->add_intvalue(height);
+
+    // copy argument fixedsamplelocations
+    GLMessage_DataType *arg_fixedsamplelocations = glmsg.add_args();
+    arg_fixedsamplelocations->set_isarray(false);
+    arg_fixedsamplelocations->set_type(GLMessage::DataType::BOOL);
+    arg_fixedsamplelocations->add_boolvalue(fixedsamplelocations);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetMultisamplefv(GLenum pname, GLuint index, GLfloat * val) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetMultisamplefv);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument val
+    GLMessage_DataType *arg_val = glmsg.add_args();
+    arg_val->set_isarray(false);
+    arg_val->set_type(GLMessage::DataType::INT64);
+    arg_val->add_int64value((uintptr_t)val);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetMultisamplefv(pname, index, val);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) val,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSampleMaski(GLuint maskNumber, GLbitfield mask) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glSampleMaski);
+
+    // copy argument maskNumber
+    GLMessage_DataType *arg_maskNumber = glmsg.add_args();
+    arg_maskNumber->set_isarray(false);
+    arg_maskNumber->set_type(GLMessage::DataType::INT);
+    arg_maskNumber->add_intvalue(maskNumber);
+
+    // copy argument mask
+    GLMessage_DataType *arg_mask = glmsg.add_args();
+    arg_mask->set_isarray(false);
+    arg_mask->set_type(GLMessage::DataType::INT);
+    arg_mask->add_intvalue(mask);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glSampleMaski(maskNumber, mask);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetTexLevelParameteriv);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument level
+    GLMessage_DataType *arg_level = glmsg.add_args();
+    arg_level->set_isarray(false);
+    arg_level->set_type(GLMessage::DataType::INT);
+    arg_level->add_intvalue(level);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetTexLevelParameteriv(target, level, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetTexLevelParameterfv);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument level
+    GLMessage_DataType *arg_level = glmsg.add_args();
+    arg_level->set_isarray(false);
+    arg_level->set_type(GLMessage::DataType::INT);
+    arg_level->add_intvalue(level);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetTexLevelParameterfv(target, level, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBindVertexBuffer);
+
+    // copy argument bindingindex
+    GLMessage_DataType *arg_bindingindex = glmsg.add_args();
+    arg_bindingindex->set_isarray(false);
+    arg_bindingindex->set_type(GLMessage::DataType::INT);
+    arg_bindingindex->add_intvalue(bindingindex);
+
+    // copy argument buffer
+    GLMessage_DataType *arg_buffer = glmsg.add_args();
+    arg_buffer->set_isarray(false);
+    arg_buffer->set_type(GLMessage::DataType::INT);
+    arg_buffer->add_intvalue(buffer);
+
+    // copy argument offset
+    GLMessage_DataType *arg_offset = glmsg.add_args();
+    arg_offset->set_isarray(false);
+    arg_offset->set_type(GLMessage::DataType::INT);
+    arg_offset->add_intvalue(offset);
+
+    // copy argument stride
+    GLMessage_DataType *arg_stride = glmsg.add_args();
+    arg_stride->set_isarray(false);
+    arg_stride->set_type(GLMessage::DataType::INT);
+    arg_stride->add_intvalue(stride);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBindVertexBuffer(bindingindex, buffer, offset, stride);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexAttribFormat);
+
+    // copy argument attribindex
+    GLMessage_DataType *arg_attribindex = glmsg.add_args();
+    arg_attribindex->set_isarray(false);
+    arg_attribindex->set_type(GLMessage::DataType::INT);
+    arg_attribindex->add_intvalue(attribindex);
+
+    // copy argument size
+    GLMessage_DataType *arg_size = glmsg.add_args();
+    arg_size->set_isarray(false);
+    arg_size->set_type(GLMessage::DataType::INT);
+    arg_size->add_intvalue(size);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument normalized
+    GLMessage_DataType *arg_normalized = glmsg.add_args();
+    arg_normalized->set_isarray(false);
+    arg_normalized->set_type(GLMessage::DataType::BOOL);
+    arg_normalized->add_boolvalue(normalized);
+
+    // copy argument relativeoffset
+    GLMessage_DataType *arg_relativeoffset = glmsg.add_args();
+    arg_relativeoffset->set_isarray(false);
+    arg_relativeoffset->set_type(GLMessage::DataType::INT);
+    arg_relativeoffset->add_intvalue(relativeoffset);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexAttribIFormat);
+
+    // copy argument attribindex
+    GLMessage_DataType *arg_attribindex = glmsg.add_args();
+    arg_attribindex->set_isarray(false);
+    arg_attribindex->set_type(GLMessage::DataType::INT);
+    arg_attribindex->add_intvalue(attribindex);
+
+    // copy argument size
+    GLMessage_DataType *arg_size = glmsg.add_args();
+    arg_size->set_isarray(false);
+    arg_size->set_type(GLMessage::DataType::INT);
+    arg_size->add_intvalue(size);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument relativeoffset
+    GLMessage_DataType *arg_relativeoffset = glmsg.add_args();
+    arg_relativeoffset->set_isarray(false);
+    arg_relativeoffset->set_type(GLMessage::DataType::INT);
+    arg_relativeoffset->add_intvalue(relativeoffset);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexAttribIFormat(attribindex, size, type, relativeoffset);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribBinding(GLuint attribindex, GLuint bindingindex) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexAttribBinding);
+
+    // copy argument attribindex
+    GLMessage_DataType *arg_attribindex = glmsg.add_args();
+    arg_attribindex->set_isarray(false);
+    arg_attribindex->set_type(GLMessage::DataType::INT);
+    arg_attribindex->add_intvalue(attribindex);
+
+    // copy argument bindingindex
+    GLMessage_DataType *arg_bindingindex = glmsg.add_args();
+    arg_bindingindex->set_isarray(false);
+    arg_bindingindex->set_type(GLMessage::DataType::INT);
+    arg_bindingindex->add_intvalue(bindingindex);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexAttribBinding(attribindex, bindingindex);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexBindingDivisor);
+
+    // copy argument bindingindex
+    GLMessage_DataType *arg_bindingindex = glmsg.add_args();
+    arg_bindingindex->set_isarray(false);
+    arg_bindingindex->set_type(GLMessage::DataType::INT);
+    arg_bindingindex->add_intvalue(bindingindex);
+
+    // copy argument divisor
+    GLMessage_DataType *arg_divisor = glmsg.add_args();
+    arg_divisor->set_isarray(false);
+    arg_divisor->set_type(GLMessage::DataType::INT);
+    arg_divisor->add_intvalue(divisor);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexBindingDivisor(bindingindex, divisor);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 
 // Definitions for GL2Ext APIs
 
+void GLTrace_glBlendBarrierKHR(void) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendBarrierKHR);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendBarrierKHR();
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDebugMessageControlKHR(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDebugMessageControlKHR);
+
+    // copy argument source
+    GLMessage_DataType *arg_source = glmsg.add_args();
+    arg_source->set_isarray(false);
+    arg_source->set_type(GLMessage::DataType::ENUM);
+    arg_source->add_intvalue((int)source);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument severity
+    GLMessage_DataType *arg_severity = glmsg.add_args();
+    arg_severity->set_isarray(false);
+    arg_severity->set_type(GLMessage::DataType::ENUM);
+    arg_severity->add_intvalue((int)severity);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument ids
+    GLMessage_DataType *arg_ids = glmsg.add_args();
+    arg_ids->set_isarray(false);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
+
+    // copy argument enabled
+    GLMessage_DataType *arg_enabled = glmsg.add_args();
+    arg_enabled->set_isarray(false);
+    arg_enabled->set_type(GLMessage::DataType::BOOL);
+    arg_enabled->add_boolvalue(enabled);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDebugMessageControlKHR(source, type, severity, count, ids, enabled);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) ids,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDebugMessageInsertKHR);
+
+    // copy argument source
+    GLMessage_DataType *arg_source = glmsg.add_args();
+    arg_source->set_isarray(false);
+    arg_source->set_type(GLMessage::DataType::ENUM);
+    arg_source->add_intvalue((int)source);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument id
+    GLMessage_DataType *arg_id = glmsg.add_args();
+    arg_id->set_isarray(false);
+    arg_id->set_type(GLMessage::DataType::INT);
+    arg_id->add_intvalue(id);
+
+    // copy argument severity
+    GLMessage_DataType *arg_severity = glmsg.add_args();
+    arg_severity->set_isarray(false);
+    arg_severity->set_type(GLMessage::DataType::ENUM);
+    arg_severity->add_intvalue((int)severity);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT);
+    arg_length->add_intvalue(length);
+
+    // copy argument buf
+    GLMessage_DataType *arg_buf = glmsg.add_args();
+    arg_buf->set_isarray(false);
+    arg_buf->set_type(GLMessage::DataType::INT64);
+    arg_buf->add_int64value((uintptr_t)buf);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDebugMessageInsertKHR(source, type, id, severity, length, buf);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) buf,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void * userParam) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDebugMessageCallbackKHR);
+
+    // copy argument callback
+    GLMessage_DataType *arg_callback = glmsg.add_args();
+    arg_callback->set_isarray(false);
+    arg_callback->set_type(GLMessage::DataType::INT64);
+    arg_callback->add_int64value((uintptr_t)callback);
+
+    // copy argument userParam
+    GLMessage_DataType *arg_userParam = glmsg.add_args();
+    arg_userParam->set_isarray(false);
+    arg_userParam->set_type(GLMessage::DataType::INT64);
+    arg_userParam->add_int64value((uintptr_t)userParam);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDebugMessageCallbackKHR(callback, userParam);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) callback,
+        (void *) userParam,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLuint GLTrace_glGetDebugMessageLogKHR(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetDebugMessageLogKHR);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument sources
+    GLMessage_DataType *arg_sources = glmsg.add_args();
+    arg_sources->set_isarray(false);
+    arg_sources->set_type(GLMessage::DataType::INT64);
+    arg_sources->add_int64value((uintptr_t)sources);
+
+    // copy argument types
+    GLMessage_DataType *arg_types = glmsg.add_args();
+    arg_types->set_isarray(false);
+    arg_types->set_type(GLMessage::DataType::INT64);
+    arg_types->add_int64value((uintptr_t)types);
+
+    // copy argument ids
+    GLMessage_DataType *arg_ids = glmsg.add_args();
+    arg_ids->set_isarray(false);
+    arg_ids->set_type(GLMessage::DataType::INT64);
+    arg_ids->add_int64value((uintptr_t)ids);
+
+    // copy argument severities
+    GLMessage_DataType *arg_severities = glmsg.add_args();
+    arg_severities->set_isarray(false);
+    arg_severities->set_type(GLMessage::DataType::INT64);
+    arg_severities->add_int64value((uintptr_t)severities);
+
+    // copy argument lengths
+    GLMessage_DataType *arg_lengths = glmsg.add_args();
+    arg_lengths->set_isarray(false);
+    arg_lengths->set_type(GLMessage::DataType::INT64);
+    arg_lengths->add_int64value((uintptr_t)lengths);
+
+    // copy argument messageLog
+    GLMessage_DataType *arg_messageLog = glmsg.add_args();
+    arg_messageLog->set_isarray(false);
+    arg_messageLog->set_type(GLMessage::DataType::INT64);
+    arg_messageLog->add_int64value((uintptr_t)messageLog);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLuint retValue = glContext->hooks->gl.glGetDebugMessageLogKHR(count, bufSize, sources, types, ids, severities, lengths, messageLog);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::INT);
+    rt->add_intvalue(retValue);
+
+    void *pointerArgs[] = {
+        (void *) sources,
+        (void *) types,
+        (void *) ids,
+        (void *) severities,
+        (void *) lengths,
+        (void *) messageLog,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glPushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar * message) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glPushDebugGroupKHR);
+
+    // copy argument source
+    GLMessage_DataType *arg_source = glmsg.add_args();
+    arg_source->set_isarray(false);
+    arg_source->set_type(GLMessage::DataType::ENUM);
+    arg_source->add_intvalue((int)source);
+
+    // copy argument id
+    GLMessage_DataType *arg_id = glmsg.add_args();
+    arg_id->set_isarray(false);
+    arg_id->set_type(GLMessage::DataType::INT);
+    arg_id->add_intvalue(id);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT);
+    arg_length->add_intvalue(length);
+
+    // copy argument message
+    GLMessage_DataType *arg_message = glmsg.add_args();
+    arg_message->set_isarray(false);
+    arg_message->set_type(GLMessage::DataType::INT64);
+    arg_message->add_int64value((uintptr_t)message);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glPushDebugGroupKHR(source, id, length, message);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) message,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPopDebugGroupKHR(void) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glPopDebugGroupKHR);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glPopDebugGroupKHR();
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar * label) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glObjectLabelKHR);
+
+    // copy argument identifier
+    GLMessage_DataType *arg_identifier = glmsg.add_args();
+    arg_identifier->set_isarray(false);
+    arg_identifier->set_type(GLMessage::DataType::ENUM);
+    arg_identifier->add_intvalue((int)identifier);
+
+    // copy argument name
+    GLMessage_DataType *arg_name = glmsg.add_args();
+    arg_name->set_isarray(false);
+    arg_name->set_type(GLMessage::DataType::INT);
+    arg_name->add_intvalue(name);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT);
+    arg_length->add_intvalue(length);
+
+    // copy argument label
+    GLMessage_DataType *arg_label = glmsg.add_args();
+    arg_label->set_isarray(false);
+    arg_label->set_type(GLMessage::DataType::INT64);
+    arg_label->add_int64value((uintptr_t)label);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glObjectLabelKHR(identifier, name, length, label);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) label,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetObjectLabelKHR);
+
+    // copy argument identifier
+    GLMessage_DataType *arg_identifier = glmsg.add_args();
+    arg_identifier->set_isarray(false);
+    arg_identifier->set_type(GLMessage::DataType::ENUM);
+    arg_identifier->add_intvalue((int)identifier);
+
+    // copy argument name
+    GLMessage_DataType *arg_name = glmsg.add_args();
+    arg_name->set_isarray(false);
+    arg_name->set_type(GLMessage::DataType::INT);
+    arg_name->add_intvalue(name);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument label
+    GLMessage_DataType *arg_label = glmsg.add_args();
+    arg_label->set_isarray(false);
+    arg_label->set_type(GLMessage::DataType::INT64);
+    arg_label->add_int64value((uintptr_t)label);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetObjectLabelKHR(identifier, name, bufSize, length, label);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) length,
+        (void *) label,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glObjectPtrLabelKHR(const void * ptr, GLsizei length, const GLchar * label) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glObjectPtrLabelKHR);
+
+    // copy argument ptr
+    GLMessage_DataType *arg_ptr = glmsg.add_args();
+    arg_ptr->set_isarray(false);
+    arg_ptr->set_type(GLMessage::DataType::INT64);
+    arg_ptr->add_int64value((uintptr_t)ptr);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT);
+    arg_length->add_intvalue(length);
+
+    // copy argument label
+    GLMessage_DataType *arg_label = glmsg.add_args();
+    arg_label->set_isarray(false);
+    arg_label->set_type(GLMessage::DataType::INT64);
+    arg_label->add_int64value((uintptr_t)label);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glObjectPtrLabelKHR(ptr, length, label);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) ptr,
+        (void *) label,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetObjectPtrLabelKHR(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetObjectPtrLabelKHR);
+
+    // copy argument ptr
+    GLMessage_DataType *arg_ptr = glmsg.add_args();
+    arg_ptr->set_isarray(false);
+    arg_ptr->set_type(GLMessage::DataType::INT64);
+    arg_ptr->add_int64value((uintptr_t)ptr);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument label
+    GLMessage_DataType *arg_label = glmsg.add_args();
+    arg_label->set_isarray(false);
+    arg_label->set_type(GLMessage::DataType::INT64);
+    arg_label->add_int64value((uintptr_t)label);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetObjectPtrLabelKHR(ptr, bufSize, length, label);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) ptr,
+        (void *) length,
+        (void *) label,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPointervKHR(GLenum pname, void ** params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetPointervKHR);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetPointervKHR(pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -10416,7 +14077,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
+void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10471,7 +14132,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
+void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void * binary, GLint length) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10518,7 +14179,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void* GLTrace_glMapBufferOES(GLenum target, GLenum access) {
+void * GLTrace_glMapBufferOES(GLenum target, GLenum access) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10539,7 +14200,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    void* retValue = glContext->hooks->gl.glMapBufferOES(target, access);
+    void * retValue = glContext->hooks->gl.glMapBufferOES(target, access);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -10597,7 +14258,7 @@
     return retValue;
 }
 
-void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params) {
+void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, void ** params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10638,7 +14299,35 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
+void GLTrace_glMinSampleShadingOES(GLfloat value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMinSampleShadingOES);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::FLOAT);
+    arg_value->add_floatvalue(value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMinSampleShadingOES(value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10721,7 +14410,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
+void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10886,7 +14575,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
+void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -10963,7 +14652,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
+void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11110,6 +14799,70 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glTexStorage3DMultisampleOES(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexStorage3DMultisampleOES);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument samples
+    GLMessage_DataType *arg_samples = glmsg.add_args();
+    arg_samples->set_isarray(false);
+    arg_samples->set_type(GLMessage::DataType::INT);
+    arg_samples->add_intvalue(samples);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument width
+    GLMessage_DataType *arg_width = glmsg.add_args();
+    arg_width->set_isarray(false);
+    arg_width->set_type(GLMessage::DataType::INT);
+    arg_width->add_intvalue(width);
+
+    // copy argument height
+    GLMessage_DataType *arg_height = glmsg.add_args();
+    arg_height->set_isarray(false);
+    arg_height->set_type(GLMessage::DataType::INT);
+    arg_height->add_intvalue(height);
+
+    // copy argument depth
+    GLMessage_DataType *arg_depth = glmsg.add_args();
+    arg_depth->set_isarray(false);
+    arg_depth->set_type(GLMessage::DataType::INT);
+    arg_depth->add_intvalue(depth);
+
+    // copy argument fixedsamplelocations
+    GLMessage_DataType *arg_fixedsamplelocations = glmsg.add_args();
+    arg_fixedsamplelocations->set_isarray(false);
+    arg_fixedsamplelocations->set_type(GLMessage::DataType::BOOL);
+    arg_fixedsamplelocations->add_boolvalue(fixedsamplelocations);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexStorage3DMultisampleOES(target, samples, internalformat, width, height, depth, fixedsamplelocations);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glBindVertexArrayOES(GLuint array) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -11138,7 +14891,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) {
+void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint * arrays) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11173,7 +14926,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays) {
+void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint * arrays) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11244,7 +14997,7 @@
     return retValue;
 }
 
-void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
+void GLTrace_glGetPerfMonitorGroupsAMD(GLint * numGroups, GLsizei groupsSize, GLuint * groups) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11286,7 +15039,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
+void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11341,7 +15094,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
+void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11389,7 +15142,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
+void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11443,7 +15196,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
+void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11490,7 +15243,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors) {
+void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint * monitors) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11525,7 +15278,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors) {
+void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint * monitors) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11560,7 +15313,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
+void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11590,21 +15343,21 @@
     arg_numCounters->set_type(GLMessage::DataType::INT);
     arg_numCounters->add_intvalue(numCounters);
 
-    // copy argument countersList
-    GLMessage_DataType *arg_countersList = glmsg.add_args();
-    arg_countersList->set_isarray(false);
-    arg_countersList->set_type(GLMessage::DataType::INT64);
-    arg_countersList->add_int64value((uintptr_t)countersList);
+    // copy argument counterList
+    GLMessage_DataType *arg_counterList = glmsg.add_args();
+    arg_counterList->set_isarray(false);
+    arg_counterList->set_type(GLMessage::DataType::INT64);
+    arg_counterList->add_int64value((uintptr_t)counterList);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, countersList);
+    glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) countersList,
+        (void *) counterList,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -11669,7 +15422,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
+void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11857,6 +15610,233 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawArraysInstancedANGLE);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument first
+    GLMessage_DataType *arg_first = glmsg.add_args();
+    arg_first->set_isarray(false);
+    arg_first->set_type(GLMessage::DataType::INT);
+    arg_first->add_intvalue(first);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawArraysInstancedANGLE(mode, first, count, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawElementsInstancedANGLE);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument indices
+    GLMessage_DataType *arg_indices = glmsg.add_args();
+    arg_indices->set_isarray(false);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawElementsInstancedANGLE(mode, count, type, indices, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) indices,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexAttribDivisorANGLE);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument divisor
+    GLMessage_DataType *arg_divisor = glmsg.add_args();
+    arg_divisor->set_isarray(false);
+    arg_divisor->set_type(GLMessage::DataType::INT);
+    arg_divisor->add_intvalue(divisor);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexAttribDivisorANGLE(index, divisor);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetTranslatedShaderSourceANGLE);
+
+    // copy argument shader
+    GLMessage_DataType *arg_shader = glmsg.add_args();
+    arg_shader->set_isarray(false);
+    arg_shader->set_type(GLMessage::DataType::INT);
+    arg_shader->add_intvalue(shader);
+
+    // copy argument bufsize
+    GLMessage_DataType *arg_bufsize = glmsg.add_args();
+    arg_bufsize->set_isarray(false);
+    arg_bufsize->set_type(GLMessage::DataType::INT);
+    arg_bufsize->add_intvalue(bufsize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument source
+    GLMessage_DataType *arg_source = glmsg.add_args();
+    arg_source->set_isarray(false);
+    arg_source->set_type(GLMessage::DataType::INT64);
+    arg_source->add_int64value((uintptr_t)source);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetTranslatedShaderSourceANGLE(shader, bufsize, length, source);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) length,
+        (void *) source,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCopyTextureLevelsAPPLE(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glCopyTextureLevelsAPPLE);
+
+    // copy argument destinationTexture
+    GLMessage_DataType *arg_destinationTexture = glmsg.add_args();
+    arg_destinationTexture->set_isarray(false);
+    arg_destinationTexture->set_type(GLMessage::DataType::INT);
+    arg_destinationTexture->add_intvalue(destinationTexture);
+
+    // copy argument sourceTexture
+    GLMessage_DataType *arg_sourceTexture = glmsg.add_args();
+    arg_sourceTexture->set_isarray(false);
+    arg_sourceTexture->set_type(GLMessage::DataType::INT);
+    arg_sourceTexture->add_intvalue(sourceTexture);
+
+    // copy argument sourceBaseLevel
+    GLMessage_DataType *arg_sourceBaseLevel = glmsg.add_args();
+    arg_sourceBaseLevel->set_isarray(false);
+    arg_sourceBaseLevel->set_type(GLMessage::DataType::INT);
+    arg_sourceBaseLevel->add_intvalue(sourceBaseLevel);
+
+    // copy argument sourceLevelCount
+    GLMessage_DataType *arg_sourceLevelCount = glmsg.add_args();
+    arg_sourceLevelCount->set_isarray(false);
+    arg_sourceLevelCount->set_type(GLMessage::DataType::INT);
+    arg_sourceLevelCount->add_intvalue(sourceLevelCount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glCopyTextureLevelsAPPLE(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -11931,7 +15911,408 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
+GLsync GLTrace_glFenceSyncAPPLE(GLenum condition, GLbitfield flags) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glFenceSyncAPPLE);
+
+    // copy argument condition
+    GLMessage_DataType *arg_condition = glmsg.add_args();
+    arg_condition->set_isarray(false);
+    arg_condition->set_type(GLMessage::DataType::ENUM);
+    arg_condition->add_intvalue((int)condition);
+
+    // copy argument flags
+    GLMessage_DataType *arg_flags = glmsg.add_args();
+    arg_flags->set_isarray(false);
+    arg_flags->set_type(GLMessage::DataType::INT);
+    arg_flags->add_intvalue(flags);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLsync retValue = glContext->hooks->gl.glFenceSyncAPPLE(condition, flags);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
+
+    void *pointerArgs[] = {
+        (void *) retValue,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+GLboolean GLTrace_glIsSyncAPPLE(GLsync sync) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glIsSyncAPPLE);
+
+    // copy argument sync
+    GLMessage_DataType *arg_sync = glmsg.add_args();
+    arg_sync->set_isarray(false);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLboolean retValue = glContext->hooks->gl.glIsSyncAPPLE(sync);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::BOOL);
+    rt->add_boolvalue(retValue);
+
+    void *pointerArgs[] = {
+        (void *) sync,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glDeleteSyncAPPLE(GLsync sync) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDeleteSyncAPPLE);
+
+    // copy argument sync
+    GLMessage_DataType *arg_sync = glmsg.add_args();
+    arg_sync->set_isarray(false);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDeleteSyncAPPLE(sync);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) sync,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLenum GLTrace_glClientWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glClientWaitSyncAPPLE);
+
+    // copy argument sync
+    GLMessage_DataType *arg_sync = glmsg.add_args();
+    arg_sync->set_isarray(false);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
+
+    // copy argument flags
+    GLMessage_DataType *arg_flags = glmsg.add_args();
+    arg_flags->set_isarray(false);
+    arg_flags->set_type(GLMessage::DataType::INT);
+    arg_flags->add_intvalue(flags);
+
+    // copy argument timeout
+    GLMessage_DataType *arg_timeout = glmsg.add_args();
+    arg_timeout->set_isarray(false);
+    arg_timeout->set_type(GLMessage::DataType::INT64);
+    arg_timeout->add_int64value(timeout);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLenum retValue = glContext->hooks->gl.glClientWaitSyncAPPLE(sync, flags, timeout);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::ENUM);
+    rt->add_intvalue((int)retValue);
+
+    void *pointerArgs[] = {
+        (void *) sync,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glWaitSyncAPPLE);
+
+    // copy argument sync
+    GLMessage_DataType *arg_sync = glmsg.add_args();
+    arg_sync->set_isarray(false);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
+
+    // copy argument flags
+    GLMessage_DataType *arg_flags = glmsg.add_args();
+    arg_flags->set_isarray(false);
+    arg_flags->set_type(GLMessage::DataType::INT);
+    arg_flags->add_intvalue(flags);
+
+    // copy argument timeout
+    GLMessage_DataType *arg_timeout = glmsg.add_args();
+    arg_timeout->set_isarray(false);
+    arg_timeout->set_type(GLMessage::DataType::INT64);
+    arg_timeout->add_int64value(timeout);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glWaitSyncAPPLE(sync, flags, timeout);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) sync,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetInteger64vAPPLE(GLenum pname, GLint64 * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetInteger64vAPPLE);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetInteger64vAPPLE(pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetSyncivAPPLE(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetSyncivAPPLE);
+
+    // copy argument sync
+    GLMessage_DataType *arg_sync = glmsg.add_args();
+    arg_sync->set_isarray(false);
+    arg_sync->set_type(GLMessage::DataType::INT64);
+    arg_sync->add_int64value((uintptr_t)sync);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument values
+    GLMessage_DataType *arg_values = glmsg.add_args();
+    arg_values->set_isarray(false);
+    arg_values->set_type(GLMessage::DataType::INT64);
+    arg_values->add_int64value((uintptr_t)values);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetSyncivAPPLE(sync, pname, bufSize, length, values);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) sync,
+        (void *) length,
+        (void *) values,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCopyImageSubDataEXT(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glCopyImageSubDataEXT);
+
+    // copy argument srcName
+    GLMessage_DataType *arg_srcName = glmsg.add_args();
+    arg_srcName->set_isarray(false);
+    arg_srcName->set_type(GLMessage::DataType::INT);
+    arg_srcName->add_intvalue(srcName);
+
+    // copy argument srcTarget
+    GLMessage_DataType *arg_srcTarget = glmsg.add_args();
+    arg_srcTarget->set_isarray(false);
+    arg_srcTarget->set_type(GLMessage::DataType::ENUM);
+    arg_srcTarget->add_intvalue((int)srcTarget);
+
+    // copy argument srcLevel
+    GLMessage_DataType *arg_srcLevel = glmsg.add_args();
+    arg_srcLevel->set_isarray(false);
+    arg_srcLevel->set_type(GLMessage::DataType::INT);
+    arg_srcLevel->add_intvalue(srcLevel);
+
+    // copy argument srcX
+    GLMessage_DataType *arg_srcX = glmsg.add_args();
+    arg_srcX->set_isarray(false);
+    arg_srcX->set_type(GLMessage::DataType::INT);
+    arg_srcX->add_intvalue(srcX);
+
+    // copy argument srcY
+    GLMessage_DataType *arg_srcY = glmsg.add_args();
+    arg_srcY->set_isarray(false);
+    arg_srcY->set_type(GLMessage::DataType::INT);
+    arg_srcY->add_intvalue(srcY);
+
+    // copy argument srcZ
+    GLMessage_DataType *arg_srcZ = glmsg.add_args();
+    arg_srcZ->set_isarray(false);
+    arg_srcZ->set_type(GLMessage::DataType::INT);
+    arg_srcZ->add_intvalue(srcZ);
+
+    // copy argument dstName
+    GLMessage_DataType *arg_dstName = glmsg.add_args();
+    arg_dstName->set_isarray(false);
+    arg_dstName->set_type(GLMessage::DataType::INT);
+    arg_dstName->add_intvalue(dstName);
+
+    // copy argument dstTarget
+    GLMessage_DataType *arg_dstTarget = glmsg.add_args();
+    arg_dstTarget->set_isarray(false);
+    arg_dstTarget->set_type(GLMessage::DataType::ENUM);
+    arg_dstTarget->add_intvalue((int)dstTarget);
+
+    // copy argument dstLevel
+    GLMessage_DataType *arg_dstLevel = glmsg.add_args();
+    arg_dstLevel->set_isarray(false);
+    arg_dstLevel->set_type(GLMessage::DataType::INT);
+    arg_dstLevel->add_intvalue(dstLevel);
+
+    // copy argument dstX
+    GLMessage_DataType *arg_dstX = glmsg.add_args();
+    arg_dstX->set_isarray(false);
+    arg_dstX->set_type(GLMessage::DataType::INT);
+    arg_dstX->add_intvalue(dstX);
+
+    // copy argument dstY
+    GLMessage_DataType *arg_dstY = glmsg.add_args();
+    arg_dstY->set_isarray(false);
+    arg_dstY->set_type(GLMessage::DataType::INT);
+    arg_dstY->add_intvalue(dstY);
+
+    // copy argument dstZ
+    GLMessage_DataType *arg_dstZ = glmsg.add_args();
+    arg_dstZ->set_isarray(false);
+    arg_dstZ->set_type(GLMessage::DataType::INT);
+    arg_dstZ->add_intvalue(dstZ);
+
+    // copy argument srcWidth
+    GLMessage_DataType *arg_srcWidth = glmsg.add_args();
+    arg_srcWidth->set_isarray(false);
+    arg_srcWidth->set_type(GLMessage::DataType::INT);
+    arg_srcWidth->add_intvalue(srcWidth);
+
+    // copy argument srcHeight
+    GLMessage_DataType *arg_srcHeight = glmsg.add_args();
+    arg_srcHeight->set_isarray(false);
+    arg_srcHeight->set_type(GLMessage::DataType::INT);
+    arg_srcHeight->add_intvalue(srcHeight);
+
+    // copy argument srcDepth
+    GLMessage_DataType *arg_srcDepth = glmsg.add_args();
+    arg_srcDepth->set_isarray(false);
+    arg_srcDepth->set_type(GLMessage::DataType::INT);
+    arg_srcDepth->add_intvalue(srcDepth);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glCopyImageSubDataEXT(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar * label) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -11978,7 +16359,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
+void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12032,7 +16413,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) {
+void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar * marker) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12067,7 +16448,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) {
+void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar * marker) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12124,7 +16505,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
+void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum * attachments) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12165,219 +16546,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT);
-
-    // copy argument target
-    GLMessage_DataType *arg_target = glmsg.add_args();
-    arg_target->set_isarray(false);
-    arg_target->set_type(GLMessage::DataType::ENUM);
-    arg_target->add_intvalue((int)target);
-
-    // copy argument samples
-    GLMessage_DataType *arg_samples = glmsg.add_args();
-    arg_samples->set_isarray(false);
-    arg_samples->set_type(GLMessage::DataType::INT);
-    arg_samples->add_intvalue(samples);
-
-    // copy argument internalformat
-    GLMessage_DataType *arg_internalformat = glmsg.add_args();
-    arg_internalformat->set_isarray(false);
-    arg_internalformat->set_type(GLMessage::DataType::ENUM);
-    arg_internalformat->add_intvalue((int)internalformat);
-
-    // copy argument width
-    GLMessage_DataType *arg_width = glmsg.add_args();
-    arg_width->set_isarray(false);
-    arg_width->set_type(GLMessage::DataType::INT);
-    arg_width->add_intvalue(width);
-
-    // copy argument height
-    GLMessage_DataType *arg_height = glmsg.add_args();
-    arg_height->set_isarray(false);
-    arg_height->set_type(GLMessage::DataType::INT);
-    arg_height->add_intvalue(height);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT);
-
-    // copy argument target
-    GLMessage_DataType *arg_target = glmsg.add_args();
-    arg_target->set_isarray(false);
-    arg_target->set_type(GLMessage::DataType::ENUM);
-    arg_target->add_intvalue((int)target);
-
-    // copy argument attachment
-    GLMessage_DataType *arg_attachment = glmsg.add_args();
-    arg_attachment->set_isarray(false);
-    arg_attachment->set_type(GLMessage::DataType::ENUM);
-    arg_attachment->add_intvalue((int)attachment);
-
-    // copy argument textarget
-    GLMessage_DataType *arg_textarget = glmsg.add_args();
-    arg_textarget->set_isarray(false);
-    arg_textarget->set_type(GLMessage::DataType::ENUM);
-    arg_textarget->add_intvalue((int)textarget);
-
-    // copy argument texture
-    GLMessage_DataType *arg_texture = glmsg.add_args();
-    arg_texture->set_isarray(false);
-    arg_texture->set_type(GLMessage::DataType::INT);
-    arg_texture->add_intvalue(texture);
-
-    // copy argument level
-    GLMessage_DataType *arg_level = glmsg.add_args();
-    arg_level->set_isarray(false);
-    arg_level->set_type(GLMessage::DataType::INT);
-    arg_level->add_intvalue(level);
-
-    // copy argument samples
-    GLMessage_DataType *arg_samples = glmsg.add_args();
-    arg_samples->set_isarray(false);
-    arg_samples->set_type(GLMessage::DataType::INT);
-    arg_samples->add_intvalue(samples);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glMultiDrawArraysEXT);
-
-    // copy argument mode
-    GLMessage_DataType *arg_mode = glmsg.add_args();
-    arg_mode->set_isarray(false);
-    arg_mode->set_type(GLMessage::DataType::ENUM);
-    arg_mode->add_intvalue((int)mode);
-
-    // copy argument first
-    GLMessage_DataType *arg_first = glmsg.add_args();
-    arg_first->set_isarray(false);
-    arg_first->set_type(GLMessage::DataType::INT64);
-    arg_first->add_int64value((uintptr_t)first);
-
-    // copy argument count
-    GLMessage_DataType *arg_count = glmsg.add_args();
-    arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT64);
-    arg_count->add_int64value((uintptr_t)count);
-
-    // copy argument primcount
-    GLMessage_DataType *arg_primcount = glmsg.add_args();
-    arg_primcount->set_isarray(false);
-    arg_primcount->set_type(GLMessage::DataType::INT);
-    arg_primcount->add_intvalue(primcount);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) first,
-        (void *) count,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glMultiDrawElementsEXT);
-
-    // copy argument mode
-    GLMessage_DataType *arg_mode = glmsg.add_args();
-    arg_mode->set_isarray(false);
-    arg_mode->set_type(GLMessage::DataType::ENUM);
-    arg_mode->add_intvalue((int)mode);
-
-    // copy argument count
-    GLMessage_DataType *arg_count = glmsg.add_args();
-    arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT64);
-    arg_count->add_int64value((uintptr_t)count);
-
-    // copy argument type
-    GLMessage_DataType *arg_type = glmsg.add_args();
-    arg_type->set_isarray(false);
-    arg_type->set_type(GLMessage::DataType::ENUM);
-    arg_type->add_intvalue((int)type);
-
-    // copy argument indices
-    GLMessage_DataType *arg_indices = glmsg.add_args();
-    arg_indices->set_isarray(false);
-    arg_indices->set_type(GLMessage::DataType::INT64);
-    arg_indices->add_int64value((uintptr_t)indices);
-
-    // copy argument primcount
-    GLMessage_DataType *arg_primcount = glmsg.add_args();
-    arg_primcount->set_isarray(false);
-    arg_primcount->set_type(GLMessage::DataType::INT);
-    arg_primcount->add_intvalue(primcount);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) count,
-        (void *) indices,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids) {
+void GLTrace_glGenQueriesEXT(GLsizei n, GLuint * ids) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12412,7 +16581,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) {
+void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint * ids) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12545,7 +16714,41 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) {
+void GLTrace_glQueryCounterEXT(GLuint id, GLenum target) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glQueryCounterEXT);
+
+    // copy argument id
+    GLMessage_DataType *arg_id = glmsg.add_args();
+    arg_id->set_isarray(false);
+    arg_id->set_type(GLMessage::DataType::INT);
+    arg_id->add_intvalue(id);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glQueryCounterEXT(id, target);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12586,7 +16789,48 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) {
+void GLTrace_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetQueryObjectivEXT);
+
+    // copy argument id
+    GLMessage_DataType *arg_id = glmsg.add_args();
+    arg_id->set_isarray(false);
+    arg_id->set_type(GLMessage::DataType::INT);
+    arg_id->add_intvalue(id);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetQueryObjectivEXT(id, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12627,6 +16871,1124 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetQueryObjecti64vEXT);
+
+    // copy argument id
+    GLMessage_DataType *arg_id = glmsg.add_args();
+    arg_id->set_isarray(false);
+    arg_id->set_type(GLMessage::DataType::INT);
+    arg_id->add_intvalue(id);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetQueryObjecti64vEXT(id, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetQueryObjectui64vEXT);
+
+    // copy argument id
+    GLMessage_DataType *arg_id = glmsg.add_args();
+    arg_id->set_isarray(false);
+    arg_id->set_type(GLMessage::DataType::INT);
+    arg_id->add_intvalue(id);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetQueryObjectui64vEXT(id, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawBuffersEXT(GLsizei n, const GLenum * bufs) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawBuffersEXT);
+
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
+
+    // copy argument bufs
+    GLMessage_DataType *arg_bufs = glmsg.add_args();
+    arg_bufs->set_isarray(false);
+    arg_bufs->set_type(GLMessage::DataType::INT64);
+    arg_bufs->add_int64value((uintptr_t)bufs);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawBuffersEXT(n, bufs);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) bufs,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEnableiEXT(GLenum target, GLuint index) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glEnableiEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glEnableiEXT(target, index);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDisableiEXT(GLenum target, GLuint index) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDisableiEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDisableiEXT(target, index);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendEquationiEXT(GLuint buf, GLenum mode) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendEquationiEXT);
+
+    // copy argument buf
+    GLMessage_DataType *arg_buf = glmsg.add_args();
+    arg_buf->set_isarray(false);
+    arg_buf->set_type(GLMessage::DataType::INT);
+    arg_buf->add_intvalue(buf);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendEquationiEXT(buf, mode);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendEquationSeparateiEXT(GLuint buf, GLenum modeRGB, GLenum modeAlpha) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendEquationSeparateiEXT);
+
+    // copy argument buf
+    GLMessage_DataType *arg_buf = glmsg.add_args();
+    arg_buf->set_isarray(false);
+    arg_buf->set_type(GLMessage::DataType::INT);
+    arg_buf->add_intvalue(buf);
+
+    // copy argument modeRGB
+    GLMessage_DataType *arg_modeRGB = glmsg.add_args();
+    arg_modeRGB->set_isarray(false);
+    arg_modeRGB->set_type(GLMessage::DataType::ENUM);
+    arg_modeRGB->add_intvalue((int)modeRGB);
+
+    // copy argument modeAlpha
+    GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
+    arg_modeAlpha->set_isarray(false);
+    arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
+    arg_modeAlpha->add_intvalue((int)modeAlpha);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendEquationSeparateiEXT(buf, modeRGB, modeAlpha);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendFunciEXT(GLuint buf, GLenum src, GLenum dst) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendFunciEXT);
+
+    // copy argument buf
+    GLMessage_DataType *arg_buf = glmsg.add_args();
+    arg_buf->set_isarray(false);
+    arg_buf->set_type(GLMessage::DataType::INT);
+    arg_buf->add_intvalue(buf);
+
+    // copy argument src
+    GLMessage_DataType *arg_src = glmsg.add_args();
+    arg_src->set_isarray(false);
+    arg_src->set_type(GLMessage::DataType::ENUM);
+    arg_src->add_intvalue((int)src);
+
+    // copy argument dst
+    GLMessage_DataType *arg_dst = glmsg.add_args();
+    arg_dst->set_isarray(false);
+    arg_dst->set_type(GLMessage::DataType::ENUM);
+    arg_dst->add_intvalue((int)dst);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendFunciEXT(buf, src, dst);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendFuncSeparateiEXT);
+
+    // copy argument buf
+    GLMessage_DataType *arg_buf = glmsg.add_args();
+    arg_buf->set_isarray(false);
+    arg_buf->set_type(GLMessage::DataType::INT);
+    arg_buf->add_intvalue(buf);
+
+    // copy argument srcRGB
+    GLMessage_DataType *arg_srcRGB = glmsg.add_args();
+    arg_srcRGB->set_isarray(false);
+    arg_srcRGB->set_type(GLMessage::DataType::ENUM);
+    arg_srcRGB->add_intvalue((int)srcRGB);
+
+    // copy argument dstRGB
+    GLMessage_DataType *arg_dstRGB = glmsg.add_args();
+    arg_dstRGB->set_isarray(false);
+    arg_dstRGB->set_type(GLMessage::DataType::ENUM);
+    arg_dstRGB->add_intvalue((int)dstRGB);
+
+    // copy argument srcAlpha
+    GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
+    arg_srcAlpha->set_isarray(false);
+    arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
+    arg_srcAlpha->add_intvalue((int)srcAlpha);
+
+    // copy argument dstAlpha
+    GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
+    arg_dstAlpha->set_isarray(false);
+    arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
+    arg_dstAlpha->add_intvalue((int)dstAlpha);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendFuncSeparateiEXT(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glColorMaskiEXT);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::BOOL);
+    arg_r->add_boolvalue(r);
+
+    // copy argument g
+    GLMessage_DataType *arg_g = glmsg.add_args();
+    arg_g->set_isarray(false);
+    arg_g->set_type(GLMessage::DataType::BOOL);
+    arg_g->add_boolvalue(g);
+
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::BOOL);
+    arg_b->add_boolvalue(b);
+
+    // copy argument a
+    GLMessage_DataType *arg_a = glmsg.add_args();
+    arg_a->set_isarray(false);
+    arg_a->set_type(GLMessage::DataType::BOOL);
+    arg_a->add_boolvalue(a);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glColorMaskiEXT(index, r, g, b, a);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsEnablediEXT(GLenum target, GLuint index) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glIsEnablediEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    GLboolean retValue = glContext->hooks->gl.glIsEnablediEXT(target, index);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::BOOL);
+    rt->add_boolvalue(retValue);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glDrawArraysInstancedEXT(GLenum mode, GLint start, GLsizei count, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawArraysInstancedEXT);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument start
+    GLMessage_DataType *arg_start = glmsg.add_args();
+    arg_start->set_isarray(false);
+    arg_start->set_type(GLMessage::DataType::INT);
+    arg_start->add_intvalue(start);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawArraysInstancedEXT(mode, start, count, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawElementsInstancedEXT);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument indices
+    GLMessage_DataType *arg_indices = glmsg.add_args();
+    arg_indices->set_isarray(false);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawElementsInstancedEXT(mode, count, type, indices, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) indices,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTextureEXT(GLenum target, GLenum attachment, GLuint texture, GLint level) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glFramebufferTextureEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument attachment
+    GLMessage_DataType *arg_attachment = glmsg.add_args();
+    arg_attachment->set_isarray(false);
+    arg_attachment->set_type(GLMessage::DataType::ENUM);
+    arg_attachment->add_intvalue((int)attachment);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::INT);
+    arg_texture->add_intvalue(texture);
+
+    // copy argument level
+    GLMessage_DataType *arg_level = glmsg.add_args();
+    arg_level->set_isarray(false);
+    arg_level->set_type(GLMessage::DataType::INT);
+    arg_level->add_intvalue(level);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glFramebufferTextureEXT(target, attachment, texture, level);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribDivisorEXT(GLuint index, GLuint divisor) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexAttribDivisorEXT);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument divisor
+    GLMessage_DataType *arg_divisor = glmsg.add_args();
+    arg_divisor->set_isarray(false);
+    arg_divisor->set_type(GLMessage::DataType::INT);
+    arg_divisor->add_intvalue(divisor);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexAttribDivisorEXT(index, divisor);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void * GLTrace_glMapBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMapBufferRangeEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument offset
+    GLMessage_DataType *arg_offset = glmsg.add_args();
+    arg_offset->set_isarray(false);
+    arg_offset->set_type(GLMessage::DataType::INT);
+    arg_offset->add_intvalue(offset);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT);
+    arg_length->add_intvalue(length);
+
+    // copy argument access
+    GLMessage_DataType *arg_access = glmsg.add_args();
+    arg_access->set_isarray(false);
+    arg_access->set_type(GLMessage::DataType::INT);
+    arg_access->add_intvalue(access);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    void * retValue = glContext->hooks->gl.glMapBufferRangeEXT(target, offset, length, access);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    // set return value
+    GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+    rt->set_isarray(false);
+    rt->set_type(GLMessage::DataType::INT64);
+    rt->add_int64value((uintptr_t)retValue);
+
+    void *pointerArgs[] = {
+        (void *) retValue,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+
+    return retValue;
+}
+
+void GLTrace_glFlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glFlushMappedBufferRangeEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument offset
+    GLMessage_DataType *arg_offset = glmsg.add_args();
+    arg_offset->set_isarray(false);
+    arg_offset->set_type(GLMessage::DataType::INT);
+    arg_offset->add_intvalue(offset);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT);
+    arg_length->add_intvalue(length);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glFlushMappedBufferRangeEXT(target, offset, length);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiDrawArraysEXT(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiDrawArraysEXT);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument first
+    GLMessage_DataType *arg_first = glmsg.add_args();
+    arg_first->set_isarray(false);
+    arg_first->set_type(GLMessage::DataType::INT64);
+    arg_first->add_int64value((uintptr_t)first);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT64);
+    arg_count->add_int64value((uintptr_t)count);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) first,
+        (void *) count,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiDrawElementsEXT);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT64);
+    arg_count->add_int64value((uintptr_t)count);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument indices
+    GLMessage_DataType *arg_indices = glmsg.add_args();
+    arg_indices->set_isarray(false);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) count,
+        (void *) indices,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument samples
+    GLMessage_DataType *arg_samples = glmsg.add_args();
+    arg_samples->set_isarray(false);
+    arg_samples->set_type(GLMessage::DataType::INT);
+    arg_samples->add_intvalue(samples);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument width
+    GLMessage_DataType *arg_width = glmsg.add_args();
+    arg_width->set_isarray(false);
+    arg_width->set_type(GLMessage::DataType::INT);
+    arg_width->add_intvalue(width);
+
+    // copy argument height
+    GLMessage_DataType *arg_height = glmsg.add_args();
+    arg_height->set_isarray(false);
+    arg_height->set_type(GLMessage::DataType::INT);
+    arg_height->add_intvalue(height);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument attachment
+    GLMessage_DataType *arg_attachment = glmsg.add_args();
+    arg_attachment->set_isarray(false);
+    arg_attachment->set_type(GLMessage::DataType::ENUM);
+    arg_attachment->add_intvalue((int)attachment);
+
+    // copy argument textarget
+    GLMessage_DataType *arg_textarget = glmsg.add_args();
+    arg_textarget->set_isarray(false);
+    arg_textarget->set_type(GLMessage::DataType::ENUM);
+    arg_textarget->add_intvalue((int)textarget);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::INT);
+    arg_texture->add_intvalue(texture);
+
+    // copy argument level
+    GLMessage_DataType *arg_level = glmsg.add_args();
+    arg_level->set_isarray(false);
+    arg_level->set_type(GLMessage::DataType::INT);
+    arg_level->add_intvalue(level);
+
+    // copy argument samples
+    GLMessage_DataType *arg_samples = glmsg.add_args();
+    arg_samples->set_isarray(false);
+    arg_samples->set_type(GLMessage::DataType::INT);
+    arg_samples->add_intvalue(samples);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glReadBufferIndexedEXT(GLenum src, GLint index) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glReadBufferIndexedEXT);
+
+    // copy argument src
+    GLMessage_DataType *arg_src = glmsg.add_args();
+    arg_src->set_isarray(false);
+    arg_src->set_type(GLMessage::DataType::ENUM);
+    arg_src->add_intvalue((int)src);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glReadBufferIndexedEXT(src, index);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawBuffersIndexedEXT(GLint n, const GLenum * location, const GLint * indices) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawBuffersIndexedEXT);
+
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT64);
+    arg_location->add_int64value((uintptr_t)location);
+
+    // copy argument indices
+    GLMessage_DataType *arg_indices = glmsg.add_args();
+    arg_indices->set_isarray(false);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawBuffersIndexedEXT(n, location, indices);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) location,
+        (void *) indices,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetIntegeri_vEXT(GLenum target, GLuint index, GLint * data) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetIntegeri_vEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetIntegeri_vEXT(target, index, data);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) data,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPrimitiveBoundingBoxEXT(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glPrimitiveBoundingBoxEXT);
+
+    // copy argument minX
+    GLMessage_DataType *arg_minX = glmsg.add_args();
+    arg_minX->set_isarray(false);
+    arg_minX->set_type(GLMessage::DataType::FLOAT);
+    arg_minX->add_floatvalue(minX);
+
+    // copy argument minY
+    GLMessage_DataType *arg_minY = glmsg.add_args();
+    arg_minY->set_isarray(false);
+    arg_minY->set_type(GLMessage::DataType::FLOAT);
+    arg_minY->add_floatvalue(minY);
+
+    // copy argument minZ
+    GLMessage_DataType *arg_minZ = glmsg.add_args();
+    arg_minZ->set_isarray(false);
+    arg_minZ->set_type(GLMessage::DataType::FLOAT);
+    arg_minZ->add_floatvalue(minZ);
+
+    // copy argument minW
+    GLMessage_DataType *arg_minW = glmsg.add_args();
+    arg_minW->set_isarray(false);
+    arg_minW->set_type(GLMessage::DataType::FLOAT);
+    arg_minW->add_floatvalue(minW);
+
+    // copy argument maxX
+    GLMessage_DataType *arg_maxX = glmsg.add_args();
+    arg_maxX->set_isarray(false);
+    arg_maxX->set_type(GLMessage::DataType::FLOAT);
+    arg_maxX->add_floatvalue(maxX);
+
+    // copy argument maxY
+    GLMessage_DataType *arg_maxY = glmsg.add_args();
+    arg_maxY->set_isarray(false);
+    arg_maxY->set_type(GLMessage::DataType::FLOAT);
+    arg_maxY->add_floatvalue(maxY);
+
+    // copy argument maxZ
+    GLMessage_DataType *arg_maxZ = glmsg.add_args();
+    arg_maxZ->set_isarray(false);
+    arg_maxZ->set_type(GLMessage::DataType::FLOAT);
+    arg_maxZ->add_floatvalue(maxZ);
+
+    // copy argument maxW
+    GLMessage_DataType *arg_maxW = glmsg.add_args();
+    arg_maxW->set_isarray(false);
+    arg_maxW->set_type(GLMessage::DataType::FLOAT);
+    arg_maxW->add_floatvalue(maxW);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glPrimitiveBoundingBoxEXT(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 GLenum GLTrace_glGetGraphicsResetStatusEXT(void) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -12657,7 +18019,7 @@
     return retValue;
 }
 
-void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
+void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12728,7 +18090,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params) {
+void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12775,7 +18137,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
+void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12822,46 +18184,6 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glUseProgramStagesEXT);
-
-    // copy argument pipeline
-    GLMessage_DataType *arg_pipeline = glmsg.add_args();
-    arg_pipeline->set_isarray(false);
-    arg_pipeline->set_type(GLMessage::DataType::INT);
-    arg_pipeline->add_intvalue(pipeline);
-
-    // copy argument stages
-    GLMessage_DataType *arg_stages = glmsg.add_args();
-    arg_stages->set_isarray(false);
-    arg_stages->set_type(GLMessage::DataType::INT);
-    arg_stages->add_intvalue(stages);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
 void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -12896,7 +18218,35 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) {
+void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBindProgramPipelineEXT);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBindProgramPipelineEXT(pipeline);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar ** strings) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -12945,35 +18295,7 @@
     return retValue;
 }
 
-void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glBindProgramPipelineEXT);
-
-    // copy argument pipeline
-    GLMessage_DataType *arg_pipeline = glmsg.add_args();
-    arg_pipeline->set_isarray(false);
-    arg_pipeline->set_type(GLMessage::DataType::INT);
-    arg_pipeline->add_intvalue(pipeline);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glBindProgramPipelineEXT(pipeline);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) {
+void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint * pipelines) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13008,7 +18330,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) {
+void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint * pipelines) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13043,6 +18365,95 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument bufSize
+    GLMessage_DataType *arg_bufSize = glmsg.add_args();
+    arg_bufSize->set_isarray(false);
+    arg_bufSize->set_type(GLMessage::DataType::INT);
+    arg_bufSize->add_intvalue(bufSize);
+
+    // copy argument length
+    GLMessage_DataType *arg_length = glmsg.add_args();
+    arg_length->set_isarray(false);
+    arg_length->set_type(GLMessage::DataType::INT64);
+    arg_length->add_int64value((uintptr_t)length);
+
+    // copy argument infoLog
+    GLMessage_DataType *arg_infoLog = glmsg.add_args();
+    arg_infoLog->set_isarray(false);
+    arg_infoLog->set_type(GLMessage::DataType::INT64);
+    arg_infoLog->add_int64value((uintptr_t)infoLog);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) length,
+        (void *) infoLog,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetProgramPipelineivEXT);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -13119,244 +18530,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glGetProgramPipelineivEXT);
-
-    // copy argument pipeline
-    GLMessage_DataType *arg_pipeline = glmsg.add_args();
-    arg_pipeline->set_isarray(false);
-    arg_pipeline->set_type(GLMessage::DataType::INT);
-    arg_pipeline->add_intvalue(pipeline);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) params,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform1iEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform1iEXT(program, location, x);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform2iEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
-
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::INT);
-    arg_y->add_intvalue(y);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform2iEXT(program, location, x, y);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform3iEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
-
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::INT);
-    arg_y->add_intvalue(y);
-
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::INT);
-    arg_z->add_intvalue(z);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform3iEXT(program, location, x, y, z);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform4iEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::INT);
-    arg_x->add_intvalue(x);
-
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::INT);
-    arg_y->add_intvalue(y);
-
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::INT);
-    arg_z->add_intvalue(z);
-
-    // copy argument w
-    GLMessage_DataType *arg_w = glmsg.add_args();
-    arg_w->set_isarray(false);
-    arg_w->set_type(GLMessage::DataType::INT);
-    arg_w->add_intvalue(w);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform4iEXT(program, location, x, y, z, w);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) {
+void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13374,16 +18548,16 @@
     arg_location->set_type(GLMessage::DataType::INT);
     arg_location->add_intvalue(location);
 
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform1fEXT(program, location, x);
+    glContext->hooks->gl.glProgramUniform1fEXT(program, location, v0);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -13396,351 +18570,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform2fEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
-
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::FLOAT);
-    arg_y->add_floatvalue(y);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform2fEXT(program, location, x, y);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform3fEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
-
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::FLOAT);
-    arg_y->add_floatvalue(y);
-
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::FLOAT);
-    arg_z->add_floatvalue(z);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform3fEXT(program, location, x, y, z);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform4fEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument x
-    GLMessage_DataType *arg_x = glmsg.add_args();
-    arg_x->set_isarray(false);
-    arg_x->set_type(GLMessage::DataType::FLOAT);
-    arg_x->add_floatvalue(x);
-
-    // copy argument y
-    GLMessage_DataType *arg_y = glmsg.add_args();
-    arg_y->set_isarray(false);
-    arg_y->set_type(GLMessage::DataType::FLOAT);
-    arg_y->add_floatvalue(y);
-
-    // copy argument z
-    GLMessage_DataType *arg_z = glmsg.add_args();
-    arg_z->set_isarray(false);
-    arg_z->set_type(GLMessage::DataType::FLOAT);
-    arg_z->add_floatvalue(z);
-
-    // copy argument w
-    GLMessage_DataType *arg_w = glmsg.add_args();
-    arg_w->set_isarray(false);
-    arg_w->set_type(GLMessage::DataType::FLOAT);
-    arg_w->add_floatvalue(w);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform4fEXT(program, location, x, y, z, w);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform1ivEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument count
-    GLMessage_DataType *arg_count = glmsg.add_args();
-    arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue(count);
-
-    // copy argument value
-    GLMessage_DataType *arg_value = glmsg.add_args();
-    arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT64);
-    arg_value->add_int64value((uintptr_t)value);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) value,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform2ivEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument count
-    GLMessage_DataType *arg_count = glmsg.add_args();
-    arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue(count);
-
-    // copy argument value
-    GLMessage_DataType *arg_value = glmsg.add_args();
-    arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT64);
-    arg_value->add_int64value((uintptr_t)value);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) value,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform3ivEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument count
-    GLMessage_DataType *arg_count = glmsg.add_args();
-    arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue(count);
-
-    // copy argument value
-    GLMessage_DataType *arg_value = glmsg.add_args();
-    arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT64);
-    arg_value->add_int64value((uintptr_t)value);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) value,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glProgramUniform4ivEXT);
-
-    // copy argument program
-    GLMessage_DataType *arg_program = glmsg.add_args();
-    arg_program->set_isarray(false);
-    arg_program->set_type(GLMessage::DataType::INT);
-    arg_program->add_intvalue(program);
-
-    // copy argument location
-    GLMessage_DataType *arg_location = glmsg.add_args();
-    arg_location->set_isarray(false);
-    arg_location->set_type(GLMessage::DataType::INT);
-    arg_location->add_intvalue(location);
-
-    // copy argument count
-    GLMessage_DataType *arg_count = glmsg.add_args();
-    arg_count->set_isarray(false);
-    arg_count->set_type(GLMessage::DataType::INT);
-    arg_count->add_intvalue(count);
-
-    // copy argument value
-    GLMessage_DataType *arg_value = glmsg.add_args();
-    arg_value->set_isarray(false);
-    arg_value->set_type(GLMessage::DataType::INT64);
-    arg_value->add_int64value((uintptr_t)value);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) value,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13787,7 +18617,140 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint v0) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1iEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1iEXT(program, location, v0);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1ivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2fEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2fEXT(program, location, v0, v1);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13834,7 +18797,152 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2iEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2iEXT(program, location, v0, v1);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2ivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3fEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::FLOAT);
+    arg_v2->add_floatvalue(v2);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3fEXT(program, location, v0, v1, v2);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13881,7 +18989,164 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3iEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3iEXT(program, location, v0, v1, v2);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3ivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4fEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::FLOAT);
+    arg_v0->add_floatvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::FLOAT);
+    arg_v1->add_floatvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::FLOAT);
+    arg_v2->add_floatvalue(v2);
+
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::FLOAT);
+    arg_v3->add_floatvalue(v3);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4fEXT(program, location, v0, v1, v2, v3);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13928,7 +19193,112 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4iEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::INT);
+    arg_v3->add_intvalue(v3);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4iEXT(program, location, v0, v1, v2, v3);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4ivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -13981,7 +19351,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -14034,7 +19404,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -14087,6 +19457,46 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUseProgramStagesEXT);
+
+    // copy argument pipeline
+    GLMessage_DataType *arg_pipeline = glmsg.add_args();
+    arg_pipeline->set_isarray(false);
+    arg_pipeline->set_type(GLMessage::DataType::INT);
+    arg_pipeline->add_intvalue(pipeline);
+
+    // copy argument stages
+    GLMessage_DataType *arg_stages = glmsg.add_args();
+    arg_stages->set_isarray(false);
+    arg_stages->set_type(GLMessage::DataType::INT);
+    arg_stages->add_intvalue(stages);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -14115,46 +19525,1154 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
+void GLTrace_glProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
-    glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT);
+    glmsg.set_function(GLMessage::glProgramUniform1uiEXT);
 
-    // copy argument pipeline
-    GLMessage_DataType *arg_pipeline = glmsg.add_args();
-    arg_pipeline->set_isarray(false);
-    arg_pipeline->set_type(GLMessage::DataType::INT);
-    arg_pipeline->add_intvalue(pipeline);
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
 
-    // copy argument bufSize
-    GLMessage_DataType *arg_bufSize = glmsg.add_args();
-    arg_bufSize->set_isarray(false);
-    arg_bufSize->set_type(GLMessage::DataType::INT);
-    arg_bufSize->add_intvalue(bufSize);
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
 
-    // copy argument length
-    GLMessage_DataType *arg_length = glmsg.add_args();
-    arg_length->set_isarray(false);
-    arg_length->set_type(GLMessage::DataType::INT64);
-    arg_length->add_int64value((uintptr_t)length);
-
-    // copy argument infoLog
-    GLMessage_DataType *arg_infoLog = glmsg.add_args();
-    arg_infoLog->set_isarray(false);
-    arg_infoLog->set_type(GLMessage::DataType::INT64);
-    arg_infoLog->add_int64value((uintptr_t)infoLog);
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog);
+    glContext->hooks->gl.glProgramUniform1uiEXT(program, location, v0);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) length,
-        (void *) infoLog,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2uiEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2uiEXT(program, location, v0, v1);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3uiEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3uiEXT(program, location, v0, v1, v2);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4uiEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument v0
+    GLMessage_DataType *arg_v0 = glmsg.add_args();
+    arg_v0->set_isarray(false);
+    arg_v0->set_type(GLMessage::DataType::INT);
+    arg_v0->add_intvalue(v0);
+
+    // copy argument v1
+    GLMessage_DataType *arg_v1 = glmsg.add_args();
+    arg_v1->set_isarray(false);
+    arg_v1->set_type(GLMessage::DataType::INT);
+    arg_v1->add_intvalue(v1);
+
+    // copy argument v2
+    GLMessage_DataType *arg_v2 = glmsg.add_args();
+    arg_v2->set_isarray(false);
+    arg_v2->set_type(GLMessage::DataType::INT);
+    arg_v2->add_intvalue(v2);
+
+    // copy argument v3
+    GLMessage_DataType *arg_v3 = glmsg.add_args();
+    arg_v3->set_isarray(false);
+    arg_v3->set_type(GLMessage::DataType::INT);
+    arg_v3->add_intvalue(v3);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4uiEXT(program, location, v0, v1, v2, v3);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform1uivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform1uivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform2uivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform2uivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform3uivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform3uivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniform4uivEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniform4uivEXT(program, location, count, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix2x3fvEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix3x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix3x2fvEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix2x4fvEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix4x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix4x2fvEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix3x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix3x4fvEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix4x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glProgramUniformMatrix4x3fvEXT);
+
+    // copy argument program
+    GLMessage_DataType *arg_program = glmsg.add_args();
+    arg_program->set_isarray(false);
+    arg_program->set_type(GLMessage::DataType::INT);
+    arg_program->add_intvalue(program);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPatchParameteriEXT(GLenum pname, GLint value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glPatchParameteriEXT);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT);
+    arg_value->add_intvalue(value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glPatchParameteriEXT(pname, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterIivEXT(GLenum target, GLenum pname, const GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexParameterIivEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexParameterIivEXT(target, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexParameterIuivEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexParameterIuivEXT(target, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexParameterIivEXT(GLenum target, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetTexParameterIivEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetTexParameterIivEXT(target, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetTexParameterIuivEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetTexParameterIuivEXT(target, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSamplerParameterIivEXT(GLuint sampler, GLenum pname, const GLint * param) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glSamplerParameterIivEXT);
+
+    // copy argument sampler
+    GLMessage_DataType *arg_sampler = glmsg.add_args();
+    arg_sampler->set_isarray(false);
+    arg_sampler->set_type(GLMessage::DataType::INT);
+    arg_sampler->add_intvalue(sampler);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glSamplerParameterIivEXT(sampler, pname, param);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) param,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSamplerParameterIuivEXT(GLuint sampler, GLenum pname, const GLuint * param) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glSamplerParameterIuivEXT);
+
+    // copy argument sampler
+    GLMessage_DataType *arg_sampler = glmsg.add_args();
+    arg_sampler->set_isarray(false);
+    arg_sampler->set_type(GLMessage::DataType::INT);
+    arg_sampler->add_intvalue(sampler);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glSamplerParameterIuivEXT(sampler, pname, param);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) param,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetSamplerParameterIivEXT(GLuint sampler, GLenum pname, GLint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetSamplerParameterIivEXT);
+
+    // copy argument sampler
+    GLMessage_DataType *arg_sampler = glmsg.add_args();
+    arg_sampler->set_isarray(false);
+    arg_sampler->set_type(GLMessage::DataType::INT);
+    arg_sampler->add_intvalue(sampler);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetSamplerParameterIivEXT(sampler, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetSamplerParameterIuivEXT(GLuint sampler, GLenum pname, GLuint * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetSamplerParameterIuivEXT);
+
+    // copy argument sampler
+    GLMessage_DataType *arg_sampler = glmsg.add_args();
+    arg_sampler->set_isarray(false);
+    arg_sampler->set_type(GLMessage::DataType::INT);
+    arg_sampler->add_intvalue(sampler);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetSamplerParameterIuivEXT(sampler, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexBufferEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument buffer
+    GLMessage_DataType *arg_buffer = glmsg.add_args();
+    arg_buffer->set_isarray(false);
+    arg_buffer->set_type(GLMessage::DataType::INT);
+    arg_buffer->add_intvalue(buffer);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexBufferEXT(target, internalformat, buffer);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexBufferRangeEXT(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexBufferRangeEXT);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument buffer
+    GLMessage_DataType *arg_buffer = glmsg.add_args();
+    arg_buffer->set_isarray(false);
+    arg_buffer->set_type(GLMessage::DataType::INT);
+    arg_buffer->add_intvalue(buffer);
+
+    // copy argument offset
+    GLMessage_DataType *arg_offset = glmsg.add_args();
+    arg_offset->set_isarray(false);
+    arg_offset->set_type(GLMessage::DataType::INT);
+    arg_offset->add_intvalue(offset);
+
+    // copy argument size
+    GLMessage_DataType *arg_size = glmsg.add_args();
+    arg_size->set_isarray(false);
+    arg_size->set_type(GLMessage::DataType::INT);
+    arg_size->add_intvalue(size);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexBufferRangeEXT(target, internalformat, buffer, offset, size);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -14493,6 +21011,76 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glTextureViewEXT(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTextureViewEXT);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::INT);
+    arg_texture->add_intvalue(texture);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument origtexture
+    GLMessage_DataType *arg_origtexture = glmsg.add_args();
+    arg_origtexture->set_isarray(false);
+    arg_origtexture->set_type(GLMessage::DataType::INT);
+    arg_origtexture->add_intvalue(origtexture);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument minlevel
+    GLMessage_DataType *arg_minlevel = glmsg.add_args();
+    arg_minlevel->set_isarray(false);
+    arg_minlevel->set_type(GLMessage::DataType::INT);
+    arg_minlevel->add_intvalue(minlevel);
+
+    // copy argument numlevels
+    GLMessage_DataType *arg_numlevels = glmsg.add_args();
+    arg_numlevels->set_isarray(false);
+    arg_numlevels->set_type(GLMessage::DataType::INT);
+    arg_numlevels->add_intvalue(numlevels);
+
+    // copy argument minlayer
+    GLMessage_DataType *arg_minlayer = glmsg.add_args();
+    arg_minlayer->set_isarray(false);
+    arg_minlayer->set_type(GLMessage::DataType::INT);
+    arg_minlayer->add_intvalue(minlayer);
+
+    // copy argument numlayers
+    GLMessage_DataType *arg_numlayers = glmsg.add_args();
+    arg_numlayers->set_isarray(false);
+    arg_numlayers->set_type(GLMessage::DataType::INT);
+    arg_numlayers->add_intvalue(numlayers);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTextureViewEXT(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -14603,6 +21191,551 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glBeginPerfQueryINTEL(GLuint queryHandle) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBeginPerfQueryINTEL);
+
+    // copy argument queryHandle
+    GLMessage_DataType *arg_queryHandle = glmsg.add_args();
+    arg_queryHandle->set_isarray(false);
+    arg_queryHandle->set_type(GLMessage::DataType::INT);
+    arg_queryHandle->add_intvalue(queryHandle);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBeginPerfQueryINTEL(queryHandle);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCreatePerfQueryINTEL(GLuint queryId, GLuint * queryHandle) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glCreatePerfQueryINTEL);
+
+    // copy argument queryId
+    GLMessage_DataType *arg_queryId = glmsg.add_args();
+    arg_queryId->set_isarray(false);
+    arg_queryId->set_type(GLMessage::DataType::INT);
+    arg_queryId->add_intvalue(queryId);
+
+    // copy argument queryHandle
+    GLMessage_DataType *arg_queryHandle = glmsg.add_args();
+    arg_queryHandle->set_isarray(false);
+    arg_queryHandle->set_type(GLMessage::DataType::INT64);
+    arg_queryHandle->add_int64value((uintptr_t)queryHandle);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glCreatePerfQueryINTEL(queryId, queryHandle);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) queryHandle,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeletePerfQueryINTEL(GLuint queryHandle) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDeletePerfQueryINTEL);
+
+    // copy argument queryHandle
+    GLMessage_DataType *arg_queryHandle = glmsg.add_args();
+    arg_queryHandle->set_isarray(false);
+    arg_queryHandle->set_type(GLMessage::DataType::INT);
+    arg_queryHandle->add_intvalue(queryHandle);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDeletePerfQueryINTEL(queryHandle);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEndPerfQueryINTEL(GLuint queryHandle) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glEndPerfQueryINTEL);
+
+    // copy argument queryHandle
+    GLMessage_DataType *arg_queryHandle = glmsg.add_args();
+    arg_queryHandle->set_isarray(false);
+    arg_queryHandle->set_type(GLMessage::DataType::INT);
+    arg_queryHandle->add_intvalue(queryHandle);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glEndPerfQueryINTEL(queryHandle);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetFirstPerfQueryIdINTEL(GLuint * queryId) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetFirstPerfQueryIdINTEL);
+
+    // copy argument queryId
+    GLMessage_DataType *arg_queryId = glmsg.add_args();
+    arg_queryId->set_isarray(false);
+    arg_queryId->set_type(GLMessage::DataType::INT64);
+    arg_queryId->add_int64value((uintptr_t)queryId);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetFirstPerfQueryIdINTEL(queryId);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) queryId,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetNextPerfQueryIdINTEL(GLuint queryId, GLuint * nextQueryId) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetNextPerfQueryIdINTEL);
+
+    // copy argument queryId
+    GLMessage_DataType *arg_queryId = glmsg.add_args();
+    arg_queryId->set_isarray(false);
+    arg_queryId->set_type(GLMessage::DataType::INT);
+    arg_queryId->add_intvalue(queryId);
+
+    // copy argument nextQueryId
+    GLMessage_DataType *arg_nextQueryId = glmsg.add_args();
+    arg_nextQueryId->set_isarray(false);
+    arg_nextQueryId->set_type(GLMessage::DataType::INT64);
+    arg_nextQueryId->add_int64value((uintptr_t)nextQueryId);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetNextPerfQueryIdINTEL(queryId, nextQueryId);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) nextQueryId,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfCounterInfoINTEL(GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetPerfCounterInfoINTEL);
+
+    // copy argument queryId
+    GLMessage_DataType *arg_queryId = glmsg.add_args();
+    arg_queryId->set_isarray(false);
+    arg_queryId->set_type(GLMessage::DataType::INT);
+    arg_queryId->add_intvalue(queryId);
+
+    // copy argument counterId
+    GLMessage_DataType *arg_counterId = glmsg.add_args();
+    arg_counterId->set_isarray(false);
+    arg_counterId->set_type(GLMessage::DataType::INT);
+    arg_counterId->add_intvalue(counterId);
+
+    // copy argument counterNameLength
+    GLMessage_DataType *arg_counterNameLength = glmsg.add_args();
+    arg_counterNameLength->set_isarray(false);
+    arg_counterNameLength->set_type(GLMessage::DataType::INT);
+    arg_counterNameLength->add_intvalue(counterNameLength);
+
+    // copy argument counterName
+    GLMessage_DataType *arg_counterName = glmsg.add_args();
+    arg_counterName->set_isarray(false);
+    arg_counterName->set_type(GLMessage::DataType::INT64);
+    arg_counterName->add_int64value((uintptr_t)counterName);
+
+    // copy argument counterDescLength
+    GLMessage_DataType *arg_counterDescLength = glmsg.add_args();
+    arg_counterDescLength->set_isarray(false);
+    arg_counterDescLength->set_type(GLMessage::DataType::INT);
+    arg_counterDescLength->add_intvalue(counterDescLength);
+
+    // copy argument counterDesc
+    GLMessage_DataType *arg_counterDesc = glmsg.add_args();
+    arg_counterDesc->set_isarray(false);
+    arg_counterDesc->set_type(GLMessage::DataType::INT64);
+    arg_counterDesc->add_int64value((uintptr_t)counterDesc);
+
+    // copy argument counterOffset
+    GLMessage_DataType *arg_counterOffset = glmsg.add_args();
+    arg_counterOffset->set_isarray(false);
+    arg_counterOffset->set_type(GLMessage::DataType::INT64);
+    arg_counterOffset->add_int64value((uintptr_t)counterOffset);
+
+    // copy argument counterDataSize
+    GLMessage_DataType *arg_counterDataSize = glmsg.add_args();
+    arg_counterDataSize->set_isarray(false);
+    arg_counterDataSize->set_type(GLMessage::DataType::INT64);
+    arg_counterDataSize->add_int64value((uintptr_t)counterDataSize);
+
+    // copy argument counterTypeEnum
+    GLMessage_DataType *arg_counterTypeEnum = glmsg.add_args();
+    arg_counterTypeEnum->set_isarray(false);
+    arg_counterTypeEnum->set_type(GLMessage::DataType::INT64);
+    arg_counterTypeEnum->add_int64value((uintptr_t)counterTypeEnum);
+
+    // copy argument counterDataTypeEnum
+    GLMessage_DataType *arg_counterDataTypeEnum = glmsg.add_args();
+    arg_counterDataTypeEnum->set_isarray(false);
+    arg_counterDataTypeEnum->set_type(GLMessage::DataType::INT64);
+    arg_counterDataTypeEnum->add_int64value((uintptr_t)counterDataTypeEnum);
+
+    // copy argument rawCounterMaxValue
+    GLMessage_DataType *arg_rawCounterMaxValue = glmsg.add_args();
+    arg_rawCounterMaxValue->set_isarray(false);
+    arg_rawCounterMaxValue->set_type(GLMessage::DataType::INT64);
+    arg_rawCounterMaxValue->add_int64value((uintptr_t)rawCounterMaxValue);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetPerfCounterInfoINTEL(queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) counterName,
+        (void *) counterDesc,
+        (void *) counterOffset,
+        (void *) counterDataSize,
+        (void *) counterTypeEnum,
+        (void *) counterDataTypeEnum,
+        (void *) rawCounterMaxValue,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfQueryDataINTEL(GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid * data, GLuint * bytesWritten) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetPerfQueryDataINTEL);
+
+    // copy argument queryHandle
+    GLMessage_DataType *arg_queryHandle = glmsg.add_args();
+    arg_queryHandle->set_isarray(false);
+    arg_queryHandle->set_type(GLMessage::DataType::INT);
+    arg_queryHandle->add_intvalue(queryHandle);
+
+    // copy argument flags
+    GLMessage_DataType *arg_flags = glmsg.add_args();
+    arg_flags->set_isarray(false);
+    arg_flags->set_type(GLMessage::DataType::INT);
+    arg_flags->add_intvalue(flags);
+
+    // copy argument dataSize
+    GLMessage_DataType *arg_dataSize = glmsg.add_args();
+    arg_dataSize->set_isarray(false);
+    arg_dataSize->set_type(GLMessage::DataType::INT);
+    arg_dataSize->add_intvalue(dataSize);
+
+    // copy argument data
+    GLMessage_DataType *arg_data = glmsg.add_args();
+    arg_data->set_isarray(false);
+    arg_data->set_type(GLMessage::DataType::INT64);
+    arg_data->add_int64value((uintptr_t)data);
+
+    // copy argument bytesWritten
+    GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
+    arg_bytesWritten->set_isarray(false);
+    arg_bytesWritten->set_type(GLMessage::DataType::INT64);
+    arg_bytesWritten->add_int64value((uintptr_t)bytesWritten);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetPerfQueryDataINTEL(queryHandle, flags, dataSize, data, bytesWritten);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) data,
+        (void *) bytesWritten,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfQueryIdByNameINTEL(GLchar * queryName, GLuint * queryId) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetPerfQueryIdByNameINTEL);
+
+    // copy argument queryName
+    GLMessage_DataType *arg_queryName = glmsg.add_args();
+    arg_queryName->set_isarray(false);
+    arg_queryName->set_type(GLMessage::DataType::INT64);
+    arg_queryName->add_int64value((uintptr_t)queryName);
+
+    // copy argument queryId
+    GLMessage_DataType *arg_queryId = glmsg.add_args();
+    arg_queryId->set_isarray(false);
+    arg_queryId->set_type(GLMessage::DataType::INT64);
+    arg_queryId->add_int64value((uintptr_t)queryId);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetPerfQueryIdByNameINTEL(queryName, queryId);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) queryName,
+        (void *) queryId,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetPerfQueryInfoINTEL(GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetPerfQueryInfoINTEL);
+
+    // copy argument queryId
+    GLMessage_DataType *arg_queryId = glmsg.add_args();
+    arg_queryId->set_isarray(false);
+    arg_queryId->set_type(GLMessage::DataType::INT);
+    arg_queryId->add_intvalue(queryId);
+
+    // copy argument queryNameLength
+    GLMessage_DataType *arg_queryNameLength = glmsg.add_args();
+    arg_queryNameLength->set_isarray(false);
+    arg_queryNameLength->set_type(GLMessage::DataType::INT);
+    arg_queryNameLength->add_intvalue(queryNameLength);
+
+    // copy argument queryName
+    GLMessage_DataType *arg_queryName = glmsg.add_args();
+    arg_queryName->set_isarray(false);
+    arg_queryName->set_type(GLMessage::DataType::INT64);
+    arg_queryName->add_int64value((uintptr_t)queryName);
+
+    // copy argument dataSize
+    GLMessage_DataType *arg_dataSize = glmsg.add_args();
+    arg_dataSize->set_isarray(false);
+    arg_dataSize->set_type(GLMessage::DataType::INT64);
+    arg_dataSize->add_int64value((uintptr_t)dataSize);
+
+    // copy argument noCounters
+    GLMessage_DataType *arg_noCounters = glmsg.add_args();
+    arg_noCounters->set_isarray(false);
+    arg_noCounters->set_type(GLMessage::DataType::INT64);
+    arg_noCounters->add_int64value((uintptr_t)noCounters);
+
+    // copy argument noInstances
+    GLMessage_DataType *arg_noInstances = glmsg.add_args();
+    arg_noInstances->set_isarray(false);
+    arg_noInstances->set_type(GLMessage::DataType::INT64);
+    arg_noInstances->add_int64value((uintptr_t)noInstances);
+
+    // copy argument capsMask
+    GLMessage_DataType *arg_capsMask = glmsg.add_args();
+    arg_capsMask->set_isarray(false);
+    arg_capsMask->set_type(GLMessage::DataType::INT64);
+    arg_capsMask->add_int64value((uintptr_t)capsMask);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetPerfQueryInfoINTEL(queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) queryName,
+        (void *) dataSize,
+        (void *) noCounters,
+        (void *) noInstances,
+        (void *) capsMask,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendParameteriNV(GLenum pname, GLint value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendParameteriNV);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT);
+    arg_value->add_intvalue(value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendParameteriNV(pname, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glBlendBarrierNV(void) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlendBarrierNV);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlendBarrierNV();
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCopyBufferSubDataNV(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glCopyBufferSubDataNV);
+
+    // copy argument readTarget
+    GLMessage_DataType *arg_readTarget = glmsg.add_args();
+    arg_readTarget->set_isarray(false);
+    arg_readTarget->set_type(GLMessage::DataType::ENUM);
+    arg_readTarget->add_intvalue((int)readTarget);
+
+    // copy argument writeTarget
+    GLMessage_DataType *arg_writeTarget = glmsg.add_args();
+    arg_writeTarget->set_isarray(false);
+    arg_writeTarget->set_type(GLMessage::DataType::ENUM);
+    arg_writeTarget->add_intvalue((int)writeTarget);
+
+    // copy argument readOffset
+    GLMessage_DataType *arg_readOffset = glmsg.add_args();
+    arg_readOffset->set_isarray(false);
+    arg_readOffset->set_type(GLMessage::DataType::INT);
+    arg_readOffset->add_intvalue(readOffset);
+
+    // copy argument writeOffset
+    GLMessage_DataType *arg_writeOffset = glmsg.add_args();
+    arg_writeOffset->set_isarray(false);
+    arg_writeOffset->set_type(GLMessage::DataType::INT);
+    arg_writeOffset->add_intvalue(writeOffset);
+
+    // copy argument size
+    GLMessage_DataType *arg_size = glmsg.add_args();
+    arg_size->set_isarray(false);
+    arg_size->set_type(GLMessage::DataType::INT);
+    arg_size->add_intvalue(size);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glCopyBufferSubDataNV(readTarget, writeTarget, readOffset, writeOffset, size);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glCoverageMaskNV(GLboolean mask) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -14659,7 +21792,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs) {
+void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum * bufs) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -14694,7 +21827,106 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
+void GLTrace_glDrawArraysInstancedNV(GLenum mode, GLint first, GLsizei count, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawArraysInstancedNV);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument first
+    GLMessage_DataType *arg_first = glmsg.add_args();
+    arg_first->set_isarray(false);
+    arg_first->set_type(GLMessage::DataType::INT);
+    arg_first->add_intvalue(first);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawArraysInstancedNV(mode, first, count, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawElementsInstancedNV(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glDrawElementsInstancedNV);
+
+    // copy argument mode
+    GLMessage_DataType *arg_mode = glmsg.add_args();
+    arg_mode->set_isarray(false);
+    arg_mode->set_type(GLMessage::DataType::ENUM);
+    arg_mode->add_intvalue((int)mode);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument indices
+    GLMessage_DataType *arg_indices = glmsg.add_args();
+    arg_indices->set_isarray(false);
+    arg_indices->set_type(GLMessage::DataType::INT64);
+    arg_indices->add_int64value((uintptr_t)indices);
+
+    // copy argument primcount
+    GLMessage_DataType *arg_primcount = glmsg.add_args();
+    arg_primcount->set_isarray(false);
+    arg_primcount->set_type(GLMessage::DataType::INT);
+    arg_primcount->add_intvalue(primcount);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glDrawElementsInstancedNV(mode, count, type, indices, primcount);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) indices,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint * fences) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -14729,7 +21961,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences) {
+void GLTrace_glGenFencesNV(GLsizei n, GLuint * fences) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -14836,7 +22068,7 @@
     return retValue;
 }
 
-void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) {
+void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -14939,6 +22171,456 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glBlitFramebufferNV);
+
+    // copy argument srcX0
+    GLMessage_DataType *arg_srcX0 = glmsg.add_args();
+    arg_srcX0->set_isarray(false);
+    arg_srcX0->set_type(GLMessage::DataType::INT);
+    arg_srcX0->add_intvalue(srcX0);
+
+    // copy argument srcY0
+    GLMessage_DataType *arg_srcY0 = glmsg.add_args();
+    arg_srcY0->set_isarray(false);
+    arg_srcY0->set_type(GLMessage::DataType::INT);
+    arg_srcY0->add_intvalue(srcY0);
+
+    // copy argument srcX1
+    GLMessage_DataType *arg_srcX1 = glmsg.add_args();
+    arg_srcX1->set_isarray(false);
+    arg_srcX1->set_type(GLMessage::DataType::INT);
+    arg_srcX1->add_intvalue(srcX1);
+
+    // copy argument srcY1
+    GLMessage_DataType *arg_srcY1 = glmsg.add_args();
+    arg_srcY1->set_isarray(false);
+    arg_srcY1->set_type(GLMessage::DataType::INT);
+    arg_srcY1->add_intvalue(srcY1);
+
+    // copy argument dstX0
+    GLMessage_DataType *arg_dstX0 = glmsg.add_args();
+    arg_dstX0->set_isarray(false);
+    arg_dstX0->set_type(GLMessage::DataType::INT);
+    arg_dstX0->add_intvalue(dstX0);
+
+    // copy argument dstY0
+    GLMessage_DataType *arg_dstY0 = glmsg.add_args();
+    arg_dstY0->set_isarray(false);
+    arg_dstY0->set_type(GLMessage::DataType::INT);
+    arg_dstY0->add_intvalue(dstY0);
+
+    // copy argument dstX1
+    GLMessage_DataType *arg_dstX1 = glmsg.add_args();
+    arg_dstX1->set_isarray(false);
+    arg_dstX1->set_type(GLMessage::DataType::INT);
+    arg_dstX1->add_intvalue(dstX1);
+
+    // copy argument dstY1
+    GLMessage_DataType *arg_dstY1 = glmsg.add_args();
+    arg_dstY1->set_isarray(false);
+    arg_dstY1->set_type(GLMessage::DataType::INT);
+    arg_dstY1->add_intvalue(dstY1);
+
+    // copy argument mask
+    GLMessage_DataType *arg_mask = glmsg.add_args();
+    arg_mask->set_isarray(false);
+    arg_mask->set_type(GLMessage::DataType::INT);
+    arg_mask->add_intvalue(mask);
+
+    // copy argument filter
+    GLMessage_DataType *arg_filter = glmsg.add_args();
+    arg_filter->set_isarray(false);
+    arg_filter->set_type(GLMessage::DataType::ENUM);
+    arg_filter->add_intvalue((int)filter);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glBlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorageMultisampleNV(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleNV);
+
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
+
+    // copy argument samples
+    GLMessage_DataType *arg_samples = glmsg.add_args();
+    arg_samples->set_isarray(false);
+    arg_samples->set_type(GLMessage::DataType::INT);
+    arg_samples->add_intvalue(samples);
+
+    // copy argument internalformat
+    GLMessage_DataType *arg_internalformat = glmsg.add_args();
+    arg_internalformat->set_isarray(false);
+    arg_internalformat->set_type(GLMessage::DataType::ENUM);
+    arg_internalformat->add_intvalue((int)internalformat);
+
+    // copy argument width
+    GLMessage_DataType *arg_width = glmsg.add_args();
+    arg_width->set_isarray(false);
+    arg_width->set_type(GLMessage::DataType::INT);
+    arg_width->add_intvalue(width);
+
+    // copy argument height
+    GLMessage_DataType *arg_height = glmsg.add_args();
+    arg_height->set_isarray(false);
+    arg_height->set_type(GLMessage::DataType::INT);
+    arg_height->add_intvalue(height);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glRenderbufferStorageMultisampleNV(target, samples, internalformat, width, height);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertexAttribDivisorNV(GLuint index, GLuint divisor) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertexAttribDivisorNV);
+
+    // copy argument index
+    GLMessage_DataType *arg_index = glmsg.add_args();
+    arg_index->set_isarray(false);
+    arg_index->set_type(GLMessage::DataType::INT);
+    arg_index->add_intvalue(index);
+
+    // copy argument divisor
+    GLMessage_DataType *arg_divisor = glmsg.add_args();
+    arg_divisor->set_isarray(false);
+    arg_divisor->set_type(GLMessage::DataType::INT);
+    arg_divisor->add_intvalue(divisor);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertexAttribDivisorNV(index, divisor);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix2x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUniformMatrix2x3fvNV);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUniformMatrix2x3fvNV(location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix3x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUniformMatrix3x2fvNV);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUniformMatrix3x2fvNV(location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix2x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUniformMatrix2x4fvNV);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUniformMatrix2x4fvNV(location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix4x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUniformMatrix4x2fvNV);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUniformMatrix4x2fvNV(location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix3x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUniformMatrix3x4fvNV);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUniformMatrix3x4fvNV(location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUniformMatrix4x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glUniformMatrix4x3fvNV);
+
+    // copy argument location
+    GLMessage_DataType *arg_location = glmsg.add_args();
+    arg_location->set_isarray(false);
+    arg_location->set_type(GLMessage::DataType::INT);
+    arg_location->add_intvalue(location);
+
+    // copy argument count
+    GLMessage_DataType *arg_count = glmsg.add_args();
+    arg_count->set_isarray(false);
+    arg_count->set_type(GLMessage::DataType::INT);
+    arg_count->add_intvalue(count);
+
+    // copy argument transpose
+    GLMessage_DataType *arg_transpose = glmsg.add_args();
+    arg_transpose->set_isarray(false);
+    arg_transpose->set_type(GLMessage::DataType::BOOL);
+    arg_transpose->add_boolvalue(transpose);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT64);
+    arg_value->add_int64value((uintptr_t)value);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glUniformMatrix4x3fvNV(location, count, transpose, value);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) value,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glReadBufferNV(GLenum mode) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -15001,7 +22683,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls) {
+void GLTrace_glGetDriverControlsQCOM(GLint * num, GLsizei size, GLuint * driverControls) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15043,7 +22725,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
+void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15147,7 +22829,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures) {
+void GLTrace_glExtGetTexturesQCOM(GLuint * textures, GLint maxTextures, GLint * numTextures) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15189,7 +22871,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
+void GLTrace_glExtGetBuffersQCOM(GLuint * buffers, GLint maxBuffers, GLint * numBuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15231,7 +22913,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
+void GLTrace_glExtGetRenderbuffersQCOM(GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15273,7 +22955,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
+void GLTrace_glExtGetFramebuffersQCOM(GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15315,7 +22997,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
+void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15408,7 +23090,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
+void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15497,7 +23179,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) {
+void GLTrace_glExtGetBufferPointervQCOM(GLenum target, void ** params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15532,7 +23214,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
+void GLTrace_glExtGetShadersQCOM(GLuint * shaders, GLint maxShaders, GLint * numShaders) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15574,7 +23256,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
+void GLTrace_glExtGetProgramsQCOM(GLuint * programs, GLint maxPrograms, GLint * numPrograms) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15652,7 +23334,7 @@
     return retValue;
 }
 
-void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
+void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar * source, GLint * length) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15783,7 +23465,7 @@
 
 // Definitions for GL1 APIs
 
-void GLTrace_glAlphaFunc(GLenum func, GLclampf ref) {
+void GLTrace_glAlphaFunc(GLenum func, GLfloat ref) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15817,33 +23499,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation) {
+void GLTrace_glClipPlanef(GLenum p, const GLfloat * eqn) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glClipPlanef);
 
-    // copy argument plane
-    GLMessage_DataType *arg_plane = glmsg.add_args();
-    arg_plane->set_isarray(false);
-    arg_plane->set_type(GLMessage::DataType::ENUM);
-    arg_plane->add_intvalue((int)plane);
+    // copy argument p
+    GLMessage_DataType *arg_p = glmsg.add_args();
+    arg_p->set_isarray(false);
+    arg_p->set_type(GLMessage::DataType::ENUM);
+    arg_p->add_intvalue((int)p);
 
-    // copy argument equation
-    GLMessage_DataType *arg_equation = glmsg.add_args();
-    arg_equation->set_isarray(false);
-    arg_equation->set_type(GLMessage::DataType::INT64);
-    arg_equation->add_int64value((uintptr_t)equation);
+    // copy argument eqn
+    GLMessage_DataType *arg_eqn = glmsg.add_args();
+    arg_eqn->set_isarray(false);
+    arg_eqn->set_type(GLMessage::DataType::INT64);
+    arg_eqn->add_int64value((uintptr_t)eqn);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glClipPlanef(plane, equation);
+    glContext->hooks->gl.glClipPlanef(p, eqn);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) equation,
+        (void *) eqn,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -15932,7 +23614,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFogfv(GLenum pname, const GLfloat *params) {
+void GLTrace_glFogfv(GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -15967,52 +23649,52 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
+void GLTrace_glFrustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glFrustumf);
 
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::FLOAT);
-    arg_left->add_floatvalue(left);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::FLOAT);
+    arg_l->add_floatvalue(l);
 
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::FLOAT);
-    arg_right->add_floatvalue(right);
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::FLOAT);
+    arg_r->add_floatvalue(r);
 
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::FLOAT);
-    arg_bottom->add_floatvalue(bottom);
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::FLOAT);
+    arg_b->add_floatvalue(b);
 
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::FLOAT);
-    arg_top->add_floatvalue(top);
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::FLOAT);
+    arg_t->add_floatvalue(t);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::FLOAT);
-    arg_zNear->add_floatvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::FLOAT);
+    arg_n->add_floatvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::FLOAT);
-    arg_zFar->add_floatvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::FLOAT);
+    arg_f->add_floatvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFrustumf(left, right, bottom, top, zNear, zFar);
+    glContext->hooks->gl.glFrustumf(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -16025,33 +23707,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
+void GLTrace_glGetClipPlanef(GLenum plane, GLfloat * equation) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetClipPlanef);
 
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
+    // copy argument plane
+    GLMessage_DataType *arg_plane = glmsg.add_args();
+    arg_plane->set_isarray(false);
+    arg_plane->set_type(GLMessage::DataType::ENUM);
+    arg_plane->add_intvalue((int)plane);
 
-    // copy argument eqn
-    GLMessage_DataType *arg_eqn = glmsg.add_args();
-    arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT64);
-    arg_eqn->add_int64value((uintptr_t)eqn);
+    // copy argument equation
+    GLMessage_DataType *arg_equation = glmsg.add_args();
+    arg_equation->set_isarray(false);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetClipPlanef(pname, eqn);
+    glContext->hooks->gl.glGetClipPlanef(plane, equation);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) eqn,
+        (void *) equation,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -16060,7 +23742,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
+void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16101,7 +23783,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
+void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16142,17 +23824,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
+void GLTrace_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetTexEnvfv);
 
-    // copy argument env
-    GLMessage_DataType *arg_env = glmsg.add_args();
-    arg_env->set_isarray(false);
-    arg_env->set_type(GLMessage::DataType::ENUM);
-    arg_env->add_intvalue((int)env);
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
 
     // copy argument pname
     GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -16169,7 +23851,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetTexEnvfv(env, pname, params);
+    glContext->hooks->gl.glGetTexEnvfv(target, pname, params);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -16217,7 +23899,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params) {
+void GLTrace_glLightModelfv(GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16292,7 +23974,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
+void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16333,7 +24015,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLoadMatrixf(const GLfloat *m) {
+void GLTrace_glLoadMatrixf(const GLfloat * m) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16402,7 +24084,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
+void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16443,7 +24125,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMultMatrixf(const GLfloat *m) {
+void GLTrace_glMultMatrixf(const GLfloat * m) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16564,52 +24246,52 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
+void GLTrace_glOrthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glOrthof);
 
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::FLOAT);
-    arg_left->add_floatvalue(left);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::FLOAT);
+    arg_l->add_floatvalue(l);
 
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::FLOAT);
-    arg_right->add_floatvalue(right);
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::FLOAT);
+    arg_r->add_floatvalue(r);
 
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::FLOAT);
-    arg_bottom->add_floatvalue(bottom);
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::FLOAT);
+    arg_b->add_floatvalue(b);
 
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::FLOAT);
-    arg_top->add_floatvalue(top);
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::FLOAT);
+    arg_t->add_floatvalue(t);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::FLOAT);
-    arg_zNear->add_floatvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::FLOAT);
+    arg_n->add_floatvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::FLOAT);
-    arg_zFar->add_floatvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::FLOAT);
+    arg_f->add_floatvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glOrthof(left, right, bottom, top, zNear, zFar);
+    glContext->hooks->gl.glOrthof(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -16656,7 +24338,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params) {
+void GLTrace_glPointParameterfv(GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16845,7 +24527,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
+void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16926,7 +24608,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref) {
+void GLTrace_glAlphaFuncx(GLenum func, GLfixed ref) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -16960,7 +24642,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
+void GLTrace_glClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17006,7 +24688,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearDepthx(GLclampx depth) {
+void GLTrace_glClearDepthx(GLfixed depth) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17062,7 +24744,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation) {
+void GLTrace_glClipPlanex(GLenum plane, const GLfixed * equation) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17189,7 +24871,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17236,28 +24918,28 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar) {
+void GLTrace_glDepthRangex(GLfixed n, GLfixed f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glDepthRangex);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::INT);
-    arg_zNear->add_intvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::INT);
-    arg_zFar->add_intvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::INT);
+    arg_f->add_intvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glDepthRangex(zNear, zFar);
+    glContext->hooks->gl.glDepthRangex(n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -17360,7 +25042,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFogxv(GLenum pname, const GLfixed *params) {
+void GLTrace_glFogxv(GLenum pname, const GLfixed * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17372,21 +25054,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFogxv(pname, params);
+    glContext->hooks->gl.glFogxv(pname, param);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) param,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -17395,52 +25077,52 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+void GLTrace_glFrustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glFrustumx);
 
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::INT);
-    arg_left->add_intvalue(left);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::INT);
+    arg_l->add_intvalue(l);
 
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::INT);
-    arg_right->add_intvalue(right);
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::INT);
+    arg_r->add_intvalue(r);
 
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::INT);
-    arg_bottom->add_intvalue(bottom);
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::INT);
+    arg_b->add_intvalue(b);
 
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::INT);
-    arg_top->add_intvalue(top);
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::INT);
+    arg_t->add_intvalue(t);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::INT);
-    arg_zNear->add_intvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::INT);
-    arg_zFar->add_intvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::INT);
+    arg_f->add_intvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFrustumx(left, right, bottom, top, zNear, zFar);
+    glContext->hooks->gl.glFrustumx(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -17453,33 +25135,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
+void GLTrace_glGetClipPlanex(GLenum plane, GLfixed * equation) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetClipPlanex);
 
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
+    // copy argument plane
+    GLMessage_DataType *arg_plane = glmsg.add_args();
+    arg_plane->set_isarray(false);
+    arg_plane->set_type(GLMessage::DataType::ENUM);
+    arg_plane->add_intvalue((int)plane);
 
-    // copy argument eqn
-    GLMessage_DataType *arg_eqn = glmsg.add_args();
-    arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT64);
-    arg_eqn->add_int64value((uintptr_t)eqn);
+    // copy argument equation
+    GLMessage_DataType *arg_equation = glmsg.add_args();
+    arg_equation->set_isarray(false);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetClipPlanex(pname, eqn);
+    glContext->hooks->gl.glGetClipPlanex(plane, equation);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) eqn,
+        (void *) equation,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -17488,7 +25170,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetFixedv(GLenum pname, GLfixed *params) {
+void GLTrace_glGetFixedv(GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17523,7 +25205,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
+void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17564,7 +25246,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
+void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17605,7 +25287,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetPointerv(GLenum pname, GLvoid **params) {
+void GLTrace_glGetPointerv(GLenum pname, void ** params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17640,17 +25322,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
+void GLTrace_glGetTexEnviv(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetTexEnviv);
 
-    // copy argument env
-    GLMessage_DataType *arg_env = glmsg.add_args();
-    arg_env->set_isarray(false);
-    arg_env->set_type(GLMessage::DataType::ENUM);
-    arg_env->add_intvalue((int)env);
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
 
     // copy argument pname
     GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -17667,7 +25349,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetTexEnviv(env, pname, params);
+    glContext->hooks->gl.glGetTexEnviv(target, pname, params);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -17681,17 +25363,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
+void GLTrace_glGetTexEnvxv(GLenum target, GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetTexEnvxv);
 
-    // copy argument env
-    GLMessage_DataType *arg_env = glmsg.add_args();
-    arg_env->set_isarray(false);
-    arg_env->set_type(GLMessage::DataType::ENUM);
-    arg_env->add_intvalue((int)env);
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
 
     // copy argument pname
     GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -17708,7 +25390,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetTexEnvxv(env, pname, params);
+    glContext->hooks->gl.glGetTexEnvxv(target, pname, params);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -17722,7 +25404,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
+void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17797,7 +25479,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params) {
+void GLTrace_glLightModelxv(GLenum pname, const GLfixed * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17809,21 +25491,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glLightModelxv(pname, params);
+    glContext->hooks->gl.glLightModelxv(pname, param);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) param,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -17872,7 +25554,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params) {
+void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -17963,7 +25645,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLoadMatrixx(const GLfixed *m) {
+void GLTrace_glLoadMatrixx(const GLfixed * m) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18060,7 +25742,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) {
+void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18078,21 +25760,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glMaterialxv(face, pname, params);
+    glContext->hooks->gl.glMaterialxv(face, pname, param);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) param,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -18129,7 +25811,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMultMatrixx(const GLfixed *m) {
+void GLTrace_glMultMatrixx(const GLfixed * m) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18158,17 +25840,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
+void GLTrace_glMultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glMultiTexCoord4x);
 
-    // copy argument target
-    GLMessage_DataType *arg_target = glmsg.add_args();
-    arg_target->set_isarray(false);
-    arg_target->set_type(GLMessage::DataType::ENUM);
-    arg_target->add_intvalue((int)target);
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
 
     // copy argument s
     GLMessage_DataType *arg_s = glmsg.add_args();
@@ -18197,7 +25879,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glMultiTexCoord4x(target, s, t, r, q);
+    glContext->hooks->gl.glMultiTexCoord4x(texture, s, t, r, q);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -18250,7 +25932,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
+void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18291,52 +25973,52 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+void GLTrace_glOrthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glOrthox);
 
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::INT);
-    arg_left->add_intvalue(left);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::INT);
+    arg_l->add_intvalue(l);
 
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::INT);
-    arg_right->add_intvalue(right);
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::INT);
+    arg_r->add_intvalue(r);
 
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::INT);
-    arg_bottom->add_intvalue(bottom);
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::INT);
+    arg_b->add_intvalue(b);
 
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::INT);
-    arg_top->add_intvalue(top);
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::INT);
+    arg_t->add_intvalue(t);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::INT);
-    arg_zNear->add_intvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::INT);
-    arg_zFar->add_intvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::INT);
+    arg_f->add_intvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glOrthox(left, right, bottom, top, zNear, zFar);
+    glContext->hooks->gl.glOrthox(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -18383,7 +26065,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params) {
+void GLTrace_glPointParameterxv(GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18672,7 +26354,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18799,7 +26481,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
+void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18840,7 +26522,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) {
+void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -18921,7 +26603,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) {
+void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19002,7 +26684,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19049,47 +26731,6 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glPointSizePointerOES);
-
-    // copy argument type
-    GLMessage_DataType *arg_type = glmsg.add_args();
-    arg_type->set_isarray(false);
-    arg_type->set_type(GLMessage::DataType::ENUM);
-    arg_type->add_intvalue((int)type);
-
-    // copy argument stride
-    GLMessage_DataType *arg_stride = glmsg.add_args();
-    arg_stride->set_isarray(false);
-    arg_stride->set_type(GLMessage::DataType::INT);
-    arg_stride->add_intvalue(stride);
-
-    // copy argument pointer
-    GLMessage_DataType *arg_pointer = glmsg.add_args();
-    arg_pointer->set_isarray(false);
-    arg_pointer->set_type(GLMessage::DataType::INT64);
-    arg_pointer->add_int64value((uintptr_t)pointer);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glPointSizePointerOES(type, stride, pointer);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) pointer,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
 
 // Definitions for GL1Ext APIs
 
@@ -19201,6 +26842,771 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glMultiTexCoord1bOES(GLenum texture, GLbyte s) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord1bOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord1bOES(texture, s);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord1bvOES(GLenum texture, const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord1bvOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord1bvOES(texture, coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord2bOES(GLenum texture, GLbyte s, GLbyte t) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord2bOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::BYTE);
+    arg_t->add_intvalue((int)t);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord2bOES(texture, s, t);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord2bvOES(GLenum texture, const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord2bvOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord2bvOES(texture, coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord3bOES(GLenum texture, GLbyte s, GLbyte t, GLbyte r) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord3bOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::BYTE);
+    arg_t->add_intvalue((int)t);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::BYTE);
+    arg_r->add_intvalue((int)r);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord3bOES(texture, s, t, r);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord3bvOES(GLenum texture, const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord3bvOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord3bvOES(texture, coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord4bOES(GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord4bOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::BYTE);
+    arg_t->add_intvalue((int)t);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::BYTE);
+    arg_r->add_intvalue((int)r);
+
+    // copy argument q
+    GLMessage_DataType *arg_q = glmsg.add_args();
+    arg_q->set_isarray(false);
+    arg_q->set_type(GLMessage::DataType::BYTE);
+    arg_q->add_intvalue((int)q);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord4bOES(texture, s, t, r, q);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glMultiTexCoord4bvOES(GLenum texture, const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glMultiTexCoord4bvOES);
+
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glMultiTexCoord4bvOES(texture, coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord1bOES(GLbyte s) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord1bOES);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord1bOES(s);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord1bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord1bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord1bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord2bOES(GLbyte s, GLbyte t) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord2bOES);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::BYTE);
+    arg_t->add_intvalue((int)t);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord2bOES(s, t);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord2bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord2bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord2bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord3bOES(GLbyte s, GLbyte t, GLbyte r) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord3bOES);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::BYTE);
+    arg_t->add_intvalue((int)t);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::BYTE);
+    arg_r->add_intvalue((int)r);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord3bOES(s, t, r);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord3bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord3bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord3bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord4bOES(GLbyte s, GLbyte t, GLbyte r, GLbyte q) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord4bOES);
+
+    // copy argument s
+    GLMessage_DataType *arg_s = glmsg.add_args();
+    arg_s->set_isarray(false);
+    arg_s->set_type(GLMessage::DataType::BYTE);
+    arg_s->add_intvalue((int)s);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::BYTE);
+    arg_t->add_intvalue((int)t);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::BYTE);
+    arg_r->add_intvalue((int)r);
+
+    // copy argument q
+    GLMessage_DataType *arg_q = glmsg.add_args();
+    arg_q->set_isarray(false);
+    arg_q->set_type(GLMessage::DataType::BYTE);
+    arg_q->add_intvalue((int)q);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord4bOES(s, t, r, q);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexCoord4bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexCoord4bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexCoord4bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertex2bOES(GLbyte x) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertex2bOES);
+
+    // copy argument x
+    GLMessage_DataType *arg_x = glmsg.add_args();
+    arg_x->set_isarray(false);
+    arg_x->set_type(GLMessage::DataType::BYTE);
+    arg_x->add_intvalue((int)x);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertex2bOES(x);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertex2bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertex2bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertex2bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertex3bOES(GLbyte x, GLbyte y) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertex3bOES);
+
+    // copy argument x
+    GLMessage_DataType *arg_x = glmsg.add_args();
+    arg_x->set_isarray(false);
+    arg_x->set_type(GLMessage::DataType::BYTE);
+    arg_x->add_intvalue((int)x);
+
+    // copy argument y
+    GLMessage_DataType *arg_y = glmsg.add_args();
+    arg_y->set_isarray(false);
+    arg_y->set_type(GLMessage::DataType::BYTE);
+    arg_y->add_intvalue((int)y);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertex3bOES(x, y);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertex3bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertex3bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertex3bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertex4bOES(GLbyte x, GLbyte y, GLbyte z) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertex4bOES);
+
+    // copy argument x
+    GLMessage_DataType *arg_x = glmsg.add_args();
+    arg_x->set_isarray(false);
+    arg_x->set_type(GLMessage::DataType::BYTE);
+    arg_x->add_intvalue((int)x);
+
+    // copy argument y
+    GLMessage_DataType *arg_y = glmsg.add_args();
+    arg_y->set_isarray(false);
+    arg_y->set_type(GLMessage::DataType::BYTE);
+    arg_y->add_intvalue((int)y);
+
+    // copy argument z
+    GLMessage_DataType *arg_z = glmsg.add_args();
+    arg_z->set_isarray(false);
+    arg_z->set_type(GLMessage::DataType::BYTE);
+    arg_z->add_intvalue((int)z);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertex4bOES(x, y, z);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glVertex4bvOES(const GLbyte * coords) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glVertex4bvOES);
+
+    // copy argument coords
+    GLMessage_DataType *arg_coords = glmsg.add_args();
+    arg_coords->set_isarray(false);
+    arg_coords->set_type(GLMessage::DataType::INT64);
+    arg_coords->add_int64value((uintptr_t)coords);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glVertex4bvOES(coords);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) coords,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -19357,7 +27763,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawTexsvOES(const GLshort *coords) {
+void GLTrace_glDrawTexsvOES(const GLshort * coords) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19386,7 +27792,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawTexivOES(const GLint *coords) {
+void GLTrace_glDrawTexivOES(const GLint * coords) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19415,7 +27821,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawTexxvOES(const GLfixed *coords) {
+void GLTrace_glDrawTexxvOES(const GLfixed * coords) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19496,7 +27902,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDrawTexfvOES(const GLfloat *coords) {
+void GLTrace_glDrawTexfvOES(const GLfloat * coords) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19525,7 +27931,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref) {
+void GLTrace_glAlphaFuncxOES(GLenum func, GLfixed ref) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19559,7 +27965,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
+void GLTrace_glClearColorxOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19605,7 +28011,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearDepthxOES(GLclampx depth) {
+void GLTrace_glClearDepthxOES(GLfixed depth) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19633,7 +28039,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation) {
+void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed * equation) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19714,28 +28120,28 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar) {
+void GLTrace_glDepthRangexOES(GLfixed n, GLfixed f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glDepthRangexOES);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::INT);
-    arg_zNear->add_intvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::INT);
-    arg_zFar->add_intvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::INT);
+    arg_f->add_intvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glDepthRangexOES(zNear, zFar);
+    glContext->hooks->gl.glDepthRangexOES(n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -19782,7 +28188,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params) {
+void GLTrace_glFogxvOES(GLenum pname, const GLfixed * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19794,21 +28200,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFogxvOES(pname, params);
+    glContext->hooks->gl.glFogxvOES(pname, param);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) param,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -19817,52 +28223,52 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+void GLTrace_glFrustumxOES(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glFrustumxOES);
 
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::INT);
-    arg_left->add_intvalue(left);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::INT);
+    arg_l->add_intvalue(l);
 
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::INT);
-    arg_right->add_intvalue(right);
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::INT);
+    arg_r->add_intvalue(r);
 
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::INT);
-    arg_bottom->add_intvalue(bottom);
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::INT);
+    arg_b->add_intvalue(b);
 
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::INT);
-    arg_top->add_intvalue(top);
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::INT);
+    arg_t->add_intvalue(t);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::INT);
-    arg_zNear->add_intvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::INT);
-    arg_zFar->add_intvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::INT);
+    arg_f->add_intvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFrustumxOES(left, right, bottom, top, zNear, zFar);
+    glContext->hooks->gl.glFrustumxOES(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -19875,33 +28281,33 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) {
+void GLTrace_glGetClipPlanexOES(GLenum plane, GLfixed * equation) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetClipPlanexOES);
 
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
+    // copy argument plane
+    GLMessage_DataType *arg_plane = glmsg.add_args();
+    arg_plane->set_isarray(false);
+    arg_plane->set_type(GLMessage::DataType::ENUM);
+    arg_plane->add_intvalue((int)plane);
 
-    // copy argument eqn
-    GLMessage_DataType *arg_eqn = glmsg.add_args();
-    arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT64);
-    arg_eqn->add_int64value((uintptr_t)eqn);
+    // copy argument equation
+    GLMessage_DataType *arg_equation = glmsg.add_args();
+    arg_equation->set_isarray(false);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetClipPlanexOES(pname, eqn);
+    glContext->hooks->gl.glGetClipPlanexOES(plane, equation);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) eqn,
+        (void *) equation,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -19910,7 +28316,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params) {
+void GLTrace_glGetFixedvOES(GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -19945,99 +28351,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glGetLightxvOES);
-
-    // copy argument light
-    GLMessage_DataType *arg_light = glmsg.add_args();
-    arg_light->set_isarray(false);
-    arg_light->set_type(GLMessage::DataType::ENUM);
-    arg_light->add_intvalue((int)light);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetLightxvOES(light, pname, params);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) params,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glGetMaterialxvOES);
-
-    // copy argument face
-    GLMessage_DataType *arg_face = glmsg.add_args();
-    arg_face->set_isarray(false);
-    arg_face->set_type(GLMessage::DataType::ENUM);
-    arg_face->add_intvalue((int)face);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetMaterialxvOES(face, pname, params);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) params,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) {
+void GLTrace_glGetTexEnvxvOES(GLenum target, GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glGetTexEnvxvOES);
 
-    // copy argument env
-    GLMessage_DataType *arg_env = glmsg.add_args();
-    arg_env->set_isarray(false);
-    arg_env->set_type(GLMessage::DataType::ENUM);
-    arg_env->add_intvalue((int)env);
+    // copy argument target
+    GLMessage_DataType *arg_target = glmsg.add_args();
+    arg_target->set_isarray(false);
+    arg_target->set_type(GLMessage::DataType::ENUM);
+    arg_target->add_intvalue((int)target);
 
     // copy argument pname
     GLMessage_DataType *arg_pname = glmsg.add_args();
@@ -20054,7 +28378,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetTexEnvxvOES(env, pname, params);
+    glContext->hooks->gl.glGetTexEnvxvOES(target, pname, params);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -20068,7 +28392,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) {
+void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20143,7 +28467,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params) {
+void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20155,21 +28479,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glLightModelxvOES(pname, params);
+    glContext->hooks->gl.glLightModelxvOES(pname, param);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) param,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -20218,7 +28542,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) {
+void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20287,7 +28611,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glLoadMatrixxOES(const GLfixed *m) {
+void GLTrace_glLoadMatrixxOES(const GLfixed * m) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20356,7 +28680,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) {
+void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed * param) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20374,21 +28698,21 @@
     arg_pname->set_type(GLMessage::DataType::ENUM);
     arg_pname->add_intvalue((int)pname);
 
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT64);
+    arg_param->add_int64value((uintptr_t)param);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glMaterialxvOES(face, pname, params);
+    glContext->hooks->gl.glMaterialxvOES(face, pname, param);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) params,
+        (void *) param,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -20397,7 +28721,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMultMatrixxOES(const GLfixed *m) {
+void GLTrace_glMultMatrixxOES(const GLfixed * m) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20426,17 +28750,17 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
+void GLTrace_glMultiTexCoord4xOES(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glMultiTexCoord4xOES);
 
-    // copy argument target
-    GLMessage_DataType *arg_target = glmsg.add_args();
-    arg_target->set_isarray(false);
-    arg_target->set_type(GLMessage::DataType::ENUM);
-    arg_target->add_intvalue((int)target);
+    // copy argument texture
+    GLMessage_DataType *arg_texture = glmsg.add_args();
+    arg_texture->set_isarray(false);
+    arg_texture->set_type(GLMessage::DataType::ENUM);
+    arg_texture->add_intvalue((int)texture);
 
     // copy argument s
     GLMessage_DataType *arg_s = glmsg.add_args();
@@ -20465,7 +28789,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glMultiTexCoord4xOES(target, s, t, r, q);
+    glContext->hooks->gl.glMultiTexCoord4xOES(texture, s, t, r, q);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -20518,52 +28842,52 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
+void GLTrace_glOrthoxOES(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
     glmsg.set_function(GLMessage::glOrthoxOES);
 
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::INT);
-    arg_left->add_intvalue(left);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::INT);
+    arg_l->add_intvalue(l);
 
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::INT);
-    arg_right->add_intvalue(right);
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::INT);
+    arg_r->add_intvalue(r);
 
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::INT);
-    arg_bottom->add_intvalue(bottom);
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::INT);
+    arg_b->add_intvalue(b);
 
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::INT);
-    arg_top->add_intvalue(top);
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::INT);
+    arg_t->add_intvalue(t);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::INT);
-    arg_zNear->add_intvalue(zNear);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::INT);
+    arg_n->add_intvalue(n);
 
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::INT);
-    arg_zFar->add_intvalue(zFar);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::INT);
+    arg_f->add_intvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glOrthoxOES(left, right, bottom, top, zNear, zFar);
+    glContext->hooks->gl.glOrthoxOES(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -20576,41 +28900,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glPointParameterxOES);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument param
-    GLMessage_DataType *arg_param = glmsg.add_args();
-    arg_param->set_isarray(false);
-    arg_param->set_type(GLMessage::DataType::INT);
-    arg_param->add_intvalue(param);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glPointParameterxOES(pname, param);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params) {
+void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20753,11 +29043,11 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
+void GLTrace_glSampleCoverageOES(GLfixed value, GLboolean invert) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
-    glmsg.set_function(GLMessage::glSampleCoveragexOES);
+    glmsg.set_function(GLMessage::glSampleCoverageOES);
 
     // copy argument value
     GLMessage_DataType *arg_value = glmsg.add_args();
@@ -20774,7 +29064,7 @@
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glSampleCoveragexOES(value, invert);
+    glContext->hooks->gl.glSampleCoverageOES(value, invert);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -20867,7 +29157,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) {
+void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -20948,7 +29238,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params) {
+void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21029,6 +29319,278 @@
     glContext->traceGLMessage(&glmsg);
 }
 
+void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetLightxvOES);
+
+    // copy argument light
+    GLMessage_DataType *arg_light = glmsg.add_args();
+    arg_light->set_isarray(false);
+    arg_light->set_type(GLMessage::DataType::ENUM);
+    arg_light->add_intvalue((int)light);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetLightxvOES(light, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetMaterialxvOES);
+
+    // copy argument face
+    GLMessage_DataType *arg_face = glmsg.add_args();
+    arg_face->set_isarray(false);
+    arg_face->set_type(GLMessage::DataType::ENUM);
+    arg_face->add_intvalue((int)face);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetMaterialxvOES(face, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glPointParameterxOES);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT);
+    arg_param->add_intvalue(param);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glPointParameterxOES(pname, param);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glSampleCoveragexOES);
+
+    // copy argument value
+    GLMessage_DataType *arg_value = glmsg.add_args();
+    arg_value->set_isarray(false);
+    arg_value->set_type(GLMessage::DataType::INT);
+    arg_value->add_intvalue(value);
+
+    // copy argument invert
+    GLMessage_DataType *arg_invert = glmsg.add_args();
+    arg_invert->set_isarray(false);
+    arg_invert->set_type(GLMessage::DataType::BOOL);
+    arg_invert->add_boolvalue(invert);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glSampleCoveragexOES(value, invert);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetTexGenxvOES);
+
+    // copy argument coord
+    GLMessage_DataType *arg_coord = glmsg.add_args();
+    arg_coord->set_isarray(false);
+    arg_coord->set_type(GLMessage::DataType::ENUM);
+    arg_coord->add_intvalue((int)coord);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetTexGenxvOES(coord, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexGenxOES);
+
+    // copy argument coord
+    GLMessage_DataType *arg_coord = glmsg.add_args();
+    arg_coord->set_isarray(false);
+    arg_coord->set_type(GLMessage::DataType::ENUM);
+    arg_coord->add_intvalue((int)coord);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument param
+    GLMessage_DataType *arg_param = glmsg.add_args();
+    arg_param->set_isarray(false);
+    arg_param->set_type(GLMessage::DataType::INT);
+    arg_param->add_intvalue(param);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexGenxOES(coord, pname, param);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed * params) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glTexGenxvOES);
+
+    // copy argument coord
+    GLMessage_DataType *arg_coord = glmsg.add_args();
+    arg_coord->set_isarray(false);
+    arg_coord->set_type(GLMessage::DataType::ENUM);
+    arg_coord->add_intvalue((int)coord);
+
+    // copy argument pname
+    GLMessage_DataType *arg_pname = glmsg.add_args();
+    arg_pname->set_isarray(false);
+    arg_pname->set_type(GLMessage::DataType::ENUM);
+    arg_pname->add_intvalue((int)pname);
+
+    // copy argument params
+    GLMessage_DataType *arg_params = glmsg.add_args();
+    arg_params->set_isarray(false);
+    arg_params->set_type(GLMessage::DataType::INT64);
+    arg_params->add_int64value((uintptr_t)params);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glTexGenxvOES(coord, pname, params);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) params,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
 GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
@@ -21099,7 +29661,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) {
+void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint * renderbuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21134,7 +29696,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) {
+void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint * renderbuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21215,7 +29777,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params) {
+void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21326,7 +29888,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) {
+void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint * framebuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21361,7 +29923,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) {
+void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint * framebuffers) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21530,7 +30092,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
+void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21655,7 +30217,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21702,7 +30264,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
+void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const void * pointer) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21749,7 +30311,48 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
+void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const void * pointer) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glPointSizePointerOES);
+
+    // copy argument type
+    GLMessage_DataType *arg_type = glmsg.add_args();
+    arg_type->set_isarray(false);
+    arg_type->set_type(GLMessage::DataType::ENUM);
+    arg_type->add_intvalue((int)type);
+
+    // copy argument stride
+    GLMessage_DataType *arg_stride = glmsg.add_args();
+    arg_stride->set_isarray(false);
+    arg_stride->set_type(GLMessage::DataType::INT);
+    arg_stride->add_intvalue(stride);
+
+    // copy argument pointer
+    GLMessage_DataType *arg_pointer = glmsg.add_args();
+    arg_pointer->set_isarray(false);
+    arg_pointer->set_type(GLMessage::DataType::INT64);
+    arg_pointer->add_int64value((uintptr_t)pointer);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glPointSizePointerOES(type, stride, pointer);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) pointer,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+GLbitfield GLTrace_glQueryMatrixxOES(GLfixed * mantissa, GLint * exponent) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21793,28 +30396,22 @@
     return retValue;
 }
 
-void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar) {
+void GLTrace_glClearDepthfOES(GLclampf depth) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
-    glmsg.set_function(GLMessage::glDepthRangefOES);
+    glmsg.set_function(GLMessage::glClearDepthfOES);
 
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::FLOAT);
-    arg_zNear->add_floatvalue(zNear);
-
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::FLOAT);
-    arg_zFar->add_floatvalue(zFar);
+    // copy argument depth
+    GLMessage_DataType *arg_depth = glmsg.add_args();
+    arg_depth->set_isarray(false);
+    arg_depth->set_type(GLMessage::DataType::FLOAT);
+    arg_depth->add_floatvalue(depth);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glDepthRangefOES(zNear, zFar);
+    glContext->hooks->gl.glClearDepthfOES(depth);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -21827,123 +30424,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glFrustumfOES);
-
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::FLOAT);
-    arg_left->add_floatvalue(left);
-
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::FLOAT);
-    arg_right->add_floatvalue(right);
-
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::FLOAT);
-    arg_bottom->add_floatvalue(bottom);
-
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::FLOAT);
-    arg_top->add_floatvalue(top);
-
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::FLOAT);
-    arg_zNear->add_floatvalue(zNear);
-
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::FLOAT);
-    arg_zFar->add_floatvalue(zFar);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glFrustumfOES(left, right, bottom, top, zNear, zFar);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glOrthofOES);
-
-    // copy argument left
-    GLMessage_DataType *arg_left = glmsg.add_args();
-    arg_left->set_isarray(false);
-    arg_left->set_type(GLMessage::DataType::FLOAT);
-    arg_left->add_floatvalue(left);
-
-    // copy argument right
-    GLMessage_DataType *arg_right = glmsg.add_args();
-    arg_right->set_isarray(false);
-    arg_right->set_type(GLMessage::DataType::FLOAT);
-    arg_right->add_floatvalue(right);
-
-    // copy argument bottom
-    GLMessage_DataType *arg_bottom = glmsg.add_args();
-    arg_bottom->set_isarray(false);
-    arg_bottom->set_type(GLMessage::DataType::FLOAT);
-    arg_bottom->add_floatvalue(bottom);
-
-    // copy argument top
-    GLMessage_DataType *arg_top = glmsg.add_args();
-    arg_top->set_isarray(false);
-    arg_top->set_type(GLMessage::DataType::FLOAT);
-    arg_top->add_floatvalue(top);
-
-    // copy argument zNear
-    GLMessage_DataType *arg_zNear = glmsg.add_args();
-    arg_zNear->set_isarray(false);
-    arg_zNear->set_type(GLMessage::DataType::FLOAT);
-    arg_zNear->add_floatvalue(zNear);
-
-    // copy argument zFar
-    GLMessage_DataType *arg_zFar = glmsg.add_args();
-    arg_zFar->set_isarray(false);
-    arg_zFar->set_type(GLMessage::DataType::FLOAT);
-    arg_zFar->add_floatvalue(zFar);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glOrthofOES(left, right, bottom, top, zNear, zFar);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation) {
+void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat * equation) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -21978,33 +30459,32 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) {
+void GLTrace_glDepthRangefOES(GLclampf n, GLclampf f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
-    glmsg.set_function(GLMessage::glGetClipPlanefOES);
+    glmsg.set_function(GLMessage::glDepthRangefOES);
 
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::FLOAT);
+    arg_n->add_floatvalue(n);
 
-    // copy argument eqn
-    GLMessage_DataType *arg_eqn = glmsg.add_args();
-    arg_eqn->set_isarray(false);
-    arg_eqn->set_type(GLMessage::DataType::INT64);
-    arg_eqn->add_int64value((uintptr_t)eqn);
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::FLOAT);
+    arg_f->add_floatvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetClipPlanefOES(pname, eqn);
+    glContext->hooks->gl.glDepthRangefOES(n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
     void *pointerArgs[] = {
-        (void *) eqn,
     };
 
     fixupGLMessage(glContext, wallStartTime, wallEndTime,
@@ -22013,22 +30493,145 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClearDepthfOES(GLclampf depth) {
+void GLTrace_glFrustumfOES(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
-    glmsg.set_function(GLMessage::glClearDepthfOES);
+    glmsg.set_function(GLMessage::glFrustumfOES);
 
-    // copy argument depth
-    GLMessage_DataType *arg_depth = glmsg.add_args();
-    arg_depth->set_isarray(false);
-    arg_depth->set_type(GLMessage::DataType::FLOAT);
-    arg_depth->add_floatvalue(depth);
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::FLOAT);
+    arg_l->add_floatvalue(l);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::FLOAT);
+    arg_r->add_floatvalue(r);
+
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::FLOAT);
+    arg_b->add_floatvalue(b);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::FLOAT);
+    arg_t->add_floatvalue(t);
+
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::FLOAT);
+    arg_n->add_floatvalue(n);
+
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::FLOAT);
+    arg_f->add_floatvalue(f);
 
     // call function
     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glClearDepthfOES(depth);
+    glContext->hooks->gl.glFrustumfOES(l, r, b, t, n, f);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetClipPlanefOES(GLenum plane, GLfloat * equation) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glGetClipPlanefOES);
+
+    // copy argument plane
+    GLMessage_DataType *arg_plane = glmsg.add_args();
+    arg_plane->set_isarray(false);
+    arg_plane->set_type(GLMessage::DataType::ENUM);
+    arg_plane->add_intvalue((int)plane);
+
+    // copy argument equation
+    GLMessage_DataType *arg_equation = glmsg.add_args();
+    arg_equation->set_isarray(false);
+    arg_equation->set_type(GLMessage::DataType::INT64);
+    arg_equation->add_int64value((uintptr_t)equation);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glGetClipPlanefOES(plane, equation);
+    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
+    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
+
+    void *pointerArgs[] = {
+        (void *) equation,
+    };
+
+    fixupGLMessage(glContext, wallStartTime, wallEndTime,
+                              threadStartTime, threadEndTime,
+                              &glmsg, pointerArgs);
+    glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glOrthofOES(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {
+    GLMessage glmsg;
+    GLTraceContext *glContext = getGLTraceContext();
+
+    glmsg.set_function(GLMessage::glOrthofOES);
+
+    // copy argument l
+    GLMessage_DataType *arg_l = glmsg.add_args();
+    arg_l->set_isarray(false);
+    arg_l->set_type(GLMessage::DataType::FLOAT);
+    arg_l->add_floatvalue(l);
+
+    // copy argument r
+    GLMessage_DataType *arg_r = glmsg.add_args();
+    arg_r->set_isarray(false);
+    arg_r->set_type(GLMessage::DataType::FLOAT);
+    arg_r->add_floatvalue(r);
+
+    // copy argument b
+    GLMessage_DataType *arg_b = glmsg.add_args();
+    arg_b->set_isarray(false);
+    arg_b->set_type(GLMessage::DataType::FLOAT);
+    arg_b->add_floatvalue(b);
+
+    // copy argument t
+    GLMessage_DataType *arg_t = glmsg.add_args();
+    arg_t->set_isarray(false);
+    arg_t->set_type(GLMessage::DataType::FLOAT);
+    arg_t->add_floatvalue(t);
+
+    // copy argument n
+    GLMessage_DataType *arg_n = glmsg.add_args();
+    arg_n->set_isarray(false);
+    arg_n->set_type(GLMessage::DataType::FLOAT);
+    arg_n->add_floatvalue(n);
+
+    // copy argument f
+    GLMessage_DataType *arg_f = glmsg.add_args();
+    arg_f->set_isarray(false);
+    arg_f->set_type(GLMessage::DataType::FLOAT);
+    arg_f->add_floatvalue(f);
+
+    // call function
+    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
+    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
+    glContext->hooks->gl.glOrthofOES(l, r, b, t, n, f);
     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
 
@@ -22081,7 +30684,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) {
+void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -22162,7 +30765,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) {
+void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -22203,88 +30806,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glTexGenxOES);
-
-    // copy argument coord
-    GLMessage_DataType *arg_coord = glmsg.add_args();
-    arg_coord->set_isarray(false);
-    arg_coord->set_type(GLMessage::DataType::ENUM);
-    arg_coord->add_intvalue((int)coord);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument param
-    GLMessage_DataType *arg_param = glmsg.add_args();
-    arg_param->set_isarray(false);
-    arg_param->set_type(GLMessage::DataType::INT);
-    arg_param->add_intvalue(param);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glTexGenxOES(coord, pname, param);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glTexGenxvOES);
-
-    // copy argument coord
-    GLMessage_DataType *arg_coord = glmsg.add_args();
-    arg_coord->set_isarray(false);
-    arg_coord->set_type(GLMessage::DataType::ENUM);
-    arg_coord->add_intvalue((int)coord);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glTexGenxvOES(coord, pname, params);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) params,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) {
+void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -22325,7 +30847,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) {
+void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint * params) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -22366,48 +30888,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) {
-    GLMessage glmsg;
-    GLTraceContext *glContext = getGLTraceContext();
-
-    glmsg.set_function(GLMessage::glGetTexGenxvOES);
-
-    // copy argument coord
-    GLMessage_DataType *arg_coord = glmsg.add_args();
-    arg_coord->set_isarray(false);
-    arg_coord->set_type(GLMessage::DataType::ENUM);
-    arg_coord->add_intvalue((int)coord);
-
-    // copy argument pname
-    GLMessage_DataType *arg_pname = glmsg.add_args();
-    arg_pname->set_isarray(false);
-    arg_pname->set_type(GLMessage::DataType::ENUM);
-    arg_pname->add_intvalue((int)pname);
-
-    // copy argument params
-    GLMessage_DataType *arg_params = glmsg.add_args();
-    arg_params->set_isarray(false);
-    arg_params->set_type(GLMessage::DataType::INT64);
-    arg_params->add_int64value((uintptr_t)params);
-
-    // call function
-    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
-    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
-    glContext->hooks->gl.glGetTexGenxvOES(coord, pname, params);
-    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
-    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
-
-    void *pointerArgs[] = {
-        (void *) params,
-    };
-
-    fixupGLMessage(glContext, wallStartTime, wallEndTime,
-                              threadStartTime, threadEndTime,
-                              &glmsg, pointerArgs);
-    glContext->traceGLMessage(&glmsg);
-}
-
-void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn) {
+void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat * eqn) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
@@ -22442,7 +30923,7 @@
     glContext->traceGLMessage(&glmsg);
 }
 
-void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn) {
+void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed * eqn) {
     GLMessage glmsg;
     GLTraceContext *glContext = getGLTraceContext();
 
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.h b/opengl/libs/GLES_trace/src/gltrace_api.h
index 3a839dd..a9ca3c4 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.h
+++ b/opengl/libs/GLES_trace/src/gltrace_api.h
@@ -19,11 +19,11 @@
 namespace android {
 namespace gltrace {
 
-// Declarations for GL3 APIs
+// Declarations for GL2 APIs
 
 void GLTrace_glActiveTexture(GLenum texture);
 void GLTrace_glAttachShader(GLuint program, GLuint shader);
-void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name);
+void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar * name);
 void GLTrace_glBindBuffer(GLenum target, GLuint buffer);
 void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer);
 void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer);
@@ -32,29 +32,29 @@
 void GLTrace_glBlendEquation(GLenum mode);
 void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
 void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor);
-void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
-void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
+void GLTrace_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const void * data, GLenum usage);
+void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void * data);
 GLenum GLTrace_glCheckFramebufferStatus(GLenum target);
 void GLTrace_glClear(GLbitfield mask);
 void GLTrace_glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
-void GLTrace_glClearDepthf(GLfloat depth);
+void GLTrace_glClearDepthf(GLfloat d);
 void GLTrace_glClearStencil(GLint s);
 void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
 void GLTrace_glCompileShader(GLuint shader);
-void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
+void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data);
+void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data);
 void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
 void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
 GLuint GLTrace_glCreateProgram(void);
 GLuint GLTrace_glCreateShader(GLenum type);
 void GLTrace_glCullFace(GLenum mode);
-void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers);
-void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
+void GLTrace_glDeleteBuffers(GLsizei n, const GLuint * buffers);
+void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers);
 void GLTrace_glDeleteProgram(GLuint program);
-void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
+void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers);
 void GLTrace_glDeleteShader(GLuint shader);
-void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures);
+void GLTrace_glDeleteTextures(GLsizei n, const GLuint * textures);
 void GLTrace_glDepthFunc(GLenum func);
 void GLTrace_glDepthMask(GLboolean flag);
 void GLTrace_glDepthRangef(GLfloat n, GLfloat f);
@@ -62,7 +62,7 @@
 void GLTrace_glDisable(GLenum cap);
 void GLTrace_glDisableVertexAttribArray(GLuint index);
 void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count);
-void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void * indices);
 void GLTrace_glEnable(GLenum cap);
 void GLTrace_glEnableVertexAttribArray(GLuint index);
 void GLTrace_glFinish(void);
@@ -70,37 +70,37 @@
 void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
 void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
 void GLTrace_glFrontFace(GLenum mode);
-void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers);
+void GLTrace_glGenBuffers(GLsizei n, GLuint * buffers);
 void GLTrace_glGenerateMipmap(GLenum target);
-void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers);
-void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
-void GLTrace_glGenTextures(GLsizei n, GLuint* textures);
-void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar* name);
-void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params);
-void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
+void GLTrace_glGenFramebuffers(GLsizei n, GLuint * framebuffers);
+void GLTrace_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers);
+void GLTrace_glGenTextures(GLsizei n, GLuint * textures);
+void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders);
+GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar * name);
+void GLTrace_glGetBooleanv(GLenum pname, GLboolean * data);
+void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint * params);
 GLenum GLTrace_glGetError(void);
-void GLTrace_glGetFloatv(GLenum pname, GLfloat* params);
-void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
-void GLTrace_glGetIntegerv(GLenum pname, GLint* params);
-void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params);
-void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
-void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
-void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-const GLubyte* GLTrace_glGetString(GLenum name);
-void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
-void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
-void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params);
-void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params);
-GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar* name);
-void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
-void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
-void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
+void GLTrace_glGetFloatv(GLenum pname, GLfloat * data);
+void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params);
+void GLTrace_glGetIntegerv(GLenum pname, GLint * data);
+void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint * params);
+void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint * params);
+void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision);
+void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source);
+const GLubyte * GLTrace_glGetString(GLenum name);
+void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params);
+void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat * params);
+void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint * params);
+GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar * name);
+void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat * params);
+void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint * params);
+void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, void ** pointer);
 void GLTrace_glHint(GLenum target, GLenum mode);
 GLboolean GLTrace_glIsBuffer(GLuint buffer);
 GLboolean GLTrace_glIsEnabled(GLenum cap);
@@ -113,356 +113,524 @@
 void GLTrace_glLinkProgram(GLuint program);
 void GLTrace_glPixelStorei(GLenum pname, GLint param);
 void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units);
-void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels);
 void GLTrace_glReleaseShaderCompiler(void);
 void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glSampleCoverage(GLfloat value, GLboolean invert);
 void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
-void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
+void GLTrace_glShaderBinary(GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length);
+void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length);
 void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask);
 void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
 void GLTrace_glStencilMask(GLuint mask);
 void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask);
 void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
-void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels);
 void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param);
-void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
+void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params);
 void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param);
-void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
-void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
-void GLTrace_glUniform1f(GLint location, GLfloat x);
-void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
-void GLTrace_glUniform1i(GLint location, GLint x);
-void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v);
-void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y);
-void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
-void GLTrace_glUniform2i(GLint location, GLint x, GLint y);
-void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v);
-void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
-void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
-void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z);
-void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v);
-void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
-void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
-void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v);
-void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint * params);
+void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels);
+void GLTrace_glUniform1f(GLint location, GLfloat v0);
+void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glUniform1i(GLint location, GLint v0);
+void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint * value);
+void GLTrace_glUniform2f(GLint location, GLfloat v0, GLfloat v1);
+void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glUniform2i(GLint location, GLint v0, GLint v1);
+void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint * value);
+void GLTrace_glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glUniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint * value);
+void GLTrace_glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint * value);
+void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
 void GLTrace_glUseProgram(GLuint program);
 void GLTrace_glValidateProgram(GLuint program);
-void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x);
-void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values);
-void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
-void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values);
-void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
-void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values);
-void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values);
-void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
+void GLTrace_glVertexAttrib1f(GLuint index, GLfloat x);
+void GLTrace_glVertexAttrib1fv(GLuint index, const GLfloat * v);
+void GLTrace_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+void GLTrace_glVertexAttrib2fv(GLuint index, const GLfloat * v);
+void GLTrace_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glVertexAttrib3fv(GLuint index, const GLfloat * v);
+void GLTrace_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void GLTrace_glVertexAttrib4fv(GLuint index, const GLfloat * v);
+void GLTrace_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer);
 void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
 void GLTrace_glReadBuffer(GLenum mode);
-void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices);
-void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices);
+void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels);
+void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels);
 void GLTrace_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
-void GLTrace_glGenQueries(GLsizei n, GLuint* ids);
-void GLTrace_glDeleteQueries(GLsizei n, const GLuint* ids);
+void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data);
+void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data);
+void GLTrace_glGenQueries(GLsizei n, GLuint * ids);
+void GLTrace_glDeleteQueries(GLsizei n, const GLuint * ids);
 GLboolean GLTrace_glIsQuery(GLuint id);
 void GLTrace_glBeginQuery(GLenum target, GLuint id);
 void GLTrace_glEndQuery(GLenum target);
-void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint* params);
-void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params);
+void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params);
 GLboolean GLTrace_glUnmapBuffer(GLenum target);
-void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params);
-void GLTrace_glDrawBuffers(GLsizei n, const GLenum* bufs);
-void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
-void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, void ** params);
+void GLTrace_glDrawBuffers(GLsizei n, const GLenum * bufs);
+void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
 void GLTrace_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
 void GLTrace_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
-GLvoid* GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+void * GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
 void GLTrace_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
 void GLTrace_glBindVertexArray(GLuint array);
-void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint* arrays);
-void GLTrace_glGenVertexArrays(GLsizei n, GLuint* arrays);
+void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint * arrays);
+void GLTrace_glGenVertexArrays(GLsizei n, GLuint * arrays);
 GLboolean GLTrace_glIsVertexArray(GLuint array);
-void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint* data);
+void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint * data);
 void GLTrace_glBeginTransformFeedback(GLenum primitiveMode);
 void GLTrace_glEndTransformFeedback(void);
 void GLTrace_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
 void GLTrace_glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
-void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode);
-void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name);
-void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer);
-void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params);
-void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params);
+void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode);
+void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name);
+void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer);
+void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint * params);
+void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint * params);
 void GLTrace_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
 void GLTrace_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
-void GLTrace_glVertexAttribI4iv(GLuint index, const GLint* v);
-void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint* v);
-void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint* params);
-GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar *name);
+void GLTrace_glVertexAttribI4iv(GLuint index, const GLint * v);
+void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint * v);
+void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint * params);
+GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar * name);
 void GLTrace_glUniform1ui(GLint location, GLuint v0);
 void GLTrace_glUniform2ui(GLint location, GLuint v0, GLuint v1);
 void GLTrace_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
 void GLTrace_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
-void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint* value);
-void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint* value);
-void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint* value);
-void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint* value);
-void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value);
-void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value);
-void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value);
+void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint * value);
+void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint * value);
+void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat * value);
 void GLTrace_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
-const GLubyte* GLTrace_glGetStringi(GLenum name, GLuint index);
+const GLubyte * GLTrace_glGetStringi(GLenum name, GLuint index);
 void GLTrace_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
-void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices);
-void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
-GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName);
-void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params);
-void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName);
+void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices);
+void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params);
+GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar * uniformBlockName);
+void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params);
+void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName);
 void GLTrace_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
-void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
-void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount);
+void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount);
 GLsync GLTrace_glFenceSync(GLenum condition, GLbitfield flags);
 GLboolean GLTrace_glIsSync(GLsync sync);
 void GLTrace_glDeleteSync(GLsync sync);
 GLenum GLTrace_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
 void GLTrace_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
-void GLTrace_glGetInteger64v(GLenum pname, GLint64* params);
-void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
-void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data);
-void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params);
-void GLTrace_glGenSamplers(GLsizei count, GLuint* samplers);
-void GLTrace_glDeleteSamplers(GLsizei count, const GLuint* samplers);
+void GLTrace_glGetInteger64v(GLenum pname, GLint64 * data);
+void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values);
+void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64 * data);
+void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 * params);
+void GLTrace_glGenSamplers(GLsizei count, GLuint * samplers);
+void GLTrace_glDeleteSamplers(GLsizei count, const GLuint * samplers);
 GLboolean GLTrace_glIsSampler(GLuint sampler);
 void GLTrace_glBindSampler(GLuint unit, GLuint sampler);
 void GLTrace_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
-void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param);
+void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint * param);
 void GLTrace_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
-void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param);
-void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params);
-void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params);
+void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat * param);
+void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint * params);
+void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat * params);
 void GLTrace_glVertexAttribDivisor(GLuint index, GLuint divisor);
 void GLTrace_glBindTransformFeedback(GLenum target, GLuint id);
-void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids);
-void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint* ids);
+void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint * ids);
+void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint * ids);
 GLboolean GLTrace_glIsTransformFeedback(GLuint id);
 void GLTrace_glPauseTransformFeedback(void);
 void GLTrace_glResumeTransformFeedback(void);
-void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary);
-void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length);
+void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary);
+void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length);
 void GLTrace_glProgramParameteri(GLuint program, GLenum pname, GLint value);
-void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments);
-void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments);
+void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height);
 void GLTrace_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
-void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
+void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params);
+void GLTrace_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+void GLTrace_glDispatchComputeIndirect(GLintptr indirect);
+void GLTrace_glDrawArraysIndirect(GLenum mode, const void * indirect);
+void GLTrace_glDrawElementsIndirect(GLenum mode, GLenum type, const void * indirect);
+void GLTrace_glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
+void GLTrace_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params);
+GLuint GLTrace_glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar * name);
+void GLTrace_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name);
+void GLTrace_glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params);
+GLint GLTrace_glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar * name);
+void GLTrace_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
+void GLTrace_glActiveShaderProgram(GLuint pipeline, GLuint program);
+GLuint GLTrace_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const* strings);
+void GLTrace_glBindProgramPipeline(GLuint pipeline);
+void GLTrace_glDeleteProgramPipelines(GLsizei n, const GLuint * pipelines);
+void GLTrace_glGenProgramPipelines(GLsizei n, GLuint * pipelines);
+GLboolean GLTrace_glIsProgramPipeline(GLuint pipeline);
+void GLTrace_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint * params);
+void GLTrace_glProgramUniform1i(GLuint program, GLint location, GLint v0);
+void GLTrace_glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
+void GLTrace_glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+void GLTrace_glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+void GLTrace_glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
+void GLTrace_glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
+void GLTrace_glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+void GLTrace_glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void GLTrace_glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
+void GLTrace_glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+void GLTrace_glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+void GLTrace_glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+void GLTrace_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glValidateProgramPipeline(GLuint pipeline);
+void GLTrace_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+void GLTrace_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+void GLTrace_glGetBooleani_v(GLenum target, GLuint index, GLboolean * data);
+void GLTrace_glMemoryBarrier(GLbitfield barriers);
+void GLTrace_glMemoryBarrierByRegion(GLbitfield barriers);
+void GLTrace_glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+void GLTrace_glGetMultisamplefv(GLenum pname, GLuint index, GLfloat * val);
+void GLTrace_glSampleMaski(GLuint maskNumber, GLbitfield mask);
+void GLTrace_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params);
+void GLTrace_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params);
+void GLTrace_glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+void GLTrace_glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+void GLTrace_glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+void GLTrace_glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
+void GLTrace_glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
 
 // Declarations for GL2Ext APIs
 
+void GLTrace_glBlendBarrierKHR(void);
+void GLTrace_glDebugMessageControlKHR(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled);
+void GLTrace_glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf);
+void GLTrace_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void * userParam);
+GLuint GLTrace_glGetDebugMessageLogKHR(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog);
+void GLTrace_glPushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar * message);
+void GLTrace_glPopDebugGroupKHR(void);
+void GLTrace_glObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar * label);
+void GLTrace_glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label);
+void GLTrace_glObjectPtrLabelKHR(const void * ptr, GLsizei length, const GLchar * label);
+void GLTrace_glGetObjectPtrLabelKHR(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label);
+void GLTrace_glGetPointervKHR(GLenum pname, void ** params);
 void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
 void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
-void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
-void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
-void* GLTrace_glMapBufferOES(GLenum target, GLenum access);
+void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary);
+void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void * binary, GLint length);
+void * GLTrace_glMapBufferOES(GLenum target, GLenum access);
 GLboolean GLTrace_glUnmapBufferOES(GLenum target);
-void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params);
-void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, void ** params);
+void GLTrace_glMinSampleShadingOES(GLfloat value);
+void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels);
+void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels);
 void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
-void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data);
+void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data);
 void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+void GLTrace_glTexStorage3DMultisampleOES(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
 void GLTrace_glBindVertexArrayOES(GLuint array);
-void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays);
-void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays);
+void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint * arrays);
+void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint * arrays);
 GLboolean GLTrace_glIsVertexArrayOES(GLuint array);
-void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups);
-void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
-void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
-void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data);
-void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors);
-void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors);
-void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+void GLTrace_glGetPerfMonitorGroupsAMD(GLint * numGroups, GLsizei groupsSize, GLuint * groups);
+void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters);
+void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString);
+void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString);
+void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, void * data);
+void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint * monitors);
+void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint * monitors);
+void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList);
 void GLTrace_glBeginPerfMonitorAMD(GLuint monitor);
 void GLTrace_glEndPerfMonitorAMD(GLuint monitor);
-void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten);
 void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
 void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+void GLTrace_glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount);
+void GLTrace_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+void GLTrace_glGetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source);
+void GLTrace_glCopyTextureLevelsAPPLE(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);
 void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glResolveMultisampleFramebufferAPPLE(void);
-void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label);
-void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
-void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker);
-void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker);
+GLsync GLTrace_glFenceSyncAPPLE(GLenum condition, GLbitfield flags);
+GLboolean GLTrace_glIsSyncAPPLE(GLsync sync);
+void GLTrace_glDeleteSyncAPPLE(GLsync sync);
+GLenum GLTrace_glClientWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void GLTrace_glWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout);
+void GLTrace_glGetInteger64vAPPLE(GLenum pname, GLint64 * params);
+void GLTrace_glGetSyncivAPPLE(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values);
+void GLTrace_glCopyImageSubDataEXT(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar * label);
+void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label);
+void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar * marker);
+void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar * marker);
 void GLTrace_glPopGroupMarkerEXT(void);
-void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments);
-void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
-void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids);
-void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids);
+void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum * attachments);
+void GLTrace_glGenQueriesEXT(GLsizei n, GLuint * ids);
+void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint * ids);
 GLboolean GLTrace_glIsQueryEXT(GLuint id);
 void GLTrace_glBeginQueryEXT(GLenum target, GLuint id);
 void GLTrace_glEndQueryEXT(GLenum target);
-void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params);
-void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params);
+void GLTrace_glQueryCounterEXT(GLuint id, GLenum target);
+void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint * params);
+void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint * params);
+void GLTrace_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 * params);
+void GLTrace_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 * params);
+void GLTrace_glDrawBuffersEXT(GLsizei n, const GLenum * bufs);
+void GLTrace_glEnableiEXT(GLenum target, GLuint index);
+void GLTrace_glDisableiEXT(GLenum target, GLuint index);
+void GLTrace_glBlendEquationiEXT(GLuint buf, GLenum mode);
+void GLTrace_glBlendEquationSeparateiEXT(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+void GLTrace_glBlendFunciEXT(GLuint buf, GLenum src, GLenum dst);
+void GLTrace_glBlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+void GLTrace_glColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLboolean GLTrace_glIsEnablediEXT(GLenum target, GLuint index);
+void GLTrace_glDrawArraysInstancedEXT(GLenum mode, GLint start, GLsizei count, GLsizei primcount);
+void GLTrace_glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount);
+void GLTrace_glFramebufferTextureEXT(GLenum target, GLenum attachment, GLuint texture, GLint level);
+void GLTrace_glVertexAttribDivisorEXT(GLuint index, GLuint divisor);
+void * GLTrace_glMapBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+void GLTrace_glFlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length);
+void GLTrace_glMultiDrawArraysEXT(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount);
+void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount);
+void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+void GLTrace_glReadBufferIndexedEXT(GLenum src, GLint index);
+void GLTrace_glDrawBuffersIndexedEXT(GLint n, const GLenum * location, const GLint * indices);
+void GLTrace_glGetIntegeri_vEXT(GLenum target, GLuint index, GLint * data);
+void GLTrace_glPrimitiveBoundingBoxEXT(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
 GLenum GLTrace_glGetGraphicsResetStatusEXT(void);
-void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
-void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params);
-void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params);
-void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program);
+void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data);
+void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat * params);
+void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint * params);
 void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program);
-GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings);
 void GLTrace_glBindProgramPipelineEXT(GLuint pipeline);
-void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines);
-void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines);
+GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar ** strings);
+void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint * pipelines);
+void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint * pipelines);
+void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint * params);
 GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline);
 void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value);
-void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params);
-void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x);
-void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y);
-void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z);
-void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
-void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x);
-void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y);
-void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
-void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
-void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
-void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0);
+void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint v0);
+void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1);
+void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1);
+void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value);
+void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value);
+void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program);
 void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline);
-void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+void GLTrace_glProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0);
+void GLTrace_glProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1);
+void GLTrace_glProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+void GLTrace_glProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+void GLTrace_glProgramUniform1uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform2uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform3uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniform4uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value);
+void GLTrace_glProgramUniformMatrix2x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix3x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix2x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix4x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix3x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glProgramUniformMatrix4x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glPatchParameteriEXT(GLenum pname, GLint value);
+void GLTrace_glTexParameterIivEXT(GLenum target, GLenum pname, const GLint * params);
+void GLTrace_glTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint * params);
+void GLTrace_glGetTexParameterIivEXT(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint * params);
+void GLTrace_glSamplerParameterIivEXT(GLuint sampler, GLenum pname, const GLint * param);
+void GLTrace_glSamplerParameterIuivEXT(GLuint sampler, GLenum pname, const GLuint * param);
+void GLTrace_glGetSamplerParameterIivEXT(GLuint sampler, GLenum pname, GLint * params);
+void GLTrace_glGetSamplerParameterIuivEXT(GLuint sampler, GLenum pname, GLuint * params);
+void GLTrace_glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer);
+void GLTrace_glTexBufferRangeEXT(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
 void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+void GLTrace_glTextureViewEXT(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
 void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
 void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+void GLTrace_glBeginPerfQueryINTEL(GLuint queryHandle);
+void GLTrace_glCreatePerfQueryINTEL(GLuint queryId, GLuint * queryHandle);
+void GLTrace_glDeletePerfQueryINTEL(GLuint queryHandle);
+void GLTrace_glEndPerfQueryINTEL(GLuint queryHandle);
+void GLTrace_glGetFirstPerfQueryIdINTEL(GLuint * queryId);
+void GLTrace_glGetNextPerfQueryIdINTEL(GLuint queryId, GLuint * nextQueryId);
+void GLTrace_glGetPerfCounterInfoINTEL(GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue);
+void GLTrace_glGetPerfQueryDataINTEL(GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid * data, GLuint * bytesWritten);
+void GLTrace_glGetPerfQueryIdByNameINTEL(GLchar * queryName, GLuint * queryId);
+void GLTrace_glGetPerfQueryInfoINTEL(GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask);
+void GLTrace_glBlendParameteriNV(GLenum pname, GLint value);
+void GLTrace_glBlendBarrierNV(void);
+void GLTrace_glCopyBufferSubDataNV(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
 void GLTrace_glCoverageMaskNV(GLboolean mask);
 void GLTrace_glCoverageOperationNV(GLenum operation);
-void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs);
-void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences);
-void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences);
+void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum * bufs);
+void GLTrace_glDrawArraysInstancedNV(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+void GLTrace_glDrawElementsInstancedNV(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount);
+void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint * fences);
+void GLTrace_glGenFencesNV(GLsizei n, GLuint * fences);
 GLboolean GLTrace_glIsFenceNV(GLuint fence);
 GLboolean GLTrace_glTestFenceNV(GLuint fence);
-void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params);
+void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint * params);
 void GLTrace_glFinishFenceNV(GLuint fence);
 void GLTrace_glSetFenceNV(GLuint fence, GLenum condition);
+void GLTrace_glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void GLTrace_glRenderbufferStorageMultisampleNV(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glVertexAttribDivisorNV(GLuint index, GLuint divisor);
+void GLTrace_glUniformMatrix2x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix3x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix2x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix4x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix3x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+void GLTrace_glUniformMatrix4x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
 void GLTrace_glReadBufferNV(GLenum mode);
 void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref);
-void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls);
-void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+void GLTrace_glGetDriverControlsQCOM(GLint * num, GLsizei size, GLuint * driverControls);
+void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString);
 void GLTrace_glEnableDriverControlQCOM(GLuint driverControl);
 void GLTrace_glDisableDriverControlQCOM(GLuint driverControl);
-void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures);
-void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
-void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
-void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
-void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+void GLTrace_glExtGetTexturesQCOM(GLuint * textures, GLint maxTextures, GLint * numTextures);
+void GLTrace_glExtGetBuffersQCOM(GLuint * buffers, GLint maxBuffers, GLint * numBuffers);
+void GLTrace_glExtGetRenderbuffersQCOM(GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers);
+void GLTrace_glExtGetFramebuffersQCOM(GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers);
+void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params);
 void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param);
-void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
-void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params);
-void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders);
-void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels);
+void GLTrace_glExtGetBufferPointervQCOM(GLenum target, void ** params);
+void GLTrace_glExtGetShadersQCOM(GLuint * shaders, GLint maxShaders, GLint * numShaders);
+void GLTrace_glExtGetProgramsQCOM(GLuint * programs, GLint maxPrograms, GLint * numPrograms);
 GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program);
-void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar * source, GLint * length);
 void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
 void GLTrace_glEndTilingQCOM(GLbitfield preserveMask);
 
 // Declarations for GL1 APIs
 
-void GLTrace_glAlphaFunc(GLenum func, GLclampf ref);
-void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation);
+void GLTrace_glAlphaFunc(GLenum func, GLfloat ref);
+void GLTrace_glClipPlanef(GLenum p, const GLfloat * eqn);
 void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
 void GLTrace_glFogf(GLenum pname, GLfloat param);
-void GLTrace_glFogfv(GLenum pname, const GLfloat *params);
-void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]);
-void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params);
-void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params);
-void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params);
+void GLTrace_glFogfv(GLenum pname, const GLfloat * params);
+void GLTrace_glFrustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+void GLTrace_glGetClipPlanef(GLenum plane, GLfloat * equation);
+void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat * params);
+void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params);
+void GLTrace_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params);
 void GLTrace_glLightModelf(GLenum pname, GLfloat param);
-void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params);
+void GLTrace_glLightModelfv(GLenum pname, const GLfloat * params);
 void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param);
-void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params);
-void GLTrace_glLoadMatrixf(const GLfloat *m);
+void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat * params);
+void GLTrace_glLoadMatrixf(const GLfloat * m);
 void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param);
-void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params);
-void GLTrace_glMultMatrixf(const GLfloat *m);
+void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params);
+void GLTrace_glMultMatrixf(const GLfloat * m);
 void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
 void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
-void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+void GLTrace_glOrthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
 void GLTrace_glPointParameterf(GLenum pname, GLfloat param);
-void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params);
+void GLTrace_glPointParameterfv(GLenum pname, const GLfloat * params);
 void GLTrace_glPointSize(GLfloat size);
 void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
 void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z);
 void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param);
-void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params);
+void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params);
 void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z);
-void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref);
-void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-void GLTrace_glClearDepthx(GLclampx depth);
+void GLTrace_glAlphaFuncx(GLenum func, GLfixed ref);
+void GLTrace_glClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void GLTrace_glClearDepthx(GLfixed depth);
 void GLTrace_glClientActiveTexture(GLenum texture);
-void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation);
+void GLTrace_glClipPlanex(GLenum plane, const GLfixed * equation);
 void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
 void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar);
+void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const void * pointer);
+void GLTrace_glDepthRangex(GLfixed n, GLfixed f);
 void GLTrace_glDisableClientState(GLenum array);
 void GLTrace_glEnableClientState(GLenum array);
 void GLTrace_glFogx(GLenum pname, GLfixed param);
-void GLTrace_glFogxv(GLenum pname, const GLfixed *params);
-void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]);
-void GLTrace_glGetFixedv(GLenum pname, GLfixed *params);
-void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params);
-void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params);
-void GLTrace_glGetPointerv(GLenum pname, GLvoid **params);
-void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params);
-void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params);
-void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params);
+void GLTrace_glFogxv(GLenum pname, const GLfixed * param);
+void GLTrace_glFrustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+void GLTrace_glGetClipPlanex(GLenum plane, GLfixed * equation);
+void GLTrace_glGetFixedv(GLenum pname, GLfixed * params);
+void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed * params);
+void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed * params);
+void GLTrace_glGetPointerv(GLenum pname, void ** params);
+void GLTrace_glGetTexEnviv(GLenum target, GLenum pname, GLint * params);
+void GLTrace_glGetTexEnvxv(GLenum target, GLenum pname, GLfixed * params);
+void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed * params);
 void GLTrace_glLightModelx(GLenum pname, GLfixed param);
-void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params);
+void GLTrace_glLightModelxv(GLenum pname, const GLfixed * param);
 void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param);
-void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params);
+void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed * params);
 void GLTrace_glLineWidthx(GLfixed width);
 void GLTrace_glLoadIdentity(void);
-void GLTrace_glLoadMatrixx(const GLfixed *m);
+void GLTrace_glLoadMatrixx(const GLfixed * m);
 void GLTrace_glLogicOp(GLenum opcode);
 void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param);
-void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params);
+void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed * param);
 void GLTrace_glMatrixMode(GLenum mode);
-void GLTrace_glMultMatrixx(const GLfixed *m);
-void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void GLTrace_glMultMatrixx(const GLfixed * m);
+void GLTrace_glMultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
 void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz);
-void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer);
-void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const void * pointer);
+void GLTrace_glOrthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
 void GLTrace_glPointParameterx(GLenum pname, GLfixed param);
-void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params);
+void GLTrace_glPointParameterxv(GLenum pname, const GLfixed * params);
 void GLTrace_glPointSizex(GLfixed size);
 void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units);
 void GLTrace_glPopMatrix(void);
@@ -471,106 +639,129 @@
 void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert);
 void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z);
 void GLTrace_glShadeModel(GLenum mode);
-void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void * pointer);
 void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param);
 void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param);
-void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params);
-void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint * params);
+void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed * params);
 void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param);
-void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed * params);
 void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z);
-void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer);
+void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const void * pointer);
 
 // Declarations for GL1Ext APIs
 
 void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha);
 void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
 void GLTrace_glBlendEquationOES(GLenum mode);
+void GLTrace_glMultiTexCoord1bOES(GLenum texture, GLbyte s);
+void GLTrace_glMultiTexCoord1bvOES(GLenum texture, const GLbyte * coords);
+void GLTrace_glMultiTexCoord2bOES(GLenum texture, GLbyte s, GLbyte t);
+void GLTrace_glMultiTexCoord2bvOES(GLenum texture, const GLbyte * coords);
+void GLTrace_glMultiTexCoord3bOES(GLenum texture, GLbyte s, GLbyte t, GLbyte r);
+void GLTrace_glMultiTexCoord3bvOES(GLenum texture, const GLbyte * coords);
+void GLTrace_glMultiTexCoord4bOES(GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);
+void GLTrace_glMultiTexCoord4bvOES(GLenum texture, const GLbyte * coords);
+void GLTrace_glTexCoord1bOES(GLbyte s);
+void GLTrace_glTexCoord1bvOES(const GLbyte * coords);
+void GLTrace_glTexCoord2bOES(GLbyte s, GLbyte t);
+void GLTrace_glTexCoord2bvOES(const GLbyte * coords);
+void GLTrace_glTexCoord3bOES(GLbyte s, GLbyte t, GLbyte r);
+void GLTrace_glTexCoord3bvOES(const GLbyte * coords);
+void GLTrace_glTexCoord4bOES(GLbyte s, GLbyte t, GLbyte r, GLbyte q);
+void GLTrace_glTexCoord4bvOES(const GLbyte * coords);
+void GLTrace_glVertex2bOES(GLbyte x);
+void GLTrace_glVertex2bvOES(const GLbyte * coords);
+void GLTrace_glVertex3bOES(GLbyte x, GLbyte y);
+void GLTrace_glVertex3bvOES(const GLbyte * coords);
+void GLTrace_glVertex4bOES(GLbyte x, GLbyte y, GLbyte z);
+void GLTrace_glVertex4bvOES(const GLbyte * coords);
 void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
 void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height);
 void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
-void GLTrace_glDrawTexsvOES(const GLshort *coords);
-void GLTrace_glDrawTexivOES(const GLint *coords);
-void GLTrace_glDrawTexxvOES(const GLfixed *coords);
+void GLTrace_glDrawTexsvOES(const GLshort * coords);
+void GLTrace_glDrawTexivOES(const GLint * coords);
+void GLTrace_glDrawTexxvOES(const GLfixed * coords);
 void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
-void GLTrace_glDrawTexfvOES(const GLfloat *coords);
-void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref);
-void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
-void GLTrace_glClearDepthxOES(GLclampx depth);
-void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation);
+void GLTrace_glDrawTexfvOES(const GLfloat * coords);
+void GLTrace_glAlphaFuncxOES(GLenum func, GLfixed ref);
+void GLTrace_glClearColorxOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+void GLTrace_glClearDepthxOES(GLfixed depth);
+void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed * equation);
 void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
-void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar);
+void GLTrace_glDepthRangexOES(GLfixed n, GLfixed f);
 void GLTrace_glFogxOES(GLenum pname, GLfixed param);
-void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params);
-void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]);
-void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params);
-void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params);
-void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params);
-void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params);
-void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params);
+void GLTrace_glFogxvOES(GLenum pname, const GLfixed * param);
+void GLTrace_glFrustumxOES(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+void GLTrace_glGetClipPlanexOES(GLenum plane, GLfixed * equation);
+void GLTrace_glGetFixedvOES(GLenum pname, GLfixed * params);
+void GLTrace_glGetTexEnvxvOES(GLenum target, GLenum pname, GLfixed * params);
+void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed * params);
 void GLTrace_glLightModelxOES(GLenum pname, GLfixed param);
-void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params);
+void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed * param);
 void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param);
-void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params);
+void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed * params);
 void GLTrace_glLineWidthxOES(GLfixed width);
-void GLTrace_glLoadMatrixxOES(const GLfixed *m);
+void GLTrace_glLoadMatrixxOES(const GLfixed * m);
 void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param);
-void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params);
-void GLTrace_glMultMatrixxOES(const GLfixed *m);
-void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed * param);
+void GLTrace_glMultMatrixxOES(const GLfixed * m);
+void GLTrace_glMultiTexCoord4xOES(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
 void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz);
-void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
-void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param);
-void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params);
+void GLTrace_glOrthoxOES(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
+void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed * params);
 void GLTrace_glPointSizexOES(GLfixed size);
 void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units);
 void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
-void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert);
+void GLTrace_glSampleCoverageOES(GLfixed value, GLboolean invert);
 void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z);
 void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param);
-void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed * params);
 void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param);
-void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params);
+void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed * params);
 void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z);
+void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed * params);
+void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed * params);
+void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param);
+void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert);
+void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed * params);
+void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param);
+void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed * params);
 GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer);
 void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer);
-void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
-void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
+void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint * renderbuffers);
+void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint * renderbuffers);
 void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
-void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
+void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint * params);
 GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer);
 void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer);
-void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
-void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers);
+void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint * framebuffers);
+void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint * framebuffers);
 GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target);
 void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
 void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
-void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
+void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint * params);
 void GLTrace_glGenerateMipmapOES(GLenum target);
 void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex);
 void GLTrace_glLoadPaletteFromModelViewMatrixOES(void);
-void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]);
-void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar);
-void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
-void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation);
-void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]);
+void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const void * pointer);
+void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const void * pointer);
+void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const void * pointer);
+GLbitfield GLTrace_glQueryMatrixxOES(GLfixed * mantissa, GLint * exponent);
 void GLTrace_glClearDepthfOES(GLclampf depth);
+void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat * equation);
+void GLTrace_glDepthRangefOES(GLclampf n, GLclampf f);
+void GLTrace_glFrustumfOES(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
+void GLTrace_glGetClipPlanefOES(GLenum plane, GLfloat * equation);
+void GLTrace_glOrthofOES(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);
 void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param);
-void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params);
+void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat * params);
 void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param);
-void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params);
-void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param);
-void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params);
-void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params);
-void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params);
-void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params);
-void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn);
-void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn);
+void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint * params);
+void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat * params);
+void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint * params);
+void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat * eqn);
+void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed * eqn);
 
 }; // namespace gltrace
 }; // namespace android
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index 76f7c78..c44b985 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -18,7 +18,7 @@
 #   This script is used to generate the trace implementations of all
 #   OpenGL calls. When executed, it reads the specs for the OpenGL calls
 #   from the files GLES2/gl2_api.in, GLES2/gl2ext_api.in, GLES_CM/gl_api.in,
-#   and GLES_CM/glext_api.in, and generates trace versions for all the 
+#   and GLES_CM/glext_api.in, and generates trace versions for all the
 #   defined functions.
 #
 # PREREQUISITES
@@ -103,11 +103,10 @@
     "GLint64":DataType.INT64,
     "GLuint64":DataType.INT64,
     "GLsync":DataType.POINTER,
+    "GLDEBUGPROCKHR":DataType.POINTER,
 }
 
 API_SPECS = [
-    ('GL3','../GLES2/gl3_api.in'),
-    ('GL3Ext','../GLES2/gl3ext_api.in'),
     ('GL2','../GLES2/gl2_api.in'),
     ('GL2Ext','../GLES2/gl2ext_api.in'),
     ('GL1','../GLES_CM/gl_api.in'),
@@ -136,7 +135,6 @@
 HEADER_INCLUDES = """
 #include <cutils/log.h>
 #include <utils/Timers.h>
-#include <GLES3/gl3.h>
 
 #include "gltrace.pb.h"
 #include "gltrace_context.h"
@@ -233,7 +231,7 @@
 
         # if name is a pointer (e.g. "*ptr"), then remove the "*" from the name
         # and add it to the data type
-        pointersInName = name.count("*")            
+        pointersInName = name.count("*")
         if pointersInName > 0:
             name = name.replace("*", "")
             dataType += "*" * pointersInName
@@ -269,7 +267,7 @@
     API_ENTRY_REGEX = "(.*)API_ENTRY\(.*?\)\((.*?)\)"
 
     # Regex to match CALL_GL_API specification:
-    #       e.g. CALL_GL_API(glCullFace, mode); 
+    #       e.g. CALL_GL_API(glCullFace, mode);
     #            CALL_GL_API_RETURN(glCreateProgram);
     CALL_GL_API_REGEX = "CALL_GL_API(_RETURN)?\((.*)\);"
 
@@ -281,7 +279,7 @@
         defn: specification line containing API_ENTRY macro
               e.g: void API_ENTRY(glActiveTexture)(GLenum texture) {
         callsite: specification line containing CALL_GL_API macro
-              e.g: CALL_GL_API(glActiveTexture, texture);        
+              e.g: CALL_GL_API(glActiveTexture, texture);
         """
         self.prefix = prefix
         self.ret = self.getReturnType(apientry)
@@ -297,7 +295,7 @@
         '''Extract the return type from the API_ENTRY specification'''
         m = re.search(self.API_ENTRY_REGEX, apientry)
         if not m:
-            raise ValueError("%s does not match API_ENTRY specification %s" 
+            raise ValueError("%s does not match API_ENTRY specification %s"
                              % (apientry, self.API_ENTRY_REGEX))
 
         return m.group(1).strip()
@@ -306,7 +304,7 @@
         '''Extract the argument list from the API_ENTRY specification'''
         m = re.search(self.API_ENTRY_REGEX, apientry)
         if not m:
-            raise ValueError("%s does not match API_ENTRY specification %s" 
+            raise ValueError("%s does not match API_ENTRY specification %s"
                              % (apientry, self.API_ENTRY_REGEX))
 
         return m.group(2).strip()
@@ -337,7 +335,7 @@
         return "%s GLTrace_%s(%s);" % (self.ret, self.func, self.arglist)
 
     def genCode(self):
-        return TRACE_CALL_TEMPLATE(func = self.func, 
+        return TRACE_CALL_TEMPLATE(func = self.func,
                                    retType = self.ret,
                                    retDataType = getDataTypeFromKw(self.ret),
                                    inputArgList = self.arglist,
diff --git a/opengl/libs/debug.in b/opengl/libs/debug.in
deleted file mode 100644
index 882b2da..0000000
--- a/opengl/libs/debug.in
+++ /dev/null
@@ -1,235 +0,0 @@
-// the following functions are not defined in GLESv2_dbg
-TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
-TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
-TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
-TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
-TRACE_GL_VOID(glBindVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glBlendEquationOES, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha)
-TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
-TRACE_GL(GLenum, glCheckFramebufferStatusOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearColorxOES, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearDepthfOES, (GLclampf depth), (depth), 1, "GLclampf", depth)
-TRACE_GL_VOID(glClearDepthx, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClearDepthxOES, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClientActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
-TRACE_GL_VOID(glClipPlanef, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat *eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn)
-TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed *eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn)
-TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha)
-TRACE_GL_VOID(glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red, green, blue, alpha), 4, "GLubyte", red, "GLubyte", green, "GLubyte", blue, "GLubyte", alpha)
-TRACE_GL_VOID(glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
-TRACE_GL_VOID(glColor4xOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
-TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask)
-TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation)
-TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex)
-TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint *fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences)
-TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
-TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
-TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays)
-TRACE_GL_VOID(glDepthRangefOES, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar)
-TRACE_GL_VOID(glDepthRangex, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDepthRangexOES, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDisableClientState, (GLenum array), (array), 1, "GLenum", array)
-TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
-TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
-TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height)
-TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords)
-TRACE_GL_VOID(glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height), (x, y, z, width, height), 5, "GLint", x, "GLint", y, "GLint", z, "GLint", width, "GLint", height)
-TRACE_GL_VOID(glDrawTexivOES, (const GLint *coords), (coords), 1, "const GLint *", coords)
-TRACE_GL_VOID(glDrawTexsOES, (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height), (x, y, z, width, height), 5, "GLshort", x, "GLshort", y, "GLshort", z, "GLshort", width, "GLshort", height)
-TRACE_GL_VOID(glDrawTexsvOES, (const GLshort *coords), (coords), 1, "const GLshort *", coords)
-TRACE_GL_VOID(glDrawTexxOES, (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height), (x, y, z, width, height), 5, "GLfixed", x, "GLfixed", y, "GLfixed", z, "GLfixed", width, "GLfixed", height)
-TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed *coords), (coords), 1, "const GLfixed *", coords)
-TRACE_GL_VOID(glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
-TRACE_GL_VOID(glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
-TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array)
-TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
-TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
-TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask)
-TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params)
-TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers)
-TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers)
-TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar *source, GLint *length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length)
-TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint *programs, GLint maxPrograms, GLint *numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms)
-TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers)
-TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint *shaders, GLint maxShaders, GLint *numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders)
-TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "GLvoid *", texels)
-TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint *textures, GLint maxTextures, GLint *numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures)
-TRACE_GL(GLboolean, glExtIsProgramBinaryQCOM, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glExtTexObjectStateOverrideiQCOM, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glFinishFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glFogf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glFogx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
-TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
-TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
-TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset)
-TRACE_GL_VOID(glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumfOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glFrustumxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences)
-TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
-TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
-TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint *arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays)
-TRACE_GL_VOID(glGenerateMipmapOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetClipPlanef, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanex, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString)
-TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint *num, GLsizei size, GLuint *driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls)
-TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten)
-TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data)
-TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString)
-TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters)
-TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString)
-TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize, GLuint *groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups)
-TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary)
-TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexEnviv, (GLenum env, GLenum pname, GLint *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
-TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer)
-TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightf, (GLenum light, GLenum pname, GLfloat param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glLightx, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxOES, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLineWidthx, (GLfixed width), (width), 1, "GLfixed", width)
-TRACE_GL_VOID(glLineWidthxOES, (GLfixed width), (width), 1, "GLfixed", width)
-TRACE_GL_VOID(glLoadIdentity, (void), (), 0)
-TRACE_GL_VOID(glLoadMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glLoadMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadPaletteFromModelViewMatrixOES, (void), (), 0)
-TRACE_GL_VOID(glLogicOp, (GLenum opcode), (opcode), 1, "GLenum", opcode)
-TRACE_GL(void*, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access)
-TRACE_GL_VOID(glMaterialf, (GLenum face, GLenum pname, GLfloat param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glMaterialx, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxOES, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glMatrixMode, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glMultMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glMultMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint *", first, "GLsizei *", count, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const GLvoid* *", indices, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q), (target, s, t, r, q), 5, "GLenum", target, "GLfloat", s, "GLfloat", t, "GLfloat", r, "GLfloat", q)
-TRACE_GL_VOID(glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz), (nx, ny, nz), 3, "GLfloat", nx, "GLfloat", ny, "GLfloat", nz)
-TRACE_GL_VOID(glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glPointParameterf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glPointParameterx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointSize, (GLfloat size), (size), 1, "GLfloat", size)
-TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glPointSizex, (GLfixed size), (size), 1, "GLfixed", size)
-TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size)
-TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
-TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
-TRACE_GL_VOID(glPopMatrix, (void), (), 0)
-TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length)
-TRACE_GL_VOID(glPushMatrix, (void), (), 0)
-TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent)
-TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glSampleCoveragex, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
-TRACE_GL_VOID(glSampleCoveragexOES, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
-TRACE_GL_VOID(glScalef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glScalex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glScalexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList), (monitor, enable, group, numCounters, countersList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", countersList)
-TRACE_GL_VOID(glSetFenceNV, (GLuint fence, GLenum condition), (fence, condition), 2, "GLuint", fence, "GLenum", condition)
-TRACE_GL_VOID(glShadeModel, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glStartTilingQCOM, (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask), (x, y, width, height, preserveMask), 5, "GLuint", x, "GLuint", y, "GLuint", width, "GLuint", height, "GLbitfield", preserveMask)
-TRACE_GL(GLboolean, glTestFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glTexEnvf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexEnvi, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexEnvx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexGenfOES, (GLenum coord, GLenum pname, GLfloat param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params)
-TRACE_GL_VOID(glTexGeniOES, (GLenum coord, GLenum pname, GLint param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params)
-TRACE_GL_VOID(glTexGenxOES, (GLenum coord, GLenum pname, GLfixed param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in
index 43c2676..0dee45d 100644
--- a/opengl/libs/entries.in
+++ b/opengl/libs/entries.in
@@ -1,20 +1,24 @@
+GL_ENTRY(void, glActiveShaderProgram, GLuint pipeline, GLuint program)
 GL_ENTRY(void, glActiveShaderProgramEXT, GLuint pipeline, GLuint program)
 GL_ENTRY(void, glActiveTexture, GLenum texture)
-GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref)
+GL_ENTRY(void, glAlphaFunc, GLenum func, GLfloat ref)
 GL_ENTRY(void, glAlphaFuncQCOM, GLenum func, GLclampf ref)
-GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref)
-GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref)
+GL_ENTRY(void, glAlphaFuncx, GLenum func, GLfixed ref)
+GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLfixed ref)
 GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader)
 GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor)
+GL_ENTRY(void, glBeginPerfQueryINTEL, GLuint queryHandle)
 GL_ENTRY(void, glBeginQuery, GLenum target, GLuint id)
 GL_ENTRY(void, glBeginQueryEXT, GLenum target, GLuint id)
 GL_ENTRY(void, glBeginTransformFeedback, GLenum primitiveMode)
-GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name)
+GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar * name)
 GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer)
 GL_ENTRY(void, glBindBufferBase, GLenum target, GLuint index, GLuint buffer)
 GL_ENTRY(void, glBindBufferRange, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
 GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer)
 GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer)
+GL_ENTRY(void, glBindImageTexture, GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
+GL_ENTRY(void, glBindProgramPipeline, GLuint pipeline)
 GL_ENTRY(void, glBindProgramPipelineEXT, GLuint pipeline)
 GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer)
 GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer)
@@ -23,145 +27,185 @@
 GL_ENTRY(void, glBindTransformFeedback, GLenum target, GLuint id)
 GL_ENTRY(void, glBindVertexArray, GLuint array)
 GL_ENTRY(void, glBindVertexArrayOES, GLuint array)
-GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-GL_ENTRY(void, glBlendEquation,  GLenum mode )
+GL_ENTRY(void, glBindVertexBuffer, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)
+GL_ENTRY(void, glBlendBarrierKHR, void)
+GL_ENTRY(void, glBlendBarrierNV, void)
+GL_ENTRY(void, glBlendColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+GL_ENTRY(void, glBlendEquation, GLenum mode)
 GL_ENTRY(void, glBlendEquationOES, GLenum mode)
 GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha)
 GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha)
+GL_ENTRY(void, glBlendEquationSeparateiEXT, GLuint buf, GLenum modeRGB, GLenum modeAlpha)
+GL_ENTRY(void, glBlendEquationiEXT, GLuint buf, GLenum mode)
 GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor)
-GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+GL_ENTRY(void, glBlendFuncSeparate, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
 GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+GL_ENTRY(void, glBlendFuncSeparateiEXT, GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+GL_ENTRY(void, glBlendFunciEXT, GLuint buf, GLenum src, GLenum dst)
+GL_ENTRY(void, glBlendParameteriNV, GLenum pname, GLint value)
 GL_ENTRY(void, glBlitFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
 GL_ENTRY(void, glBlitFramebufferANGLE, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
-GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
-GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
+GL_ENTRY(void, glBlitFramebufferNV, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
+GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const void * data, GLenum usage)
+GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const void * data)
 GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target)
 GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target)
 GL_ENTRY(void, glClear, GLbitfield mask)
 GL_ENTRY(void, glClearBufferfi, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
-GL_ENTRY(void, glClearBufferfv, GLenum buffer, GLint drawbuffer, const GLfloat* value)
-GL_ENTRY(void, glClearBufferiv, GLenum buffer, GLint drawbuffer, const GLint* value)
-GL_ENTRY(void, glClearBufferuiv, GLenum buffer, GLint drawbuffer, const GLuint* value)
-GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
-GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
-GL_ENTRY(void, glClearDepthf, GLclampf depth)
+GL_ENTRY(void, glClearBufferfv, GLenum buffer, GLint drawbuffer, const GLfloat * value)
+GL_ENTRY(void, glClearBufferiv, GLenum buffer, GLint drawbuffer, const GLint * value)
+GL_ENTRY(void, glClearBufferuiv, GLenum buffer, GLint drawbuffer, const GLuint * value)
+GL_ENTRY(void, glClearColor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+GL_ENTRY(void, glClearColorx, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
+GL_ENTRY(void, glClearColorxOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
+GL_ENTRY(void, glClearDepthf, GLfloat d)
 GL_ENTRY(void, glClearDepthfOES, GLclampf depth)
-GL_ENTRY(void, glClearDepthx, GLclampx depth)
-GL_ENTRY(void, glClearDepthxOES, GLclampx depth)
+GL_ENTRY(void, glClearDepthx, GLfixed depth)
+GL_ENTRY(void, glClearDepthxOES, GLfixed depth)
 GL_ENTRY(void, glClearStencil, GLint s)
 GL_ENTRY(void, glClientActiveTexture, GLenum texture)
 GL_ENTRY(GLenum, glClientWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout)
-GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation)
-GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat *eqn)
-GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation)
-GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation)
-GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed *eqn)
-GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation)
+GL_ENTRY(GLenum, glClientWaitSyncAPPLE, GLsync sync, GLbitfield flags, GLuint64 timeout)
+GL_ENTRY(void, glClipPlanef, GLenum p, const GLfloat * eqn)
+GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat * eqn)
+GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat * equation)
+GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed * equation)
+GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed * eqn)
+GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed * equation)
 GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
 GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
 GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
 GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
-GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+GL_ENTRY(void, glColorMaskiEXT, GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const void * pointer)
 GL_ENTRY(void, glCompileShader, GLuint shader)
-GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
-GL_ENTRY(void, glCompressedTexImage3D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
-GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
-GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
-GL_ENTRY(void, glCompressedTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
-GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
+GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data)
+GL_ENTRY(void, glCompressedTexImage3D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data)
+GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data)
+GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data)
+GL_ENTRY(void, glCompressedTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data)
+GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data)
 GL_ENTRY(void, glCopyBufferSubData, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+GL_ENTRY(void, glCopyBufferSubDataNV, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
+GL_ENTRY(void, glCopyImageSubDataEXT, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)
 GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 GL_ENTRY(void, glCopyTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+GL_ENTRY(void, glCopyTextureLevelsAPPLE, GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount)
 GL_ENTRY(void, glCoverageMaskNV, GLboolean mask)
 GL_ENTRY(void, glCoverageOperationNV, GLenum operation)
+GL_ENTRY(void, glCreatePerfQueryINTEL, GLuint queryId, GLuint * queryHandle)
 GL_ENTRY(GLuint, glCreateProgram, void)
 GL_ENTRY(GLuint, glCreateShader, GLenum type)
-GL_ENTRY(GLuint, glCreateShaderProgramvEXT, GLenum type, GLsizei count, const GLchar **strings)
+GL_ENTRY(GLuint, glCreateShaderProgramv, GLenum type, GLsizei count, const GLchar *const* strings)
+GL_ENTRY(GLuint, glCreateShaderProgramvEXT, GLenum type, GLsizei count, const GLchar ** strings)
 GL_ENTRY(void, glCullFace, GLenum mode)
 GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex)
-GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers)
-GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences)
-GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers)
-GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers)
-GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors)
+GL_ENTRY(void, glDebugMessageCallbackKHR, GLDEBUGPROCKHR callback, const void * userParam)
+GL_ENTRY(void, glDebugMessageControlKHR, GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled)
+GL_ENTRY(void, glDebugMessageInsertKHR, GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf)
+GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint * buffers)
+GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint * fences)
+GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint * framebuffers)
+GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint * framebuffers)
+GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint * monitors)
+GL_ENTRY(void, glDeletePerfQueryINTEL, GLuint queryHandle)
 GL_ENTRY(void, glDeleteProgram, GLuint program)
-GL_ENTRY(void, glDeleteProgramPipelinesEXT, GLsizei n, const GLuint *pipelines)
-GL_ENTRY(void, glDeleteQueries, GLsizei n, const GLuint* ids)
-GL_ENTRY(void, glDeleteQueriesEXT, GLsizei n, const GLuint *ids)
-GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers)
-GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers)
-GL_ENTRY(void, glDeleteSamplers, GLsizei count, const GLuint* samplers)
+GL_ENTRY(void, glDeleteProgramPipelines, GLsizei n, const GLuint * pipelines)
+GL_ENTRY(void, glDeleteProgramPipelinesEXT, GLsizei n, const GLuint * pipelines)
+GL_ENTRY(void, glDeleteQueries, GLsizei n, const GLuint * ids)
+GL_ENTRY(void, glDeleteQueriesEXT, GLsizei n, const GLuint * ids)
+GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint * renderbuffers)
+GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint * renderbuffers)
+GL_ENTRY(void, glDeleteSamplers, GLsizei count, const GLuint * samplers)
 GL_ENTRY(void, glDeleteShader, GLuint shader)
 GL_ENTRY(void, glDeleteSync, GLsync sync)
-GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures)
-GL_ENTRY(void, glDeleteTransformFeedbacks, GLsizei n, const GLuint* ids)
-GL_ENTRY(void, glDeleteVertexArrays, GLsizei n, const GLuint* arrays)
-GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays)
+GL_ENTRY(void, glDeleteSyncAPPLE, GLsync sync)
+GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint * textures)
+GL_ENTRY(void, glDeleteTransformFeedbacks, GLsizei n, const GLuint * ids)
+GL_ENTRY(void, glDeleteVertexArrays, GLsizei n, const GLuint * arrays)
+GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint * arrays)
 GL_ENTRY(void, glDepthFunc, GLenum func)
 GL_ENTRY(void, glDepthMask, GLboolean flag)
-GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar)
-GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar)
-GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar)
-GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar)
+GL_ENTRY(void, glDepthRangef, GLfloat n, GLfloat f)
+GL_ENTRY(void, glDepthRangefOES, GLclampf n, GLclampf f)
+GL_ENTRY(void, glDepthRangex, GLfixed n, GLfixed f)
+GL_ENTRY(void, glDepthRangexOES, GLfixed n, GLfixed f)
 GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader)
 GL_ENTRY(void, glDisable, GLenum cap)
 GL_ENTRY(void, glDisableClientState, GLenum array)
 GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl)
 GL_ENTRY(void, glDisableVertexAttribArray, GLuint index)
-GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments)
+GL_ENTRY(void, glDisableiEXT, GLenum target, GLuint index)
+GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum * attachments)
+GL_ENTRY(void, glDispatchCompute, GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
+GL_ENTRY(void, glDispatchComputeIndirect, GLintptr indirect)
 GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count)
-GL_ENTRY(void, glDrawArraysInstanced, GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
-GL_ENTRY(void, glDrawBuffers, GLsizei n, const GLenum* bufs)
-GL_ENTRY(void, glDrawBuffersNV, GLsizei n, const GLenum *bufs)
-GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
-GL_ENTRY(void, glDrawElementsInstanced, GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount)
-GL_ENTRY(void, glDrawRangeElements, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
+GL_ENTRY(void, glDrawArraysIndirect, GLenum mode, const void * indirect)
+GL_ENTRY(void, glDrawArraysInstanced, GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
+GL_ENTRY(void, glDrawArraysInstancedANGLE, GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+GL_ENTRY(void, glDrawArraysInstancedEXT, GLenum mode, GLint start, GLsizei count, GLsizei primcount)
+GL_ENTRY(void, glDrawArraysInstancedNV, GLenum mode, GLint first, GLsizei count, GLsizei primcount)
+GL_ENTRY(void, glDrawBuffers, GLsizei n, const GLenum * bufs)
+GL_ENTRY(void, glDrawBuffersEXT, GLsizei n, const GLenum * bufs)
+GL_ENTRY(void, glDrawBuffersIndexedEXT, GLint n, const GLenum * location, const GLint * indices)
+GL_ENTRY(void, glDrawBuffersNV, GLsizei n, const GLenum * bufs)
+GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const void * indices)
+GL_ENTRY(void, glDrawElementsIndirect, GLenum mode, GLenum type, const void * indirect)
+GL_ENTRY(void, glDrawElementsInstanced, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount)
+GL_ENTRY(void, glDrawElementsInstancedANGLE, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount)
+GL_ENTRY(void, glDrawElementsInstancedEXT, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount)
+GL_ENTRY(void, glDrawElementsInstancedNV, GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount)
+GL_ENTRY(void, glDrawRangeElements, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices)
 GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
-GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords)
+GL_ENTRY(void, glDrawTexfvOES, const GLfloat * coords)
 GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height)
-GL_ENTRY(void, glDrawTexivOES, const GLint *coords)
+GL_ENTRY(void, glDrawTexivOES, const GLint * coords)
 GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
-GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords)
+GL_ENTRY(void, glDrawTexsvOES, const GLshort * coords)
 GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
-GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords)
+GL_ENTRY(void, glDrawTexxvOES, const GLfixed * coords)
 GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image)
 GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image)
 GL_ENTRY(void, glEnable, GLenum cap)
 GL_ENTRY(void, glEnableClientState, GLenum array)
 GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl)
 GL_ENTRY(void, glEnableVertexAttribArray, GLuint index)
+GL_ENTRY(void, glEnableiEXT, GLenum target, GLuint index)
 GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor)
+GL_ENTRY(void, glEndPerfQueryINTEL, GLuint queryHandle)
 GL_ENTRY(void, glEndQuery, GLenum target)
 GL_ENTRY(void, glEndQueryEXT, GLenum target)
 GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask)
 GL_ENTRY(void, glEndTransformFeedback, void)
-GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params)
-GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
-GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers)
-GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length)
-GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms)
-GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers)
-GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders)
-GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params)
-GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels)
-GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures)
+GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, void ** params)
+GL_ENTRY(void, glExtGetBuffersQCOM, GLuint * buffers, GLint maxBuffers, GLint * numBuffers)
+GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers)
+GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar * source, GLint * length)
+GL_ENTRY(void, glExtGetProgramsQCOM, GLuint * programs, GLint maxPrograms, GLint * numPrograms)
+GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers)
+GL_ENTRY(void, glExtGetShadersQCOM, GLuint * shaders, GLint maxShaders, GLint * numShaders)
+GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params)
+GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels)
+GL_ENTRY(void, glExtGetTexturesQCOM, GLuint * textures, GLint maxTextures, GLint * numTextures)
 GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program)
 GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param)
 GL_ENTRY(GLsync, glFenceSync, GLenum condition, GLbitfield flags)
+GL_ENTRY(GLsync, glFenceSyncAPPLE, GLenum condition, GLbitfield flags)
 GL_ENTRY(void, glFinish, void)
 GL_ENTRY(void, glFinishFenceNV, GLuint fence)
 GL_ENTRY(void, glFlush, void)
 GL_ENTRY(void, glFlushMappedBufferRange, GLenum target, GLintptr offset, GLsizeiptr length)
+GL_ENTRY(void, glFlushMappedBufferRangeEXT, GLenum target, GLintptr offset, GLsizeiptr length)
 GL_ENTRY(void, glFogf, GLenum pname, GLfloat param)
-GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glFogx, GLenum pname, GLfixed param)
 GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param)
-GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed * param)
+GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed * param)
+GL_ENTRY(void, glFramebufferParameteri, GLenum target, GLenum pname, GLint param)
 GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
@@ -169,131 +213,168 @@
 GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
 GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
+GL_ENTRY(void, glFramebufferTextureEXT, GLenum target, GLenum attachment, GLuint texture, GLint level)
 GL_ENTRY(void, glFramebufferTextureLayer, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
 GL_ENTRY(void, glFrontFace, GLenum mode)
-GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers)
-GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences)
-GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers)
-GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers)
-GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors)
-GL_ENTRY(void, glGenProgramPipelinesEXT, GLsizei n, GLuint *pipelines)
-GL_ENTRY(void, glGenQueries, GLsizei n, GLuint* ids)
-GL_ENTRY(void, glGenQueriesEXT, GLsizei n, GLuint *ids)
-GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers)
-GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers)
-GL_ENTRY(void, glGenSamplers, GLsizei count, GLuint* samplers)
-GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures)
-GL_ENTRY(void, glGenTransformFeedbacks, GLsizei n, GLuint* ids)
-GL_ENTRY(void, glGenVertexArrays, GLsizei n, GLuint* arrays)
-GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays)
+GL_ENTRY(void, glFrustumf, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
+GL_ENTRY(void, glFrustumfOES, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
+GL_ENTRY(void, glFrustumx, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
+GL_ENTRY(void, glFrustumxOES, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
+GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint * buffers)
+GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint * fences)
+GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint * framebuffers)
+GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint * framebuffers)
+GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint * monitors)
+GL_ENTRY(void, glGenProgramPipelines, GLsizei n, GLuint * pipelines)
+GL_ENTRY(void, glGenProgramPipelinesEXT, GLsizei n, GLuint * pipelines)
+GL_ENTRY(void, glGenQueries, GLsizei n, GLuint * ids)
+GL_ENTRY(void, glGenQueriesEXT, GLsizei n, GLuint * ids)
+GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint * renderbuffers)
+GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint * renderbuffers)
+GL_ENTRY(void, glGenSamplers, GLsizei count, GLuint * samplers)
+GL_ENTRY(void, glGenTextures, GLsizei n, GLuint * textures)
+GL_ENTRY(void, glGenTransformFeedbacks, GLsizei n, GLuint * ids)
+GL_ENTRY(void, glGenVertexArrays, GLsizei n, GLuint * arrays)
+GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint * arrays)
 GL_ENTRY(void, glGenerateMipmap, GLenum target)
 GL_ENTRY(void, glGenerateMipmapOES, GLenum target)
-GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-GL_ENTRY(void, glGetActiveUniformBlockName, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
-GL_ENTRY(void, glGetActiveUniformBlockiv, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetActiveUniformsiv, GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
-GL_ENTRY(GLint, glGetAttribLocation, GLuint program, const GLchar* name)
-GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params)
-GL_ENTRY(void, glGetBufferParameteri64v, GLenum target, GLenum pname, GLint64* params)
-GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetBufferPointerv, GLenum target, GLenum pname, GLvoid** params)
-GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid ** params)
-GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4])
-GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4])
-GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4])
-GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4])
-GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString)
-GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls)
+GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name)
+GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name)
+GL_ENTRY(void, glGetActiveUniformBlockName, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName)
+GL_ENTRY(void, glGetActiveUniformBlockiv, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetActiveUniformsiv, GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders)
+GL_ENTRY(GLint, glGetAttribLocation, GLuint program, const GLchar * name)
+GL_ENTRY(void, glGetBooleani_v, GLenum target, GLuint index, GLboolean * data)
+GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean * data)
+GL_ENTRY(void, glGetBufferParameteri64v, GLenum target, GLenum pname, GLint64 * params)
+GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetBufferPointerv, GLenum target, GLenum pname, void ** params)
+GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, void ** params)
+GL_ENTRY(void, glGetClipPlanef, GLenum plane, GLfloat * equation)
+GL_ENTRY(void, glGetClipPlanefOES, GLenum plane, GLfloat * equation)
+GL_ENTRY(void, glGetClipPlanex, GLenum plane, GLfixed * equation)
+GL_ENTRY(void, glGetClipPlanexOES, GLenum plane, GLfixed * equation)
+GL_ENTRY(GLuint, glGetDebugMessageLogKHR, GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog)
+GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString)
+GL_ENTRY(void, glGetDriverControlsQCOM, GLint * num, GLsizei size, GLuint * driverControls)
 GL_ENTRY(GLenum, glGetError, void)
-GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params)
-GL_ENTRY(GLint, glGetFragDataLocation, GLuint program, const GLchar *name)
-GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params)
+GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetFirstPerfQueryIdINTEL, GLuint * queryId)
+GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat * data)
+GL_ENTRY(GLint, glGetFragDataLocation, GLuint program, const GLchar * name)
+GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetFramebufferParameteriv, GLenum target, GLenum pname, GLint * params)
 GL_ENTRY(GLenum, glGetGraphicsResetStatusEXT, void)
-GL_ENTRY(void, glGetInteger64i_v, GLenum target, GLuint index, GLint64* data)
-GL_ENTRY(void, glGetInteger64v, GLenum pname, GLint64* params)
-GL_ENTRY(void, glGetIntegeri_v, GLenum target, GLuint index, GLint* data)
-GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetInternalformativ, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
-GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetObjectLabelEXT, GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label)
-GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
-GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data)
-GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
-GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters)
-GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString)
-GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups)
-GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params)
-GL_ENTRY(void, glGetProgramBinary, GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
-GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
-GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-GL_ENTRY(void, glGetProgramPipelineInfoLogEXT, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
-GL_ENTRY(void, glGetProgramPipelineivEXT, GLuint pipeline, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetQueryObjectuiv, GLuint id, GLenum pname, GLuint* params)
-GL_ENTRY(void, glGetQueryObjectuivEXT, GLuint id, GLenum pname, GLuint *params)
-GL_ENTRY(void, glGetQueryiv, GLenum target, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetQueryivEXT, GLenum target, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetSamplerParameterfv, GLuint sampler, GLenum pname, GLfloat* params)
-GL_ENTRY(void, glGetSamplerParameteriv, GLuint sampler, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
-GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params)
+GL_ENTRY(void, glGetInteger64i_v, GLenum target, GLuint index, GLint64 * data)
+GL_ENTRY(void, glGetInteger64v, GLenum pname, GLint64 * data)
+GL_ENTRY(void, glGetInteger64vAPPLE, GLenum pname, GLint64 * params)
+GL_ENTRY(void, glGetIntegeri_v, GLenum target, GLuint index, GLint * data)
+GL_ENTRY(void, glGetIntegeri_vEXT, GLenum target, GLuint index, GLint * data)
+GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint * data)
+GL_ENTRY(void, glGetInternalformativ, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params)
+GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetMultisamplefv, GLenum pname, GLuint index, GLfloat * val)
+GL_ENTRY(void, glGetNextPerfQueryIdINTEL, GLuint queryId, GLuint * nextQueryId)
+GL_ENTRY(void, glGetObjectLabelEXT, GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label)
+GL_ENTRY(void, glGetObjectLabelKHR, GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label)
+GL_ENTRY(void, glGetObjectPtrLabelKHR, const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label)
+GL_ENTRY(void, glGetPerfCounterInfoINTEL, GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue)
+GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten)
+GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, void * data)
+GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString)
+GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters)
+GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString)
+GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint * numGroups, GLsizei groupsSize, GLuint * groups)
+GL_ENTRY(void, glGetPerfQueryDataINTEL, GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid * data, GLuint * bytesWritten)
+GL_ENTRY(void, glGetPerfQueryIdByNameINTEL, GLchar * queryName, GLuint * queryId)
+GL_ENTRY(void, glGetPerfQueryInfoINTEL, GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask)
+GL_ENTRY(void, glGetPointerv, GLenum pname, void ** params)
+GL_ENTRY(void, glGetPointervKHR, GLenum pname, void ** params)
+GL_ENTRY(void, glGetProgramBinary, GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary)
+GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary)
+GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog)
+GL_ENTRY(void, glGetProgramInterfaceiv, GLuint program, GLenum programInterface, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetProgramPipelineInfoLog, GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog)
+GL_ENTRY(void, glGetProgramPipelineInfoLogEXT, GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog)
+GL_ENTRY(void, glGetProgramPipelineiv, GLuint pipeline, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetProgramPipelineivEXT, GLuint pipeline, GLenum pname, GLint * params)
+GL_ENTRY(GLuint, glGetProgramResourceIndex, GLuint program, GLenum programInterface, const GLchar * name)
+GL_ENTRY(GLint, glGetProgramResourceLocation, GLuint program, GLenum programInterface, const GLchar * name)
+GL_ENTRY(void, glGetProgramResourceName, GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name)
+GL_ENTRY(void, glGetProgramResourceiv, GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params)
+GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetQueryObjecti64vEXT, GLuint id, GLenum pname, GLint64 * params)
+GL_ENTRY(void, glGetQueryObjectivEXT, GLuint id, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetQueryObjectui64vEXT, GLuint id, GLenum pname, GLuint64 * params)
+GL_ENTRY(void, glGetQueryObjectuiv, GLuint id, GLenum pname, GLuint * params)
+GL_ENTRY(void, glGetQueryObjectuivEXT, GLuint id, GLenum pname, GLuint * params)
+GL_ENTRY(void, glGetQueryiv, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetQueryivEXT, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetSamplerParameterIivEXT, GLuint sampler, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetSamplerParameterIuivEXT, GLuint sampler, GLenum pname, GLuint * params)
+GL_ENTRY(void, glGetSamplerParameterfv, GLuint sampler, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetSamplerParameteriv, GLuint sampler, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog)
+GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision)
+GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source)
+GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint * params)
 GL_ENTRY(const GLubyte *, glGetString, GLenum name)
-GL_ENTRY(const GLubyte*, glGetStringi, GLenum name, GLuint index)
-GL_ENTRY(void, glGetSynciv, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
-GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params)
-GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params)
-GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params)
-GL_ENTRY(void, glGetTransformFeedbackVarying, GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
-GL_ENTRY(GLuint, glGetUniformBlockIndex, GLuint program, const GLchar* uniformBlockName)
-GL_ENTRY(void, glGetUniformIndices, GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices)
-GL_ENTRY(GLint, glGetUniformLocation, GLuint program, const GLchar* name)
-GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params)
-GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params)
-GL_ENTRY(void, glGetUniformuiv, GLuint program, GLint location, GLuint* params)
-GL_ENTRY(void, glGetVertexAttribIiv, GLuint index, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetVertexAttribIuiv, GLuint index, GLenum pname, GLuint* params)
-GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
-GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params)
-GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params)
-GL_ENTRY(void, glGetnUniformfvEXT, GLuint program, GLint location, GLsizei bufSize, float *params)
-GL_ENTRY(void, glGetnUniformivEXT, GLuint program, GLint location, GLsizei bufSize, GLint *params)
+GL_ENTRY(const GLubyte *, glGetStringi, GLenum name, GLuint index)
+GL_ENTRY(void, glGetSynciv, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values)
+GL_ENTRY(void, glGetSyncivAPPLE, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values)
+GL_ENTRY(void, glGetTexEnvfv, GLenum target, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetTexEnviv, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetTexEnvxv, GLenum target, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetTexEnvxvOES, GLenum target, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetTexLevelParameterfv, GLenum target, GLint level, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetTexLevelParameteriv, GLenum target, GLint level, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetTexParameterIivEXT, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetTexParameterIuivEXT, GLenum target, GLenum pname, GLuint * params)
+GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed * params)
+GL_ENTRY(void, glGetTransformFeedbackVarying, GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name)
+GL_ENTRY(void, glGetTranslatedShaderSourceANGLE, GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source)
+GL_ENTRY(GLuint, glGetUniformBlockIndex, GLuint program, const GLchar * uniformBlockName)
+GL_ENTRY(void, glGetUniformIndices, GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices)
+GL_ENTRY(GLint, glGetUniformLocation, GLuint program, const GLchar * name)
+GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat * params)
+GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint * params)
+GL_ENTRY(void, glGetUniformuiv, GLuint program, GLint location, GLuint * params)
+GL_ENTRY(void, glGetVertexAttribIiv, GLuint index, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetVertexAttribIuiv, GLuint index, GLenum pname, GLuint * params)
+GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, void ** pointer)
+GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat * params)
+GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint * params)
+GL_ENTRY(void, glGetnUniformfvEXT, GLuint program, GLint location, GLsizei bufSize, GLfloat * params)
+GL_ENTRY(void, glGetnUniformivEXT, GLuint program, GLint location, GLsizei bufSize, GLint * params)
 GL_ENTRY(void, glHint, GLenum target, GLenum mode)
-GL_ENTRY(void, glInsertEventMarkerEXT, GLsizei length, const GLchar *marker)
-GL_ENTRY(void, glInvalidateFramebuffer, GLenum target, GLsizei numAttachments, const GLenum* attachments)
-GL_ENTRY(void, glInvalidateSubFramebuffer, GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
+GL_ENTRY(void, glInsertEventMarkerEXT, GLsizei length, const GLchar * marker)
+GL_ENTRY(void, glInvalidateFramebuffer, GLenum target, GLsizei numAttachments, const GLenum * attachments)
+GL_ENTRY(void, glInvalidateSubFramebuffer, GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height)
 GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer)
 GL_ENTRY(GLboolean, glIsEnabled, GLenum cap)
+GL_ENTRY(GLboolean, glIsEnablediEXT, GLenum target, GLuint index)
 GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence)
 GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer)
 GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer)
 GL_ENTRY(GLboolean, glIsProgram, GLuint program)
+GL_ENTRY(GLboolean, glIsProgramPipeline, GLuint pipeline)
 GL_ENTRY(GLboolean, glIsProgramPipelineEXT, GLuint pipeline)
 GL_ENTRY(GLboolean, glIsQuery, GLuint id)
 GL_ENTRY(GLboolean, glIsQueryEXT, GLuint id)
@@ -302,106 +383,174 @@
 GL_ENTRY(GLboolean, glIsSampler, GLuint sampler)
 GL_ENTRY(GLboolean, glIsShader, GLuint shader)
 GL_ENTRY(GLboolean, glIsSync, GLsync sync)
+GL_ENTRY(GLboolean, glIsSyncAPPLE, GLsync sync)
 GL_ENTRY(GLboolean, glIsTexture, GLuint texture)
 GL_ENTRY(GLboolean, glIsTransformFeedback, GLuint id)
 GL_ENTRY(GLboolean, glIsVertexArray, GLuint array)
 GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array)
-GL_ENTRY(void, glLabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar *label)
+GL_ENTRY(void, glLabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar * label)
 GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param)
-GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param)
 GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param)
-GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed * param)
+GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed * param)
 GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param)
-GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param)
 GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param)
-GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed * params)
+GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed * params)
 GL_ENTRY(void, glLineWidth, GLfloat width)
 GL_ENTRY(void, glLineWidthx, GLfixed width)
 GL_ENTRY(void, glLineWidthxOES, GLfixed width)
 GL_ENTRY(void, glLinkProgram, GLuint program)
 GL_ENTRY(void, glLoadIdentity, void)
-GL_ENTRY(void, glLoadMatrixf, const GLfloat *m)
-GL_ENTRY(void, glLoadMatrixx, const GLfixed *m)
-GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m)
+GL_ENTRY(void, glLoadMatrixf, const GLfloat * m)
+GL_ENTRY(void, glLoadMatrixx, const GLfixed * m)
+GL_ENTRY(void, glLoadMatrixxOES, const GLfixed * m)
 GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void)
 GL_ENTRY(void, glLogicOp, GLenum opcode)
-GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access)
-GL_ENTRY(GLvoid*, glMapBufferRange, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+GL_ENTRY(void *, glMapBufferOES, GLenum target, GLenum access)
+GL_ENTRY(void *, glMapBufferRange, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
+GL_ENTRY(void *, glMapBufferRangeEXT, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
 GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param)
-GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param)
 GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param)
-GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed * param)
+GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed * param)
+GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const void * pointer)
 GL_ENTRY(void, glMatrixMode, GLenum mode)
-GL_ENTRY(void, glMultMatrixf, const GLfloat *m)
-GL_ENTRY(void, glMultMatrixx, const GLfixed *m)
-GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m)
-GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount)
-GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
+GL_ENTRY(void, glMemoryBarrier, GLbitfield barriers)
+GL_ENTRY(void, glMemoryBarrierByRegion, GLbitfield barriers)
+GL_ENTRY(void, glMinSampleShadingOES, GLfloat value)
+GL_ENTRY(void, glMultMatrixf, const GLfloat * m)
+GL_ENTRY(void, glMultMatrixx, const GLfixed * m)
+GL_ENTRY(void, glMultMatrixxOES, const GLfixed * m)
+GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount)
+GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount)
+GL_ENTRY(void, glMultiTexCoord1bOES, GLenum texture, GLbyte s)
+GL_ENTRY(void, glMultiTexCoord1bvOES, GLenum texture, const GLbyte * coords)
+GL_ENTRY(void, glMultiTexCoord2bOES, GLenum texture, GLbyte s, GLbyte t)
+GL_ENTRY(void, glMultiTexCoord2bvOES, GLenum texture, const GLbyte * coords)
+GL_ENTRY(void, glMultiTexCoord3bOES, GLenum texture, GLbyte s, GLbyte t, GLbyte r)
+GL_ENTRY(void, glMultiTexCoord3bvOES, GLenum texture, const GLbyte * coords)
+GL_ENTRY(void, glMultiTexCoord4bOES, GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q)
+GL_ENTRY(void, glMultiTexCoord4bvOES, GLenum texture, const GLbyte * coords)
 GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
-GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
+GL_ENTRY(void, glMultiTexCoord4x, GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
+GL_ENTRY(void, glMultiTexCoord4xOES, GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
 GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz)
 GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz)
 GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz)
-GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer)
-GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
-GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
-GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
+GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const void * pointer)
+GL_ENTRY(void, glObjectLabelKHR, GLenum identifier, GLuint name, GLsizei length, const GLchar * label)
+GL_ENTRY(void, glObjectPtrLabelKHR, const void * ptr, GLsizei length, const GLchar * label)
+GL_ENTRY(void, glOrthof, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
+GL_ENTRY(void, glOrthofOES, GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
+GL_ENTRY(void, glOrthox, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
+GL_ENTRY(void, glOrthoxOES, GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
+GL_ENTRY(void, glPatchParameteriEXT, GLenum pname, GLint value)
 GL_ENTRY(void, glPauseTransformFeedback, void)
 GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param)
 GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param)
-GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param)
 GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param)
-GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed * params)
+GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed * params)
 GL_ENTRY(void, glPointSize, GLfloat size)
-GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer)
+GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const void * pointer)
 GL_ENTRY(void, glPointSizex, GLfixed size)
 GL_ENTRY(void, glPointSizexOES, GLfixed size)
 GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units)
 GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units)
 GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units)
+GL_ENTRY(void, glPopDebugGroupKHR, void)
 GL_ENTRY(void, glPopGroupMarkerEXT, void)
 GL_ENTRY(void, glPopMatrix, void)
-GL_ENTRY(void, glProgramBinary, GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length)
-GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
+GL_ENTRY(void, glPrimitiveBoundingBoxEXT, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW)
+GL_ENTRY(void, glProgramBinary, GLuint program, GLenum binaryFormat, const void * binary, GLsizei length)
+GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const void * binary, GLint length)
 GL_ENTRY(void, glProgramParameteri, GLuint program, GLenum pname, GLint value)
 GL_ENTRY(void, glProgramParameteriEXT, GLuint program, GLenum pname, GLint value)
-GL_ENTRY(void, glProgramUniform1fEXT, GLuint program, GLint location, GLfloat x)
-GL_ENTRY(void, glProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform1iEXT, GLuint program, GLint location, GLint x)
-GL_ENTRY(void, glProgramUniform1ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniform2fEXT, GLuint program, GLint location, GLfloat x, GLfloat y)
-GL_ENTRY(void, glProgramUniform2fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform2iEXT, GLuint program, GLint location, GLint x, GLint y)
-GL_ENTRY(void, glProgramUniform2ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniform3fEXT, GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glProgramUniform3fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform3iEXT, GLuint program, GLint location, GLint x, GLint y, GLint z)
-GL_ENTRY(void, glProgramUniform3ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniform4fEXT, GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-GL_ENTRY(void, glProgramUniform4fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
-GL_ENTRY(void, glProgramUniform4iEXT, GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)
-GL_ENTRY(void, glProgramUniform4ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
-GL_ENTRY(void, glProgramUniformMatrix2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
-GL_ENTRY(void, glProgramUniformMatrix3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
-GL_ENTRY(void, glProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
-GL_ENTRY(void, glPushGroupMarkerEXT, GLsizei length, const GLchar *marker)
+GL_ENTRY(void, glProgramUniform1f, GLuint program, GLint location, GLfloat v0)
+GL_ENTRY(void, glProgramUniform1fEXT, GLuint program, GLint location, GLfloat v0)
+GL_ENTRY(void, glProgramUniform1fv, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform1i, GLuint program, GLint location, GLint v0)
+GL_ENTRY(void, glProgramUniform1iEXT, GLuint program, GLint location, GLint v0)
+GL_ENTRY(void, glProgramUniform1iv, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform1ivEXT, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform1ui, GLuint program, GLint location, GLuint v0)
+GL_ENTRY(void, glProgramUniform1uiEXT, GLuint program, GLint location, GLuint v0)
+GL_ENTRY(void, glProgramUniform1uiv, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform1uivEXT, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform2f, GLuint program, GLint location, GLfloat v0, GLfloat v1)
+GL_ENTRY(void, glProgramUniform2fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1)
+GL_ENTRY(void, glProgramUniform2fv, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform2fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform2i, GLuint program, GLint location, GLint v0, GLint v1)
+GL_ENTRY(void, glProgramUniform2iEXT, GLuint program, GLint location, GLint v0, GLint v1)
+GL_ENTRY(void, glProgramUniform2iv, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform2ivEXT, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform2ui, GLuint program, GLint location, GLuint v0, GLuint v1)
+GL_ENTRY(void, glProgramUniform2uiEXT, GLuint program, GLint location, GLuint v0, GLuint v1)
+GL_ENTRY(void, glProgramUniform2uiv, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform2uivEXT, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform3f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+GL_ENTRY(void, glProgramUniform3fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+GL_ENTRY(void, glProgramUniform3fv, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform3fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform3i, GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
+GL_ENTRY(void, glProgramUniform3iEXT, GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
+GL_ENTRY(void, glProgramUniform3iv, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform3ivEXT, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform3ui, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
+GL_ENTRY(void, glProgramUniform3uiEXT, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
+GL_ENTRY(void, glProgramUniform3uiv, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform3uivEXT, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform4f, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+GL_ENTRY(void, glProgramUniform4fEXT, GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+GL_ENTRY(void, glProgramUniform4fv, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform4fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glProgramUniform4i, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+GL_ENTRY(void, glProgramUniform4iEXT, GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+GL_ENTRY(void, glProgramUniform4iv, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform4ivEXT, GLuint program, GLint location, GLsizei count, const GLint * value)
+GL_ENTRY(void, glProgramUniform4ui, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+GL_ENTRY(void, glProgramUniform4uiEXT, GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
+GL_ENTRY(void, glProgramUniform4uiv, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniform4uivEXT, GLuint program, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glProgramUniformMatrix2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix2x3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix2x3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix2x4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix2x4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix3x2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix3x2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix3x4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix3x4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix4fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix4x2fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix4x2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix4x3fv, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glProgramUniformMatrix4x3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glPushDebugGroupKHR, GLenum source, GLuint id, GLsizei length, const GLchar * message)
+GL_ENTRY(void, glPushGroupMarkerEXT, GLsizei length, const GLchar * marker)
 GL_ENTRY(void, glPushMatrix, void)
-GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16])
+GL_ENTRY(void, glQueryCounterEXT, GLuint id, GLenum target)
+GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed * mantissa, GLint * exponent)
 GL_ENTRY(void, glReadBuffer, GLenum mode)
+GL_ENTRY(void, glReadBufferIndexedEXT, GLenum src, GLint index)
 GL_ENTRY(void, glReadBufferNV, GLenum mode)
-GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
-GL_ENTRY(void, glReadnPixelsEXT, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)
+GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels)
+GL_ENTRY(void, glReadnPixelsEXT, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data)
 GL_ENTRY(void, glReleaseShaderCompiler, void)
 GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glRenderbufferStorageMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
@@ -409,133 +558,175 @@
 GL_ENTRY(void, glRenderbufferStorageMultisampleAPPLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glRenderbufferStorageMultisampleEXT, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glRenderbufferStorageMultisampleNV, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glResolveMultisampleFramebufferAPPLE, void)
 GL_ENTRY(void, glResumeTransformFeedback, void)
 GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
 GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert)
+GL_ENTRY(void, glSampleCoverage, GLfloat value, GLboolean invert)
+GL_ENTRY(void, glSampleCoverageOES, GLfixed value, GLboolean invert)
 GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert)
 GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert)
+GL_ENTRY(void, glSampleMaski, GLuint maskNumber, GLbitfield mask)
+GL_ENTRY(void, glSamplerParameterIivEXT, GLuint sampler, GLenum pname, const GLint * param)
+GL_ENTRY(void, glSamplerParameterIuivEXT, GLuint sampler, GLenum pname, const GLuint * param)
 GL_ENTRY(void, glSamplerParameterf, GLuint sampler, GLenum pname, GLfloat param)
-GL_ENTRY(void, glSamplerParameterfv, GLuint sampler, GLenum pname, const GLfloat* param)
+GL_ENTRY(void, glSamplerParameterfv, GLuint sampler, GLenum pname, const GLfloat * param)
 GL_ENTRY(void, glSamplerParameteri, GLuint sampler, GLenum pname, GLint param)
-GL_ENTRY(void, glSamplerParameteriv, GLuint sampler, GLenum pname, const GLint* param)
+GL_ENTRY(void, glSamplerParameteriv, GLuint sampler, GLenum pname, const GLint * param)
 GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z)
 GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z)
 GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z)
 GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height)
-GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList)
+GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList)
 GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition)
 GL_ENTRY(void, glShadeModel, GLenum mode)
-GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
-GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length)
+GL_ENTRY(void, glShaderBinary, GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length)
+GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length)
 GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
 GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask)
 GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask)
 GL_ENTRY(void, glStencilMask, GLuint mask)
 GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask)
 GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass)
-GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
+GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
 GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence)
-GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+GL_ENTRY(void, glTexBufferEXT, GLenum target, GLenum internalformat, GLuint buffer)
+GL_ENTRY(void, glTexBufferRangeEXT, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)
+GL_ENTRY(void, glTexCoord1bOES, GLbyte s)
+GL_ENTRY(void, glTexCoord1bvOES, const GLbyte * coords)
+GL_ENTRY(void, glTexCoord2bOES, GLbyte s, GLbyte t)
+GL_ENTRY(void, glTexCoord2bvOES, const GLbyte * coords)
+GL_ENTRY(void, glTexCoord3bOES, GLbyte s, GLbyte t, GLbyte r)
+GL_ENTRY(void, glTexCoord3bvOES, const GLbyte * coords)
+GL_ENTRY(void, glTexCoord4bOES, GLbyte s, GLbyte t, GLbyte r, GLbyte q)
+GL_ENTRY(void, glTexCoord4bvOES, const GLbyte * coords)
+GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const void * pointer)
 GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param)
-GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param)
-GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params)
+GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint * params)
 GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param)
 GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed * params)
+GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed * params)
 GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param)
-GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param)
-GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params)
+GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint * params)
 GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
-GL_ENTRY(void, glTexImage3D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
-GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
+GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed * params)
+GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels)
+GL_ENTRY(void, glTexImage3D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels)
+GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels)
+GL_ENTRY(void, glTexParameterIivEXT, GLenum target, GLenum pname, const GLint * params)
+GL_ENTRY(void, glTexParameterIuivEXT, GLenum target, GLenum pname, const GLuint * params)
 GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param)
-GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params)
+GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat * params)
 GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param)
-GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params)
+GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint * params)
 GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param)
 GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param)
-GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params)
-GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed * params)
+GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed * params)
 GL_ENTRY(void, glTexStorage1DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
 GL_ENTRY(void, glTexStorage2D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glTexStorage2DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glTexStorage2DMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
 GL_ENTRY(void, glTexStorage3D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
 GL_ENTRY(void, glTexStorage3DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
-GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
-GL_ENTRY(void, glTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
-GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
+GL_ENTRY(void, glTexStorage3DMultisampleOES, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
+GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels)
+GL_ENTRY(void, glTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels)
+GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels)
 GL_ENTRY(void, glTextureStorage1DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
 GL_ENTRY(void, glTextureStorage2DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
 GL_ENTRY(void, glTextureStorage3DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
-GL_ENTRY(void, glTransformFeedbackVaryings, GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode)
+GL_ENTRY(void, glTextureViewEXT, GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)
+GL_ENTRY(void, glTransformFeedbackVaryings, GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode)
 GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z)
 GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z)
 GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z)
-GL_ENTRY(void, glUniform1f, GLint location, GLfloat x)
-GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform1i, GLint location, GLint x)
-GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v)
+GL_ENTRY(void, glUniform1f, GLint location, GLfloat v0)
+GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glUniform1i, GLint location, GLint v0)
+GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint * value)
 GL_ENTRY(void, glUniform1ui, GLint location, GLuint v0)
-GL_ENTRY(void, glUniform1uiv, GLint location, GLsizei count, const GLuint* value)
-GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y)
-GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y)
-GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v)
+GL_ENTRY(void, glUniform1uiv, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glUniform2f, GLint location, GLfloat v0, GLfloat v1)
+GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glUniform2i, GLint location, GLint v0, GLint v1)
+GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint * value)
 GL_ENTRY(void, glUniform2ui, GLint location, GLuint v0, GLuint v1)
-GL_ENTRY(void, glUniform2uiv, GLint location, GLsizei count, const GLuint* value)
-GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z)
-GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v)
+GL_ENTRY(void, glUniform2uiv, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glUniform3f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
+GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glUniform3i, GLint location, GLint v0, GLint v1, GLint v2)
+GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint * value)
 GL_ENTRY(void, glUniform3ui, GLint location, GLuint v0, GLuint v1, GLuint v2)
-GL_ENTRY(void, glUniform3uiv, GLint location, GLsizei count, const GLuint* value)
-GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v)
-GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w)
-GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v)
+GL_ENTRY(void, glUniform3uiv, GLint location, GLsizei count, const GLuint * value)
+GL_ENTRY(void, glUniform4f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat * value)
+GL_ENTRY(void, glUniform4i, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
+GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint * value)
 GL_ENTRY(void, glUniform4ui, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
-GL_ENTRY(void, glUniform4uiv, GLint location, GLsizei count, const GLuint* value)
+GL_ENTRY(void, glUniform4uiv, GLint location, GLsizei count, const GLuint * value)
 GL_ENTRY(void, glUniformBlockBinding, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
-GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix2x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix2x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix3x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix3x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix4x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-GL_ENTRY(void, glUniformMatrix4x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
+GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix2x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix2x3fvNV, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix2x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix2x4fvNV, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix3x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix3x2fvNV, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix3x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix3x4fvNV, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix4x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix4x2fvNV, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix4x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
+GL_ENTRY(void, glUniformMatrix4x3fvNV, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value)
 GL_ENTRY(GLboolean, glUnmapBuffer, GLenum target)
 GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target)
 GL_ENTRY(void, glUseProgram, GLuint program)
+GL_ENTRY(void, glUseProgramStages, GLuint pipeline, GLbitfield stages, GLuint program)
 GL_ENTRY(void, glUseProgramStagesEXT, GLuint pipeline, GLbitfield stages, GLuint program)
 GL_ENTRY(void, glValidateProgram, GLuint program)
+GL_ENTRY(void, glValidateProgramPipeline, GLuint pipeline)
 GL_ENTRY(void, glValidateProgramPipelineEXT, GLuint pipeline)
-GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x)
-GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y)
-GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z)
-GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values)
-GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values)
+GL_ENTRY(void, glVertex2bOES, GLbyte x)
+GL_ENTRY(void, glVertex2bvOES, const GLbyte * coords)
+GL_ENTRY(void, glVertex3bOES, GLbyte x, GLbyte y)
+GL_ENTRY(void, glVertex3bvOES, const GLbyte * coords)
+GL_ENTRY(void, glVertex4bOES, GLbyte x, GLbyte y, GLbyte z)
+GL_ENTRY(void, glVertex4bvOES, const GLbyte * coords)
+GL_ENTRY(void, glVertexAttrib1f, GLuint index, GLfloat x)
+GL_ENTRY(void, glVertexAttrib1fv, GLuint index, const GLfloat * v)
+GL_ENTRY(void, glVertexAttrib2f, GLuint index, GLfloat x, GLfloat y)
+GL_ENTRY(void, glVertexAttrib2fv, GLuint index, const GLfloat * v)
+GL_ENTRY(void, glVertexAttrib3f, GLuint index, GLfloat x, GLfloat y, GLfloat z)
+GL_ENTRY(void, glVertexAttrib3fv, GLuint index, const GLfloat * v)
+GL_ENTRY(void, glVertexAttrib4f, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+GL_ENTRY(void, glVertexAttrib4fv, GLuint index, const GLfloat * v)
+GL_ENTRY(void, glVertexAttribBinding, GLuint attribindex, GLuint bindingindex)
 GL_ENTRY(void, glVertexAttribDivisor, GLuint index, GLuint divisor)
+GL_ENTRY(void, glVertexAttribDivisorANGLE, GLuint index, GLuint divisor)
+GL_ENTRY(void, glVertexAttribDivisorEXT, GLuint index, GLuint divisor)
+GL_ENTRY(void, glVertexAttribDivisorNV, GLuint index, GLuint divisor)
+GL_ENTRY(void, glVertexAttribFormat, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
 GL_ENTRY(void, glVertexAttribI4i, GLuint index, GLint x, GLint y, GLint z, GLint w)
-GL_ENTRY(void, glVertexAttribI4iv, GLuint index, const GLint* v)
+GL_ENTRY(void, glVertexAttribI4iv, GLuint index, const GLint * v)
 GL_ENTRY(void, glVertexAttribI4ui, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
-GL_ENTRY(void, glVertexAttribI4uiv, GLuint index, const GLuint* v)
-GL_ENTRY(void, glVertexAttribIPointer, GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
-GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
-GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+GL_ENTRY(void, glVertexAttribI4uiv, GLuint index, const GLuint * v)
+GL_ENTRY(void, glVertexAttribIFormat, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
+GL_ENTRY(void, glVertexAttribIPointer, GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer)
+GL_ENTRY(void, glVertexAttribPointer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer)
+GL_ENTRY(void, glVertexBindingDivisor, GLuint bindingindex, GLuint divisor)
+GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const void * pointer)
 GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height)
 GL_ENTRY(void, glWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout)
-GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
+GL_ENTRY(void, glWaitSyncAPPLE, GLsync sync, GLbitfield flags, GLuint64 timeout)
+GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const void * pointer)
diff --git a/opengl/libs/enums.in b/opengl/libs/enums.in
index 4279574..f3d216d 100644
--- a/opengl/libs/enums.in
+++ b/opengl/libs/enums.in
@@ -1,13 +1,10 @@
 GL_ENUM(0x0000,GL_POINTS)
-GL_ENUM(0x00000001,GL_VERTEX_SHADER_BIT_EXT)
-GL_ENUM(0x00000002,GL_FRAGMENT_SHADER_BIT_EXT)
 GL_ENUM(0x0001,GL_LINES)
 GL_ENUM(0x0002,GL_LINE_LOOP)
 GL_ENUM(0x0003,GL_LINE_STRIP)
 GL_ENUM(0x0004,GL_TRIANGLES)
 GL_ENUM(0x0005,GL_TRIANGLE_STRIP)
 GL_ENUM(0x0006,GL_TRIANGLE_FAN)
-GL_ENUM(0x0104,GL_ADD)
 GL_ENUM(0x0200,GL_NEVER)
 GL_ENUM(0x0201,GL_LESS)
 GL_ENUM(0x0202,GL_EQUAL)
@@ -25,49 +22,74 @@
 GL_ENUM(0x0306,GL_DST_COLOR)
 GL_ENUM(0x0307,GL_ONE_MINUS_DST_COLOR)
 GL_ENUM(0x0308,GL_SRC_ALPHA_SATURATE)
+GL_ENUM(0x3000,GL_CLIP_PLANE0)
+GL_ENUM(0x3001,GL_CLIP_PLANE1)
+GL_ENUM(0x3002,GL_CLIP_PLANE2)
+GL_ENUM(0x3003,GL_CLIP_PLANE3)
+GL_ENUM(0x3004,GL_CLIP_PLANE4)
+GL_ENUM(0x3005,GL_CLIP_PLANE5)
 GL_ENUM(0x0404,GL_FRONT)
 GL_ENUM(0x0405,GL_BACK)
 GL_ENUM(0x0408,GL_FRONT_AND_BACK)
+GL_ENUM(0x0B60,GL_FOG)
+GL_ENUM(0x0B50,GL_LIGHTING)
+GL_ENUM(0x0DE1,GL_TEXTURE_2D)
+GL_ENUM(0x0B44,GL_CULL_FACE)
+GL_ENUM(0x0BC0,GL_ALPHA_TEST)
+GL_ENUM(0x0BE2,GL_BLEND)
+GL_ENUM(0x0BF2,GL_COLOR_LOGIC_OP)
+GL_ENUM(0x0BD0,GL_DITHER)
+GL_ENUM(0x0B90,GL_STENCIL_TEST)
+GL_ENUM(0x0B71,GL_DEPTH_TEST)
+GL_ENUM(0x0B10,GL_POINT_SMOOTH)
+GL_ENUM(0x0B20,GL_LINE_SMOOTH)
+GL_ENUM(0x0C11,GL_SCISSOR_TEST)
+GL_ENUM(0x0B57,GL_COLOR_MATERIAL)
+GL_ENUM(0x0BA1,GL_NORMALIZE)
+GL_ENUM(0x803A,GL_RESCALE_NORMAL)
+GL_ENUM(0x8074,GL_VERTEX_ARRAY)
+GL_ENUM(0x8075,GL_NORMAL_ARRAY)
+GL_ENUM(0x8076,GL_COLOR_ARRAY)
+GL_ENUM(0x8078,GL_TEXTURE_COORD_ARRAY)
+GL_ENUM(0x809D,GL_MULTISAMPLE)
+GL_ENUM(0x809E,GL_SAMPLE_ALPHA_TO_COVERAGE)
+GL_ENUM(0x809F,GL_SAMPLE_ALPHA_TO_ONE)
+GL_ENUM(0x80A0,GL_SAMPLE_COVERAGE)
 GL_ENUM(0x0500,GL_INVALID_ENUM)
 GL_ENUM(0x0501,GL_INVALID_VALUE)
 GL_ENUM(0x0502,GL_INVALID_OPERATION)
 GL_ENUM(0x0503,GL_STACK_OVERFLOW)
 GL_ENUM(0x0504,GL_STACK_UNDERFLOW)
 GL_ENUM(0x0505,GL_OUT_OF_MEMORY)
-GL_ENUM(0x0506,GL_INVALID_FRAMEBUFFER_OPERATION_OES)
 GL_ENUM(0x0800,GL_EXP)
 GL_ENUM(0x0801,GL_EXP2)
-GL_ENUM(0x0900,GL_CW)
-GL_ENUM(0x0901,GL_CCW)
-GL_ENUM(0x0B00,GL_CURRENT_COLOR)
-GL_ENUM(0x0B02,GL_CURRENT_NORMAL)
-GL_ENUM(0x0B03,GL_CURRENT_TEXTURE_COORDS)
-GL_ENUM(0x0B10,GL_POINT_SMOOTH)
-GL_ENUM(0x0B11,GL_POINT_SIZE)
-GL_ENUM(0x0B12,GL_SMOOTH_POINT_SIZE_RANGE)
-GL_ENUM(0x0B20,GL_LINE_SMOOTH)
-GL_ENUM(0x0B21,GL_LINE_WIDTH)
-GL_ENUM(0x0B22,GL_SMOOTH_LINE_WIDTH_RANGE)
-GL_ENUM(0x0B44,GL_CULL_FACE)
-GL_ENUM(0x0B45,GL_CULL_FACE_MODE)
-GL_ENUM(0x0B46,GL_FRONT_FACE)
-GL_ENUM(0x0B50,GL_LIGHTING)
-GL_ENUM(0x0B52,GL_LIGHT_MODEL_TWO_SIDE)
-GL_ENUM(0x0B53,GL_LIGHT_MODEL_AMBIENT)
-GL_ENUM(0x0B54,GL_SHADE_MODEL)
-GL_ENUM(0x0B57,GL_COLOR_MATERIAL)
-GL_ENUM(0x0B60,GL_FOG)
 GL_ENUM(0x0B62,GL_FOG_DENSITY)
 GL_ENUM(0x0B63,GL_FOG_START)
 GL_ENUM(0x0B64,GL_FOG_END)
 GL_ENUM(0x0B65,GL_FOG_MODE)
 GL_ENUM(0x0B66,GL_FOG_COLOR)
+GL_ENUM(0x0900,GL_CW)
+GL_ENUM(0x0901,GL_CCW)
+GL_ENUM(0x0B00,GL_CURRENT_COLOR)
+GL_ENUM(0x0B02,GL_CURRENT_NORMAL)
+GL_ENUM(0x0B03,GL_CURRENT_TEXTURE_COORDS)
+GL_ENUM(0x0B11,GL_POINT_SIZE)
+GL_ENUM(0x8126,GL_POINT_SIZE_MIN)
+GL_ENUM(0x8127,GL_POINT_SIZE_MAX)
+GL_ENUM(0x8128,GL_POINT_FADE_THRESHOLD_SIZE)
+GL_ENUM(0x8129,GL_POINT_DISTANCE_ATTENUATION)
+GL_ENUM(0x0B12,GL_SMOOTH_POINT_SIZE_RANGE)
+GL_ENUM(0x0B21,GL_LINE_WIDTH)
+GL_ENUM(0x0B22,GL_SMOOTH_LINE_WIDTH_RANGE)
+GL_ENUM(0x846D,GL_ALIASED_POINT_SIZE_RANGE)
+GL_ENUM(0x846E,GL_ALIASED_LINE_WIDTH_RANGE)
+GL_ENUM(0x0B45,GL_CULL_FACE_MODE)
+GL_ENUM(0x0B46,GL_FRONT_FACE)
+GL_ENUM(0x0B54,GL_SHADE_MODEL)
 GL_ENUM(0x0B70,GL_DEPTH_RANGE)
-GL_ENUM(0x0B71,GL_DEPTH_TEST)
 GL_ENUM(0x0B72,GL_DEPTH_WRITEMASK)
 GL_ENUM(0x0B73,GL_DEPTH_CLEAR_VALUE)
 GL_ENUM(0x0B74,GL_DEPTH_FUNC)
-GL_ENUM(0x0B90,GL_STENCIL_TEST)
 GL_ENUM(0x0B91,GL_STENCIL_CLEAR_VALUE)
 GL_ENUM(0x0B92,GL_STENCIL_FUNC)
 GL_ENUM(0x0B93,GL_STENCIL_VALUE_MASK)
@@ -77,7 +99,6 @@
 GL_ENUM(0x0B97,GL_STENCIL_REF)
 GL_ENUM(0x0B98,GL_STENCIL_WRITEMASK)
 GL_ENUM(0x0BA0,GL_MATRIX_MODE)
-GL_ENUM(0x0BA1,GL_NORMALIZE)
 GL_ENUM(0x0BA2,GL_VIEWPORT)
 GL_ENUM(0x0BA3,GL_MODELVIEW_STACK_DEPTH)
 GL_ENUM(0x0BA4,GL_PROJECTION_STACK_DEPTH)
@@ -85,33 +106,14 @@
 GL_ENUM(0x0BA6,GL_MODELVIEW_MATRIX)
 GL_ENUM(0x0BA7,GL_PROJECTION_MATRIX)
 GL_ENUM(0x0BA8,GL_TEXTURE_MATRIX)
-GL_ENUM(0x0BC0,GL_ALPHA_TEST)
 GL_ENUM(0x0BC1,GL_ALPHA_TEST_FUNC)
 GL_ENUM(0x0BC2,GL_ALPHA_TEST_REF)
-GL_ENUM(0x0BD0,GL_DITHER)
 GL_ENUM(0x0BE0,GL_BLEND_DST)
 GL_ENUM(0x0BE1,GL_BLEND_SRC)
-GL_ENUM(0x0BE2,GL_BLEND)
 GL_ENUM(0x0BF0,GL_LOGIC_OP_MODE)
-GL_ENUM(0x0BF2,GL_COLOR_LOGIC_OP)
-GL_ENUM(0x0C02,GL_READ_BUFFER_NV)
 GL_ENUM(0x0C10,GL_SCISSOR_BOX)
-GL_ENUM(0x0C11,GL_SCISSOR_TEST)
 GL_ENUM(0x0C22,GL_COLOR_CLEAR_VALUE)
 GL_ENUM(0x0C23,GL_COLOR_WRITEMASK)
-GL_ENUM(0x0C50,GL_PERSPECTIVE_CORRECTION_HINT)
-GL_ENUM(0x0C51,GL_POINT_SMOOTH_HINT)
-GL_ENUM(0x0C52,GL_LINE_SMOOTH_HINT)
-GL_ENUM(0x0C54,GL_FOG_HINT)
-GL_ENUM(0x0CF2,GL_UNPACK_ROW_LENGTH)
-GL_ENUM(0x0CF3,GL_UNPACK_SKIP_ROWS)
-GL_ENUM(0x0CF4,GL_UNPACK_SKIP_PIXELS)
-GL_ENUM(0x0CF5,GL_UNPACK_ALIGNMENT)
-GL_ENUM(0x0D02,GL_PACK_ROW_LENGTH)
-GL_ENUM(0x0D03,GL_PACK_SKIP_ROWS)
-GL_ENUM(0x0D04,GL_PACK_SKIP_PIXELS)
-GL_ENUM(0x0D05,GL_PACK_ALIGNMENT)
-GL_ENUM(0x0D1C,GL_ALPHA_SCALE)
 GL_ENUM(0x0D31,GL_MAX_LIGHTS)
 GL_ENUM(0x0D32,GL_MAX_CLIP_PLANES)
 GL_ENUM(0x0D33,GL_MAX_TEXTURE_SIZE)
@@ -119,6 +121,7 @@
 GL_ENUM(0x0D38,GL_MAX_PROJECTION_STACK_DEPTH)
 GL_ENUM(0x0D39,GL_MAX_TEXTURE_STACK_DEPTH)
 GL_ENUM(0x0D3A,GL_MAX_VIEWPORT_DIMS)
+GL_ENUM(0x84E2,GL_MAX_TEXTURE_UNITS)
 GL_ENUM(0x0D50,GL_SUBPIXEL_BITS)
 GL_ENUM(0x0D52,GL_RED_BITS)
 GL_ENUM(0x0D53,GL_GREEN_BITS)
@@ -126,10 +129,41 @@
 GL_ENUM(0x0D55,GL_ALPHA_BITS)
 GL_ENUM(0x0D56,GL_DEPTH_BITS)
 GL_ENUM(0x0D57,GL_STENCIL_BITS)
-GL_ENUM(0x0DE1,GL_TEXTURE_2D)
+GL_ENUM(0x2A00,GL_POLYGON_OFFSET_UNITS)
+GL_ENUM(0x8037,GL_POLYGON_OFFSET_FILL)
+GL_ENUM(0x8038,GL_POLYGON_OFFSET_FACTOR)
+GL_ENUM(0x8069,GL_TEXTURE_BINDING_2D)
+GL_ENUM(0x807A,GL_VERTEX_ARRAY_SIZE)
+GL_ENUM(0x807B,GL_VERTEX_ARRAY_TYPE)
+GL_ENUM(0x807C,GL_VERTEX_ARRAY_STRIDE)
+GL_ENUM(0x807E,GL_NORMAL_ARRAY_TYPE)
+GL_ENUM(0x807F,GL_NORMAL_ARRAY_STRIDE)
+GL_ENUM(0x8081,GL_COLOR_ARRAY_SIZE)
+GL_ENUM(0x8082,GL_COLOR_ARRAY_TYPE)
+GL_ENUM(0x8083,GL_COLOR_ARRAY_STRIDE)
+GL_ENUM(0x8088,GL_TEXTURE_COORD_ARRAY_SIZE)
+GL_ENUM(0x8089,GL_TEXTURE_COORD_ARRAY_TYPE)
+GL_ENUM(0x808A,GL_TEXTURE_COORD_ARRAY_STRIDE)
+GL_ENUM(0x808E,GL_VERTEX_ARRAY_POINTER)
+GL_ENUM(0x808F,GL_NORMAL_ARRAY_POINTER)
+GL_ENUM(0x8090,GL_COLOR_ARRAY_POINTER)
+GL_ENUM(0x8092,GL_TEXTURE_COORD_ARRAY_POINTER)
+GL_ENUM(0x80A8,GL_SAMPLE_BUFFERS)
+GL_ENUM(0x80A9,GL_SAMPLES)
+GL_ENUM(0x80AA,GL_SAMPLE_COVERAGE_VALUE)
+GL_ENUM(0x80AB,GL_SAMPLE_COVERAGE_INVERT)
+GL_ENUM(0x86A2,GL_NUM_COMPRESSED_TEXTURE_FORMATS)
+GL_ENUM(0x86A3,GL_COMPRESSED_TEXTURE_FORMATS)
 GL_ENUM(0x1100,GL_DONT_CARE)
 GL_ENUM(0x1101,GL_FASTEST)
 GL_ENUM(0x1102,GL_NICEST)
+GL_ENUM(0x0C50,GL_PERSPECTIVE_CORRECTION_HINT)
+GL_ENUM(0x0C51,GL_POINT_SMOOTH_HINT)
+GL_ENUM(0x0C52,GL_LINE_SMOOTH_HINT)
+GL_ENUM(0x0C54,GL_FOG_HINT)
+GL_ENUM(0x8192,GL_GENERATE_MIPMAP_HINT)
+GL_ENUM(0x0B53,GL_LIGHT_MODEL_AMBIENT)
+GL_ENUM(0x0B52,GL_LIGHT_MODEL_TWO_SIDE)
 GL_ENUM(0x1200,GL_AMBIENT)
 GL_ENUM(0x1201,GL_DIFFUSE)
 GL_ENUM(0x1202,GL_SPECULAR)
@@ -144,10 +178,7 @@
 GL_ENUM(0x1401,GL_UNSIGNED_BYTE)
 GL_ENUM(0x1402,GL_SHORT)
 GL_ENUM(0x1403,GL_UNSIGNED_SHORT)
-GL_ENUM(0x1404,GL_INT)
-GL_ENUM(0x1405,GL_UNSIGNED_INT)
 GL_ENUM(0x1406,GL_FLOAT)
-GL_ENUM(0x140B,GL_HALF_FLOAT)
 GL_ENUM(0x140C,GL_FIXED)
 GL_ENUM(0x1500,GL_CLEAR)
 GL_ENUM(0x1501,GL_AND)
@@ -171,19 +202,16 @@
 GL_ENUM(0x1700,GL_MODELVIEW)
 GL_ENUM(0x1701,GL_PROJECTION)
 GL_ENUM(0x1702,GL_TEXTURE)
-GL_ENUM(0x1800,GL_COLOR_EXT)
-GL_ENUM(0x1801,GL_DEPTH_EXT)
-GL_ENUM(0x1802,GL_STENCIL_EXT)
-GL_ENUM(0x1901,GL_STENCIL_INDEX)
-GL_ENUM(0x1902,GL_DEPTH_COMPONENT)
-GL_ENUM(0x1903,GL_RED_EXT)
-GL_ENUM(0x1904,GL_GREEN)
-GL_ENUM(0x1905,GL_BLUE)
 GL_ENUM(0x1906,GL_ALPHA)
 GL_ENUM(0x1907,GL_RGB)
 GL_ENUM(0x1908,GL_RGBA)
 GL_ENUM(0x1909,GL_LUMINANCE)
 GL_ENUM(0x190A,GL_LUMINANCE_ALPHA)
+GL_ENUM(0x0CF5,GL_UNPACK_ALIGNMENT)
+GL_ENUM(0x0D05,GL_PACK_ALIGNMENT)
+GL_ENUM(0x8033,GL_UNSIGNED_SHORT_4_4_4_4)
+GL_ENUM(0x8034,GL_UNSIGNED_SHORT_5_5_5_1)
+GL_ENUM(0x8363,GL_UNSIGNED_SHORT_5_6_5)
 GL_ENUM(0x1D00,GL_FLAT)
 GL_ENUM(0x1D01,GL_SMOOTH)
 GL_ENUM(0x1E00,GL_KEEP)
@@ -196,10 +224,10 @@
 GL_ENUM(0x1F03,GL_EXTENSIONS)
 GL_ENUM(0x2100,GL_MODULATE)
 GL_ENUM(0x2101,GL_DECAL)
+GL_ENUM(0x0104,GL_ADD)
 GL_ENUM(0x2200,GL_TEXTURE_ENV_MODE)
 GL_ENUM(0x2201,GL_TEXTURE_ENV_COLOR)
 GL_ENUM(0x2300,GL_TEXTURE_ENV)
-GL_ENUM(0x2500,GL_TEXTURE_GEN_MODE_OES)
 GL_ENUM(0x2600,GL_NEAREST)
 GL_ENUM(0x2601,GL_LINEAR)
 GL_ENUM(0x2700,GL_NEAREST_MIPMAP_NEAREST)
@@ -210,157 +238,7 @@
 GL_ENUM(0x2801,GL_TEXTURE_MIN_FILTER)
 GL_ENUM(0x2802,GL_TEXTURE_WRAP_S)
 GL_ENUM(0x2803,GL_TEXTURE_WRAP_T)
-GL_ENUM(0x2901,GL_REPEAT)
-GL_ENUM(0x2A00,GL_POLYGON_OFFSET_UNITS)
-GL_ENUM(0x3000,GL_CLIP_PLANE0)
-GL_ENUM(0x3001,GL_CLIP_PLANE1)
-GL_ENUM(0x3002,GL_CLIP_PLANE2)
-GL_ENUM(0x3003,GL_CLIP_PLANE3)
-GL_ENUM(0x3004,GL_CLIP_PLANE4)
-GL_ENUM(0x3005,GL_CLIP_PLANE5)
-GL_ENUM(0x4000,GL_LIGHT0)
-GL_ENUM(0x4001,GL_LIGHT1)
-GL_ENUM(0x4002,GL_LIGHT2)
-GL_ENUM(0x4003,GL_LIGHT3)
-GL_ENUM(0x4004,GL_LIGHT4)
-GL_ENUM(0x4005,GL_LIGHT5)
-GL_ENUM(0x4006,GL_LIGHT6)
-GL_ENUM(0x4007,GL_LIGHT7)
-GL_ENUM(0x8000,GL_COVERAGE_BUFFER_BIT_NV)
-GL_ENUM(0x8001,GL_CONSTANT_COLOR)
-GL_ENUM(0x8002,GL_ONE_MINUS_CONSTANT_COLOR)
-GL_ENUM(0x8003,GL_CONSTANT_ALPHA)
-GL_ENUM(0x8004,GL_ONE_MINUS_CONSTANT_ALPHA)
-GL_ENUM(0x8005,GL_BLEND_COLOR)
-GL_ENUM(0x8006,GL_FUNC_ADD_OES)
-GL_ENUM(0x8007,GL_MIN_EXT)
-GL_ENUM(0x8008,GL_MAX_EXT)
-GL_ENUM(0x8009,GL_BLEND_EQUATION_RGB_OES)
-GL_ENUM(0x800A,GL_FUNC_SUBTRACT_OES)
-GL_ENUM(0x800B,GL_FUNC_REVERSE_SUBTRACT_OES)
-GL_ENUM(0x8033,GL_UNSIGNED_SHORT_4_4_4_4)
-GL_ENUM(0x8034,GL_UNSIGNED_SHORT_5_5_5_1)
-GL_ENUM(0x8037,GL_POLYGON_OFFSET_FILL)
-GL_ENUM(0x8038,GL_POLYGON_OFFSET_FACTOR)
-GL_ENUM(0x803A,GL_RESCALE_NORMAL)
-GL_ENUM(0x803C,GL_ALPHA8_EXT)
-GL_ENUM(0x8040,GL_LUMINANCE8_EXT)
-GL_ENUM(0x8045,GL_LUMINANCE8_ALPHA8_EXT)
-GL_ENUM(0x8051,GL_RGB8_OES)
-GL_ENUM(0x8052,GL_RGB10_EXT)
-GL_ENUM(0x8056,GL_RGBA4_OES)
-GL_ENUM(0x8057,GL_RGB5_A1_OES)
-GL_ENUM(0x8058,GL_RGBA8_OES)
-GL_ENUM(0x8059,GL_RGB10_A2_EXT)
-GL_ENUM(0x8069,GL_TEXTURE_BINDING_2D)
-GL_ENUM(0x806A,GL_TEXTURE_BINDING_3D_OES)
-GL_ENUM(0x806D,GL_UNPACK_SKIP_IMAGES)
-GL_ENUM(0x806E,GL_UNPACK_IMAGE_HEIGHT)
-GL_ENUM(0x806F,GL_TEXTURE_3D_OES)
-GL_ENUM(0x8072,GL_TEXTURE_WRAP_R_OES)
-GL_ENUM(0x8073,GL_MAX_3D_TEXTURE_SIZE_OES)
-GL_ENUM(0x8074,GL_VERTEX_ARRAY)
-GL_ENUM(0x8075,GL_NORMAL_ARRAY)
-GL_ENUM(0x8076,GL_COLOR_ARRAY)
-GL_ENUM(0x8078,GL_TEXTURE_COORD_ARRAY)
-GL_ENUM(0x807A,GL_VERTEX_ARRAY_SIZE)
-GL_ENUM(0x807B,GL_VERTEX_ARRAY_TYPE)
-GL_ENUM(0x807C,GL_VERTEX_ARRAY_STRIDE)
-GL_ENUM(0x807E,GL_NORMAL_ARRAY_TYPE)
-GL_ENUM(0x807F,GL_NORMAL_ARRAY_STRIDE)
-GL_ENUM(0x8081,GL_COLOR_ARRAY_SIZE)
-GL_ENUM(0x8082,GL_COLOR_ARRAY_TYPE)
-GL_ENUM(0x8083,GL_COLOR_ARRAY_STRIDE)
-GL_ENUM(0x8088,GL_TEXTURE_COORD_ARRAY_SIZE)
-GL_ENUM(0x8089,GL_TEXTURE_COORD_ARRAY_TYPE)
-GL_ENUM(0x808A,GL_TEXTURE_COORD_ARRAY_STRIDE)
-GL_ENUM(0x808E,GL_VERTEX_ARRAY_POINTER)
-GL_ENUM(0x808F,GL_NORMAL_ARRAY_POINTER)
-GL_ENUM(0x8090,GL_COLOR_ARRAY_POINTER)
-GL_ENUM(0x8092,GL_TEXTURE_COORD_ARRAY_POINTER)
-GL_ENUM(0x809D,GL_MULTISAMPLE)
-GL_ENUM(0x809E,GL_SAMPLE_ALPHA_TO_COVERAGE)
-GL_ENUM(0x809F,GL_SAMPLE_ALPHA_TO_ONE)
-GL_ENUM(0x80A0,GL_SAMPLE_COVERAGE)
-GL_ENUM(0x80A8,GL_SAMPLE_BUFFERS)
-GL_ENUM(0x80A9,GL_SAMPLES)
-GL_ENUM(0x80AA,GL_SAMPLE_COVERAGE_VALUE)
-GL_ENUM(0x80AB,GL_SAMPLE_COVERAGE_INVERT)
-GL_ENUM(0x80C8,GL_BLEND_DST_RGB_OES)
-GL_ENUM(0x80C9,GL_BLEND_SRC_RGB_OES)
-GL_ENUM(0x80CA,GL_BLEND_DST_ALPHA_OES)
-GL_ENUM(0x80CB,GL_BLEND_SRC_ALPHA_OES)
-GL_ENUM(0x80E1,GL_BGRA_EXT)
-GL_ENUM(0x80E8,GL_MAX_ELEMENTS_VERTICES)
-GL_ENUM(0x80E9,GL_MAX_ELEMENTS_INDICES)
-GL_ENUM(0x8126,GL_POINT_SIZE_MIN)
-GL_ENUM(0x8127,GL_POINT_SIZE_MAX)
-GL_ENUM(0x8128,GL_POINT_FADE_THRESHOLD_SIZE)
-GL_ENUM(0x8129,GL_POINT_DISTANCE_ATTENUATION)
-GL_ENUM(0x812F,GL_CLAMP_TO_EDGE)
-GL_ENUM(0x813A,GL_TEXTURE_MIN_LOD)
-GL_ENUM(0x813B,GL_TEXTURE_MAX_LOD)
-GL_ENUM(0x813C,GL_TEXTURE_BASE_LEVEL)
-GL_ENUM(0x813D,GL_TEXTURE_MAX_LEVEL_APPLE)
 GL_ENUM(0x8191,GL_GENERATE_MIPMAP)
-GL_ENUM(0x8192,GL_GENERATE_MIPMAP_HINT)
-GL_ENUM(0x81A5,GL_DEPTH_COMPONENT16_OES)
-GL_ENUM(0x81A6,GL_DEPTH_COMPONENT24_OES)
-GL_ENUM(0x81A7,GL_DEPTH_COMPONENT32_OES)
-GL_ENUM(0x8210,GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)
-GL_ENUM(0x8211,GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT)
-GL_ENUM(0x8212,GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE)
-GL_ENUM(0x8213,GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE)
-GL_ENUM(0x8214,GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE)
-GL_ENUM(0x8215,GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE)
-GL_ENUM(0x8216,GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE)
-GL_ENUM(0x8217,GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE)
-GL_ENUM(0x8218,GL_FRAMEBUFFER_DEFAULT)
-GL_ENUM(0x8219,GL_FRAMEBUFFER_UNDEFINED)
-GL_ENUM(0x821A,GL_DEPTH_STENCIL_ATTACHMENT)
-GL_ENUM(0x821B,GL_MAJOR_VERSION)
-GL_ENUM(0x821C,GL_MINOR_VERSION)
-GL_ENUM(0x821D,GL_NUM_EXTENSIONS)
-GL_ENUM(0x8227,GL_RG_EXT)
-GL_ENUM(0x8228,GL_RG_INTEGER)
-GL_ENUM(0x8229,GL_R8_EXT)
-GL_ENUM(0x822B,GL_RG8_EXT)
-GL_ENUM(0x822D,GL_R16F_EXT)
-GL_ENUM(0x822E,GL_R32F)
-GL_ENUM(0x822F,GL_RG16F_EXT)
-GL_ENUM(0x8230,GL_RG32F)
-GL_ENUM(0x8231,GL_R8I)
-GL_ENUM(0x8232,GL_R8UI)
-GL_ENUM(0x8233,GL_R16I)
-GL_ENUM(0x8234,GL_R16UI)
-GL_ENUM(0x8235,GL_R32I)
-GL_ENUM(0x8236,GL_R32UI)
-GL_ENUM(0x8237,GL_RG8I)
-GL_ENUM(0x8238,GL_RG8UI)
-GL_ENUM(0x8239,GL_RG16I)
-GL_ENUM(0x823A,GL_RG16UI)
-GL_ENUM(0x823B,GL_RG32I)
-GL_ENUM(0x823C,GL_RG32UI)
-GL_ENUM(0x8252,GL_LOSE_CONTEXT_ON_RESET_EXT)
-GL_ENUM(0x8253,GL_GUILTY_CONTEXT_RESET_EXT)
-GL_ENUM(0x8254,GL_INNOCENT_CONTEXT_RESET_EXT)
-GL_ENUM(0x8255,GL_UNKNOWN_CONTEXT_RESET_EXT)
-GL_ENUM(0x8256,GL_RESET_NOTIFICATION_STRATEGY_EXT)
-GL_ENUM(0x8257,GL_PROGRAM_BINARY_RETRIEVABLE_HINT)
-GL_ENUM(0x8258,GL_PROGRAM_SEPARABLE_EXT)
-GL_ENUM(0x8259,GL_ACTIVE_PROGRAM_EXT)
-GL_ENUM(0x825A,GL_PROGRAM_PIPELINE_BINDING_EXT)
-GL_ENUM(0x8261,GL_NO_RESET_NOTIFICATION_EXT)
-GL_ENUM(0x82DF,GL_TEXTURE_IMMUTABLE_LEVELS)
-GL_ENUM(0x8363,GL_UNSIGNED_SHORT_5_6_5)
-GL_ENUM(0x8365,GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT)
-GL_ENUM(0x8366,GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT)
-GL_ENUM(0x8368,GL_UNSIGNED_INT_2_10_10_10_REV_EXT)
-GL_ENUM(0x8370,GL_MIRRORED_REPEAT_OES)
-GL_ENUM(0x83F0,GL_COMPRESSED_RGB_S3TC_DXT1_EXT)
-GL_ENUM(0x83F1,GL_COMPRESSED_RGBA_S3TC_DXT1_EXT)
-GL_ENUM(0x846D,GL_ALIASED_POINT_SIZE_RANGE)
-GL_ENUM(0x846E,GL_ALIASED_LINE_WIDTH_RANGE)
 GL_ENUM(0x84C0,GL_TEXTURE0)
 GL_ENUM(0x84C1,GL_TEXTURE1)
 GL_ENUM(0x84C2,GL_TEXTURE2)
@@ -395,32 +273,29 @@
 GL_ENUM(0x84DF,GL_TEXTURE31)
 GL_ENUM(0x84E0,GL_ACTIVE_TEXTURE)
 GL_ENUM(0x84E1,GL_CLIENT_ACTIVE_TEXTURE)
-GL_ENUM(0x84E2,GL_MAX_TEXTURE_UNITS)
+GL_ENUM(0x2901,GL_REPEAT)
+GL_ENUM(0x812F,GL_CLAMP_TO_EDGE)
+GL_ENUM(0x4000,GL_LIGHT0)
+GL_ENUM(0x4001,GL_LIGHT1)
+GL_ENUM(0x4002,GL_LIGHT2)
+GL_ENUM(0x4003,GL_LIGHT3)
+GL_ENUM(0x4004,GL_LIGHT4)
+GL_ENUM(0x4005,GL_LIGHT5)
+GL_ENUM(0x4006,GL_LIGHT6)
+GL_ENUM(0x4007,GL_LIGHT7)
+GL_ENUM(0x8892,GL_ARRAY_BUFFER)
+GL_ENUM(0x8893,GL_ELEMENT_ARRAY_BUFFER)
+GL_ENUM(0x8894,GL_ARRAY_BUFFER_BINDING)
+GL_ENUM(0x8895,GL_ELEMENT_ARRAY_BUFFER_BINDING)
+GL_ENUM(0x8896,GL_VERTEX_ARRAY_BUFFER_BINDING)
+GL_ENUM(0x8897,GL_NORMAL_ARRAY_BUFFER_BINDING)
+GL_ENUM(0x8898,GL_COLOR_ARRAY_BUFFER_BINDING)
+GL_ENUM(0x889A,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
+GL_ENUM(0x88E4,GL_STATIC_DRAW)
+GL_ENUM(0x88E8,GL_DYNAMIC_DRAW)
+GL_ENUM(0x8764,GL_BUFFER_SIZE)
+GL_ENUM(0x8765,GL_BUFFER_USAGE)
 GL_ENUM(0x84E7,GL_SUBTRACT)
-GL_ENUM(0x84E8,GL_MAX_RENDERBUFFER_SIZE_OES)
-GL_ENUM(0x84F2,GL_ALL_COMPLETED_NV)
-GL_ENUM(0x84F3,GL_FENCE_STATUS_NV)
-GL_ENUM(0x84F4,GL_FENCE_CONDITION_NV)
-GL_ENUM(0x84F9,GL_DEPTH_STENCIL_OES)
-GL_ENUM(0x84FA,GL_UNSIGNED_INT_24_8_OES)
-GL_ENUM(0x84FD,GL_MAX_TEXTURE_LOD_BIAS_EXT)
-GL_ENUM(0x84FE,GL_TEXTURE_MAX_ANISOTROPY_EXT)
-GL_ENUM(0x84FF,GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
-GL_ENUM(0x8500,GL_TEXTURE_FILTER_CONTROL_EXT)
-GL_ENUM(0x8501,GL_TEXTURE_LOD_BIAS_EXT)
-GL_ENUM(0x8507,GL_INCR_WRAP_OES)
-GL_ENUM(0x8508,GL_DECR_WRAP_OES)
-GL_ENUM(0x8511,GL_NORMAL_MAP_OES)
-GL_ENUM(0x8512,GL_REFLECTION_MAP_OES)
-GL_ENUM(0x8513,GL_TEXTURE_CUBE_MAP_OES)
-GL_ENUM(0x8514,GL_TEXTURE_BINDING_CUBE_MAP_OES)
-GL_ENUM(0x8515,GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES)
-GL_ENUM(0x8516,GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES)
-GL_ENUM(0x8517,GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES)
-GL_ENUM(0x8518,GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES)
-GL_ENUM(0x8519,GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES)
-GL_ENUM(0x851A,GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES)
-GL_ENUM(0x851C,GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES)
 GL_ENUM(0x8570,GL_COMBINE)
 GL_ENUM(0x8571,GL_COMBINE_RGB)
 GL_ENUM(0x8572,GL_COMBINE_ALPHA)
@@ -430,140 +305,363 @@
 GL_ENUM(0x8576,GL_CONSTANT)
 GL_ENUM(0x8577,GL_PRIMARY_COLOR)
 GL_ENUM(0x8578,GL_PREVIOUS)
-GL_ENUM(0x8580,GL_SRC0_RGB)
-GL_ENUM(0x8581,GL_SRC1_RGB)
-GL_ENUM(0x8582,GL_SRC2_RGB)
-GL_ENUM(0x8588,GL_SRC0_ALPHA)
-GL_ENUM(0x8589,GL_SRC1_ALPHA)
-GL_ENUM(0x858A,GL_SRC2_ALPHA)
 GL_ENUM(0x8590,GL_OPERAND0_RGB)
 GL_ENUM(0x8591,GL_OPERAND1_RGB)
 GL_ENUM(0x8592,GL_OPERAND2_RGB)
 GL_ENUM(0x8598,GL_OPERAND0_ALPHA)
 GL_ENUM(0x8599,GL_OPERAND1_ALPHA)
 GL_ENUM(0x859A,GL_OPERAND2_ALPHA)
-GL_ENUM(0x85B5,GL_VERTEX_ARRAY_BINDING_OES)
-GL_ENUM(0x85BA,GL_UNSIGNED_SHORT_8_8_APPLE)
-GL_ENUM(0x85BB,GL_UNSIGNED_SHORT_8_8_REV_APPLE)
-GL_ENUM(0x8622,GL_VERTEX_ATTRIB_ARRAY_ENABLED)
-GL_ENUM(0x8623,GL_VERTEX_ATTRIB_ARRAY_SIZE)
-GL_ENUM(0x8624,GL_VERTEX_ATTRIB_ARRAY_STRIDE)
-GL_ENUM(0x8625,GL_VERTEX_ATTRIB_ARRAY_TYPE)
-GL_ENUM(0x8626,GL_CURRENT_VERTEX_ATTRIB)
-GL_ENUM(0x8645,GL_VERTEX_ATTRIB_ARRAY_POINTER)
-GL_ENUM(0x86A2,GL_NUM_COMPRESSED_TEXTURE_FORMATS)
-GL_ENUM(0x86A3,GL_COMPRESSED_TEXTURE_FORMATS)
-GL_ENUM(0x86A4,GL_MAX_VERTEX_UNITS_OES)
-GL_ENUM(0x86A9,GL_WEIGHT_ARRAY_TYPE_OES)
-GL_ENUM(0x86AA,GL_WEIGHT_ARRAY_STRIDE_OES)
-GL_ENUM(0x86AB,GL_WEIGHT_ARRAY_SIZE_OES)
-GL_ENUM(0x86AC,GL_WEIGHT_ARRAY_POINTER_OES)
-GL_ENUM(0x86AD,GL_WEIGHT_ARRAY_OES)
+GL_ENUM(0x0D1C,GL_ALPHA_SCALE)
+GL_ENUM(0x8580,GL_SRC0_RGB)
+GL_ENUM(0x8581,GL_SRC1_RGB)
+GL_ENUM(0x8582,GL_SRC2_RGB)
+GL_ENUM(0x8588,GL_SRC0_ALPHA)
+GL_ENUM(0x8589,GL_SRC1_ALPHA)
+GL_ENUM(0x858A,GL_SRC2_ALPHA)
 GL_ENUM(0x86AE,GL_DOT3_RGB)
 GL_ENUM(0x86AF,GL_DOT3_RGBA)
-GL_ENUM(0x8740,GL_Z400_BINARY_AMD)
-GL_ENUM(0x8741,GL_PROGRAM_BINARY_LENGTH_OES)
-GL_ENUM(0x8764,GL_BUFFER_SIZE)
-GL_ENUM(0x8765,GL_BUFFER_USAGE)
-GL_ENUM(0x87EE,GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD)
-GL_ENUM(0x87F9,GL_3DC_X_AMD)
-GL_ENUM(0x87FA,GL_3DC_XY_AMD)
-GL_ENUM(0x87FE,GL_NUM_PROGRAM_BINARY_FORMATS_OES)
-GL_ENUM(0x87FF,GL_PROGRAM_BINARY_FORMATS_OES)
+GL_ENUM(0x8006,GL_FUNC_ADD)
+GL_ENUM(0x8009,GL_BLEND_EQUATION)
+GL_ENUM(0x883D,GL_BLEND_EQUATION_ALPHA)
+GL_ENUM(0x800A,GL_FUNC_SUBTRACT)
+GL_ENUM(0x800B,GL_FUNC_REVERSE_SUBTRACT)
+GL_ENUM(0x80C8,GL_BLEND_DST_RGB)
+GL_ENUM(0x80C9,GL_BLEND_SRC_RGB)
+GL_ENUM(0x80CA,GL_BLEND_DST_ALPHA)
+GL_ENUM(0x80CB,GL_BLEND_SRC_ALPHA)
+GL_ENUM(0x8001,GL_CONSTANT_COLOR)
+GL_ENUM(0x8002,GL_ONE_MINUS_CONSTANT_COLOR)
+GL_ENUM(0x8003,GL_CONSTANT_ALPHA)
+GL_ENUM(0x8004,GL_ONE_MINUS_CONSTANT_ALPHA)
+GL_ENUM(0x8005,GL_BLEND_COLOR)
+GL_ENUM(0x88E0,GL_STREAM_DRAW)
+GL_ENUM(0x8626,GL_CURRENT_VERTEX_ATTRIB)
 GL_ENUM(0x8800,GL_STENCIL_BACK_FUNC)
 GL_ENUM(0x8801,GL_STENCIL_BACK_FAIL)
 GL_ENUM(0x8802,GL_STENCIL_BACK_PASS_DEPTH_FAIL)
 GL_ENUM(0x8803,GL_STENCIL_BACK_PASS_DEPTH_PASS)
-GL_ENUM(0x8814,GL_RGBA32F_EXT)
-GL_ENUM(0x8815,GL_RGB32F_EXT)
-GL_ENUM(0x8816,GL_ALPHA32F_EXT)
-GL_ENUM(0x8818,GL_LUMINANCE32F_EXT)
-GL_ENUM(0x8819,GL_LUMINANCE_ALPHA32F_EXT)
-GL_ENUM(0x881A,GL_RGBA16F_EXT)
-GL_ENUM(0x881B,GL_RGB16F_EXT)
-GL_ENUM(0x881C,GL_ALPHA16F_EXT)
-GL_ENUM(0x881E,GL_LUMINANCE16F_EXT)
-GL_ENUM(0x881F,GL_LUMINANCE_ALPHA16F_EXT)
-GL_ENUM(0x8823,GL_WRITEONLY_RENDERING_QCOM)
-GL_ENUM(0x8824,GL_MAX_DRAW_BUFFERS_NV)
-GL_ENUM(0x8825,GL_DRAW_BUFFER0_NV)
-GL_ENUM(0x8826,GL_DRAW_BUFFER1_NV)
-GL_ENUM(0x8827,GL_DRAW_BUFFER2_NV)
-GL_ENUM(0x8828,GL_DRAW_BUFFER3_NV)
-GL_ENUM(0x8829,GL_DRAW_BUFFER4_NV)
-GL_ENUM(0x882A,GL_DRAW_BUFFER5_NV)
-GL_ENUM(0x882B,GL_DRAW_BUFFER6_NV)
-GL_ENUM(0x882C,GL_DRAW_BUFFER7_NV)
-GL_ENUM(0x882D,GL_DRAW_BUFFER8_NV)
-GL_ENUM(0x882E,GL_DRAW_BUFFER9_NV)
-GL_ENUM(0x882F,GL_DRAW_BUFFER10_NV)
-GL_ENUM(0x8830,GL_DRAW_BUFFER11_NV)
-GL_ENUM(0x8831,GL_DRAW_BUFFER12_NV)
-GL_ENUM(0x8832,GL_DRAW_BUFFER13_NV)
-GL_ENUM(0x8833,GL_DRAW_BUFFER14_NV)
-GL_ENUM(0x8834,GL_DRAW_BUFFER15_NV)
-GL_ENUM(0x883D,GL_BLEND_EQUATION_ALPHA_OES)
-GL_ENUM(0x8840,GL_MATRIX_PALETTE_OES)
-GL_ENUM(0x8842,GL_MAX_PALETTE_MATRICES_OES)
-GL_ENUM(0x8843,GL_CURRENT_PALETTE_MATRIX_OES)
-GL_ENUM(0x8844,GL_MATRIX_INDEX_ARRAY_OES)
-GL_ENUM(0x8846,GL_MATRIX_INDEX_ARRAY_SIZE_OES)
-GL_ENUM(0x8847,GL_MATRIX_INDEX_ARRAY_TYPE_OES)
-GL_ENUM(0x8848,GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
-GL_ENUM(0x8849,GL_MATRIX_INDEX_ARRAY_POINTER_OES)
-GL_ENUM(0x884C,GL_TEXTURE_COMPARE_MODE_EXT)
-GL_ENUM(0x884D,GL_TEXTURE_COMPARE_FUNC_EXT)
-GL_ENUM(0x884E,GL_COMPARE_REF_TO_TEXTURE_EXT)
-GL_ENUM(0x8861,GL_POINT_SPRITE_OES)
-GL_ENUM(0x8862,GL_COORD_REPLACE_OES)
-GL_ENUM(0x8865,GL_CURRENT_QUERY_EXT)
-GL_ENUM(0x8866,GL_QUERY_RESULT_EXT)
-GL_ENUM(0x8867,GL_QUERY_RESULT_AVAILABLE_EXT)
+GL_ENUM(0x8CA3,GL_STENCIL_BACK_REF)
+GL_ENUM(0x8CA4,GL_STENCIL_BACK_VALUE_MASK)
+GL_ENUM(0x8CA5,GL_STENCIL_BACK_WRITEMASK)
+GL_ENUM(0x1404,GL_INT)
+GL_ENUM(0x1405,GL_UNSIGNED_INT)
+GL_ENUM(0x1902,GL_DEPTH_COMPONENT)
+GL_ENUM(0x8B30,GL_FRAGMENT_SHADER)
+GL_ENUM(0x8B31,GL_VERTEX_SHADER)
 GL_ENUM(0x8869,GL_MAX_VERTEX_ATTRIBS)
-GL_ENUM(0x886A,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED)
+GL_ENUM(0x8DFB,GL_MAX_VERTEX_UNIFORM_VECTORS)
+GL_ENUM(0x8DFC,GL_MAX_VARYING_VECTORS)
+GL_ENUM(0x8B4D,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
+GL_ENUM(0x8B4C,GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS)
 GL_ENUM(0x8872,GL_MAX_TEXTURE_IMAGE_UNITS)
-GL_ENUM(0x8892,GL_ARRAY_BUFFER)
-GL_ENUM(0x8893,GL_ELEMENT_ARRAY_BUFFER)
-GL_ENUM(0x8894,GL_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8895,GL_ELEMENT_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8896,GL_VERTEX_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8897,GL_NORMAL_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x8898,GL_COLOR_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x889A,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x889E,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
+GL_ENUM(0x8DFD,GL_MAX_FRAGMENT_UNIFORM_VECTORS)
+GL_ENUM(0x8B4F,GL_SHADER_TYPE)
+GL_ENUM(0x8B80,GL_DELETE_STATUS)
+GL_ENUM(0x8B82,GL_LINK_STATUS)
+GL_ENUM(0x8B83,GL_VALIDATE_STATUS)
+GL_ENUM(0x8B85,GL_ATTACHED_SHADERS)
+GL_ENUM(0x8B86,GL_ACTIVE_UNIFORMS)
+GL_ENUM(0x8B87,GL_ACTIVE_UNIFORM_MAX_LENGTH)
+GL_ENUM(0x8B89,GL_ACTIVE_ATTRIBUTES)
+GL_ENUM(0x8B8A,GL_ACTIVE_ATTRIBUTE_MAX_LENGTH)
+GL_ENUM(0x8B8C,GL_SHADING_LANGUAGE_VERSION)
+GL_ENUM(0x8B8D,GL_CURRENT_PROGRAM)
+GL_ENUM(0x8507,GL_INCR_WRAP)
+GL_ENUM(0x8508,GL_DECR_WRAP)
+GL_ENUM(0x8513,GL_TEXTURE_CUBE_MAP)
+GL_ENUM(0x8514,GL_TEXTURE_BINDING_CUBE_MAP)
+GL_ENUM(0x8515,GL_TEXTURE_CUBE_MAP_POSITIVE_X)
+GL_ENUM(0x8516,GL_TEXTURE_CUBE_MAP_NEGATIVE_X)
+GL_ENUM(0x8517,GL_TEXTURE_CUBE_MAP_POSITIVE_Y)
+GL_ENUM(0x8518,GL_TEXTURE_CUBE_MAP_NEGATIVE_Y)
+GL_ENUM(0x8519,GL_TEXTURE_CUBE_MAP_POSITIVE_Z)
+GL_ENUM(0x851A,GL_TEXTURE_CUBE_MAP_NEGATIVE_Z)
+GL_ENUM(0x851C,GL_MAX_CUBE_MAP_TEXTURE_SIZE)
+GL_ENUM(0x8370,GL_MIRRORED_REPEAT)
+GL_ENUM(0x8B50,GL_FLOAT_VEC2)
+GL_ENUM(0x8B51,GL_FLOAT_VEC3)
+GL_ENUM(0x8B52,GL_FLOAT_VEC4)
+GL_ENUM(0x8B53,GL_INT_VEC2)
+GL_ENUM(0x8B54,GL_INT_VEC3)
+GL_ENUM(0x8B55,GL_INT_VEC4)
+GL_ENUM(0x8B56,GL_BOOL)
+GL_ENUM(0x8B57,GL_BOOL_VEC2)
+GL_ENUM(0x8B58,GL_BOOL_VEC3)
+GL_ENUM(0x8B59,GL_BOOL_VEC4)
+GL_ENUM(0x8B5A,GL_FLOAT_MAT2)
+GL_ENUM(0x8B5B,GL_FLOAT_MAT3)
+GL_ENUM(0x8B5C,GL_FLOAT_MAT4)
+GL_ENUM(0x8B5E,GL_SAMPLER_2D)
+GL_ENUM(0x8B60,GL_SAMPLER_CUBE)
+GL_ENUM(0x8622,GL_VERTEX_ATTRIB_ARRAY_ENABLED)
+GL_ENUM(0x8623,GL_VERTEX_ATTRIB_ARRAY_SIZE)
+GL_ENUM(0x8624,GL_VERTEX_ATTRIB_ARRAY_STRIDE)
+GL_ENUM(0x8625,GL_VERTEX_ATTRIB_ARRAY_TYPE)
+GL_ENUM(0x886A,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED)
+GL_ENUM(0x8645,GL_VERTEX_ATTRIB_ARRAY_POINTER)
 GL_ENUM(0x889F,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING)
-GL_ENUM(0x88B9,GL_WRITE_ONLY_OES)
-GL_ENUM(0x88BB,GL_BUFFER_ACCESS_OES)
-GL_ENUM(0x88BC,GL_BUFFER_MAPPED_OES)
-GL_ENUM(0x88BD,GL_BUFFER_MAP_POINTER_OES)
-GL_ENUM(0x88E0,GL_STREAM_DRAW)
+GL_ENUM(0x8B9A,GL_IMPLEMENTATION_COLOR_READ_TYPE)
+GL_ENUM(0x8B9B,GL_IMPLEMENTATION_COLOR_READ_FORMAT)
+GL_ENUM(0x8B81,GL_COMPILE_STATUS)
+GL_ENUM(0x8B84,GL_INFO_LOG_LENGTH)
+GL_ENUM(0x8B88,GL_SHADER_SOURCE_LENGTH)
+GL_ENUM(0x8DFA,GL_SHADER_COMPILER)
+GL_ENUM(0x8DF8,GL_SHADER_BINARY_FORMATS)
+GL_ENUM(0x8DF9,GL_NUM_SHADER_BINARY_FORMATS)
+GL_ENUM(0x8DF0,GL_LOW_FLOAT)
+GL_ENUM(0x8DF1,GL_MEDIUM_FLOAT)
+GL_ENUM(0x8DF2,GL_HIGH_FLOAT)
+GL_ENUM(0x8DF3,GL_LOW_INT)
+GL_ENUM(0x8DF4,GL_MEDIUM_INT)
+GL_ENUM(0x8DF5,GL_HIGH_INT)
+GL_ENUM(0x8D40,GL_FRAMEBUFFER)
+GL_ENUM(0x8D41,GL_RENDERBUFFER)
+GL_ENUM(0x8056,GL_RGBA4)
+GL_ENUM(0x8057,GL_RGB5_A1)
+GL_ENUM(0x8D62,GL_RGB565)
+GL_ENUM(0x81A5,GL_DEPTH_COMPONENT16)
+GL_ENUM(0x8D48,GL_STENCIL_INDEX8)
+GL_ENUM(0x8D42,GL_RENDERBUFFER_WIDTH)
+GL_ENUM(0x8D43,GL_RENDERBUFFER_HEIGHT)
+GL_ENUM(0x8D44,GL_RENDERBUFFER_INTERNAL_FORMAT)
+GL_ENUM(0x8D50,GL_RENDERBUFFER_RED_SIZE)
+GL_ENUM(0x8D51,GL_RENDERBUFFER_GREEN_SIZE)
+GL_ENUM(0x8D52,GL_RENDERBUFFER_BLUE_SIZE)
+GL_ENUM(0x8D53,GL_RENDERBUFFER_ALPHA_SIZE)
+GL_ENUM(0x8D54,GL_RENDERBUFFER_DEPTH_SIZE)
+GL_ENUM(0x8D55,GL_RENDERBUFFER_STENCIL_SIZE)
+GL_ENUM(0x8CD0,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE)
+GL_ENUM(0x8CD1,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME)
+GL_ENUM(0x8CD2,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL)
+GL_ENUM(0x8CD3,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE)
+GL_ENUM(0x8CE0,GL_COLOR_ATTACHMENT0)
+GL_ENUM(0x8D00,GL_DEPTH_ATTACHMENT)
+GL_ENUM(0x8D20,GL_STENCIL_ATTACHMENT)
+GL_ENUM(0x8CD5,GL_FRAMEBUFFER_COMPLETE)
+GL_ENUM(0x8CD6,GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT)
+GL_ENUM(0x8CD7,GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT)
+GL_ENUM(0x8CD9,GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS)
+GL_ENUM(0x8CDD,GL_FRAMEBUFFER_UNSUPPORTED)
+GL_ENUM(0x8CA6,GL_FRAMEBUFFER_BINDING)
+GL_ENUM(0x8CA7,GL_RENDERBUFFER_BINDING)
+GL_ENUM(0x84E8,GL_MAX_RENDERBUFFER_SIZE)
+GL_ENUM(0x0506,GL_INVALID_FRAMEBUFFER_OPERATION)
+GL_ENUM(0x0C02,GL_READ_BUFFER)
+GL_ENUM(0x0CF2,GL_UNPACK_ROW_LENGTH)
+GL_ENUM(0x0CF3,GL_UNPACK_SKIP_ROWS)
+GL_ENUM(0x0CF4,GL_UNPACK_SKIP_PIXELS)
+GL_ENUM(0x0D02,GL_PACK_ROW_LENGTH)
+GL_ENUM(0x0D03,GL_PACK_SKIP_ROWS)
+GL_ENUM(0x0D04,GL_PACK_SKIP_PIXELS)
+GL_ENUM(0x1800,GL_COLOR)
+GL_ENUM(0x1801,GL_DEPTH)
+GL_ENUM(0x1802,GL_STENCIL)
+GL_ENUM(0x1903,GL_RED)
+GL_ENUM(0x8051,GL_RGB8)
+GL_ENUM(0x8058,GL_RGBA8)
+GL_ENUM(0x8059,GL_RGB10_A2)
+GL_ENUM(0x806A,GL_TEXTURE_BINDING_3D)
+GL_ENUM(0x806D,GL_UNPACK_SKIP_IMAGES)
+GL_ENUM(0x806E,GL_UNPACK_IMAGE_HEIGHT)
+GL_ENUM(0x806F,GL_TEXTURE_3D)
+GL_ENUM(0x8072,GL_TEXTURE_WRAP_R)
+GL_ENUM(0x8073,GL_MAX_3D_TEXTURE_SIZE)
+GL_ENUM(0x8368,GL_UNSIGNED_INT_2_10_10_10_REV)
+GL_ENUM(0x80E8,GL_MAX_ELEMENTS_VERTICES)
+GL_ENUM(0x80E9,GL_MAX_ELEMENTS_INDICES)
+GL_ENUM(0x813A,GL_TEXTURE_MIN_LOD)
+GL_ENUM(0x813B,GL_TEXTURE_MAX_LOD)
+GL_ENUM(0x813C,GL_TEXTURE_BASE_LEVEL)
+GL_ENUM(0x813D,GL_TEXTURE_MAX_LEVEL)
+GL_ENUM(0x8007,GL_MIN)
+GL_ENUM(0x8008,GL_MAX)
+GL_ENUM(0x81A6,GL_DEPTH_COMPONENT24)
+GL_ENUM(0x84FD,GL_MAX_TEXTURE_LOD_BIAS)
+GL_ENUM(0x884C,GL_TEXTURE_COMPARE_MODE)
+GL_ENUM(0x884D,GL_TEXTURE_COMPARE_FUNC)
+GL_ENUM(0x8865,GL_CURRENT_QUERY)
+GL_ENUM(0x8866,GL_QUERY_RESULT)
+GL_ENUM(0x8867,GL_QUERY_RESULT_AVAILABLE)
+GL_ENUM(0x88BC,GL_BUFFER_MAPPED)
+GL_ENUM(0x88BD,GL_BUFFER_MAP_POINTER)
 GL_ENUM(0x88E1,GL_STREAM_READ)
 GL_ENUM(0x88E2,GL_STREAM_COPY)
-GL_ENUM(0x88E4,GL_STATIC_DRAW)
 GL_ENUM(0x88E5,GL_STATIC_READ)
 GL_ENUM(0x88E6,GL_STATIC_COPY)
-GL_ENUM(0x88E8,GL_DYNAMIC_DRAW)
 GL_ENUM(0x88E9,GL_DYNAMIC_READ)
 GL_ENUM(0x88EA,GL_DYNAMIC_COPY)
+GL_ENUM(0x8824,GL_MAX_DRAW_BUFFERS)
+GL_ENUM(0x8825,GL_DRAW_BUFFER0)
+GL_ENUM(0x8826,GL_DRAW_BUFFER1)
+GL_ENUM(0x8827,GL_DRAW_BUFFER2)
+GL_ENUM(0x8828,GL_DRAW_BUFFER3)
+GL_ENUM(0x8829,GL_DRAW_BUFFER4)
+GL_ENUM(0x882A,GL_DRAW_BUFFER5)
+GL_ENUM(0x882B,GL_DRAW_BUFFER6)
+GL_ENUM(0x882C,GL_DRAW_BUFFER7)
+GL_ENUM(0x882D,GL_DRAW_BUFFER8)
+GL_ENUM(0x882E,GL_DRAW_BUFFER9)
+GL_ENUM(0x882F,GL_DRAW_BUFFER10)
+GL_ENUM(0x8830,GL_DRAW_BUFFER11)
+GL_ENUM(0x8831,GL_DRAW_BUFFER12)
+GL_ENUM(0x8832,GL_DRAW_BUFFER13)
+GL_ENUM(0x8833,GL_DRAW_BUFFER14)
+GL_ENUM(0x8834,GL_DRAW_BUFFER15)
+GL_ENUM(0x8B49,GL_MAX_FRAGMENT_UNIFORM_COMPONENTS)
+GL_ENUM(0x8B4A,GL_MAX_VERTEX_UNIFORM_COMPONENTS)
+GL_ENUM(0x8B5F,GL_SAMPLER_3D)
+GL_ENUM(0x8B62,GL_SAMPLER_2D_SHADOW)
+GL_ENUM(0x8B8B,GL_FRAGMENT_SHADER_DERIVATIVE_HINT)
 GL_ENUM(0x88EB,GL_PIXEL_PACK_BUFFER)
 GL_ENUM(0x88EC,GL_PIXEL_UNPACK_BUFFER)
 GL_ENUM(0x88ED,GL_PIXEL_PACK_BUFFER_BINDING)
 GL_ENUM(0x88EF,GL_PIXEL_UNPACK_BUFFER_BINDING)
-GL_ENUM(0x88F0,GL_DEPTH24_STENCIL8_OES)
+GL_ENUM(0x8B65,GL_FLOAT_MAT2x3)
+GL_ENUM(0x8B66,GL_FLOAT_MAT2x4)
+GL_ENUM(0x8B67,GL_FLOAT_MAT3x2)
+GL_ENUM(0x8B68,GL_FLOAT_MAT3x4)
+GL_ENUM(0x8B69,GL_FLOAT_MAT4x2)
+GL_ENUM(0x8B6A,GL_FLOAT_MAT4x3)
+GL_ENUM(0x8C40,GL_SRGB)
+GL_ENUM(0x8C41,GL_SRGB8)
+GL_ENUM(0x8C43,GL_SRGB8_ALPHA8)
+GL_ENUM(0x884E,GL_COMPARE_REF_TO_TEXTURE)
+GL_ENUM(0x821B,GL_MAJOR_VERSION)
+GL_ENUM(0x821C,GL_MINOR_VERSION)
+GL_ENUM(0x821D,GL_NUM_EXTENSIONS)
+GL_ENUM(0x8814,GL_RGBA32F)
+GL_ENUM(0x8815,GL_RGB32F)
+GL_ENUM(0x881A,GL_RGBA16F)
+GL_ENUM(0x881B,GL_RGB16F)
 GL_ENUM(0x88FD,GL_VERTEX_ATTRIB_ARRAY_INTEGER)
-GL_ENUM(0x88FE,GL_VERTEX_ATTRIB_ARRAY_DIVISOR)
 GL_ENUM(0x88FF,GL_MAX_ARRAY_TEXTURE_LAYERS)
 GL_ENUM(0x8904,GL_MIN_PROGRAM_TEXEL_OFFSET)
 GL_ENUM(0x8905,GL_MAX_PROGRAM_TEXEL_OFFSET)
-GL_ENUM(0x8919,GL_SAMPLER_BINDING)
-GL_ENUM(0x898A,GL_POINT_SIZE_ARRAY_TYPE_OES)
-GL_ENUM(0x898B,GL_POINT_SIZE_ARRAY_STRIDE_OES)
-GL_ENUM(0x898C,GL_POINT_SIZE_ARRAY_POINTER_OES)
-GL_ENUM(0x898D,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
-GL_ENUM(0x898E,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
-GL_ENUM(0x898F,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
+GL_ENUM(0x8B4B,GL_MAX_VARYING_COMPONENTS)
+GL_ENUM(0x8C1A,GL_TEXTURE_2D_ARRAY)
+GL_ENUM(0x8C1D,GL_TEXTURE_BINDING_2D_ARRAY)
+GL_ENUM(0x8C3A,GL_R11F_G11F_B10F)
+GL_ENUM(0x8C3B,GL_UNSIGNED_INT_10F_11F_11F_REV)
+GL_ENUM(0x8C3D,GL_RGB9_E5)
+GL_ENUM(0x8C3E,GL_UNSIGNED_INT_5_9_9_9_REV)
+GL_ENUM(0x8C76,GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH)
+GL_ENUM(0x8C7F,GL_TRANSFORM_FEEDBACK_BUFFER_MODE)
+GL_ENUM(0x8C80,GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS)
+GL_ENUM(0x8C83,GL_TRANSFORM_FEEDBACK_VARYINGS)
+GL_ENUM(0x8C84,GL_TRANSFORM_FEEDBACK_BUFFER_START)
+GL_ENUM(0x8C85,GL_TRANSFORM_FEEDBACK_BUFFER_SIZE)
+GL_ENUM(0x8C88,GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN)
+GL_ENUM(0x8C89,GL_RASTERIZER_DISCARD)
+GL_ENUM(0x8C8A,GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS)
+GL_ENUM(0x8C8B,GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS)
+GL_ENUM(0x8C8C,GL_INTERLEAVED_ATTRIBS)
+GL_ENUM(0x8C8D,GL_SEPARATE_ATTRIBS)
+GL_ENUM(0x8C8E,GL_TRANSFORM_FEEDBACK_BUFFER)
+GL_ENUM(0x8C8F,GL_TRANSFORM_FEEDBACK_BUFFER_BINDING)
+GL_ENUM(0x8D70,GL_RGBA32UI)
+GL_ENUM(0x8D71,GL_RGB32UI)
+GL_ENUM(0x8D76,GL_RGBA16UI)
+GL_ENUM(0x8D77,GL_RGB16UI)
+GL_ENUM(0x8D7C,GL_RGBA8UI)
+GL_ENUM(0x8D7D,GL_RGB8UI)
+GL_ENUM(0x8D82,GL_RGBA32I)
+GL_ENUM(0x8D83,GL_RGB32I)
+GL_ENUM(0x8D88,GL_RGBA16I)
+GL_ENUM(0x8D89,GL_RGB16I)
+GL_ENUM(0x8D8E,GL_RGBA8I)
+GL_ENUM(0x8D8F,GL_RGB8I)
+GL_ENUM(0x8D94,GL_RED_INTEGER)
+GL_ENUM(0x8D98,GL_RGB_INTEGER)
+GL_ENUM(0x8D99,GL_RGBA_INTEGER)
+GL_ENUM(0x8DC1,GL_SAMPLER_2D_ARRAY)
+GL_ENUM(0x8DC4,GL_SAMPLER_2D_ARRAY_SHADOW)
+GL_ENUM(0x8DC5,GL_SAMPLER_CUBE_SHADOW)
+GL_ENUM(0x8DC6,GL_UNSIGNED_INT_VEC2)
+GL_ENUM(0x8DC7,GL_UNSIGNED_INT_VEC3)
+GL_ENUM(0x8DC8,GL_UNSIGNED_INT_VEC4)
+GL_ENUM(0x8DCA,GL_INT_SAMPLER_2D)
+GL_ENUM(0x8DCB,GL_INT_SAMPLER_3D)
+GL_ENUM(0x8DCC,GL_INT_SAMPLER_CUBE)
+GL_ENUM(0x8DCF,GL_INT_SAMPLER_2D_ARRAY)
+GL_ENUM(0x8DD2,GL_UNSIGNED_INT_SAMPLER_2D)
+GL_ENUM(0x8DD3,GL_UNSIGNED_INT_SAMPLER_3D)
+GL_ENUM(0x8DD4,GL_UNSIGNED_INT_SAMPLER_CUBE)
+GL_ENUM(0x8DD7,GL_UNSIGNED_INT_SAMPLER_2D_ARRAY)
+GL_ENUM(0x911F,GL_BUFFER_ACCESS_FLAGS)
+GL_ENUM(0x9120,GL_BUFFER_MAP_LENGTH)
+GL_ENUM(0x9121,GL_BUFFER_MAP_OFFSET)
+GL_ENUM(0x8CAC,GL_DEPTH_COMPONENT32F)
+GL_ENUM(0x8CAD,GL_DEPTH32F_STENCIL8)
+GL_ENUM(0x8DAD,GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
+GL_ENUM(0x8210,GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING)
+GL_ENUM(0x8211,GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE)
+GL_ENUM(0x8212,GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE)
+GL_ENUM(0x8213,GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE)
+GL_ENUM(0x8214,GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE)
+GL_ENUM(0x8215,GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE)
+GL_ENUM(0x8216,GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE)
+GL_ENUM(0x8217,GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE)
+GL_ENUM(0x8218,GL_FRAMEBUFFER_DEFAULT)
+GL_ENUM(0x8219,GL_FRAMEBUFFER_UNDEFINED)
+GL_ENUM(0x821A,GL_DEPTH_STENCIL_ATTACHMENT)
+GL_ENUM(0x84F9,GL_DEPTH_STENCIL)
+GL_ENUM(0x84FA,GL_UNSIGNED_INT_24_8)
+GL_ENUM(0x88F0,GL_DEPTH24_STENCIL8)
+GL_ENUM(0x8C17,GL_UNSIGNED_NORMALIZED)
+GL_ENUM(0x8CA8,GL_READ_FRAMEBUFFER)
+GL_ENUM(0x8CA9,GL_DRAW_FRAMEBUFFER)
+GL_ENUM(0x8CAA,GL_READ_FRAMEBUFFER_BINDING)
+GL_ENUM(0x8CAB,GL_RENDERBUFFER_SAMPLES)
+GL_ENUM(0x8CD4,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER)
+GL_ENUM(0x8CDF,GL_MAX_COLOR_ATTACHMENTS)
+GL_ENUM(0x8CE1,GL_COLOR_ATTACHMENT1)
+GL_ENUM(0x8CE2,GL_COLOR_ATTACHMENT2)
+GL_ENUM(0x8CE3,GL_COLOR_ATTACHMENT3)
+GL_ENUM(0x8CE4,GL_COLOR_ATTACHMENT4)
+GL_ENUM(0x8CE5,GL_COLOR_ATTACHMENT5)
+GL_ENUM(0x8CE6,GL_COLOR_ATTACHMENT6)
+GL_ENUM(0x8CE7,GL_COLOR_ATTACHMENT7)
+GL_ENUM(0x8CE8,GL_COLOR_ATTACHMENT8)
+GL_ENUM(0x8CE9,GL_COLOR_ATTACHMENT9)
+GL_ENUM(0x8CEA,GL_COLOR_ATTACHMENT10)
+GL_ENUM(0x8CEB,GL_COLOR_ATTACHMENT11)
+GL_ENUM(0x8CEC,GL_COLOR_ATTACHMENT12)
+GL_ENUM(0x8CED,GL_COLOR_ATTACHMENT13)
+GL_ENUM(0x8CEE,GL_COLOR_ATTACHMENT14)
+GL_ENUM(0x8CEF,GL_COLOR_ATTACHMENT15)
+GL_ENUM(0x8D56,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE)
+GL_ENUM(0x8D57,GL_MAX_SAMPLES)
+GL_ENUM(0x140B,GL_HALF_FLOAT)
+GL_ENUM(0x8227,GL_RG)
+GL_ENUM(0x8228,GL_RG_INTEGER)
+GL_ENUM(0x8229,GL_R8)
+GL_ENUM(0x822B,GL_RG8)
+GL_ENUM(0x822D,GL_R16F)
+GL_ENUM(0x822E,GL_R32F)
+GL_ENUM(0x822F,GL_RG16F)
+GL_ENUM(0x8230,GL_RG32F)
+GL_ENUM(0x8231,GL_R8I)
+GL_ENUM(0x8232,GL_R8UI)
+GL_ENUM(0x8233,GL_R16I)
+GL_ENUM(0x8234,GL_R16UI)
+GL_ENUM(0x8235,GL_R32I)
+GL_ENUM(0x8236,GL_R32UI)
+GL_ENUM(0x8237,GL_RG8I)
+GL_ENUM(0x8238,GL_RG8UI)
+GL_ENUM(0x8239,GL_RG16I)
+GL_ENUM(0x823A,GL_RG16UI)
+GL_ENUM(0x823B,GL_RG32I)
+GL_ENUM(0x823C,GL_RG32UI)
+GL_ENUM(0x85B5,GL_VERTEX_ARRAY_BINDING)
+GL_ENUM(0x8F94,GL_R8_SNORM)
+GL_ENUM(0x8F95,GL_RG8_SNORM)
+GL_ENUM(0x8F96,GL_RGB8_SNORM)
+GL_ENUM(0x8F97,GL_RGBA8_SNORM)
+GL_ENUM(0x8F9C,GL_SIGNED_NORMALIZED)
+GL_ENUM(0x8D69,GL_PRIMITIVE_RESTART_FIXED_INDEX)
+GL_ENUM(0x8F36,GL_COPY_READ_BUFFER)
+GL_ENUM(0x8F37,GL_COPY_WRITE_BUFFER)
 GL_ENUM(0x8A11,GL_UNIFORM_BUFFER)
-GL_ENUM(0x8A1F,GL_RGB_422_APPLE)
 GL_ENUM(0x8A28,GL_UNIFORM_BUFFER_BINDING)
 GL_ENUM(0x8A29,GL_UNIFORM_BUFFER_START)
 GL_ENUM(0x8A2A,GL_UNIFORM_BUFFER_SIZE)
@@ -592,270 +690,9 @@
 GL_ENUM(0x8A43,GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES)
 GL_ENUM(0x8A44,GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER)
 GL_ENUM(0x8A46,GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER)
-GL_ENUM(0x8A4F,GL_PROGRAM_PIPELINE_OBJECT_EXT)
-GL_ENUM(0x8B30,GL_FRAGMENT_SHADER)
-GL_ENUM(0x8B31,GL_VERTEX_SHADER)
-GL_ENUM(0x8B40,GL_PROGRAM_OBJECT_EXT)
-GL_ENUM(0x8B48,GL_SHADER_OBJECT_EXT)
-GL_ENUM(0x8B49,GL_MAX_FRAGMENT_UNIFORM_COMPONENTS)
-GL_ENUM(0x8B4A,GL_MAX_VERTEX_UNIFORM_COMPONENTS)
-GL_ENUM(0x8B4B,GL_MAX_VARYING_COMPONENTS)
-GL_ENUM(0x8B4C,GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS)
-GL_ENUM(0x8B4D,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
-GL_ENUM(0x8B4F,GL_SHADER_TYPE)
-GL_ENUM(0x8B50,GL_FLOAT_VEC2)
-GL_ENUM(0x8B51,GL_FLOAT_VEC3)
-GL_ENUM(0x8B52,GL_FLOAT_VEC4)
-GL_ENUM(0x8B53,GL_INT_VEC2)
-GL_ENUM(0x8B54,GL_INT_VEC3)
-GL_ENUM(0x8B55,GL_INT_VEC4)
-GL_ENUM(0x8B56,GL_BOOL)
-GL_ENUM(0x8B57,GL_BOOL_VEC2)
-GL_ENUM(0x8B58,GL_BOOL_VEC3)
-GL_ENUM(0x8B59,GL_BOOL_VEC4)
-GL_ENUM(0x8B5A,GL_FLOAT_MAT2)
-GL_ENUM(0x8B5B,GL_FLOAT_MAT3)
-GL_ENUM(0x8B5C,GL_FLOAT_MAT4)
-GL_ENUM(0x8B5E,GL_SAMPLER_2D)
-GL_ENUM(0x8B5F,GL_SAMPLER_3D_OES)
-GL_ENUM(0x8B60,GL_SAMPLER_CUBE)
-GL_ENUM(0x8B62,GL_SAMPLER_2D_SHADOW_EXT)
-GL_ENUM(0x8B65,GL_FLOAT_MAT2x3)
-GL_ENUM(0x8B66,GL_FLOAT_MAT2x4)
-GL_ENUM(0x8B67,GL_FLOAT_MAT3x2)
-GL_ENUM(0x8B68,GL_FLOAT_MAT3x4)
-GL_ENUM(0x8B69,GL_FLOAT_MAT4x2)
-GL_ENUM(0x8B6A,GL_FLOAT_MAT4x3)
-GL_ENUM(0x8B80,GL_DELETE_STATUS)
-GL_ENUM(0x8B81,GL_COMPILE_STATUS)
-GL_ENUM(0x8B82,GL_LINK_STATUS)
-GL_ENUM(0x8B83,GL_VALIDATE_STATUS)
-GL_ENUM(0x8B84,GL_INFO_LOG_LENGTH)
-GL_ENUM(0x8B85,GL_ATTACHED_SHADERS)
-GL_ENUM(0x8B86,GL_ACTIVE_UNIFORMS)
-GL_ENUM(0x8B87,GL_ACTIVE_UNIFORM_MAX_LENGTH)
-GL_ENUM(0x8B88,GL_SHADER_SOURCE_LENGTH)
-GL_ENUM(0x8B89,GL_ACTIVE_ATTRIBUTES)
-GL_ENUM(0x8B8A,GL_ACTIVE_ATTRIBUTE_MAX_LENGTH)
-GL_ENUM(0x8B8B,GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES)
-GL_ENUM(0x8B8C,GL_SHADING_LANGUAGE_VERSION)
-GL_ENUM(0x8B8D,GL_CURRENT_PROGRAM)
-GL_ENUM(0x8B90,GL_PALETTE4_RGB8_OES)
-GL_ENUM(0x8B91,GL_PALETTE4_RGBA8_OES)
-GL_ENUM(0x8B92,GL_PALETTE4_R5_G6_B5_OES)
-GL_ENUM(0x8B93,GL_PALETTE4_RGBA4_OES)
-GL_ENUM(0x8B94,GL_PALETTE4_RGB5_A1_OES)
-GL_ENUM(0x8B95,GL_PALETTE8_RGB8_OES)
-GL_ENUM(0x8B96,GL_PALETTE8_RGBA8_OES)
-GL_ENUM(0x8B97,GL_PALETTE8_R5_G6_B5_OES)
-GL_ENUM(0x8B98,GL_PALETTE8_RGBA4_OES)
-GL_ENUM(0x8B99,GL_PALETTE8_RGB5_A1_OES)
-GL_ENUM(0x8B9A,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
-GL_ENUM(0x8B9B,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)
-GL_ENUM(0x8B9C,GL_POINT_SIZE_ARRAY_OES)
-GL_ENUM(0x8B9D,GL_TEXTURE_CROP_RECT_OES)
-GL_ENUM(0x8B9E,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
-GL_ENUM(0x8B9F,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
-GL_ENUM(0x8BC0,GL_COUNTER_TYPE_AMD)
-GL_ENUM(0x8BC1,GL_COUNTER_RANGE_AMD)
-GL_ENUM(0x8BC2,GL_UNSIGNED_INT64_AMD)
-GL_ENUM(0x8BC3,GL_PERCENTAGE_AMD)
-GL_ENUM(0x8BC4,GL_PERFMON_RESULT_AVAILABLE_AMD)
-GL_ENUM(0x8BC5,GL_PERFMON_RESULT_SIZE_AMD)
-GL_ENUM(0x8BC6,GL_PERFMON_RESULT_AMD)
-GL_ENUM(0x8BD2,GL_TEXTURE_WIDTH_QCOM)
-GL_ENUM(0x8BD3,GL_TEXTURE_HEIGHT_QCOM)
-GL_ENUM(0x8BD4,GL_TEXTURE_DEPTH_QCOM)
-GL_ENUM(0x8BD5,GL_TEXTURE_INTERNAL_FORMAT_QCOM)
-GL_ENUM(0x8BD6,GL_TEXTURE_FORMAT_QCOM)
-GL_ENUM(0x8BD7,GL_TEXTURE_TYPE_QCOM)
-GL_ENUM(0x8BD8,GL_TEXTURE_IMAGE_VALID_QCOM)
-GL_ENUM(0x8BD9,GL_TEXTURE_NUM_LEVELS_QCOM)
-GL_ENUM(0x8BDA,GL_TEXTURE_TARGET_QCOM)
-GL_ENUM(0x8BDB,GL_TEXTURE_OBJECT_VALID_QCOM)
-GL_ENUM(0x8BDC,GL_STATE_RESTORE)
-GL_ENUM(0x8C00,GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG)
-GL_ENUM(0x8C01,GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG)
-GL_ENUM(0x8C02,GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG)
-GL_ENUM(0x8C03,GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG)
-GL_ENUM(0x8C04,GL_MODULATE_COLOR_IMG)
-GL_ENUM(0x8C05,GL_RECIP_ADD_SIGNED_ALPHA_IMG)
-GL_ENUM(0x8C06,GL_TEXTURE_ALPHA_MODULATE_IMG)
-GL_ENUM(0x8C07,GL_FACTOR_ALPHA_MODULATE_IMG)
-GL_ENUM(0x8C08,GL_FRAGMENT_ALPHA_MODULATE_IMG)
-GL_ENUM(0x8C09,GL_ADD_BLEND_IMG)
-GL_ENUM(0x8C0A,GL_SGX_BINARY_IMG)
-GL_ENUM(0x8C17,GL_UNSIGNED_NORMALIZED_EXT)
-GL_ENUM(0x8C1A,GL_TEXTURE_2D_ARRAY)
-GL_ENUM(0x8C1D,GL_TEXTURE_BINDING_2D_ARRAY)
-GL_ENUM(0x8C2F,GL_ANY_SAMPLES_PASSED_EXT)
-GL_ENUM(0x8C3A,GL_R11F_G11F_B10F)
-GL_ENUM(0x8C3B,GL_UNSIGNED_INT_10F_11F_11F_REV)
-GL_ENUM(0x8C3D,GL_RGB9_E5)
-GL_ENUM(0x8C3E,GL_UNSIGNED_INT_5_9_9_9_REV)
-GL_ENUM(0x8C40,GL_SRGB_EXT)
-GL_ENUM(0x8C41,GL_SRGB8)
-GL_ENUM(0x8C42,GL_SRGB_ALPHA_EXT)
-GL_ENUM(0x8C43,GL_SRGB8_ALPHA8_EXT)
-GL_ENUM(0x8C76,GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH)
-GL_ENUM(0x8C7F,GL_TRANSFORM_FEEDBACK_BUFFER_MODE)
-GL_ENUM(0x8C80,GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS)
-GL_ENUM(0x8C83,GL_TRANSFORM_FEEDBACK_VARYINGS)
-GL_ENUM(0x8C84,GL_TRANSFORM_FEEDBACK_BUFFER_START)
-GL_ENUM(0x8C85,GL_TRANSFORM_FEEDBACK_BUFFER_SIZE)
-GL_ENUM(0x8C88,GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN)
-GL_ENUM(0x8C89,GL_RASTERIZER_DISCARD)
-GL_ENUM(0x8C8A,GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS)
-GL_ENUM(0x8C8B,GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS)
-GL_ENUM(0x8C8C,GL_INTERLEAVED_ATTRIBS)
-GL_ENUM(0x8C8D,GL_SEPARATE_ATTRIBS)
-GL_ENUM(0x8C8E,GL_TRANSFORM_FEEDBACK_BUFFER)
-GL_ENUM(0x8C8F,GL_TRANSFORM_FEEDBACK_BUFFER_BINDING)
-GL_ENUM(0x8C92,GL_ATC_RGB_AMD)
-GL_ENUM(0x8C93,GL_ATC_RGBA_EXPLICIT_ALPHA_AMD)
-GL_ENUM(0x8CA3,GL_STENCIL_BACK_REF)
-GL_ENUM(0x8CA4,GL_STENCIL_BACK_VALUE_MASK)
-GL_ENUM(0x8CA5,GL_STENCIL_BACK_WRITEMASK)
-GL_ENUM(0x8CA6,GL_FRAMEBUFFER_BINDING_OES)
-GL_ENUM(0x8CA7,GL_RENDERBUFFER_BINDING_OES)
-GL_ENUM(0x8CA8,GL_READ_FRAMEBUFFER_APPLE)
-GL_ENUM(0x8CA9,GL_DRAW_FRAMEBUFFER_APPLE)
-GL_ENUM(0x8CAA,GL_READ_FRAMEBUFFER_BINDING_APPLE)
-GL_ENUM(0x8CAB,GL_RENDERBUFFER_SAMPLES_APPLE)
-GL_ENUM(0x8CAC,GL_DEPTH_COMPONENT32F)
-GL_ENUM(0x8CAD,GL_DEPTH32F_STENCIL8)
-GL_ENUM(0x8CD0,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES)
-GL_ENUM(0x8CD1,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES)
-GL_ENUM(0x8CD2,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES)
-GL_ENUM(0x8CD3,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES)
-GL_ENUM(0x8CD4,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES)
-GL_ENUM(0x8CD5,GL_FRAMEBUFFER_COMPLETE_OES)
-GL_ENUM(0x8CD6,GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES)
-GL_ENUM(0x8CD7,GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES)
-GL_ENUM(0x8CD9,GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES)
-GL_ENUM(0x8CDA,GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES)
-GL_ENUM(0x8CDD,GL_FRAMEBUFFER_UNSUPPORTED_OES)
-GL_ENUM(0x8CDF,GL_MAX_COLOR_ATTACHMENTS_NV)
-GL_ENUM(0x8CE0,GL_COLOR_ATTACHMENT0_OES)
-GL_ENUM(0x8CE1,GL_COLOR_ATTACHMENT1_NV)
-GL_ENUM(0x8CE2,GL_COLOR_ATTACHMENT2_NV)
-GL_ENUM(0x8CE3,GL_COLOR_ATTACHMENT3_NV)
-GL_ENUM(0x8CE4,GL_COLOR_ATTACHMENT4_NV)
-GL_ENUM(0x8CE5,GL_COLOR_ATTACHMENT5_NV)
-GL_ENUM(0x8CE6,GL_COLOR_ATTACHMENT6_NV)
-GL_ENUM(0x8CE7,GL_COLOR_ATTACHMENT7_NV)
-GL_ENUM(0x8CE8,GL_COLOR_ATTACHMENT8_NV)
-GL_ENUM(0x8CE9,GL_COLOR_ATTACHMENT9_NV)
-GL_ENUM(0x8CEA,GL_COLOR_ATTACHMENT10_NV)
-GL_ENUM(0x8CEB,GL_COLOR_ATTACHMENT11_NV)
-GL_ENUM(0x8CEC,GL_COLOR_ATTACHMENT12_NV)
-GL_ENUM(0x8CED,GL_COLOR_ATTACHMENT13_NV)
-GL_ENUM(0x8CEE,GL_COLOR_ATTACHMENT14_NV)
-GL_ENUM(0x8CEF,GL_COLOR_ATTACHMENT15_NV)
-GL_ENUM(0x8D00,GL_DEPTH_ATTACHMENT_OES)
-GL_ENUM(0x8D20,GL_STENCIL_ATTACHMENT_OES)
-GL_ENUM(0x8D40,GL_FRAMEBUFFER_OES)
-GL_ENUM(0x8D41,GL_RENDERBUFFER_OES)
-GL_ENUM(0x8D42,GL_RENDERBUFFER_WIDTH_OES)
-GL_ENUM(0x8D43,GL_RENDERBUFFER_HEIGHT_OES)
-GL_ENUM(0x8D44,GL_RENDERBUFFER_INTERNAL_FORMAT_OES)
-GL_ENUM(0x8D46,GL_STENCIL_INDEX1_OES)
-GL_ENUM(0x8D47,GL_STENCIL_INDEX4_OES)
-GL_ENUM(0x8D48,GL_STENCIL_INDEX8_OES)
-GL_ENUM(0x8D50,GL_RENDERBUFFER_RED_SIZE_OES)
-GL_ENUM(0x8D51,GL_RENDERBUFFER_GREEN_SIZE_OES)
-GL_ENUM(0x8D52,GL_RENDERBUFFER_BLUE_SIZE_OES)
-GL_ENUM(0x8D53,GL_RENDERBUFFER_ALPHA_SIZE_OES)
-GL_ENUM(0x8D54,GL_RENDERBUFFER_DEPTH_SIZE_OES)
-GL_ENUM(0x8D55,GL_RENDERBUFFER_STENCIL_SIZE_OES)
-GL_ENUM(0x8D56,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE)
-GL_ENUM(0x8D57,GL_MAX_SAMPLES_APPLE)
-GL_ENUM(0x8D60,GL_TEXTURE_GEN_STR_OES)
-GL_ENUM(0x8D61,GL_HALF_FLOAT_OES)
-GL_ENUM(0x8D62,GL_RGB565_OES)
-GL_ENUM(0x8D64,GL_ETC1_RGB8_OES)
-GL_ENUM(0x8D65,GL_TEXTURE_EXTERNAL_OES)
-GL_ENUM(0x8D66,GL_SAMPLER_EXTERNAL_OES)
-GL_ENUM(0x8D67,GL_TEXTURE_BINDING_EXTERNAL_OES)
-GL_ENUM(0x8D68,GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES)
-GL_ENUM(0x8D69,GL_PRIMITIVE_RESTART_FIXED_INDEX)
-GL_ENUM(0x8D6A,GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT)
-GL_ENUM(0x8D6B,GL_MAX_ELEMENT_INDEX)
-GL_ENUM(0x8D6C,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT)
-GL_ENUM(0x8D70,GL_RGBA32UI)
-GL_ENUM(0x8D71,GL_RGB32UI)
-GL_ENUM(0x8D76,GL_RGBA16UI)
-GL_ENUM(0x8D77,GL_RGB16UI)
-GL_ENUM(0x8D7C,GL_RGBA8UI)
-GL_ENUM(0x8D7D,GL_RGB8UI)
-GL_ENUM(0x8D82,GL_RGBA32I)
-GL_ENUM(0x8D83,GL_RGB32I)
-GL_ENUM(0x8D88,GL_RGBA16I)
-GL_ENUM(0x8D89,GL_RGB16I)
-GL_ENUM(0x8D8E,GL_RGBA8I)
-GL_ENUM(0x8D8F,GL_RGB8I)
-GL_ENUM(0x8D94,GL_RED_INTEGER)
-GL_ENUM(0x8D98,GL_RGB_INTEGER)
-GL_ENUM(0x8D99,GL_RGBA_INTEGER)
-GL_ENUM(0x8D9F,GL_INT_2_10_10_10_REV)
-GL_ENUM(0x8DAD,GL_FLOAT_32_UNSIGNED_INT_24_8_REV)
-GL_ENUM(0x8DC1,GL_SAMPLER_2D_ARRAY)
-GL_ENUM(0x8DC4,GL_SAMPLER_2D_ARRAY_SHADOW)
-GL_ENUM(0x8DC5,GL_SAMPLER_CUBE_SHADOW)
-GL_ENUM(0x8DC6,GL_UNSIGNED_INT_VEC2)
-GL_ENUM(0x8DC7,GL_UNSIGNED_INT_VEC3)
-GL_ENUM(0x8DC8,GL_UNSIGNED_INT_VEC4)
-GL_ENUM(0x8DCA,GL_INT_SAMPLER_2D)
-GL_ENUM(0x8DCB,GL_INT_SAMPLER_3D)
-GL_ENUM(0x8DCC,GL_INT_SAMPLER_CUBE)
-GL_ENUM(0x8DCF,GL_INT_SAMPLER_2D_ARRAY)
-GL_ENUM(0x8DD2,GL_UNSIGNED_INT_SAMPLER_2D)
-GL_ENUM(0x8DD3,GL_UNSIGNED_INT_SAMPLER_3D)
-GL_ENUM(0x8DD4,GL_UNSIGNED_INT_SAMPLER_CUBE)
-GL_ENUM(0x8DD7,GL_UNSIGNED_INT_SAMPLER_2D_ARRAY)
-GL_ENUM(0x8DF0,GL_LOW_FLOAT)
-GL_ENUM(0x8DF1,GL_MEDIUM_FLOAT)
-GL_ENUM(0x8DF2,GL_HIGH_FLOAT)
-GL_ENUM(0x8DF3,GL_LOW_INT)
-GL_ENUM(0x8DF4,GL_MEDIUM_INT)
-GL_ENUM(0x8DF5,GL_HIGH_INT)
-GL_ENUM(0x8DF6,GL_UNSIGNED_INT_10_10_10_2_OES)
-GL_ENUM(0x8DF7,GL_INT_10_10_10_2_OES)
-GL_ENUM(0x8DF8,GL_SHADER_BINARY_FORMATS)
-GL_ENUM(0x8DF9,GL_NUM_SHADER_BINARY_FORMATS)
-GL_ENUM(0x8DFA,GL_SHADER_COMPILER)
-GL_ENUM(0x8DFB,GL_MAX_VERTEX_UNIFORM_VECTORS)
-GL_ENUM(0x8DFC,GL_MAX_VARYING_VECTORS)
-GL_ENUM(0x8DFD,GL_MAX_FRAGMENT_UNIFORM_VECTORS)
-GL_ENUM(0x8E22,GL_TRANSFORM_FEEDBACK)
-GL_ENUM(0x8E23,GL_TRANSFORM_FEEDBACK_PAUSED)
-GL_ENUM(0x8E24,GL_TRANSFORM_FEEDBACK_ACTIVE)
-GL_ENUM(0x8E25,GL_TRANSFORM_FEEDBACK_BINDING)
-GL_ENUM(0x8E2C,GL_DEPTH_COMPONENT16_NONLINEAR_NV)
-GL_ENUM(0x8E42,GL_TEXTURE_SWIZZLE_R)
-GL_ENUM(0x8E43,GL_TEXTURE_SWIZZLE_G)
-GL_ENUM(0x8E44,GL_TEXTURE_SWIZZLE_B)
-GL_ENUM(0x8E45,GL_TEXTURE_SWIZZLE_A)
-GL_ENUM(0x8ED0,GL_COVERAGE_COMPONENT_NV)
-GL_ENUM(0x8ED1,GL_COVERAGE_COMPONENT4_NV)
-GL_ENUM(0x8ED2,GL_COVERAGE_ATTACHMENT_NV)
-GL_ENUM(0x8ED3,GL_COVERAGE_BUFFERS_NV)
-GL_ENUM(0x8ED4,GL_COVERAGE_SAMPLES_NV)
-GL_ENUM(0x8ED5,GL_COVERAGE_ALL_FRAGMENTS_NV)
-GL_ENUM(0x8ED6,GL_COVERAGE_EDGE_FRAGMENTS_NV)
-GL_ENUM(0x8ED7,GL_COVERAGE_AUTOMATIC_NV)
-GL_ENUM(0x8F36,GL_COPY_READ_BUFFER)
-GL_ENUM(0x8F37,GL_COPY_WRITE_BUFFER)
-GL_ENUM(0x8F60,GL_MALI_SHADER_BINARY_ARM)
-GL_ENUM(0x8F94,GL_R8_SNORM)
-GL_ENUM(0x8F95,GL_RG8_SNORM)
-GL_ENUM(0x8F96,GL_RGB8_SNORM)
-GL_ENUM(0x8F97,GL_RGBA8_SNORM)
-GL_ENUM(0x8F9C,GL_SIGNED_NORMALIZED)
-GL_ENUM(0x8FA0,GL_PERFMON_GLOBAL_MODE_QCOM)
-GL_ENUM(0x8FC4,GL_SHADER_BINARY_VIV)
-GL_ENUM(0x906F,GL_RGB10_A2UI)
-GL_ENUM(0x90F3,GL_CONTEXT_ROBUST_ACCESS_EXT)
+GL_ENUM(0xFFFFFFFFu,GL_INVALID_INDEX)
+GL_ENUM(0x9122,GL_MAX_VERTEX_OUTPUT_COMPONENTS)
+GL_ENUM(0x9125,GL_MAX_FRAGMENT_INPUT_COMPONENTS)
 GL_ENUM(0x9111,GL_MAX_SERVER_WAIT_TIMEOUT)
 GL_ENUM(0x9112,GL_OBJECT_TYPE)
 GL_ENUM(0x9113,GL_SYNC_CONDITION)
@@ -869,21 +706,27 @@
 GL_ENUM(0x911B,GL_TIMEOUT_EXPIRED)
 GL_ENUM(0x911C,GL_CONDITION_SATISFIED)
 GL_ENUM(0x911D,GL_WAIT_FAILED)
-GL_ENUM(0x911F,GL_BUFFER_ACCESS_FLAGS)
-GL_ENUM(0x9120,GL_BUFFER_MAP_LENGTH)
-GL_ENUM(0x9121,GL_BUFFER_MAP_OFFSET)
-GL_ENUM(0x9122,GL_MAX_VERTEX_OUTPUT_COMPONENTS)
-GL_ENUM(0x9125,GL_MAX_FRAGMENT_INPUT_COMPONENTS)
-GL_ENUM(0x912F,GL_TEXTURE_IMMUTABLE_FORMAT_EXT)
-GL_ENUM(0x9130,GL_SGX_PROGRAM_BINARY_IMG)
-GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_EXT)
-GL_ENUM(0x9134,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT)
-GL_ENUM(0x9135,GL_MAX_SAMPLES_EXT)
-GL_ENUM(0x9136,GL_TEXTURE_SAMPLES_IMG)
-GL_ENUM(0x9151,GL_BUFFER_OBJECT_EXT)
-GL_ENUM(0x9153,GL_QUERY_OBJECT_EXT)
-GL_ENUM(0x9154,GL_VERTEX_ARRAY_OBJECT_EXT)
-GL_ENUM(0x9250,GL_SHADER_BINARY_DMP)
+GL_ENUM(0xFFFFFFFFFFFFFFFFull,GL_TIMEOUT_IGNORED)
+GL_ENUM(0x88FE,GL_VERTEX_ATTRIB_ARRAY_DIVISOR)
+GL_ENUM(0x8C2F,GL_ANY_SAMPLES_PASSED)
+GL_ENUM(0x8D6A,GL_ANY_SAMPLES_PASSED_CONSERVATIVE)
+GL_ENUM(0x8919,GL_SAMPLER_BINDING)
+GL_ENUM(0x906F,GL_RGB10_A2UI)
+GL_ENUM(0x8E42,GL_TEXTURE_SWIZZLE_R)
+GL_ENUM(0x8E43,GL_TEXTURE_SWIZZLE_G)
+GL_ENUM(0x8E44,GL_TEXTURE_SWIZZLE_B)
+GL_ENUM(0x8E45,GL_TEXTURE_SWIZZLE_A)
+GL_ENUM(0x1904,GL_GREEN)
+GL_ENUM(0x1905,GL_BLUE)
+GL_ENUM(0x8D9F,GL_INT_2_10_10_10_REV)
+GL_ENUM(0x8E22,GL_TRANSFORM_FEEDBACK)
+GL_ENUM(0x8E23,GL_TRANSFORM_FEEDBACK_PAUSED)
+GL_ENUM(0x8E24,GL_TRANSFORM_FEEDBACK_ACTIVE)
+GL_ENUM(0x8E25,GL_TRANSFORM_FEEDBACK_BINDING)
+GL_ENUM(0x8257,GL_PROGRAM_BINARY_RETRIEVABLE_HINT)
+GL_ENUM(0x8741,GL_PROGRAM_BINARY_LENGTH)
+GL_ENUM(0x87FE,GL_NUM_PROGRAM_BINARY_FORMATS)
+GL_ENUM(0x87FF,GL_PROGRAM_BINARY_FORMATS)
 GL_ENUM(0x9270,GL_COMPRESSED_R11_EAC)
 GL_ENUM(0x9271,GL_COMPRESSED_SIGNED_R11_EAC)
 GL_ENUM(0x9272,GL_COMPRESSED_RG11_EAC)
@@ -894,8 +737,624 @@
 GL_ENUM(0x9277,GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2)
 GL_ENUM(0x9278,GL_COMPRESSED_RGBA8_ETC2_EAC)
 GL_ENUM(0x9279,GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC)
+GL_ENUM(0x912F,GL_TEXTURE_IMMUTABLE_FORMAT)
+GL_ENUM(0x8D6B,GL_MAX_ELEMENT_INDEX)
 GL_ENUM(0x9380,GL_NUM_SAMPLE_COUNTS)
+GL_ENUM(0x82DF,GL_TEXTURE_IMMUTABLE_LEVELS)
+GL_ENUM(0x91B9,GL_COMPUTE_SHADER)
+GL_ENUM(0x91BB,GL_MAX_COMPUTE_UNIFORM_BLOCKS)
+GL_ENUM(0x91BC,GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS)
+GL_ENUM(0x91BD,GL_MAX_COMPUTE_IMAGE_UNIFORMS)
+GL_ENUM(0x8262,GL_MAX_COMPUTE_SHARED_MEMORY_SIZE)
+GL_ENUM(0x8263,GL_MAX_COMPUTE_UNIFORM_COMPONENTS)
+GL_ENUM(0x8264,GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS)
+GL_ENUM(0x8265,GL_MAX_COMPUTE_ATOMIC_COUNTERS)
+GL_ENUM(0x8266,GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS)
+GL_ENUM(0x90EB,GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS)
+GL_ENUM(0x91BE,GL_MAX_COMPUTE_WORK_GROUP_COUNT)
+GL_ENUM(0x91BF,GL_MAX_COMPUTE_WORK_GROUP_SIZE)
+GL_ENUM(0x8267,GL_COMPUTE_WORK_GROUP_SIZE)
+GL_ENUM(0x90EE,GL_DISPATCH_INDIRECT_BUFFER)
+GL_ENUM(0x90EF,GL_DISPATCH_INDIRECT_BUFFER_BINDING)
+GL_ENUM(0x8F3F,GL_DRAW_INDIRECT_BUFFER)
+GL_ENUM(0x8F43,GL_DRAW_INDIRECT_BUFFER_BINDING)
+GL_ENUM(0x826E,GL_MAX_UNIFORM_LOCATIONS)
+GL_ENUM(0x9310,GL_FRAMEBUFFER_DEFAULT_WIDTH)
+GL_ENUM(0x9311,GL_FRAMEBUFFER_DEFAULT_HEIGHT)
+GL_ENUM(0x9313,GL_FRAMEBUFFER_DEFAULT_SAMPLES)
+GL_ENUM(0x9314,GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS)
+GL_ENUM(0x9315,GL_MAX_FRAMEBUFFER_WIDTH)
+GL_ENUM(0x9316,GL_MAX_FRAMEBUFFER_HEIGHT)
+GL_ENUM(0x9318,GL_MAX_FRAMEBUFFER_SAMPLES)
+GL_ENUM(0x92E1,GL_UNIFORM)
+GL_ENUM(0x92E2,GL_UNIFORM_BLOCK)
+GL_ENUM(0x92E3,GL_PROGRAM_INPUT)
+GL_ENUM(0x92E4,GL_PROGRAM_OUTPUT)
+GL_ENUM(0x92E5,GL_BUFFER_VARIABLE)
+GL_ENUM(0x92E6,GL_SHADER_STORAGE_BLOCK)
+GL_ENUM(0x92C0,GL_ATOMIC_COUNTER_BUFFER)
+GL_ENUM(0x92F4,GL_TRANSFORM_FEEDBACK_VARYING)
+GL_ENUM(0x92F5,GL_ACTIVE_RESOURCES)
+GL_ENUM(0x92F6,GL_MAX_NAME_LENGTH)
+GL_ENUM(0x92F7,GL_MAX_NUM_ACTIVE_VARIABLES)
+GL_ENUM(0x92F9,GL_NAME_LENGTH)
+GL_ENUM(0x92FA,GL_TYPE)
+GL_ENUM(0x92FB,GL_ARRAY_SIZE)
+GL_ENUM(0x92FC,GL_OFFSET)
+GL_ENUM(0x92FD,GL_BLOCK_INDEX)
+GL_ENUM(0x92FE,GL_ARRAY_STRIDE)
+GL_ENUM(0x92FF,GL_MATRIX_STRIDE)
+GL_ENUM(0x9300,GL_IS_ROW_MAJOR)
+GL_ENUM(0x9301,GL_ATOMIC_COUNTER_BUFFER_INDEX)
+GL_ENUM(0x9302,GL_BUFFER_BINDING)
+GL_ENUM(0x9303,GL_BUFFER_DATA_SIZE)
+GL_ENUM(0x9304,GL_NUM_ACTIVE_VARIABLES)
+GL_ENUM(0x9305,GL_ACTIVE_VARIABLES)
+GL_ENUM(0x9306,GL_REFERENCED_BY_VERTEX_SHADER)
+GL_ENUM(0x930A,GL_REFERENCED_BY_FRAGMENT_SHADER)
+GL_ENUM(0x930B,GL_REFERENCED_BY_COMPUTE_SHADER)
+GL_ENUM(0x930C,GL_TOP_LEVEL_ARRAY_SIZE)
+GL_ENUM(0x930D,GL_TOP_LEVEL_ARRAY_STRIDE)
+GL_ENUM(0x930E,GL_LOCATION)
+GL_ENUM(0xFFFFFFFF,GL_ALL_SHADER_BITS)
+GL_ENUM(0x8258,GL_PROGRAM_SEPARABLE)
+GL_ENUM(0x8259,GL_ACTIVE_PROGRAM)
+GL_ENUM(0x825A,GL_PROGRAM_PIPELINE_BINDING)
+GL_ENUM(0x92C1,GL_ATOMIC_COUNTER_BUFFER_BINDING)
+GL_ENUM(0x92C2,GL_ATOMIC_COUNTER_BUFFER_START)
+GL_ENUM(0x92C3,GL_ATOMIC_COUNTER_BUFFER_SIZE)
+GL_ENUM(0x92CC,GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS)
+GL_ENUM(0x92D0,GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS)
+GL_ENUM(0x92D1,GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS)
+GL_ENUM(0x92D2,GL_MAX_VERTEX_ATOMIC_COUNTERS)
+GL_ENUM(0x92D6,GL_MAX_FRAGMENT_ATOMIC_COUNTERS)
+GL_ENUM(0x92D7,GL_MAX_COMBINED_ATOMIC_COUNTERS)
+GL_ENUM(0x92D8,GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE)
+GL_ENUM(0x92DC,GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS)
+GL_ENUM(0x92D9,GL_ACTIVE_ATOMIC_COUNTER_BUFFERS)
+GL_ENUM(0x92DB,GL_UNSIGNED_INT_ATOMIC_COUNTER)
+GL_ENUM(0x8F38,GL_MAX_IMAGE_UNITS)
+GL_ENUM(0x90CA,GL_MAX_VERTEX_IMAGE_UNIFORMS)
+GL_ENUM(0x90CE,GL_MAX_FRAGMENT_IMAGE_UNIFORMS)
+GL_ENUM(0x90CF,GL_MAX_COMBINED_IMAGE_UNIFORMS)
+GL_ENUM(0x8F3A,GL_IMAGE_BINDING_NAME)
+GL_ENUM(0x8F3B,GL_IMAGE_BINDING_LEVEL)
+GL_ENUM(0x8F3C,GL_IMAGE_BINDING_LAYERED)
+GL_ENUM(0x8F3D,GL_IMAGE_BINDING_LAYER)
+GL_ENUM(0x8F3E,GL_IMAGE_BINDING_ACCESS)
+GL_ENUM(0x906E,GL_IMAGE_BINDING_FORMAT)
+GL_ENUM(0x904D,GL_IMAGE_2D)
+GL_ENUM(0x904E,GL_IMAGE_3D)
+GL_ENUM(0x9050,GL_IMAGE_CUBE)
+GL_ENUM(0x9053,GL_IMAGE_2D_ARRAY)
+GL_ENUM(0x9058,GL_INT_IMAGE_2D)
+GL_ENUM(0x9059,GL_INT_IMAGE_3D)
+GL_ENUM(0x905B,GL_INT_IMAGE_CUBE)
+GL_ENUM(0x905E,GL_INT_IMAGE_2D_ARRAY)
+GL_ENUM(0x9063,GL_UNSIGNED_INT_IMAGE_2D)
+GL_ENUM(0x9064,GL_UNSIGNED_INT_IMAGE_3D)
+GL_ENUM(0x9066,GL_UNSIGNED_INT_IMAGE_CUBE)
+GL_ENUM(0x9069,GL_UNSIGNED_INT_IMAGE_2D_ARRAY)
+GL_ENUM(0x90C7,GL_IMAGE_FORMAT_COMPATIBILITY_TYPE)
+GL_ENUM(0x90C8,GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE)
+GL_ENUM(0x90C9,GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS)
+GL_ENUM(0x88B8,GL_READ_ONLY)
+GL_ENUM(0x88B9,GL_WRITE_ONLY)
+GL_ENUM(0x88BA,GL_READ_WRITE)
+GL_ENUM(0x90D2,GL_SHADER_STORAGE_BUFFER)
+GL_ENUM(0x90D3,GL_SHADER_STORAGE_BUFFER_BINDING)
+GL_ENUM(0x90D4,GL_SHADER_STORAGE_BUFFER_START)
+GL_ENUM(0x90D5,GL_SHADER_STORAGE_BUFFER_SIZE)
+GL_ENUM(0x90D6,GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS)
+GL_ENUM(0x90DA,GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS)
+GL_ENUM(0x90DB,GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS)
+GL_ENUM(0x90DC,GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS)
+GL_ENUM(0x90DD,GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS)
+GL_ENUM(0x90DE,GL_MAX_SHADER_STORAGE_BLOCK_SIZE)
+GL_ENUM(0x90DF,GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT)
+GL_ENUM(0x8F39,GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES)
+GL_ENUM(0x90EA,GL_DEPTH_STENCIL_TEXTURE_MODE)
+GL_ENUM(0x1901,GL_STENCIL_INDEX)
+GL_ENUM(0x8E5E,GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET)
+GL_ENUM(0x8E5F,GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET)
+GL_ENUM(0x8E50,GL_SAMPLE_POSITION)
+GL_ENUM(0x8E51,GL_SAMPLE_MASK)
+GL_ENUM(0x8E52,GL_SAMPLE_MASK_VALUE)
+GL_ENUM(0x9100,GL_TEXTURE_2D_MULTISAMPLE)
+GL_ENUM(0x8E59,GL_MAX_SAMPLE_MASK_WORDS)
+GL_ENUM(0x910E,GL_MAX_COLOR_TEXTURE_SAMPLES)
+GL_ENUM(0x910F,GL_MAX_DEPTH_TEXTURE_SAMPLES)
+GL_ENUM(0x9110,GL_MAX_INTEGER_SAMPLES)
+GL_ENUM(0x9104,GL_TEXTURE_BINDING_2D_MULTISAMPLE)
+GL_ENUM(0x9106,GL_TEXTURE_SAMPLES)
+GL_ENUM(0x9107,GL_TEXTURE_FIXED_SAMPLE_LOCATIONS)
+GL_ENUM(0x1000,GL_TEXTURE_WIDTH)
+GL_ENUM(0x1001,GL_TEXTURE_HEIGHT)
+GL_ENUM(0x8071,GL_TEXTURE_DEPTH)
+GL_ENUM(0x1003,GL_TEXTURE_INTERNAL_FORMAT)
+GL_ENUM(0x805C,GL_TEXTURE_RED_SIZE)
+GL_ENUM(0x805D,GL_TEXTURE_GREEN_SIZE)
+GL_ENUM(0x805E,GL_TEXTURE_BLUE_SIZE)
+GL_ENUM(0x805F,GL_TEXTURE_ALPHA_SIZE)
+GL_ENUM(0x884A,GL_TEXTURE_DEPTH_SIZE)
+GL_ENUM(0x88F1,GL_TEXTURE_STENCIL_SIZE)
+GL_ENUM(0x8C3F,GL_TEXTURE_SHARED_SIZE)
+GL_ENUM(0x8C10,GL_TEXTURE_RED_TYPE)
+GL_ENUM(0x8C11,GL_TEXTURE_GREEN_TYPE)
+GL_ENUM(0x8C12,GL_TEXTURE_BLUE_TYPE)
+GL_ENUM(0x8C13,GL_TEXTURE_ALPHA_TYPE)
+GL_ENUM(0x8C16,GL_TEXTURE_DEPTH_TYPE)
+GL_ENUM(0x86A1,GL_TEXTURE_COMPRESSED)
+GL_ENUM(0x9108,GL_SAMPLER_2D_MULTISAMPLE)
+GL_ENUM(0x9109,GL_INT_SAMPLER_2D_MULTISAMPLE)
+GL_ENUM(0x910A,GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE)
+GL_ENUM(0x82D4,GL_VERTEX_ATTRIB_BINDING)
+GL_ENUM(0x82D5,GL_VERTEX_ATTRIB_RELATIVE_OFFSET)
+GL_ENUM(0x82D6,GL_VERTEX_BINDING_DIVISOR)
+GL_ENUM(0x82D7,GL_VERTEX_BINDING_OFFSET)
+GL_ENUM(0x82D8,GL_VERTEX_BINDING_STRIDE)
+GL_ENUM(0x8F4F,GL_VERTEX_BINDING_BUFFER)
+GL_ENUM(0x82D9,GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET)
+GL_ENUM(0x82DA,GL_MAX_VERTEX_ATTRIB_BINDINGS)
+GL_ENUM(0x82E5,GL_MAX_VERTEX_ATTRIB_STRIDE)
+GL_ENUM(0x8D65,GL_TEXTURE_EXTERNAL_OES)
+GL_ENUM(0x8D67,GL_TEXTURE_BINDING_EXTERNAL_OES)
+GL_ENUM(0x8D68,GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES)
+GL_ENUM(0x8D64,GL_ETC1_RGB8_OES)
+GL_ENUM(0x8B90,GL_PALETTE4_RGB8_OES)
+GL_ENUM(0x8B91,GL_PALETTE4_RGBA8_OES)
+GL_ENUM(0x8B92,GL_PALETTE4_R5_G6_B5_OES)
+GL_ENUM(0x8B93,GL_PALETTE4_RGBA4_OES)
+GL_ENUM(0x8B94,GL_PALETTE4_RGB5_A1_OES)
+GL_ENUM(0x8B95,GL_PALETTE8_RGB8_OES)
+GL_ENUM(0x8B96,GL_PALETTE8_RGBA8_OES)
+GL_ENUM(0x8B97,GL_PALETTE8_R5_G6_B5_OES)
+GL_ENUM(0x8B98,GL_PALETTE8_RGBA4_OES)
+GL_ENUM(0x8B99,GL_PALETTE8_RGB5_A1_OES)
+GL_ENUM(0x81A7,GL_DEPTH_COMPONENT32_OES)
+GL_ENUM(0x8B9D,GL_TEXTURE_CROP_RECT_OES)
+GL_ENUM(0x8CDA,GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES)
+GL_ENUM(0x88BB,GL_BUFFER_ACCESS_OES)
+GL_ENUM(0x898D,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
+GL_ENUM(0x898E,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
+GL_ENUM(0x898F,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
+GL_ENUM(0x86A4,GL_MAX_VERTEX_UNITS_OES)
+GL_ENUM(0x8842,GL_MAX_PALETTE_MATRICES_OES)
+GL_ENUM(0x8840,GL_MATRIX_PALETTE_OES)
+GL_ENUM(0x8844,GL_MATRIX_INDEX_ARRAY_OES)
+GL_ENUM(0x86AD,GL_WEIGHT_ARRAY_OES)
+GL_ENUM(0x8843,GL_CURRENT_PALETTE_MATRIX_OES)
+GL_ENUM(0x8846,GL_MATRIX_INDEX_ARRAY_SIZE_OES)
+GL_ENUM(0x8847,GL_MATRIX_INDEX_ARRAY_TYPE_OES)
+GL_ENUM(0x8848,GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
+GL_ENUM(0x8849,GL_MATRIX_INDEX_ARRAY_POINTER_OES)
+GL_ENUM(0x8B9E,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES)
+GL_ENUM(0x86AB,GL_WEIGHT_ARRAY_SIZE_OES)
+GL_ENUM(0x86A9,GL_WEIGHT_ARRAY_TYPE_OES)
+GL_ENUM(0x86AA,GL_WEIGHT_ARRAY_STRIDE_OES)
+GL_ENUM(0x86AC,GL_WEIGHT_ARRAY_POINTER_OES)
+GL_ENUM(0x889E,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES)
+GL_ENUM(0x8B9C,GL_POINT_SIZE_ARRAY_OES)
+GL_ENUM(0x898A,GL_POINT_SIZE_ARRAY_TYPE_OES)
+GL_ENUM(0x898B,GL_POINT_SIZE_ARRAY_STRIDE_OES)
+GL_ENUM(0x898C,GL_POINT_SIZE_ARRAY_POINTER_OES)
+GL_ENUM(0x8B9F,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES)
+GL_ENUM(0x8861,GL_POINT_SPRITE_OES)
+GL_ENUM(0x8862,GL_COORD_REPLACE_OES)
+GL_ENUM(0x803C,GL_ALPHA8_OES)
+GL_ENUM(0x8043,GL_LUMINANCE4_ALPHA4_OES)
+GL_ENUM(0x8045,GL_LUMINANCE8_ALPHA8_OES)
+GL_ENUM(0x8040,GL_LUMINANCE8_OES)
+GL_ENUM(0x8052,GL_RGB10_EXT)
+GL_ENUM(0x8D46,GL_STENCIL_INDEX1_OES)
+GL_ENUM(0x8D47,GL_STENCIL_INDEX4_OES)
+GL_ENUM(0x8511,GL_NORMAL_MAP_OES)
+GL_ENUM(0x8512,GL_REFLECTION_MAP_OES)
+GL_ENUM(0x2500,GL_TEXTURE_GEN_MODE_OES)
+GL_ENUM(0x8D60,GL_TEXTURE_GEN_STR_OES)
+GL_ENUM(0x87F9,GL_3DC_X_AMD)
+GL_ENUM(0x87FA,GL_3DC_XY_AMD)
+GL_ENUM(0x8C92,GL_ATC_RGB_AMD)
+GL_ENUM(0x8C93,GL_ATC_RGBA_EXPLICIT_ALPHA_AMD)
+GL_ENUM(0x87EE,GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD)
+GL_ENUM(0x8A53,GL_SYNC_OBJECT_APPLE)
+GL_ENUM(0x80E1,GL_BGRA_EXT)
 GL_ENUM(0x93A1,GL_BGRA8_EXT)
-GL_ENUM(0xFFFFFFFF,GL_ALL_SHADER_BITS_EXT)
-GL_ENUM(0xFFFFFFFFFFFFFFFFull,GL_TIMEOUT_IGNORED)
-GL_ENUM(0xFFFFFFFFu,GL_INVALID_INDEX)
+GL_ENUM(0x8D6C,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT)
+GL_ENUM(0x8365,GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT)
+GL_ENUM(0x8366,GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT)
+GL_ENUM(0x8253,GL_GUILTY_CONTEXT_RESET_EXT)
+GL_ENUM(0x8254,GL_INNOCENT_CONTEXT_RESET_EXT)
+GL_ENUM(0x8255,GL_UNKNOWN_CONTEXT_RESET_EXT)
+GL_ENUM(0x90F3,GL_CONTEXT_ROBUST_ACCESS_EXT)
+GL_ENUM(0x8256,GL_RESET_NOTIFICATION_STRATEGY_EXT)
+GL_ENUM(0x8252,GL_LOSE_CONTEXT_ON_RESET_EXT)
+GL_ENUM(0x8261,GL_NO_RESET_NOTIFICATION_EXT)
+GL_ENUM(0x8C42,GL_SRGB_ALPHA_EXT)
+GL_ENUM(0x83F0,GL_COMPRESSED_RGB_S3TC_DXT1_EXT)
+GL_ENUM(0x83F1,GL_COMPRESSED_RGBA_S3TC_DXT1_EXT)
+GL_ENUM(0x84FE,GL_TEXTURE_MAX_ANISOTROPY_EXT)
+GL_ENUM(0x84FF,GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT)
+GL_ENUM(0x8500,GL_TEXTURE_FILTER_CONTROL_EXT)
+GL_ENUM(0x8501,GL_TEXTURE_LOD_BIAS_EXT)
+GL_ENUM(0x8816,GL_ALPHA32F_EXT)
+GL_ENUM(0x8818,GL_LUMINANCE32F_EXT)
+GL_ENUM(0x8819,GL_LUMINANCE_ALPHA32F_EXT)
+GL_ENUM(0x881C,GL_ALPHA16F_EXT)
+GL_ENUM(0x881E,GL_LUMINANCE16F_EXT)
+GL_ENUM(0x881F,GL_LUMINANCE_ALPHA16F_EXT)
+GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_IMG)
+GL_ENUM(0x9134,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG)
+GL_ENUM(0x9135,GL_MAX_SAMPLES_IMG)
+GL_ENUM(0x9136,GL_TEXTURE_SAMPLES_IMG)
+GL_ENUM(0x8C00,GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG)
+GL_ENUM(0x8C01,GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG)
+GL_ENUM(0x8C02,GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG)
+GL_ENUM(0x8C03,GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG)
+GL_ENUM(0x8C04,GL_MODULATE_COLOR_IMG)
+GL_ENUM(0x8C05,GL_RECIP_ADD_SIGNED_ALPHA_IMG)
+GL_ENUM(0x8C06,GL_TEXTURE_ALPHA_MODULATE_IMG)
+GL_ENUM(0x8C07,GL_FACTOR_ALPHA_MODULATE_IMG)
+GL_ENUM(0x8C08,GL_FRAGMENT_ALPHA_MODULATE_IMG)
+GL_ENUM(0x8C09,GL_ADD_BLEND_IMG)
+GL_ENUM(0x84F2,GL_ALL_COMPLETED_NV)
+GL_ENUM(0x84F3,GL_FENCE_STATUS_NV)
+GL_ENUM(0x84F4,GL_FENCE_CONDITION_NV)
+GL_ENUM(0x8BD2,GL_TEXTURE_WIDTH_QCOM)
+GL_ENUM(0x8BD3,GL_TEXTURE_HEIGHT_QCOM)
+GL_ENUM(0x8BD4,GL_TEXTURE_DEPTH_QCOM)
+GL_ENUM(0x8BD5,GL_TEXTURE_INTERNAL_FORMAT_QCOM)
+GL_ENUM(0x8BD6,GL_TEXTURE_FORMAT_QCOM)
+GL_ENUM(0x8BD7,GL_TEXTURE_TYPE_QCOM)
+GL_ENUM(0x8BD8,GL_TEXTURE_IMAGE_VALID_QCOM)
+GL_ENUM(0x8BD9,GL_TEXTURE_NUM_LEVELS_QCOM)
+GL_ENUM(0x8BDA,GL_TEXTURE_TARGET_QCOM)
+GL_ENUM(0x8BDB,GL_TEXTURE_OBJECT_VALID_QCOM)
+GL_ENUM(0x8BDC,GL_STATE_RESTORE)
+GL_ENUM(0x8FA0,GL_PERFMON_GLOBAL_MODE_QCOM)
+GL_ENUM(0x8823,GL_WRITEONLY_RENDERING_QCOM)
+GL_ENUM(0x9285,GL_BLEND_ADVANCED_COHERENT_KHR)
+GL_ENUM(0x9294,GL_MULTIPLY_KHR)
+GL_ENUM(0x9295,GL_SCREEN_KHR)
+GL_ENUM(0x9296,GL_OVERLAY_KHR)
+GL_ENUM(0x9297,GL_DARKEN_KHR)
+GL_ENUM(0x9298,GL_LIGHTEN_KHR)
+GL_ENUM(0x9299,GL_COLORDODGE_KHR)
+GL_ENUM(0x929A,GL_COLORBURN_KHR)
+GL_ENUM(0x929B,GL_HARDLIGHT_KHR)
+GL_ENUM(0x929C,GL_SOFTLIGHT_KHR)
+GL_ENUM(0x929E,GL_DIFFERENCE_KHR)
+GL_ENUM(0x92A0,GL_EXCLUSION_KHR)
+GL_ENUM(0x92AD,GL_HSL_HUE_KHR)
+GL_ENUM(0x92AE,GL_HSL_SATURATION_KHR)
+GL_ENUM(0x92AF,GL_HSL_COLOR_KHR)
+GL_ENUM(0x92B0,GL_HSL_LUMINOSITY_KHR)
+GL_ENUM(0x82E6,GL_SAMPLER)
+GL_ENUM(0x8242,GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR)
+GL_ENUM(0x8243,GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR)
+GL_ENUM(0x8244,GL_DEBUG_CALLBACK_FUNCTION_KHR)
+GL_ENUM(0x8245,GL_DEBUG_CALLBACK_USER_PARAM_KHR)
+GL_ENUM(0x8246,GL_DEBUG_SOURCE_API_KHR)
+GL_ENUM(0x8247,GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR)
+GL_ENUM(0x8248,GL_DEBUG_SOURCE_SHADER_COMPILER_KHR)
+GL_ENUM(0x8249,GL_DEBUG_SOURCE_THIRD_PARTY_KHR)
+GL_ENUM(0x824A,GL_DEBUG_SOURCE_APPLICATION_KHR)
+GL_ENUM(0x824B,GL_DEBUG_SOURCE_OTHER_KHR)
+GL_ENUM(0x824C,GL_DEBUG_TYPE_ERROR_KHR)
+GL_ENUM(0x824D,GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR)
+GL_ENUM(0x824E,GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR)
+GL_ENUM(0x824F,GL_DEBUG_TYPE_PORTABILITY_KHR)
+GL_ENUM(0x8250,GL_DEBUG_TYPE_PERFORMANCE_KHR)
+GL_ENUM(0x8251,GL_DEBUG_TYPE_OTHER_KHR)
+GL_ENUM(0x8268,GL_DEBUG_TYPE_MARKER_KHR)
+GL_ENUM(0x8269,GL_DEBUG_TYPE_PUSH_GROUP_KHR)
+GL_ENUM(0x826A,GL_DEBUG_TYPE_POP_GROUP_KHR)
+GL_ENUM(0x826B,GL_DEBUG_SEVERITY_NOTIFICATION_KHR)
+GL_ENUM(0x826C,GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR)
+GL_ENUM(0x826D,GL_DEBUG_GROUP_STACK_DEPTH_KHR)
+GL_ENUM(0x82E0,GL_BUFFER_KHR)
+GL_ENUM(0x82E1,GL_SHADER_KHR)
+GL_ENUM(0x82E2,GL_PROGRAM_KHR)
+GL_ENUM(0x82E3,GL_QUERY_KHR)
+GL_ENUM(0x82E8,GL_MAX_LABEL_LENGTH_KHR)
+GL_ENUM(0x9143,GL_MAX_DEBUG_MESSAGE_LENGTH_KHR)
+GL_ENUM(0x9144,GL_MAX_DEBUG_LOGGED_MESSAGES_KHR)
+GL_ENUM(0x9145,GL_DEBUG_LOGGED_MESSAGES_KHR)
+GL_ENUM(0x9146,GL_DEBUG_SEVERITY_HIGH_KHR)
+GL_ENUM(0x9147,GL_DEBUG_SEVERITY_MEDIUM_KHR)
+GL_ENUM(0x9148,GL_DEBUG_SEVERITY_LOW_KHR)
+GL_ENUM(0x92E0,GL_DEBUG_OUTPUT_KHR)
+GL_ENUM(0x93B0,GL_COMPRESSED_RGBA_ASTC_4x4_KHR)
+GL_ENUM(0x93B1,GL_COMPRESSED_RGBA_ASTC_5x4_KHR)
+GL_ENUM(0x93B2,GL_COMPRESSED_RGBA_ASTC_5x5_KHR)
+GL_ENUM(0x93B3,GL_COMPRESSED_RGBA_ASTC_6x5_KHR)
+GL_ENUM(0x93B4,GL_COMPRESSED_RGBA_ASTC_6x6_KHR)
+GL_ENUM(0x93B5,GL_COMPRESSED_RGBA_ASTC_8x5_KHR)
+GL_ENUM(0x93B6,GL_COMPRESSED_RGBA_ASTC_8x6_KHR)
+GL_ENUM(0x93B7,GL_COMPRESSED_RGBA_ASTC_8x8_KHR)
+GL_ENUM(0x93B8,GL_COMPRESSED_RGBA_ASTC_10x5_KHR)
+GL_ENUM(0x93B9,GL_COMPRESSED_RGBA_ASTC_10x6_KHR)
+GL_ENUM(0x93BA,GL_COMPRESSED_RGBA_ASTC_10x8_KHR)
+GL_ENUM(0x93BB,GL_COMPRESSED_RGBA_ASTC_10x10_KHR)
+GL_ENUM(0x93BC,GL_COMPRESSED_RGBA_ASTC_12x10_KHR)
+GL_ENUM(0x93BD,GL_COMPRESSED_RGBA_ASTC_12x12_KHR)
+GL_ENUM(0x93D0,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR)
+GL_ENUM(0x93D1,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR)
+GL_ENUM(0x93D2,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR)
+GL_ENUM(0x93D3,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR)
+GL_ENUM(0x93D4,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR)
+GL_ENUM(0x93D5,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR)
+GL_ENUM(0x93D6,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR)
+GL_ENUM(0x93D7,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR)
+GL_ENUM(0x93D8,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR)
+GL_ENUM(0x93D9,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR)
+GL_ENUM(0x93DA,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR)
+GL_ENUM(0x93DB,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR)
+GL_ENUM(0x93DC,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR)
+GL_ENUM(0x93DD,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR)
+GL_ENUM(0x8D66,GL_SAMPLER_EXTERNAL_OES)
+GL_ENUM(0x8C36,GL_SAMPLE_SHADING_OES)
+GL_ENUM(0x8C37,GL_MIN_SAMPLE_SHADING_VALUE_OES)
+GL_ENUM(0x8E5B,GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES)
+GL_ENUM(0x8E5C,GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES)
+GL_ENUM(0x8E5D,GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES)
+GL_ENUM(0x93C0,GL_COMPRESSED_RGBA_ASTC_3x3x3_OES)
+GL_ENUM(0x93C1,GL_COMPRESSED_RGBA_ASTC_4x3x3_OES)
+GL_ENUM(0x93C2,GL_COMPRESSED_RGBA_ASTC_4x4x3_OES)
+GL_ENUM(0x93C3,GL_COMPRESSED_RGBA_ASTC_4x4x4_OES)
+GL_ENUM(0x93C4,GL_COMPRESSED_RGBA_ASTC_5x4x4_OES)
+GL_ENUM(0x93C5,GL_COMPRESSED_RGBA_ASTC_5x5x4_OES)
+GL_ENUM(0x93C6,GL_COMPRESSED_RGBA_ASTC_5x5x5_OES)
+GL_ENUM(0x93C7,GL_COMPRESSED_RGBA_ASTC_6x5x5_OES)
+GL_ENUM(0x93C8,GL_COMPRESSED_RGBA_ASTC_6x6x5_OES)
+GL_ENUM(0x93C9,GL_COMPRESSED_RGBA_ASTC_6x6x6_OES)
+GL_ENUM(0x93E0,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES)
+GL_ENUM(0x93E1,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES)
+GL_ENUM(0x93E2,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES)
+GL_ENUM(0x93E3,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES)
+GL_ENUM(0x93E4,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES)
+GL_ENUM(0x93E5,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES)
+GL_ENUM(0x93E6,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES)
+GL_ENUM(0x93E7,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES)
+GL_ENUM(0x93E8,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES)
+GL_ENUM(0x93E9,GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES)
+GL_ENUM(0x8D61,GL_HALF_FLOAT_OES)
+GL_ENUM(0x9102,GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES)
+GL_ENUM(0x9105,GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES)
+GL_ENUM(0x910B,GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES)
+GL_ENUM(0x910C,GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES)
+GL_ENUM(0x910D,GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES)
+GL_ENUM(0x8DF6,GL_UNSIGNED_INT_10_10_10_2_OES)
+GL_ENUM(0x8DF7,GL_INT_10_10_10_2_OES)
+GL_ENUM(0x8BC0,GL_COUNTER_TYPE_AMD)
+GL_ENUM(0x8BC1,GL_COUNTER_RANGE_AMD)
+GL_ENUM(0x8BC2,GL_UNSIGNED_INT64_AMD)
+GL_ENUM(0x8BC3,GL_PERCENTAGE_AMD)
+GL_ENUM(0x8BC4,GL_PERFMON_RESULT_AVAILABLE_AMD)
+GL_ENUM(0x8BC5,GL_PERFMON_RESULT_SIZE_AMD)
+GL_ENUM(0x8BC6,GL_PERFMON_RESULT_AMD)
+GL_ENUM(0x8740,GL_Z400_BINARY_AMD)
+GL_ENUM(0x93A4,GL_PACK_REVERSE_ROW_ORDER_ANGLE)
+GL_ENUM(0x93A6,GL_PROGRAM_BINARY_ANGLE)
+GL_ENUM(0x83F2,GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE)
+GL_ENUM(0x83F3,GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE)
+GL_ENUM(0x93A2,GL_TEXTURE_USAGE_ANGLE)
+GL_ENUM(0x93A3,GL_FRAMEBUFFER_ATTACHMENT_ANGLE)
+GL_ENUM(0x93A0,GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE)
+GL_ENUM(0x8A1F,GL_RGB_422_APPLE)
+GL_ENUM(0x85BA,GL_UNSIGNED_SHORT_8_8_APPLE)
+GL_ENUM(0x85BB,GL_UNSIGNED_SHORT_8_8_REV_APPLE)
+GL_ENUM(0x8A51,GL_RGB_RAW_422_APPLE)
+GL_ENUM(0x8F61,GL_MALI_PROGRAM_BINARY_ARM)
+GL_ENUM(0x8F60,GL_MALI_SHADER_BINARY_ARM)
+GL_ENUM(0x8F65,GL_FETCH_PER_SAMPLE_ARM)
+GL_ENUM(0x8F66,GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM)
+GL_ENUM(0x9250,GL_SHADER_BINARY_DMP)
+GL_ENUM(0x8A4F,GL_PROGRAM_PIPELINE_OBJECT_EXT)
+GL_ENUM(0x8B40,GL_PROGRAM_OBJECT_EXT)
+GL_ENUM(0x8B48,GL_SHADER_OBJECT_EXT)
+GL_ENUM(0x9151,GL_BUFFER_OBJECT_EXT)
+GL_ENUM(0x9153,GL_QUERY_OBJECT_EXT)
+GL_ENUM(0x9154,GL_VERTEX_ARRAY_OBJECT_EXT)
+GL_ENUM(0x8864,GL_QUERY_COUNTER_BITS_EXT)
+GL_ENUM(0x88BF,GL_TIME_ELAPSED_EXT)
+GL_ENUM(0x8E28,GL_TIMESTAMP_EXT)
+GL_ENUM(0x8FBB,GL_GPU_DISJOINT_EXT)
+GL_ENUM(0x8DD9,GL_GEOMETRY_SHADER_EXT)
+GL_ENUM(0x8916,GL_GEOMETRY_LINKED_VERTICES_OUT_EXT)
+GL_ENUM(0x8917,GL_GEOMETRY_LINKED_INPUT_TYPE_EXT)
+GL_ENUM(0x8918,GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT)
+GL_ENUM(0x887F,GL_GEOMETRY_SHADER_INVOCATIONS_EXT)
+GL_ENUM(0x825E,GL_LAYER_PROVOKING_VERTEX_EXT)
+GL_ENUM(0x000A,GL_LINES_ADJACENCY_EXT)
+GL_ENUM(0x000B,GL_LINE_STRIP_ADJACENCY_EXT)
+GL_ENUM(0x000C,GL_TRIANGLES_ADJACENCY_EXT)
+GL_ENUM(0x000D,GL_TRIANGLE_STRIP_ADJACENCY_EXT)
+GL_ENUM(0x8DDF,GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT)
+GL_ENUM(0x8A2C,GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT)
+GL_ENUM(0x8A32,GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT)
+GL_ENUM(0x9123,GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT)
+GL_ENUM(0x9124,GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT)
+GL_ENUM(0x8DE0,GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT)
+GL_ENUM(0x8DE1,GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT)
+GL_ENUM(0x8E5A,GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT)
+GL_ENUM(0x8C29,GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT)
+GL_ENUM(0x92CF,GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT)
+GL_ENUM(0x92D5,GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT)
+GL_ENUM(0x90CD,GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT)
+GL_ENUM(0x90D7,GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT)
+GL_ENUM(0x8E4D,GL_FIRST_VERTEX_CONVENTION_EXT)
+GL_ENUM(0x8E4E,GL_LAST_VERTEX_CONVENTION_EXT)
+GL_ENUM(0x8260,GL_UNDEFINED_VERTEX_EXT)
+GL_ENUM(0x8C87,GL_PRIMITIVES_GENERATED_EXT)
+GL_ENUM(0x9312,GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT)
+GL_ENUM(0x9317,GL_MAX_FRAMEBUFFER_LAYERS_EXT)
+GL_ENUM(0x8DA8,GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT)
+GL_ENUM(0x8DA7,GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT)
+GL_ENUM(0x9309,GL_REFERENCED_BY_GEOMETRY_SHADER_EXT)
+GL_ENUM(0x90F0,GL_COLOR_ATTACHMENT_EXT)
+GL_ENUM(0x90F1,GL_MULTIVIEW_EXT)
+GL_ENUM(0x0C01,GL_DRAW_BUFFER_EXT)
+GL_ENUM(0x90F2,GL_MAX_MULTIVIEW_BUFFERS_EXT)
+GL_ENUM(0x92BE,GL_PRIMITIVE_BOUNDING_BOX_EXT)
+GL_ENUM(0x8A54,GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT)
+GL_ENUM(0x8A55,GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT)
+GL_ENUM(0x8A56,GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT)
+GL_ENUM(0x8A57,GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT)
+GL_ENUM(0x93F0,GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG)
+GL_ENUM(0x93F1,GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG)
+GL_ENUM(0x8DB9,GL_FRAMEBUFFER_SRGB_EXT)
+GL_ENUM(0x8A52,GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT)
+GL_ENUM(0x8F63,GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT)
+GL_ENUM(0x8F67,GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT)
+GL_ENUM(0x8F64,GL_SHADER_PIXEL_LOCAL_STORAGE_EXT)
+GL_ENUM(0x000E,GL_PATCHES_EXT)
+GL_ENUM(0x8E72,GL_PATCH_VERTICES_EXT)
+GL_ENUM(0x8E75,GL_TESS_CONTROL_OUTPUT_VERTICES_EXT)
+GL_ENUM(0x8E76,GL_TESS_GEN_MODE_EXT)
+GL_ENUM(0x8E77,GL_TESS_GEN_SPACING_EXT)
+GL_ENUM(0x8E78,GL_TESS_GEN_VERTEX_ORDER_EXT)
+GL_ENUM(0x8E79,GL_TESS_GEN_POINT_MODE_EXT)
+GL_ENUM(0x8E7A,GL_ISOLINES_EXT)
+GL_ENUM(0x0007,GL_QUADS_EXT)
+GL_ENUM(0x8E7B,GL_FRACTIONAL_ODD_EXT)
+GL_ENUM(0x8E7C,GL_FRACTIONAL_EVEN_EXT)
+GL_ENUM(0x8E7D,GL_MAX_PATCH_VERTICES_EXT)
+GL_ENUM(0x8E7E,GL_MAX_TESS_GEN_LEVEL_EXT)
+GL_ENUM(0x8E7F,GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT)
+GL_ENUM(0x8E80,GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT)
+GL_ENUM(0x8E81,GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT)
+GL_ENUM(0x8E82,GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT)
+GL_ENUM(0x8E83,GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT)
+GL_ENUM(0x8E84,GL_MAX_TESS_PATCH_COMPONENTS_EXT)
+GL_ENUM(0x8E85,GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT)
+GL_ENUM(0x8E86,GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT)
+GL_ENUM(0x8E89,GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT)
+GL_ENUM(0x8E8A,GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT)
+GL_ENUM(0x886C,GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT)
+GL_ENUM(0x886D,GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT)
+GL_ENUM(0x8E1E,GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT)
+GL_ENUM(0x8E1F,GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT)
+GL_ENUM(0x92CD,GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT)
+GL_ENUM(0x92CE,GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT)
+GL_ENUM(0x92D3,GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT)
+GL_ENUM(0x92D4,GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT)
+GL_ENUM(0x90CB,GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT)
+GL_ENUM(0x90CC,GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT)
+GL_ENUM(0x90D8,GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT)
+GL_ENUM(0x90D9,GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT)
+GL_ENUM(0x8221,GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED)
+GL_ENUM(0x92E7,GL_IS_PER_PATCH_EXT)
+GL_ENUM(0x9307,GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT)
+GL_ENUM(0x9308,GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT)
+GL_ENUM(0x8E88,GL_TESS_CONTROL_SHADER_EXT)
+GL_ENUM(0x8E87,GL_TESS_EVALUATION_SHADER_EXT)
+GL_ENUM(0x1004,GL_TEXTURE_BORDER_COLOR_EXT)
+GL_ENUM(0x812D,GL_CLAMP_TO_BORDER_EXT)
+GL_ENUM(0x8C2A,GL_TEXTURE_BUFFER_EXT)
+GL_ENUM(0x8C2B,GL_MAX_TEXTURE_BUFFER_SIZE_EXT)
+GL_ENUM(0x8C2C,GL_TEXTURE_BINDING_BUFFER_EXT)
+GL_ENUM(0x8C2D,GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT)
+GL_ENUM(0x919F,GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT)
+GL_ENUM(0x8DC2,GL_SAMPLER_BUFFER_EXT)
+GL_ENUM(0x8DD0,GL_INT_SAMPLER_BUFFER_EXT)
+GL_ENUM(0x8DD8,GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT)
+GL_ENUM(0x9051,GL_IMAGE_BUFFER_EXT)
+GL_ENUM(0x905C,GL_INT_IMAGE_BUFFER_EXT)
+GL_ENUM(0x9067,GL_UNSIGNED_INT_IMAGE_BUFFER_EXT)
+GL_ENUM(0x919D,GL_TEXTURE_BUFFER_OFFSET_EXT)
+GL_ENUM(0x919E,GL_TEXTURE_BUFFER_SIZE_EXT)
+GL_ENUM(0x9009,GL_TEXTURE_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x900A,GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x900C,GL_SAMPLER_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x900D,GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT)
+GL_ENUM(0x900E,GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x900F,GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x9054,GL_IMAGE_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x905F,GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x906A,GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT)
+GL_ENUM(0x8A48,GL_TEXTURE_SRGB_DECODE_EXT)
+GL_ENUM(0x8A49,GL_DECODE_EXT)
+GL_ENUM(0x8A4A,GL_SKIP_DECODE_EXT)
+GL_ENUM(0x82DB,GL_TEXTURE_VIEW_MIN_LEVEL_EXT)
+GL_ENUM(0x82DC,GL_TEXTURE_VIEW_NUM_LEVELS_EXT)
+GL_ENUM(0x82DD,GL_TEXTURE_VIEW_MIN_LAYER_EXT)
+GL_ENUM(0x82DE,GL_TEXTURE_VIEW_NUM_LAYERS_EXT)
+GL_ENUM(0x9260,GL_GCCSO_SHADER_BINARY_FJ)
+GL_ENUM(0x9130,GL_SGX_PROGRAM_BINARY_IMG)
+GL_ENUM(0x8C0A,GL_SGX_BINARY_IMG)
+GL_ENUM(0x9137,GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG)
+GL_ENUM(0x9138,GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG)
+GL_ENUM(0x00000000,GL_PERFQUERY_SINGLE_CONTEXT_INTEL)
+GL_ENUM(0x00000001,GL_PERFQUERY_GLOBAL_CONTEXT_INTEL)
+GL_ENUM(0x83FB,GL_PERFQUERY_WAIT_INTEL)
+GL_ENUM(0x83FA,GL_PERFQUERY_FLUSH_INTEL)
+GL_ENUM(0x83F9,GL_PERFQUERY_DONOT_FLUSH_INTEL)
+GL_ENUM(0x94F0,GL_PERFQUERY_COUNTER_EVENT_INTEL)
+GL_ENUM(0x94F1,GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL)
+GL_ENUM(0x94F2,GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL)
+GL_ENUM(0x94F3,GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL)
+GL_ENUM(0x94F4,GL_PERFQUERY_COUNTER_RAW_INTEL)
+GL_ENUM(0x94F5,GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL)
+GL_ENUM(0x94F8,GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL)
+GL_ENUM(0x94F9,GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL)
+GL_ENUM(0x94FA,GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL)
+GL_ENUM(0x94FB,GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL)
+GL_ENUM(0x94FC,GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL)
+GL_ENUM(0x94FD,GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL)
+GL_ENUM(0x94FE,GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL)
+GL_ENUM(0x94FF,GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL)
+GL_ENUM(0x9500,GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL)
+GL_ENUM(0x9281,GL_BLEND_OVERLAP_NV)
+GL_ENUM(0x9280,GL_BLEND_PREMULTIPLIED_SRC_NV)
+GL_ENUM(0x9284,GL_CONJOINT_NV)
+GL_ENUM(0x92A1,GL_CONTRAST_NV)
+GL_ENUM(0x9283,GL_DISJOINT_NV)
+GL_ENUM(0x928F,GL_DST_ATOP_NV)
+GL_ENUM(0x928B,GL_DST_IN_NV)
+GL_ENUM(0x9287,GL_DST_NV)
+GL_ENUM(0x928D,GL_DST_OUT_NV)
+GL_ENUM(0x9289,GL_DST_OVER_NV)
+GL_ENUM(0x92A9,GL_HARDMIX_NV)
+GL_ENUM(0x92B4,GL_INVERT_OVG_NV)
+GL_ENUM(0x92A3,GL_INVERT_RGB_NV)
+GL_ENUM(0x92A5,GL_LINEARBURN_NV)
+GL_ENUM(0x92A4,GL_LINEARDODGE_NV)
+GL_ENUM(0x92A7,GL_LINEARLIGHT_NV)
+GL_ENUM(0x92B3,GL_MINUS_CLAMPED_NV)
+GL_ENUM(0x929F,GL_MINUS_NV)
+GL_ENUM(0x92A8,GL_PINLIGHT_NV)
+GL_ENUM(0x92B2,GL_PLUS_CLAMPED_ALPHA_NV)
+GL_ENUM(0x92B1,GL_PLUS_CLAMPED_NV)
+GL_ENUM(0x9292,GL_PLUS_DARKER_NV)
+GL_ENUM(0x9291,GL_PLUS_NV)
+GL_ENUM(0x928E,GL_SRC_ATOP_NV)
+GL_ENUM(0x928A,GL_SRC_IN_NV)
+GL_ENUM(0x9286,GL_SRC_NV)
+GL_ENUM(0x928C,GL_SRC_OUT_NV)
+GL_ENUM(0x9288,GL_SRC_OVER_NV)
+GL_ENUM(0x9282,GL_UNCORRELATED_NV)
+GL_ENUM(0x92A6,GL_VIVIDLIGHT_NV)
+GL_ENUM(0x8ED0,GL_COVERAGE_COMPONENT_NV)
+GL_ENUM(0x8ED1,GL_COVERAGE_COMPONENT4_NV)
+GL_ENUM(0x8ED2,GL_COVERAGE_ATTACHMENT_NV)
+GL_ENUM(0x8ED3,GL_COVERAGE_BUFFERS_NV)
+GL_ENUM(0x8ED4,GL_COVERAGE_SAMPLES_NV)
+GL_ENUM(0x8ED5,GL_COVERAGE_ALL_FRAGMENTS_NV)
+GL_ENUM(0x8ED6,GL_COVERAGE_EDGE_FRAGMENTS_NV)
+GL_ENUM(0x8ED7,GL_COVERAGE_AUTOMATIC_NV)
+GL_ENUM(0x8E2C,GL_DEPTH_COMPONENT16_NONLINEAR_NV)
+GL_ENUM(0x8C46,GL_SLUMINANCE_NV)
+GL_ENUM(0x8C44,GL_SLUMINANCE_ALPHA_NV)
+GL_ENUM(0x8C47,GL_SLUMINANCE8_NV)
+GL_ENUM(0x8C45,GL_SLUMINANCE8_ALPHA8_NV)
+GL_ENUM(0x8C4C,GL_COMPRESSED_SRGB_S3TC_DXT1_NV)
+GL_ENUM(0x8C4D,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV)
+GL_ENUM(0x8C4E,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV)
+GL_ENUM(0x8C4F,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV)
+GL_ENUM(0x88EE,GL_ETC1_SRGB8_NV)
+GL_ENUM(0x8FB0,GL_BINNING_CONTROL_HINT_QCOM)
+GL_ENUM(0x8FB1,GL_CPU_OPTIMIZED_QCOM)
+GL_ENUM(0x8FB2,GL_GPU_OPTIMIZED_QCOM)
+GL_ENUM(0x8FB3,GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM)
+GL_ENUM(0x8FC4,GL_SHADER_BINARY_VIV)
diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h
index 4b43198..3f36b7d 100644
--- a/opengl/libs/hooks.h
+++ b/opengl/libs/hooks.h
@@ -30,7 +30,7 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 #include <GLES3/gl3.h>
-#include <GLES3/gl3ext.h>
+#include <GLES3/gl31.h>
 
 // set to 1 for debugging
 #define USE_SLOW_BINDING    0
diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles
index f92c9ab..a4a1958 100755
--- a/opengl/libs/tools/genfiles
+++ b/opengl/libs/tools/genfiles
@@ -20,17 +20,13 @@
 
 ./glapigen ../../include/GLES/gl.h      > ../GLES_CM/gl_api.in
 ./glapigen ../../include/GLES/glext.h   > ../GLES_CM/glext_api.in
-./glapigen ../../include/GLES2/gl2.h    > ../GLES2/gl2_api.in
+./glapigen ../../include/GLES3/gl3.h    > ../GLES2/gl2_api.in
 ./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in
-./glapigen ../../include/GLES3/gl3.h    > ../GLES2/gl3_api.in
-./glapigen ../../include/GLES3/gl3ext.h > ../GLES2/gl3ext_api.in
 
 ./glentrygen ../../include/GLES/gl.h      > /tmp/gl_entries.in
 ./glentrygen ../../include/GLES/glext.h   > /tmp/glext_entries.in
-./glentrygen ../../include/GLES2/gl2.h    > /tmp/gl2_entries.in
+./glentrygen ../../include/GLES3/gl3.h    > /tmp/gl2_entries.in
 ./glentrygen ../../include/GLES2/gl2ext.h > /tmp/gl2ext_entries.in
-./glentrygen ../../include/GLES3/gl3.h    > /tmp/gl3_entries.in
-./glentrygen ../../include/GLES3/gl3ext.h > /tmp/gl3ext_entries.in
 
 # The awk command removes lines with the same function name as an earlier
 # line, even if the rest of the line differs. Although signatures of
@@ -40,8 +36,6 @@
     /tmp/glext_entries.in \
     /tmp/gl2_entries.in \
     /tmp/gl2ext_entries.in \
-    /tmp/gl3_entries.in \
-    /tmp/gl3ext_entries.in \
         | sort -t, -k2 \
         | awk -F, '!_[$2]++' \
             > ../entries.in
@@ -50,10 +44,8 @@
 
 cat ../../include/GLES/gl.h \
     ../../include/GLES/glext.h \
-    ../../include/GLES2/gl2.h \
     ../../include/GLES2/gl2ext.h \
     ../../include/GLES3/gl3.h \
-    ../../include/GLES3/gl3ext.h \
         | ./glenumsgen \
         | sort \
         > ../enums.in
diff --git a/opengl/libs/trace.in b/opengl/libs/trace.in
index 188d81b..4375a94 100644
--- a/opengl/libs/trace.in
+++ b/opengl/libs/trace.in
@@ -1,20 +1,24 @@
+TRACE_GL_VOID(glActiveShaderProgram, (GLuint pipeline, GLuint program), (pipeline, program), 2, "GLuint", pipeline, "GLuint", program)
 TRACE_GL_VOID(glActiveShaderProgramEXT, (GLuint pipeline, GLuint program), (pipeline, program), 2, "GLuint", pipeline, "GLuint", program)
 TRACE_GL_VOID(glActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
-TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
+TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLfloat ref), (func, ref), 2, "GLenum", func, "GLfloat", ref)
 TRACE_GL_VOID(glAlphaFuncQCOM, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
-TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
-TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
+TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLfixed ref), (func, ref), 2, "GLenum", func, "GLfixed", ref)
+TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLfixed ref), (func, ref), 2, "GLenum", func, "GLfixed", ref)
 TRACE_GL_VOID(glAttachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader)
 TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
+TRACE_GL_VOID(glBeginPerfQueryINTEL, (GLuint queryHandle), (queryHandle), 1, "GLuint", queryHandle)
 TRACE_GL_VOID(glBeginQuery, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id)
 TRACE_GL_VOID(glBeginQueryEXT, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id)
 TRACE_GL_VOID(glBeginTransformFeedback, (GLenum primitiveMode), (primitiveMode), 1, "GLenum", primitiveMode)
-TRACE_GL_VOID(glBindAttribLocation, (GLuint program, GLuint index, const GLchar* name), (program, index, name), 3, "GLuint", program, "GLuint", index, "const GLchar*", name)
+TRACE_GL_VOID(glBindAttribLocation, (GLuint program, GLuint index, const GLchar * name), (program, index, name), 3, "GLuint", program, "GLuint", index, "const GLchar *", name)
 TRACE_GL_VOID(glBindBuffer, (GLenum target, GLuint buffer), (target, buffer), 2, "GLenum", target, "GLuint", buffer)
 TRACE_GL_VOID(glBindBufferBase, (GLenum target, GLuint index, GLuint buffer), (target, index, buffer), 3, "GLenum", target, "GLuint", index, "GLuint", buffer)
 TRACE_GL_VOID(glBindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size), (target, index, buffer, offset, size), 5, "GLenum", target, "GLuint", index, "GLuint", buffer, "GLintptr", offset, "GLsizeiptr", size)
 TRACE_GL_VOID(glBindFramebuffer, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
 TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
+TRACE_GL_VOID(glBindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format), (unit, texture, level, layered, layer, access, format), 7, "GLuint", unit, "GLuint", texture, "GLint", level, "GLboolean", layered, "GLint", layer, "GLenum", access, "GLenum", format)
+TRACE_GL_VOID(glBindProgramPipeline, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
 TRACE_GL_VOID(glBindProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
 TRACE_GL_VOID(glBindRenderbuffer, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
 TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
@@ -23,145 +27,185 @@
 TRACE_GL_VOID(glBindTransformFeedback, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id)
 TRACE_GL_VOID(glBindVertexArray, (GLuint array), (array), 1, "GLuint", array)
 TRACE_GL_VOID(glBindVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red, green, blue, alpha), 4, "GLclampf", red, "GLclampf", green, "GLclampf", blue, "GLclampf", alpha)
-TRACE_GL_VOID(glBlendEquation, ( GLenum mode ), (mode), 1, "GLenum", mode)
+TRACE_GL_VOID(glBindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride), (bindingindex, buffer, offset, stride), 4, "GLuint", bindingindex, "GLuint", buffer, "GLintptr", offset, "GLsizei", stride)
+TRACE_GL_VOID(glBlendBarrierKHR, (void), (), 0)
+TRACE_GL_VOID(glBlendBarrierNV, (void), (), 0)
+TRACE_GL_VOID(glBlendColor, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha)
+TRACE_GL_VOID(glBlendEquation, (GLenum mode), (mode), 1, "GLenum", mode)
 TRACE_GL_VOID(glBlendEquationOES, (GLenum mode), (mode), 1, "GLenum", mode)
 TRACE_GL_VOID(glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha)
 TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha)
+TRACE_GL_VOID(glBlendEquationSeparateiEXT, (GLuint buf, GLenum modeRGB, GLenum modeAlpha), (buf, modeRGB, modeAlpha), 3, "GLuint", buf, "GLenum", modeRGB, "GLenum", modeAlpha)
+TRACE_GL_VOID(glBlendEquationiEXT, (GLuint buf, GLenum mode), (buf, mode), 2, "GLuint", buf, "GLenum", mode)
 TRACE_GL_VOID(glBlendFunc, (GLenum sfactor, GLenum dfactor), (sfactor, dfactor), 2, "GLenum", sfactor, "GLenum", dfactor)
-TRACE_GL_VOID(glBlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
+TRACE_GL_VOID(glBlendFuncSeparate, (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha), (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), 4, "GLenum", sfactorRGB, "GLenum", dfactorRGB, "GLenum", sfactorAlpha, "GLenum", dfactorAlpha)
 TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
+TRACE_GL_VOID(glBlendFuncSeparateiEXT, (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (buf, srcRGB, dstRGB, srcAlpha, dstAlpha), 5, "GLuint", buf, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
+TRACE_GL_VOID(glBlendFunciEXT, (GLuint buf, GLenum src, GLenum dst), (buf, src, dst), 3, "GLuint", buf, "GLenum", src, "GLenum", dst)
+TRACE_GL_VOID(glBlendParameteriNV, (GLenum pname, GLint value), (pname, value), 2, "GLenum", pname, "GLint", value)
 TRACE_GL_VOID(glBlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter)
 TRACE_GL_VOID(glBlitFramebufferANGLE, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter)
-TRACE_GL_VOID(glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage), (target, size, data, usage), 4, "GLenum", target, "GLsizeiptr", size, "const GLvoid *", data, "GLenum", usage)
-TRACE_GL_VOID(glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data), (target, offset, size, data), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", size, "const GLvoid *", data)
+TRACE_GL_VOID(glBlitFramebufferNV, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter)
+TRACE_GL_VOID(glBufferData, (GLenum target, GLsizeiptr size, const void * data, GLenum usage), (target, size, data, usage), 4, "GLenum", target, "GLsizeiptr", size, "const void *", data, "GLenum", usage)
+TRACE_GL_VOID(glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const void * data), (target, offset, size, data), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", size, "const void *", data)
 TRACE_GL(GLenum, glCheckFramebufferStatus, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL(GLenum, glCheckFramebufferStatusOES, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL_VOID(glClear, (GLbitfield mask), (mask), 1, "GLbitfield", mask)
 TRACE_GL_VOID(glClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil), (buffer, drawbuffer, depth, stencil), 4, "GLenum", buffer, "GLint", drawbuffer, "GLfloat", depth, "GLint", stencil)
-TRACE_GL_VOID(glClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat* value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLfloat*", value)
-TRACE_GL_VOID(glClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint* value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLint*", value)
-TRACE_GL_VOID(glClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint* value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLuint*", value)
-TRACE_GL_VOID(glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red, green, blue, alpha), 4, "GLclampf", red, "GLclampf", green, "GLclampf", blue, "GLclampf", alpha)
-TRACE_GL_VOID(glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearColorxOES, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha)
-TRACE_GL_VOID(glClearDepthf, (GLclampf depth), (depth), 1, "GLclampf", depth)
+TRACE_GL_VOID(glClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat * value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLfloat *", value)
+TRACE_GL_VOID(glClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint * value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLint *", value)
+TRACE_GL_VOID(glClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint * value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLuint *", value)
+TRACE_GL_VOID(glClearColor, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha)
+TRACE_GL_VOID(glClearColorx, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
+TRACE_GL_VOID(glClearColorxOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
+TRACE_GL_VOID(glClearDepthf, (GLfloat d), (d), 1, "GLfloat", d)
 TRACE_GL_VOID(glClearDepthfOES, (GLclampf depth), (depth), 1, "GLclampf", depth)
-TRACE_GL_VOID(glClearDepthx, (GLclampx depth), (depth), 1, "GLclampx", depth)
-TRACE_GL_VOID(glClearDepthxOES, (GLclampx depth), (depth), 1, "GLclampx", depth)
+TRACE_GL_VOID(glClearDepthx, (GLfixed depth), (depth), 1, "GLfixed", depth)
+TRACE_GL_VOID(glClearDepthxOES, (GLfixed depth), (depth), 1, "GLfixed", depth)
 TRACE_GL_VOID(glClearStencil, (GLint s), (s), 1, "GLint", s)
 TRACE_GL_VOID(glClientActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
 TRACE_GL(GLenum, glClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout), (sync, flags, timeout), 3, "GLsync", sync, "GLbitfield", flags, "GLuint64", timeout)
-TRACE_GL_VOID(glClipPlanef, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat *eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn)
-TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
-TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
-TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed *eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn)
-TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
+TRACE_GL(GLenum, glClientWaitSyncAPPLE, (GLsync sync, GLbitfield flags, GLuint64 timeout), (sync, flags, timeout), 3, "GLsync", sync, "GLbitfield", flags, "GLuint64", timeout)
+TRACE_GL_VOID(glClipPlanef, (GLenum p, const GLfloat * eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn)
+TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat * eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn)
+TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat * equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation)
+TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed * equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
+TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed * eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn)
+TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed * equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation)
 TRACE_GL_VOID(glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha)
 TRACE_GL_VOID(glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red, green, blue, alpha), 4, "GLubyte", red, "GLubyte", green, "GLubyte", blue, "GLubyte", alpha)
 TRACE_GL_VOID(glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
 TRACE_GL_VOID(glColor4xOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha)
 TRACE_GL_VOID(glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), (red, green, blue, alpha), 4, "GLboolean", red, "GLboolean", green, "GLboolean", blue, "GLboolean", alpha)
-TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
+TRACE_GL_VOID(glColorMaskiEXT, (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a), (index, r, g, b, a), 5, "GLuint", index, "GLboolean", r, "GLboolean", g, "GLboolean", b, "GLboolean", a)
+TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const void * pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const void *", pointer)
 TRACE_GL_VOID(glCompileShader, (GLuint shader), (shader), 1, "GLuint", shader)
-TRACE_GL_VOID(glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data), (target, level, internalformat, width, height, border, imageSize, data), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLsizei", imageSize, "const GLvoid *", data)
-TRACE_GL_VOID(glCompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data), (target, level, xoffset, yoffset, width, height, format, imageSize, data), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLsizei", imageSize, "const GLvoid *", data)
-TRACE_GL_VOID(glCompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data)
-TRACE_GL_VOID(glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data)
+TRACE_GL_VOID(glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data), (target, level, internalformat, width, height, border, imageSize, data), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLsizei", imageSize, "const void *", data)
+TRACE_GL_VOID(glCompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const void *", data)
+TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const void *", data)
+TRACE_GL_VOID(glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data), (target, level, xoffset, yoffset, width, height, format, imageSize, data), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLsizei", imageSize, "const void *", data)
+TRACE_GL_VOID(glCompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const void *", data)
+TRACE_GL_VOID(glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const void *", data)
 TRACE_GL_VOID(glCopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size), (readTarget, writeTarget, readOffset, writeOffset, size), 5, "GLenum", readTarget, "GLenum", writeTarget, "GLintptr", readOffset, "GLintptr", writeOffset, "GLsizeiptr", size)
+TRACE_GL_VOID(glCopyBufferSubDataNV, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size), (readTarget, writeTarget, readOffset, writeOffset, size), 5, "GLenum", readTarget, "GLenum", writeTarget, "GLintptr", readOffset, "GLintptr", writeOffset, "GLsizeiptr", size)
+TRACE_GL_VOID(glCopyImageSubDataEXT, (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth), (srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth), 15, "GLuint", srcName, "GLenum", srcTarget, "GLint", srcLevel, "GLint", srcX, "GLint", srcY, "GLint", srcZ, "GLuint", dstName, "GLenum", dstTarget, "GLint", dstLevel, "GLint", dstX, "GLint", dstY, "GLint", dstZ, "GLsizei", srcWidth, "GLsizei", srcHeight, "GLsizei", srcDepth)
 TRACE_GL_VOID(glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border), (target, level, internalformat, x, y, width, height, border), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLint", border)
 TRACE_GL_VOID(glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, x, y, width, height), 8, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glCopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glCopyTextureLevelsAPPLE, (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount), (destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount), 4, "GLuint", destinationTexture, "GLuint", sourceTexture, "GLint", sourceBaseLevel, "GLsizei", sourceLevelCount)
 TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask)
 TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation)
+TRACE_GL_VOID(glCreatePerfQueryINTEL, (GLuint queryId, GLuint * queryHandle), (queryId, queryHandle), 2, "GLuint", queryId, "GLuint *", queryHandle)
 TRACE_GL(GLuint, glCreateProgram, (void), (), 0)
 TRACE_GL(GLuint, glCreateShader, (GLenum type), (type), 1, "GLenum", type)
-TRACE_GL(GLuint, glCreateShaderProgramvEXT, (GLenum type, GLsizei count, const GLchar **strings), (type, count, strings), 3, "GLenum", type, "GLsizei", count, "const GLchar **", strings)
+TRACE_GL(GLuint, glCreateShaderProgramv, (GLenum type, GLsizei count, const GLchar *const* strings), (type, count, strings), 3, "GLenum", type, "GLsizei", count, "const GLchar *const*", strings)
+TRACE_GL(GLuint, glCreateShaderProgramvEXT, (GLenum type, GLsizei count, const GLchar ** strings), (type, count, strings), 3, "GLenum", type, "GLsizei", count, "const GLchar **", strings)
 TRACE_GL_VOID(glCullFace, (GLenum mode), (mode), 1, "GLenum", mode)
 TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex)
-TRACE_GL_VOID(glDeleteBuffers, (GLsizei n, const GLuint *buffers), (n, buffers), 2, "GLsizei", n, "const GLuint *", buffers)
-TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint *fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences)
-TRACE_GL_VOID(glDeleteFramebuffers, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
-TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
-TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
+TRACE_GL_VOID(glDebugMessageCallbackKHR, (GLDEBUGPROCKHR callback, const void * userParam), (callback, userParam), 2, "GLDEBUGPROCKHR", callback, "const void *", userParam)
+TRACE_GL_VOID(glDebugMessageControlKHR, (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled), (source, type, severity, count, ids, enabled), 6, "GLenum", source, "GLenum", type, "GLenum", severity, "GLsizei", count, "const GLuint *", ids, "GLboolean", enabled)
+TRACE_GL_VOID(glDebugMessageInsertKHR, (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf), (source, type, id, severity, length, buf), 6, "GLenum", source, "GLenum", type, "GLuint", id, "GLenum", severity, "GLsizei", length, "const GLchar *", buf)
+TRACE_GL_VOID(glDeleteBuffers, (GLsizei n, const GLuint * buffers), (n, buffers), 2, "GLsizei", n, "const GLuint *", buffers)
+TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint * fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences)
+TRACE_GL_VOID(glDeleteFramebuffers, (GLsizei n, const GLuint * framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint *", framebuffers)
+TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint * framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint *", framebuffers)
+TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint * monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
+TRACE_GL_VOID(glDeletePerfQueryINTEL, (GLuint queryHandle), (queryHandle), 1, "GLuint", queryHandle)
 TRACE_GL_VOID(glDeleteProgram, (GLuint program), (program), 1, "GLuint", program)
-TRACE_GL_VOID(glDeleteProgramPipelinesEXT, (GLsizei n, const GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "const GLuint *", pipelines)
-TRACE_GL_VOID(glDeleteQueries, (GLsizei n, const GLuint* ids), (n, ids), 2, "GLsizei", n, "const GLuint*", ids)
-TRACE_GL_VOID(glDeleteQueriesEXT, (GLsizei n, const GLuint *ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids)
-TRACE_GL_VOID(glDeleteRenderbuffers, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
-TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
-TRACE_GL_VOID(glDeleteSamplers, (GLsizei count, const GLuint* samplers), (count, samplers), 2, "GLsizei", count, "const GLuint*", samplers)
+TRACE_GL_VOID(glDeleteProgramPipelines, (GLsizei n, const GLuint * pipelines), (n, pipelines), 2, "GLsizei", n, "const GLuint *", pipelines)
+TRACE_GL_VOID(glDeleteProgramPipelinesEXT, (GLsizei n, const GLuint * pipelines), (n, pipelines), 2, "GLsizei", n, "const GLuint *", pipelines)
+TRACE_GL_VOID(glDeleteQueries, (GLsizei n, const GLuint * ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids)
+TRACE_GL_VOID(glDeleteQueriesEXT, (GLsizei n, const GLuint * ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids)
+TRACE_GL_VOID(glDeleteRenderbuffers, (GLsizei n, const GLuint * renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint *", renderbuffers)
+TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint * renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint *", renderbuffers)
+TRACE_GL_VOID(glDeleteSamplers, (GLsizei count, const GLuint * samplers), (count, samplers), 2, "GLsizei", count, "const GLuint *", samplers)
 TRACE_GL_VOID(glDeleteShader, (GLuint shader), (shader), 1, "GLuint", shader)
 TRACE_GL_VOID(glDeleteSync, (GLsync sync), (sync), 1, "GLsync", sync)
-TRACE_GL_VOID(glDeleteTextures, (GLsizei n, const GLuint *textures), (n, textures), 2, "GLsizei", n, "const GLuint *", textures)
-TRACE_GL_VOID(glDeleteTransformFeedbacks, (GLsizei n, const GLuint* ids), (n, ids), 2, "GLsizei", n, "const GLuint*", ids)
-TRACE_GL_VOID(glDeleteVertexArrays, (GLsizei n, const GLuint* arrays), (n, arrays), 2, "GLsizei", n, "const GLuint*", arrays)
-TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays)
+TRACE_GL_VOID(glDeleteSyncAPPLE, (GLsync sync), (sync), 1, "GLsync", sync)
+TRACE_GL_VOID(glDeleteTextures, (GLsizei n, const GLuint * textures), (n, textures), 2, "GLsizei", n, "const GLuint *", textures)
+TRACE_GL_VOID(glDeleteTransformFeedbacks, (GLsizei n, const GLuint * ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids)
+TRACE_GL_VOID(glDeleteVertexArrays, (GLsizei n, const GLuint * arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays)
+TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint * arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays)
 TRACE_GL_VOID(glDepthFunc, (GLenum func), (func), 1, "GLenum", func)
 TRACE_GL_VOID(glDepthMask, (GLboolean flag), (flag), 1, "GLboolean", flag)
-TRACE_GL_VOID(glDepthRangef, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar)
-TRACE_GL_VOID(glDepthRangefOES, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar)
-TRACE_GL_VOID(glDepthRangex, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
-TRACE_GL_VOID(glDepthRangexOES, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar)
+TRACE_GL_VOID(glDepthRangef, (GLfloat n, GLfloat f), (n, f), 2, "GLfloat", n, "GLfloat", f)
+TRACE_GL_VOID(glDepthRangefOES, (GLclampf n, GLclampf f), (n, f), 2, "GLclampf", n, "GLclampf", f)
+TRACE_GL_VOID(glDepthRangex, (GLfixed n, GLfixed f), (n, f), 2, "GLfixed", n, "GLfixed", f)
+TRACE_GL_VOID(glDepthRangexOES, (GLfixed n, GLfixed f), (n, f), 2, "GLfixed", n, "GLfixed", f)
 TRACE_GL_VOID(glDetachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader)
 TRACE_GL_VOID(glDisable, (GLenum cap), (cap), 1, "GLenum", cap)
 TRACE_GL_VOID(glDisableClientState, (GLenum array), (array), 1, "GLenum", array)
 TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
 TRACE_GL_VOID(glDisableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index)
-TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
+TRACE_GL_VOID(glDisableiEXT, (GLenum target, GLuint index), (target, index), 2, "GLenum", target, "GLuint", index)
+TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum * attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
+TRACE_GL_VOID(glDispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z), (num_groups_x, num_groups_y, num_groups_z), 3, "GLuint", num_groups_x, "GLuint", num_groups_y, "GLuint", num_groups_z)
+TRACE_GL_VOID(glDispatchComputeIndirect, (GLintptr indirect), (indirect), 1, "GLintptr", indirect)
 TRACE_GL_VOID(glDrawArrays, (GLenum mode, GLint first, GLsizei count), (mode, first, count), 3, "GLenum", mode, "GLint", first, "GLsizei", count)
-TRACE_GL_VOID(glDrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount), (mode, first, count, instanceCount), 4, "GLenum", mode, "GLint", first, "GLsizei", count, "GLsizei", instanceCount)
-TRACE_GL_VOID(glDrawBuffers, (GLsizei n, const GLenum* bufs), (n, bufs), 2, "GLsizei", n, "const GLenum*", bufs)
-TRACE_GL_VOID(glDrawBuffersNV, (GLsizei n, const GLenum *bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs)
-TRACE_GL_VOID(glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices), (mode, count, type, indices), 4, "GLenum", mode, "GLsizei", count, "GLenum", type, "const GLvoid *", indices)
-TRACE_GL_VOID(glDrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount), (mode, count, type, indices, instanceCount), 5, "GLenum", mode, "GLsizei", count, "GLenum", type, "const GLvoid*", indices, "GLsizei", instanceCount)
-TRACE_GL_VOID(glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices), (mode, start, end, count, type, indices), 6, "GLenum", mode, "GLuint", start, "GLuint", end, "GLsizei", count, "GLenum", type, "const GLvoid*", indices)
+TRACE_GL_VOID(glDrawArraysIndirect, (GLenum mode, const void * indirect), (mode, indirect), 2, "GLenum", mode, "const void *", indirect)
+TRACE_GL_VOID(glDrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount), (mode, first, count, instancecount), 4, "GLenum", mode, "GLint", first, "GLsizei", count, "GLsizei", instancecount)
+TRACE_GL_VOID(glDrawArraysInstancedANGLE, (GLenum mode, GLint first, GLsizei count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint", first, "GLsizei", count, "GLsizei", primcount)
+TRACE_GL_VOID(glDrawArraysInstancedEXT, (GLenum mode, GLint start, GLsizei count, GLsizei primcount), (mode, start, count, primcount), 4, "GLenum", mode, "GLint", start, "GLsizei", count, "GLsizei", primcount)
+TRACE_GL_VOID(glDrawArraysInstancedNV, (GLenum mode, GLint first, GLsizei count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint", first, "GLsizei", count, "GLsizei", primcount)
+TRACE_GL_VOID(glDrawBuffers, (GLsizei n, const GLenum * bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs)
+TRACE_GL_VOID(glDrawBuffersEXT, (GLsizei n, const GLenum * bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs)
+TRACE_GL_VOID(glDrawBuffersIndexedEXT, (GLint n, const GLenum * location, const GLint * indices), (n, location, indices), 3, "GLint", n, "const GLenum *", location, "const GLint *", indices)
+TRACE_GL_VOID(glDrawBuffersNV, (GLsizei n, const GLenum * bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs)
+TRACE_GL_VOID(glDrawElements, (GLenum mode, GLsizei count, GLenum type, const void * indices), (mode, count, type, indices), 4, "GLenum", mode, "GLsizei", count, "GLenum", type, "const void *", indices)
+TRACE_GL_VOID(glDrawElementsIndirect, (GLenum mode, GLenum type, const void * indirect), (mode, type, indirect), 3, "GLenum", mode, "GLenum", type, "const void *", indirect)
+TRACE_GL_VOID(glDrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount), (mode, count, type, indices, instancecount), 5, "GLenum", mode, "GLsizei", count, "GLenum", type, "const void *", indices, "GLsizei", instancecount)
+TRACE_GL_VOID(glDrawElementsInstancedANGLE, (GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "GLsizei", count, "GLenum", type, "const void *", indices, "GLsizei", primcount)
+TRACE_GL_VOID(glDrawElementsInstancedEXT, (GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "GLsizei", count, "GLenum", type, "const void *", indices, "GLsizei", primcount)
+TRACE_GL_VOID(glDrawElementsInstancedNV, (GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "GLsizei", count, "GLenum", type, "const void *", indices, "GLsizei", primcount)
+TRACE_GL_VOID(glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices), (mode, start, end, count, type, indices), 6, "GLenum", mode, "GLuint", start, "GLuint", end, "GLsizei", count, "GLenum", type, "const void *", indices)
 TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height)
-TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords)
+TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat * coords), (coords), 1, "const GLfloat *", coords)
 TRACE_GL_VOID(glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height), (x, y, z, width, height), 5, "GLint", x, "GLint", y, "GLint", z, "GLint", width, "GLint", height)
-TRACE_GL_VOID(glDrawTexivOES, (const GLint *coords), (coords), 1, "const GLint *", coords)
+TRACE_GL_VOID(glDrawTexivOES, (const GLint * coords), (coords), 1, "const GLint *", coords)
 TRACE_GL_VOID(glDrawTexsOES, (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height), (x, y, z, width, height), 5, "GLshort", x, "GLshort", y, "GLshort", z, "GLshort", width, "GLshort", height)
-TRACE_GL_VOID(glDrawTexsvOES, (const GLshort *coords), (coords), 1, "const GLshort *", coords)
+TRACE_GL_VOID(glDrawTexsvOES, (const GLshort * coords), (coords), 1, "const GLshort *", coords)
 TRACE_GL_VOID(glDrawTexxOES, (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height), (x, y, z, width, height), 5, "GLfixed", x, "GLfixed", y, "GLfixed", z, "GLfixed", width, "GLfixed", height)
-TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed *coords), (coords), 1, "const GLfixed *", coords)
+TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed * coords), (coords), 1, "const GLfixed *", coords)
 TRACE_GL_VOID(glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
 TRACE_GL_VOID(glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image)
 TRACE_GL_VOID(glEnable, (GLenum cap), (cap), 1, "GLenum", cap)
 TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array)
 TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
 TRACE_GL_VOID(glEnableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index)
+TRACE_GL_VOID(glEnableiEXT, (GLenum target, GLuint index), (target, index), 2, "GLenum", target, "GLuint", index)
 TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
+TRACE_GL_VOID(glEndPerfQueryINTEL, (GLuint queryHandle), (queryHandle), 1, "GLuint", queryHandle)
 TRACE_GL_VOID(glEndQuery, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL_VOID(glEndQueryEXT, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask)
 TRACE_GL_VOID(glEndTransformFeedback, (void), (), 0)
-TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params)
-TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers)
-TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers)
-TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar *source, GLint *length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length)
-TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint *programs, GLint maxPrograms, GLint *numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms)
-TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers)
-TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint *shaders, GLint maxShaders, GLint *numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders)
-TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "GLvoid *", texels)
-TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint *textures, GLint maxTextures, GLint *numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures)
+TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, void ** params), (target, params), 2, "GLenum", target, "void **", params)
+TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint * buffers, GLint maxBuffers, GLint * numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers)
+TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers)
+TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar * source, GLint * length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length)
+TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint * programs, GLint maxPrograms, GLint * numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms)
+TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers)
+TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint * shaders, GLint maxShaders, GLint * numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders)
+TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "void *", texels)
+TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint * textures, GLint maxTextures, GLint * numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures)
 TRACE_GL(GLboolean, glExtIsProgramBinaryQCOM, (GLuint program), (program), 1, "GLuint", program)
 TRACE_GL_VOID(glExtTexObjectStateOverrideiQCOM, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
 TRACE_GL(GLsync, glFenceSync, (GLenum condition, GLbitfield flags), (condition, flags), 2, "GLenum", condition, "GLbitfield", flags)
+TRACE_GL(GLsync, glFenceSyncAPPLE, (GLenum condition, GLbitfield flags), (condition, flags), 2, "GLenum", condition, "GLbitfield", flags)
 TRACE_GL_VOID(glFinish, (void), (), 0)
 TRACE_GL_VOID(glFinishFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
 TRACE_GL_VOID(glFlush, (void), (), 0)
 TRACE_GL_VOID(glFlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length), (target, offset, length), 3, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length)
+TRACE_GL_VOID(glFlushMappedBufferRangeEXT, (GLenum target, GLintptr offset, GLsizeiptr length), (target, offset, length), 3, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length)
 TRACE_GL_VOID(glFogf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat * params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glFogx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glFogxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed * param), (pname, param), 2, "GLenum", pname, "const GLfixed *", param)
+TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed * param), (pname, param), 2, "GLenum", pname, "const GLfixed *", param)
+TRACE_GL_VOID(glFramebufferParameteri, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
 TRACE_GL_VOID(glFramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
 TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
 TRACE_GL_VOID(glFramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
@@ -169,131 +213,168 @@
 TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
 TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
 TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset)
+TRACE_GL_VOID(glFramebufferTextureEXT, (GLenum target, GLenum attachment, GLuint texture, GLint level), (target, attachment, texture, level), 4, "GLenum", target, "GLenum", attachment, "GLuint", texture, "GLint", level)
 TRACE_GL_VOID(glFramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer), (target, attachment, texture, level, layer), 5, "GLenum", target, "GLenum", attachment, "GLuint", texture, "GLint", level, "GLint", layer)
 TRACE_GL_VOID(glFrontFace, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumfOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glFrustumxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glGenBuffers, (GLsizei n, GLuint *buffers), (n, buffers), 2, "GLsizei", n, "GLuint *", buffers)
-TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences)
-TRACE_GL_VOID(glGenFramebuffers, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
-TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
-TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
-TRACE_GL_VOID(glGenProgramPipelinesEXT, (GLsizei n, GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "GLuint *", pipelines)
-TRACE_GL_VOID(glGenQueries, (GLsizei n, GLuint* ids), (n, ids), 2, "GLsizei", n, "GLuint*", ids)
-TRACE_GL_VOID(glGenQueriesEXT, (GLsizei n, GLuint *ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids)
-TRACE_GL_VOID(glGenRenderbuffers, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
-TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
-TRACE_GL_VOID(glGenSamplers, (GLsizei count, GLuint* samplers), (count, samplers), 2, "GLsizei", count, "GLuint*", samplers)
-TRACE_GL_VOID(glGenTextures, (GLsizei n, GLuint *textures), (n, textures), 2, "GLsizei", n, "GLuint *", textures)
-TRACE_GL_VOID(glGenTransformFeedbacks, (GLsizei n, GLuint* ids), (n, ids), 2, "GLsizei", n, "GLuint*", ids)
-TRACE_GL_VOID(glGenVertexArrays, (GLsizei n, GLuint* arrays), (n, arrays), 2, "GLsizei", n, "GLuint*", arrays)
-TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint *arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays)
+TRACE_GL_VOID(glFrustumf, (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f), (l, r, b, t, n, f), 6, "GLfloat", l, "GLfloat", r, "GLfloat", b, "GLfloat", t, "GLfloat", n, "GLfloat", f)
+TRACE_GL_VOID(glFrustumfOES, (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f), (l, r, b, t, n, f), 6, "GLfloat", l, "GLfloat", r, "GLfloat", b, "GLfloat", t, "GLfloat", n, "GLfloat", f)
+TRACE_GL_VOID(glFrustumx, (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f), (l, r, b, t, n, f), 6, "GLfixed", l, "GLfixed", r, "GLfixed", b, "GLfixed", t, "GLfixed", n, "GLfixed", f)
+TRACE_GL_VOID(glFrustumxOES, (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f), (l, r, b, t, n, f), 6, "GLfixed", l, "GLfixed", r, "GLfixed", b, "GLfixed", t, "GLfixed", n, "GLfixed", f)
+TRACE_GL_VOID(glGenBuffers, (GLsizei n, GLuint * buffers), (n, buffers), 2, "GLsizei", n, "GLuint *", buffers)
+TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint * fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences)
+TRACE_GL_VOID(glGenFramebuffers, (GLsizei n, GLuint * framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint *", framebuffers)
+TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint * framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint *", framebuffers)
+TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint * monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
+TRACE_GL_VOID(glGenProgramPipelines, (GLsizei n, GLuint * pipelines), (n, pipelines), 2, "GLsizei", n, "GLuint *", pipelines)
+TRACE_GL_VOID(glGenProgramPipelinesEXT, (GLsizei n, GLuint * pipelines), (n, pipelines), 2, "GLsizei", n, "GLuint *", pipelines)
+TRACE_GL_VOID(glGenQueries, (GLsizei n, GLuint * ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids)
+TRACE_GL_VOID(glGenQueriesEXT, (GLsizei n, GLuint * ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids)
+TRACE_GL_VOID(glGenRenderbuffers, (GLsizei n, GLuint * renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint *", renderbuffers)
+TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint * renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint *", renderbuffers)
+TRACE_GL_VOID(glGenSamplers, (GLsizei count, GLuint * samplers), (count, samplers), 2, "GLsizei", count, "GLuint *", samplers)
+TRACE_GL_VOID(glGenTextures, (GLsizei n, GLuint * textures), (n, textures), 2, "GLsizei", n, "GLuint *", textures)
+TRACE_GL_VOID(glGenTransformFeedbacks, (GLsizei n, GLuint * ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids)
+TRACE_GL_VOID(glGenVertexArrays, (GLsizei n, GLuint * arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays)
+TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint * arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays)
 TRACE_GL_VOID(glGenerateMipmap, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL_VOID(glGenerateMipmapOES, (GLenum target), (target), 1, "GLenum", target)
-TRACE_GL_VOID(glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name), (program, index, bufsize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufsize, "GLsizei*", length, "GLint*", size, "GLenum*", type, "GLchar*", name)
-TRACE_GL_VOID(glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name), (program, index, bufsize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufsize, "GLsizei*", length, "GLint*", size, "GLenum*", type, "GLchar*", name)
-TRACE_GL_VOID(glGetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName), (program, uniformBlockIndex, bufSize, length, uniformBlockName), 5, "GLuint", program, "GLuint", uniformBlockIndex, "GLsizei", bufSize, "GLsizei*", length, "GLchar*", uniformBlockName)
-TRACE_GL_VOID(glGetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params), (program, uniformBlockIndex, pname, params), 4, "GLuint", program, "GLuint", uniformBlockIndex, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params), (program, uniformCount, uniformIndices, pname, params), 5, "GLuint", program, "GLsizei", uniformCount, "const GLuint*", uniformIndices, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetAttachedShaders, (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders), (program, maxcount, count, shaders), 4, "GLuint", program, "GLsizei", maxcount, "GLsizei*", count, "GLuint*", shaders)
-TRACE_GL(GLint, glGetAttribLocation, (GLuint program, const GLchar* name), (program, name), 2, "GLuint", program, "const GLchar*", name)
-TRACE_GL_VOID(glGetBooleanv, (GLenum pname, GLboolean *params), (pname, params), 2, "GLenum", pname, "GLboolean *", params)
-TRACE_GL_VOID(glGetBufferParameteri64v, (GLenum target, GLenum pname, GLint64* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint64*", params)
-TRACE_GL_VOID(glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetBufferPointerv, (GLenum target, GLenum pname, GLvoid** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid**", params)
-TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetClipPlanef, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn)
-TRACE_GL_VOID(glGetClipPlanex, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn)
-TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString)
-TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint *num, GLsizei size, GLuint *driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls)
+TRACE_GL_VOID(glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name), (program, index, bufSize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufSize, "GLsizei *", length, "GLint *", size, "GLenum *", type, "GLchar *", name)
+TRACE_GL_VOID(glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name), (program, index, bufSize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufSize, "GLsizei *", length, "GLint *", size, "GLenum *", type, "GLchar *", name)
+TRACE_GL_VOID(glGetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName), (program, uniformBlockIndex, bufSize, length, uniformBlockName), 5, "GLuint", program, "GLuint", uniformBlockIndex, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", uniformBlockName)
+TRACE_GL_VOID(glGetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params), (program, uniformBlockIndex, pname, params), 4, "GLuint", program, "GLuint", uniformBlockIndex, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params), (program, uniformCount, uniformIndices, pname, params), 5, "GLuint", program, "GLsizei", uniformCount, "const GLuint *", uniformIndices, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetAttachedShaders, (GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders), (program, maxCount, count, shaders), 4, "GLuint", program, "GLsizei", maxCount, "GLsizei *", count, "GLuint *", shaders)
+TRACE_GL(GLint, glGetAttribLocation, (GLuint program, const GLchar * name), (program, name), 2, "GLuint", program, "const GLchar *", name)
+TRACE_GL_VOID(glGetBooleani_v, (GLenum target, GLuint index, GLboolean * data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLboolean *", data)
+TRACE_GL_VOID(glGetBooleanv, (GLenum pname, GLboolean * data), (pname, data), 2, "GLenum", pname, "GLboolean *", data)
+TRACE_GL_VOID(glGetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint64 *", params)
+TRACE_GL_VOID(glGetBufferParameteriv, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetBufferPointerv, (GLenum target, GLenum pname, void ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "void **", params)
+TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, void ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "void **", params)
+TRACE_GL_VOID(glGetClipPlanef, (GLenum plane, GLfloat * equation), (plane, equation), 2, "GLenum", plane, "GLfloat *", equation)
+TRACE_GL_VOID(glGetClipPlanefOES, (GLenum plane, GLfloat * equation), (plane, equation), 2, "GLenum", plane, "GLfloat *", equation)
+TRACE_GL_VOID(glGetClipPlanex, (GLenum plane, GLfixed * equation), (plane, equation), 2, "GLenum", plane, "GLfixed *", equation)
+TRACE_GL_VOID(glGetClipPlanexOES, (GLenum plane, GLfixed * equation), (plane, equation), 2, "GLenum", plane, "GLfixed *", equation)
+TRACE_GL(GLuint, glGetDebugMessageLogKHR, (GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog), (count, bufSize, sources, types, ids, severities, lengths, messageLog), 8, "GLuint", count, "GLsizei", bufSize, "GLenum *", sources, "GLenum *", types, "GLuint *", ids, "GLenum *", severities, "GLsizei *", lengths, "GLchar *", messageLog)
+TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString)
+TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint * num, GLsizei size, GLuint * driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls)
 TRACE_GL(GLenum, glGetError, (void), (), 0)
-TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetFloatv, (GLenum pname, GLfloat *params), (pname, params), 2, "GLenum", pname, "GLfloat *", params)
-TRACE_GL(GLint, glGetFragDataLocation, (GLuint program, const GLchar *name), (program, name), 2, "GLuint", program, "const GLchar *", name)
-TRACE_GL_VOID(glGetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
+TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint * params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetFirstPerfQueryIdINTEL, (GLuint * queryId), (queryId), 1, "GLuint *", queryId)
+TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed * params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed * params), (pname, params), 2, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetFloatv, (GLenum pname, GLfloat * data), (pname, data), 2, "GLenum", pname, "GLfloat *", data)
+TRACE_GL(GLint, glGetFragDataLocation, (GLuint program, const GLchar * name), (program, name), 2, "GLuint", program, "const GLchar *", name)
+TRACE_GL_VOID(glGetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint * params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint * params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetFramebufferParameteriv, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
 TRACE_GL(GLenum, glGetGraphicsResetStatusEXT, (void), (), 0)
-TRACE_GL_VOID(glGetInteger64i_v, (GLenum target, GLuint index, GLint64* data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint64*", data)
-TRACE_GL_VOID(glGetInteger64v, (GLenum pname, GLint64* params), (pname, params), 2, "GLenum", pname, "GLint64*", params)
-TRACE_GL_VOID(glGetIntegeri_v, (GLenum target, GLuint index, GLint* data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint*", data)
-TRACE_GL_VOID(glGetIntegerv, (GLenum pname, GLint *params), (pname, params), 2, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params), (target, internalformat, pname, bufSize, params), 5, "GLenum", target, "GLenum", internalformat, "GLenum", pname, "GLsizei", bufSize, "GLint*", params)
-TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetObjectLabelEXT, (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label), (type, object, bufSize, length, label), 5, "GLenum", type, "GLuint", object, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", label)
-TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten)
-TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data)
-TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString)
-TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters)
-TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString)
-TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize, GLuint *groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups)
-TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params)
-TRACE_GL_VOID(glGetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei*", length, "GLenum*", binaryFormat, "GLvoid*", binary)
-TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary)
-TRACE_GL_VOID(glGetProgramInfoLog, (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog), (program, bufsize, length, infolog), 4, "GLuint", program, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog)
-TRACE_GL_VOID(glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog), (pipeline, bufSize, length, infoLog), 4, "GLuint", pipeline, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
-TRACE_GL_VOID(glGetProgramPipelineivEXT, (GLuint pipeline, GLenum pname, GLint *params), (pipeline, pname, params), 3, "GLuint", pipeline, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetProgramiv, (GLuint program, GLenum pname, GLint* params), (program, pname, params), 3, "GLuint", program, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetQueryObjectuiv, (GLuint id, GLenum pname, GLuint* params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint*", params)
-TRACE_GL_VOID(glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint *params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint *", params)
-TRACE_GL_VOID(glGetQueryiv, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetQueryivEXT, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat* params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLfloat*", params)
-TRACE_GL_VOID(glGetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint* params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetShaderInfoLog, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog), (shader, bufsize, length, infolog), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog)
-TRACE_GL_VOID(glGetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision), (shadertype, precisiontype, range, precision), 4, "GLenum", shadertype, "GLenum", precisiontype, "GLint*", range, "GLint*", precision)
-TRACE_GL_VOID(glGetShaderSource, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source), (shader, bufsize, length, source), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", source)
-TRACE_GL_VOID(glGetShaderiv, (GLuint shader, GLenum pname, GLint* params), (shader, pname, params), 3, "GLuint", shader, "GLenum", pname, "GLint*", params)
+TRACE_GL_VOID(glGetInteger64i_v, (GLenum target, GLuint index, GLint64 * data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint64 *", data)
+TRACE_GL_VOID(glGetInteger64v, (GLenum pname, GLint64 * data), (pname, data), 2, "GLenum", pname, "GLint64 *", data)
+TRACE_GL_VOID(glGetInteger64vAPPLE, (GLenum pname, GLint64 * params), (pname, params), 2, "GLenum", pname, "GLint64 *", params)
+TRACE_GL_VOID(glGetIntegeri_v, (GLenum target, GLuint index, GLint * data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint *", data)
+TRACE_GL_VOID(glGetIntegeri_vEXT, (GLenum target, GLuint index, GLint * data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint *", data)
+TRACE_GL_VOID(glGetIntegerv, (GLenum pname, GLint * data), (pname, data), 2, "GLenum", pname, "GLint *", data)
+TRACE_GL_VOID(glGetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params), (target, internalformat, pname, bufSize, params), 5, "GLenum", target, "GLenum", internalformat, "GLenum", pname, "GLsizei", bufSize, "GLint *", params)
+TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat * params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed * params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed * params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat * params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed * params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed * params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetMultisamplefv, (GLenum pname, GLuint index, GLfloat * val), (pname, index, val), 3, "GLenum", pname, "GLuint", index, "GLfloat *", val)
+TRACE_GL_VOID(glGetNextPerfQueryIdINTEL, (GLuint queryId, GLuint * nextQueryId), (queryId, nextQueryId), 2, "GLuint", queryId, "GLuint *", nextQueryId)
+TRACE_GL_VOID(glGetObjectLabelEXT, (GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label), (type, object, bufSize, length, label), 5, "GLenum", type, "GLuint", object, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", label)
+TRACE_GL_VOID(glGetObjectLabelKHR, (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label), (identifier, name, bufSize, length, label), 5, "GLenum", identifier, "GLuint", name, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", label)
+TRACE_GL_VOID(glGetObjectPtrLabelKHR, (const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label), (ptr, bufSize, length, label), 4, "const void *", ptr, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", label)
+TRACE_GL_VOID(glGetPerfCounterInfoINTEL, (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue), (queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue), 11, "GLuint", queryId, "GLuint", counterId, "GLuint", counterNameLength, "GLchar *", counterName, "GLuint", counterDescLength, "GLchar *", counterDesc, "GLuint *", counterOffset, "GLuint *", counterDataSize, "GLuint *", counterTypeEnum, "GLuint *", counterDataTypeEnum, "GLuint64 *", rawCounterMaxValue)
+TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten)
+TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, void * data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "void *", data)
+TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString)
+TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters)
+TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString)
+TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint * numGroups, GLsizei groupsSize, GLuint * groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups)
+TRACE_GL_VOID(glGetPerfQueryDataINTEL, (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid * data, GLuint * bytesWritten), (queryHandle, flags, dataSize, data, bytesWritten), 5, "GLuint", queryHandle, "GLuint", flags, "GLsizei", dataSize, "GLvoid *", data, "GLuint *", bytesWritten)
+TRACE_GL_VOID(glGetPerfQueryIdByNameINTEL, (GLchar * queryName, GLuint * queryId), (queryName, queryId), 2, "GLchar *", queryName, "GLuint *", queryId)
+TRACE_GL_VOID(glGetPerfQueryInfoINTEL, (GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask), (queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask), 7, "GLuint", queryId, "GLuint", queryNameLength, "GLchar *", queryName, "GLuint *", dataSize, "GLuint *", noCounters, "GLuint *", noInstances, "GLuint *", capsMask)
+TRACE_GL_VOID(glGetPointerv, (GLenum pname, void ** params), (pname, params), 2, "GLenum", pname, "void **", params)
+TRACE_GL_VOID(glGetPointervKHR, (GLenum pname, void ** params), (pname, params), 2, "GLenum", pname, "void **", params)
+TRACE_GL_VOID(glGetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "void *", binary)
+TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "void *", binary)
+TRACE_GL_VOID(glGetProgramInfoLog, (GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog), (program, bufSize, length, infoLog), 4, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
+TRACE_GL_VOID(glGetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint * params), (program, programInterface, pname, params), 4, "GLuint", program, "GLenum", programInterface, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog), (pipeline, bufSize, length, infoLog), 4, "GLuint", pipeline, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
+TRACE_GL_VOID(glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog), (pipeline, bufSize, length, infoLog), 4, "GLuint", pipeline, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
+TRACE_GL_VOID(glGetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint * params), (pipeline, pname, params), 3, "GLuint", pipeline, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetProgramPipelineivEXT, (GLuint pipeline, GLenum pname, GLint * params), (pipeline, pname, params), 3, "GLuint", pipeline, "GLenum", pname, "GLint *", params)
+TRACE_GL(GLuint, glGetProgramResourceIndex, (GLuint program, GLenum programInterface, const GLchar * name), (program, programInterface, name), 3, "GLuint", program, "GLenum", programInterface, "const GLchar *", name)
+TRACE_GL(GLint, glGetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar * name), (program, programInterface, name), 3, "GLuint", program, "GLenum", programInterface, "const GLchar *", name)
+TRACE_GL_VOID(glGetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name), (program, programInterface, index, bufSize, length, name), 6, "GLuint", program, "GLenum", programInterface, "GLuint", index, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", name)
+TRACE_GL_VOID(glGetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params), (program, programInterface, index, propCount, props, bufSize, length, params), 8, "GLuint", program, "GLenum", programInterface, "GLuint", index, "GLsizei", propCount, "const GLenum *", props, "GLsizei", bufSize, "GLsizei *", length, "GLint *", params)
+TRACE_GL_VOID(glGetProgramiv, (GLuint program, GLenum pname, GLint * params), (program, pname, params), 3, "GLuint", program, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetQueryObjecti64vEXT, (GLuint id, GLenum pname, GLint64 * params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLint64 *", params)
+TRACE_GL_VOID(glGetQueryObjectivEXT, (GLuint id, GLenum pname, GLint * params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetQueryObjectui64vEXT, (GLuint id, GLenum pname, GLuint64 * params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint64 *", params)
+TRACE_GL_VOID(glGetQueryObjectuiv, (GLuint id, GLenum pname, GLuint * params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint *", params)
+TRACE_GL_VOID(glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint * params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint *", params)
+TRACE_GL_VOID(glGetQueryiv, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetQueryivEXT, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetSamplerParameterIivEXT, (GLuint sampler, GLenum pname, GLint * params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetSamplerParameterIuivEXT, (GLuint sampler, GLenum pname, GLuint * params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLuint *", params)
+TRACE_GL_VOID(glGetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat * params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint * params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetShaderInfoLog, (GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog), (shader, bufSize, length, infoLog), 4, "GLuint", shader, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
+TRACE_GL_VOID(glGetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision), (shadertype, precisiontype, range, precision), 4, "GLenum", shadertype, "GLenum", precisiontype, "GLint *", range, "GLint *", precision)
+TRACE_GL_VOID(glGetShaderSource, (GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source), (shader, bufSize, length, source), 4, "GLuint", shader, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", source)
+TRACE_GL_VOID(glGetShaderiv, (GLuint shader, GLenum pname, GLint * params), (shader, pname, params), 3, "GLuint", shader, "GLenum", pname, "GLint *", params)
 TRACE_GL(const GLubyte *, glGetString, (GLenum name), (name), 1, "GLenum", name)
-TRACE_GL(const GLubyte*, glGetStringi, (GLenum name, GLuint index), (name, index), 2, "GLenum", name, "GLuint", index)
-TRACE_GL_VOID(glGetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values), (sync, pname, bufSize, length, values), 5, "GLsync", sync, "GLenum", pname, "GLsizei", bufSize, "GLsizei*", length, "GLint*", values)
-TRACE_GL_VOID(glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexEnviv, (GLenum env, GLenum pname, GLint *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfloat *", params)
-TRACE_GL_VOID(glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
-TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
-TRACE_GL_VOID(glGetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name), (program, index, bufSize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufSize, "GLsizei*", length, "GLsizei*", size, "GLenum*", type, "GLchar*", name)
-TRACE_GL(GLuint, glGetUniformBlockIndex, (GLuint program, const GLchar* uniformBlockName), (program, uniformBlockName), 2, "GLuint", program, "const GLchar*", uniformBlockName)
-TRACE_GL_VOID(glGetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices), (program, uniformCount, uniformNames, uniformIndices), 4, "GLuint", program, "GLsizei", uniformCount, "const GLchar* const*", uniformNames, "GLuint*", uniformIndices)
-TRACE_GL(GLint, glGetUniformLocation, (GLuint program, const GLchar* name), (program, name), 2, "GLuint", program, "const GLchar*", name)
-TRACE_GL_VOID(glGetUniformfv, (GLuint program, GLint location, GLfloat* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLfloat*", params)
-TRACE_GL_VOID(glGetUniformiv, (GLuint program, GLint location, GLint* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLint*", params)
-TRACE_GL_VOID(glGetUniformuiv, (GLuint program, GLint location, GLuint* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLuint*", params)
-TRACE_GL_VOID(glGetVertexAttribIiv, (GLuint index, GLenum pname, GLint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLuint*", params)
-TRACE_GL_VOID(glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid** pointer), (index, pname, pointer), 3, "GLuint", index, "GLenum", pname, "GLvoid**", pointer)
-TRACE_GL_VOID(glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLfloat*", params)
-TRACE_GL_VOID(glGetVertexAttribiv, (GLuint index, GLenum pname, GLint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint*", params)
-TRACE_GL_VOID(glGetnUniformfvEXT, (GLuint program, GLint location, GLsizei bufSize, float *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "float *", params)
-TRACE_GL_VOID(glGetnUniformivEXT, (GLuint program, GLint location, GLsizei bufSize, GLint *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "GLint *", params)
+TRACE_GL(const GLubyte *, glGetStringi, (GLenum name, GLuint index), (name, index), 2, "GLenum", name, "GLuint", index)
+TRACE_GL_VOID(glGetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values), (sync, pname, bufSize, length, values), 5, "GLsync", sync, "GLenum", pname, "GLsizei", bufSize, "GLsizei *", length, "GLint *", values)
+TRACE_GL_VOID(glGetSyncivAPPLE, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values), (sync, pname, bufSize, length, values), 5, "GLsync", sync, "GLenum", pname, "GLsizei", bufSize, "GLsizei *", length, "GLint *", values)
+TRACE_GL_VOID(glGetTexEnvfv, (GLenum target, GLenum pname, GLfloat * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetTexEnviv, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetTexEnvxv, (GLenum target, GLenum pname, GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum target, GLenum pname, GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat * params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint * params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed * params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat * params), (target, level, pname, params), 4, "GLenum", target, "GLint", level, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint * params), (target, level, pname, params), 4, "GLenum", target, "GLint", level, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetTexParameterIivEXT, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetTexParameterIuivEXT, (GLenum target, GLenum pname, GLuint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLuint *", params)
+TRACE_GL_VOID(glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetTexParameteriv, (GLenum target, GLenum pname, GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name), (program, index, bufSize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufSize, "GLsizei *", length, "GLsizei *", size, "GLenum *", type, "GLchar *", name)
+TRACE_GL_VOID(glGetTranslatedShaderSourceANGLE, (GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source), (shader, bufsize, length, source), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei *", length, "GLchar *", source)
+TRACE_GL(GLuint, glGetUniformBlockIndex, (GLuint program, const GLchar * uniformBlockName), (program, uniformBlockName), 2, "GLuint", program, "const GLchar *", uniformBlockName)
+TRACE_GL_VOID(glGetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices), (program, uniformCount, uniformNames, uniformIndices), 4, "GLuint", program, "GLsizei", uniformCount, "const GLchar *const*", uniformNames, "GLuint *", uniformIndices)
+TRACE_GL(GLint, glGetUniformLocation, (GLuint program, const GLchar * name), (program, name), 2, "GLuint", program, "const GLchar *", name)
+TRACE_GL_VOID(glGetUniformfv, (GLuint program, GLint location, GLfloat * params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLfloat *", params)
+TRACE_GL_VOID(glGetUniformiv, (GLuint program, GLint location, GLint * params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLint *", params)
+TRACE_GL_VOID(glGetUniformuiv, (GLuint program, GLint location, GLuint * params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLuint *", params)
+TRACE_GL_VOID(glGetVertexAttribIiv, (GLuint index, GLenum pname, GLint * params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint * params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLuint *", params)
+TRACE_GL_VOID(glGetVertexAttribPointerv, (GLuint index, GLenum pname, void ** pointer), (index, pname, pointer), 3, "GLuint", index, "GLenum", pname, "void **", pointer)
+TRACE_GL_VOID(glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat * params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLfloat *", params)
+TRACE_GL_VOID(glGetVertexAttribiv, (GLuint index, GLenum pname, GLint * params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint *", params)
+TRACE_GL_VOID(glGetnUniformfvEXT, (GLuint program, GLint location, GLsizei bufSize, GLfloat * params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "GLfloat *", params)
+TRACE_GL_VOID(glGetnUniformivEXT, (GLuint program, GLint location, GLsizei bufSize, GLint * params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "GLint *", params)
 TRACE_GL_VOID(glHint, (GLenum target, GLenum mode), (target, mode), 2, "GLenum", target, "GLenum", mode)
-TRACE_GL_VOID(glInsertEventMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
-TRACE_GL_VOID(glInvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum* attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum*", attachments)
-TRACE_GL_VOID(glInvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height), (target, numAttachments, attachments, x, y, width, height), 7, "GLenum", target, "GLsizei", numAttachments, "const GLenum*", attachments, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glInsertEventMarkerEXT, (GLsizei length, const GLchar * marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
+TRACE_GL_VOID(glInvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum * attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
+TRACE_GL_VOID(glInvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height), (target, numAttachments, attachments, x, y, width, height), 7, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
 TRACE_GL(GLboolean, glIsBuffer, (GLuint buffer), (buffer), 1, "GLuint", buffer)
 TRACE_GL(GLboolean, glIsEnabled, (GLenum cap), (cap), 1, "GLenum", cap)
+TRACE_GL(GLboolean, glIsEnablediEXT, (GLenum target, GLuint index), (target, index), 2, "GLenum", target, "GLuint", index)
 TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
 TRACE_GL(GLboolean, glIsFramebuffer, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
 TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
 TRACE_GL(GLboolean, glIsProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL(GLboolean, glIsProgramPipeline, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
 TRACE_GL(GLboolean, glIsProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
 TRACE_GL(GLboolean, glIsQuery, (GLuint id), (id), 1, "GLuint", id)
 TRACE_GL(GLboolean, glIsQueryEXT, (GLuint id), (id), 1, "GLuint", id)
@@ -302,106 +383,174 @@
 TRACE_GL(GLboolean, glIsSampler, (GLuint sampler), (sampler), 1, "GLuint", sampler)
 TRACE_GL(GLboolean, glIsShader, (GLuint shader), (shader), 1, "GLuint", shader)
 TRACE_GL(GLboolean, glIsSync, (GLsync sync), (sync), 1, "GLsync", sync)
+TRACE_GL(GLboolean, glIsSyncAPPLE, (GLsync sync), (sync), 1, "GLsync", sync)
 TRACE_GL(GLboolean, glIsTexture, (GLuint texture), (texture), 1, "GLuint", texture)
 TRACE_GL(GLboolean, glIsTransformFeedback, (GLuint id), (id), 1, "GLuint", id)
 TRACE_GL(GLboolean, glIsVertexArray, (GLuint array), (array), 1, "GLuint", array)
 TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
-TRACE_GL_VOID(glLabelObjectEXT, (GLenum type, GLuint object, GLsizei length, const GLchar *label), (type, object, length, label), 4, "GLenum", type, "GLuint", object, "GLsizei", length, "const GLchar *", label)
+TRACE_GL_VOID(glLabelObjectEXT, (GLenum type, GLuint object, GLsizei length, const GLchar * label), (type, object, length, label), 4, "GLenum", type, "GLuint", object, "GLsizei", length, "const GLchar *", label)
 TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat * params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glLightModelxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed * param), (pname, param), 2, "GLenum", pname, "const GLfixed *", param)
+TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed * param), (pname, param), 2, "GLenum", pname, "const GLfixed *", param)
 TRACE_GL_VOID(glLightf, (GLenum light, GLenum pname, GLfloat param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat * params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glLightx, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glLightxOES, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed * params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed * params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params)
 TRACE_GL_VOID(glLineWidth, (GLfloat width), (width), 1, "GLfloat", width)
 TRACE_GL_VOID(glLineWidthx, (GLfixed width), (width), 1, "GLfixed", width)
 TRACE_GL_VOID(glLineWidthxOES, (GLfixed width), (width), 1, "GLfixed", width)
 TRACE_GL_VOID(glLinkProgram, (GLuint program), (program), 1, "GLuint", program)
 TRACE_GL_VOID(glLoadIdentity, (void), (), 0)
-TRACE_GL_VOID(glLoadMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glLoadMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
+TRACE_GL_VOID(glLoadMatrixf, (const GLfloat * m), (m), 1, "const GLfloat *", m)
+TRACE_GL_VOID(glLoadMatrixx, (const GLfixed * m), (m), 1, "const GLfixed *", m)
+TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed * m), (m), 1, "const GLfixed *", m)
 TRACE_GL_VOID(glLoadPaletteFromModelViewMatrixOES, (void), (), 0)
 TRACE_GL_VOID(glLogicOp, (GLenum opcode), (opcode), 1, "GLenum", opcode)
-TRACE_GL(void*, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access)
-TRACE_GL(GLvoid*, glMapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access), (target, offset, length, access), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length, "GLbitfield", access)
+TRACE_GL(void *, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access)
+TRACE_GL(void *, glMapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access), (target, offset, length, access), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length, "GLbitfield", access)
+TRACE_GL(void *, glMapBufferRangeEXT, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access), (target, offset, length, access), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length, "GLbitfield", access)
 TRACE_GL_VOID(glMaterialf, (GLenum face, GLenum pname, GLfloat param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat * params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glMaterialx, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glMaterialxOES, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
+TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed * param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", param)
+TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed * param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", param)
+TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const void * pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const void *", pointer)
 TRACE_GL_VOID(glMatrixMode, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glMultMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m)
-TRACE_GL_VOID(glMultMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m)
-TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint *", first, "GLsizei *", count, "GLsizei", primcount)
-TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const GLvoid* *", indices, "GLsizei", primcount)
+TRACE_GL_VOID(glMemoryBarrier, (GLbitfield barriers), (barriers), 1, "GLbitfield", barriers)
+TRACE_GL_VOID(glMemoryBarrierByRegion, (GLbitfield barriers), (barriers), 1, "GLbitfield", barriers)
+TRACE_GL_VOID(glMinSampleShadingOES, (GLfloat value), (value), 1, "GLfloat", value)
+TRACE_GL_VOID(glMultMatrixf, (const GLfloat * m), (m), 1, "const GLfloat *", m)
+TRACE_GL_VOID(glMultMatrixx, (const GLfixed * m), (m), 1, "const GLfixed *", m)
+TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed * m), (m), 1, "const GLfixed *", m)
+TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "const GLint *", first, "const GLsizei *", count, "GLsizei", primcount)
+TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const void *const*", indices, "GLsizei", primcount)
+TRACE_GL_VOID(glMultiTexCoord1bOES, (GLenum texture, GLbyte s), (texture, s), 2, "GLenum", texture, "GLbyte", s)
+TRACE_GL_VOID(glMultiTexCoord1bvOES, (GLenum texture, const GLbyte * coords), (texture, coords), 2, "GLenum", texture, "const GLbyte *", coords)
+TRACE_GL_VOID(glMultiTexCoord2bOES, (GLenum texture, GLbyte s, GLbyte t), (texture, s, t), 3, "GLenum", texture, "GLbyte", s, "GLbyte", t)
+TRACE_GL_VOID(glMultiTexCoord2bvOES, (GLenum texture, const GLbyte * coords), (texture, coords), 2, "GLenum", texture, "const GLbyte *", coords)
+TRACE_GL_VOID(glMultiTexCoord3bOES, (GLenum texture, GLbyte s, GLbyte t, GLbyte r), (texture, s, t, r), 4, "GLenum", texture, "GLbyte", s, "GLbyte", t, "GLbyte", r)
+TRACE_GL_VOID(glMultiTexCoord3bvOES, (GLenum texture, const GLbyte * coords), (texture, coords), 2, "GLenum", texture, "const GLbyte *", coords)
+TRACE_GL_VOID(glMultiTexCoord4bOES, (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q), (texture, s, t, r, q), 5, "GLenum", texture, "GLbyte", s, "GLbyte", t, "GLbyte", r, "GLbyte", q)
+TRACE_GL_VOID(glMultiTexCoord4bvOES, (GLenum texture, const GLbyte * coords), (texture, coords), 2, "GLenum", texture, "const GLbyte *", coords)
 TRACE_GL_VOID(glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q), (target, s, t, r, q), 5, "GLenum", target, "GLfloat", s, "GLfloat", t, "GLfloat", r, "GLfloat", q)
-TRACE_GL_VOID(glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
-TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
+TRACE_GL_VOID(glMultiTexCoord4x, (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (texture, s, t, r, q), 5, "GLenum", texture, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
+TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (texture, s, t, r, q), 5, "GLenum", texture, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q)
 TRACE_GL_VOID(glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz), (nx, ny, nz), 3, "GLfloat", nx, "GLfloat", ny, "GLfloat", nz)
 TRACE_GL_VOID(glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
 TRACE_GL_VOID(glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz)
-TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
-TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar)
-TRACE_GL_VOID(glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
-TRACE_GL_VOID(glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar)
+TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const void * pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const void *", pointer)
+TRACE_GL_VOID(glObjectLabelKHR, (GLenum identifier, GLuint name, GLsizei length, const GLchar * label), (identifier, name, length, label), 4, "GLenum", identifier, "GLuint", name, "GLsizei", length, "const GLchar *", label)
+TRACE_GL_VOID(glObjectPtrLabelKHR, (const void * ptr, GLsizei length, const GLchar * label), (ptr, length, label), 3, "const void *", ptr, "GLsizei", length, "const GLchar *", label)
+TRACE_GL_VOID(glOrthof, (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f), (l, r, b, t, n, f), 6, "GLfloat", l, "GLfloat", r, "GLfloat", b, "GLfloat", t, "GLfloat", n, "GLfloat", f)
+TRACE_GL_VOID(glOrthofOES, (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f), (l, r, b, t, n, f), 6, "GLfloat", l, "GLfloat", r, "GLfloat", b, "GLfloat", t, "GLfloat", n, "GLfloat", f)
+TRACE_GL_VOID(glOrthox, (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f), (l, r, b, t, n, f), 6, "GLfixed", l, "GLfixed", r, "GLfixed", b, "GLfixed", t, "GLfixed", n, "GLfixed", f)
+TRACE_GL_VOID(glOrthoxOES, (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f), (l, r, b, t, n, f), 6, "GLfixed", l, "GLfixed", r, "GLfixed", b, "GLfixed", t, "GLfixed", n, "GLfixed", f)
+TRACE_GL_VOID(glPatchParameteriEXT, (GLenum pname, GLint value), (pname, value), 2, "GLenum", pname, "GLint", value)
 TRACE_GL_VOID(glPauseTransformFeedback, (void), (), 0)
 TRACE_GL_VOID(glPixelStorei, (GLenum pname, GLint param), (pname, param), 2, "GLenum", pname, "GLint", param)
 TRACE_GL_VOID(glPointParameterf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat * params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glPointParameterx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glPointParameterxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed * params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed * params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params)
 TRACE_GL_VOID(glPointSize, (GLfloat size), (size), 1, "GLfloat", size)
-TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
+TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const void * pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const void *", pointer)
 TRACE_GL_VOID(glPointSizex, (GLfixed size), (size), 1, "GLfixed", size)
 TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size)
 TRACE_GL_VOID(glPolygonOffset, (GLfloat factor, GLfloat units), (factor, units), 2, "GLfloat", factor, "GLfloat", units)
 TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
 TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
+TRACE_GL_VOID(glPopDebugGroupKHR, (void), (), 0)
 TRACE_GL_VOID(glPopGroupMarkerEXT, (void), (), 0)
 TRACE_GL_VOID(glPopMatrix, (void), (), 0)
-TRACE_GL_VOID(glProgramBinary, (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid*", binary, "GLsizei", length)
-TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length)
+TRACE_GL_VOID(glPrimitiveBoundingBoxEXT, (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW), (minX, minY, minZ, minW, maxX, maxY, maxZ, maxW), 8, "GLfloat", minX, "GLfloat", minY, "GLfloat", minZ, "GLfloat", minW, "GLfloat", maxX, "GLfloat", maxY, "GLfloat", maxZ, "GLfloat", maxW)
+TRACE_GL_VOID(glProgramBinary, (GLuint program, GLenum binaryFormat, const void * binary, GLsizei length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const void *", binary, "GLsizei", length)
+TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const void * binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const void *", binary, "GLint", length)
 TRACE_GL_VOID(glProgramParameteri, (GLuint program, GLenum pname, GLint value), (program, pname, value), 3, "GLuint", program, "GLenum", pname, "GLint", value)
 TRACE_GL_VOID(glProgramParameteriEXT, (GLuint program, GLenum pname, GLint value), (program, pname, value), 3, "GLuint", program, "GLenum", pname, "GLint", value)
-TRACE_GL_VOID(glProgramUniform1fEXT, (GLuint program, GLint location, GLfloat x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLfloat", x)
-TRACE_GL_VOID(glProgramUniform1fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform1iEXT, (GLuint program, GLint location, GLint x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLint", x)
-TRACE_GL_VOID(glProgramUniform1ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniform2fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y), (program, location, x, y), 4, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y)
-TRACE_GL_VOID(glProgramUniform2fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform2iEXT, (GLuint program, GLint location, GLint x, GLint y), (program, location, x, y), 4, "GLuint", program, "GLint", location, "GLint", x, "GLint", y)
-TRACE_GL_VOID(glProgramUniform2ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniform3fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z), (program, location, x, y, z), 5, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glProgramUniform3fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform3iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z), (program, location, x, y, z), 5, "GLuint", program, "GLint", location, "GLint", x, "GLint", y, "GLint", z)
-TRACE_GL_VOID(glProgramUniform3ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniform4fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (program, location, x, y, z, w), 6, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
-TRACE_GL_VOID(glProgramUniform4fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniform4iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w), (program, location, x, y, z, w), 6, "GLuint", program, "GLint", location, "GLint", x, "GLint", y, "GLint", z, "GLint", w)
-TRACE_GL_VOID(glProgramUniform4ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
-TRACE_GL_VOID(glProgramUniformMatrix2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniformMatrix3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
-TRACE_GL_VOID(glProgramUniformMatrix4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
-TRACE_GL_VOID(glPushGroupMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
+TRACE_GL_VOID(glProgramUniform1f, (GLuint program, GLint location, GLfloat v0), (program, location, v0), 3, "GLuint", program, "GLint", location, "GLfloat", v0)
+TRACE_GL_VOID(glProgramUniform1fEXT, (GLuint program, GLint location, GLfloat v0), (program, location, v0), 3, "GLuint", program, "GLint", location, "GLfloat", v0)
+TRACE_GL_VOID(glProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform1fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform1i, (GLuint program, GLint location, GLint v0), (program, location, v0), 3, "GLuint", program, "GLint", location, "GLint", v0)
+TRACE_GL_VOID(glProgramUniform1iEXT, (GLuint program, GLint location, GLint v0), (program, location, v0), 3, "GLuint", program, "GLint", location, "GLint", v0)
+TRACE_GL_VOID(glProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform1ivEXT, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform1ui, (GLuint program, GLint location, GLuint v0), (program, location, v0), 3, "GLuint", program, "GLint", location, "GLuint", v0)
+TRACE_GL_VOID(glProgramUniform1uiEXT, (GLuint program, GLint location, GLuint v0), (program, location, v0), 3, "GLuint", program, "GLint", location, "GLuint", v0)
+TRACE_GL_VOID(glProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform1uivEXT, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform2f, (GLuint program, GLint location, GLfloat v0, GLfloat v1), (program, location, v0, v1), 4, "GLuint", program, "GLint", location, "GLfloat", v0, "GLfloat", v1)
+TRACE_GL_VOID(glProgramUniform2fEXT, (GLuint program, GLint location, GLfloat v0, GLfloat v1), (program, location, v0, v1), 4, "GLuint", program, "GLint", location, "GLfloat", v0, "GLfloat", v1)
+TRACE_GL_VOID(glProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform2fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform2i, (GLuint program, GLint location, GLint v0, GLint v1), (program, location, v0, v1), 4, "GLuint", program, "GLint", location, "GLint", v0, "GLint", v1)
+TRACE_GL_VOID(glProgramUniform2iEXT, (GLuint program, GLint location, GLint v0, GLint v1), (program, location, v0, v1), 4, "GLuint", program, "GLint", location, "GLint", v0, "GLint", v1)
+TRACE_GL_VOID(glProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform2ivEXT, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform2ui, (GLuint program, GLint location, GLuint v0, GLuint v1), (program, location, v0, v1), 4, "GLuint", program, "GLint", location, "GLuint", v0, "GLuint", v1)
+TRACE_GL_VOID(glProgramUniform2uiEXT, (GLuint program, GLint location, GLuint v0, GLuint v1), (program, location, v0, v1), 4, "GLuint", program, "GLint", location, "GLuint", v0, "GLuint", v1)
+TRACE_GL_VOID(glProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform2uivEXT, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform3f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2), (program, location, v0, v1, v2), 5, "GLuint", program, "GLint", location, "GLfloat", v0, "GLfloat", v1, "GLfloat", v2)
+TRACE_GL_VOID(glProgramUniform3fEXT, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2), (program, location, v0, v1, v2), 5, "GLuint", program, "GLint", location, "GLfloat", v0, "GLfloat", v1, "GLfloat", v2)
+TRACE_GL_VOID(glProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform3fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform3i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2), (program, location, v0, v1, v2), 5, "GLuint", program, "GLint", location, "GLint", v0, "GLint", v1, "GLint", v2)
+TRACE_GL_VOID(glProgramUniform3iEXT, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2), (program, location, v0, v1, v2), 5, "GLuint", program, "GLint", location, "GLint", v0, "GLint", v1, "GLint", v2)
+TRACE_GL_VOID(glProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform3ivEXT, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform3ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2), (program, location, v0, v1, v2), 5, "GLuint", program, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2)
+TRACE_GL_VOID(glProgramUniform3uiEXT, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2), (program, location, v0, v1, v2), 5, "GLuint", program, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2)
+TRACE_GL_VOID(glProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform3uivEXT, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform4f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3), (program, location, v0, v1, v2, v3), 6, "GLuint", program, "GLint", location, "GLfloat", v0, "GLfloat", v1, "GLfloat", v2, "GLfloat", v3)
+TRACE_GL_VOID(glProgramUniform4fEXT, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3), (program, location, v0, v1, v2, v3), 6, "GLuint", program, "GLint", location, "GLfloat", v0, "GLfloat", v1, "GLfloat", v2, "GLfloat", v3)
+TRACE_GL_VOID(glProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform4fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform4i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3), (program, location, v0, v1, v2, v3), 6, "GLuint", program, "GLint", location, "GLint", v0, "GLint", v1, "GLint", v2, "GLint", v3)
+TRACE_GL_VOID(glProgramUniform4iEXT, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3), (program, location, v0, v1, v2, v3), 6, "GLuint", program, "GLint", location, "GLint", v0, "GLint", v1, "GLint", v2, "GLint", v3)
+TRACE_GL_VOID(glProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform4ivEXT, (GLuint program, GLint location, GLsizei count, const GLint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform4ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3), (program, location, v0, v1, v2, v3), 6, "GLuint", program, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2, "GLuint", v3)
+TRACE_GL_VOID(glProgramUniform4uiEXT, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3), (program, location, v0, v1, v2, v3), 6, "GLuint", program, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2, "GLuint", v3)
+TRACE_GL_VOID(glProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniform4uivEXT, (GLuint program, GLint location, GLsizei count, const GLuint * value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2x3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2x4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3x2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3x4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4x2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4x3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glPushDebugGroupKHR, (GLenum source, GLuint id, GLsizei length, const GLchar * message), (source, id, length, message), 4, "GLenum", source, "GLuint", id, "GLsizei", length, "const GLchar *", message)
+TRACE_GL_VOID(glPushGroupMarkerEXT, (GLsizei length, const GLchar * marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
 TRACE_GL_VOID(glPushMatrix, (void), (), 0)
-TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent)
+TRACE_GL_VOID(glQueryCounterEXT, (GLuint id, GLenum target), (id, target), 2, "GLuint", id, "GLenum", target)
+TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed * mantissa, GLint * exponent), (mantissa, exponent), 2, "GLfixed *", mantissa, "GLint *", exponent)
 TRACE_GL_VOID(glReadBuffer, (GLenum mode), (mode), 1, "GLenum", mode)
+TRACE_GL_VOID(glReadBufferIndexedEXT, (GLenum src, GLint index), (src, index), 2, "GLenum", src, "GLint", index)
 TRACE_GL_VOID(glReadBufferNV, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels), (x, y, width, height, format, type, pixels), 7, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLvoid *", pixels)
-TRACE_GL_VOID(glReadnPixelsEXT, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data), (x, y, width, height, format, type, bufSize, data), 8, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLsizei", bufSize, "void *", data)
+TRACE_GL_VOID(glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels), (x, y, width, height, format, type, pixels), 7, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "void *", pixels)
+TRACE_GL_VOID(glReadnPixelsEXT, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data), (x, y, width, height, format, type, bufSize, data), 8, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLsizei", bufSize, "void *", data)
 TRACE_GL_VOID(glReleaseShaderCompiler, (void), (), 0)
 TRACE_GL_VOID(glRenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glRenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
@@ -409,133 +558,175 @@
 TRACE_GL_VOID(glRenderbufferStorageMultisampleAPPLE, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glRenderbufferStorageMultisampleEXT, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glRenderbufferStorageMultisampleNV, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glResolveMultisampleFramebufferAPPLE, (void), (), 0)
 TRACE_GL_VOID(glResumeTransformFeedback, (void), (), 0)
 TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z)
 TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
 TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glSampleCoverage, (GLclampf value, GLboolean invert), (value, invert), 2, "GLclampf", value, "GLboolean", invert)
+TRACE_GL_VOID(glSampleCoverage, (GLfloat value, GLboolean invert), (value, invert), 2, "GLfloat", value, "GLboolean", invert)
+TRACE_GL_VOID(glSampleCoverageOES, (GLfixed value, GLboolean invert), (value, invert), 2, "GLfixed", value, "GLboolean", invert)
 TRACE_GL_VOID(glSampleCoveragex, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
 TRACE_GL_VOID(glSampleCoveragexOES, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert)
+TRACE_GL_VOID(glSampleMaski, (GLuint maskNumber, GLbitfield mask), (maskNumber, mask), 2, "GLuint", maskNumber, "GLbitfield", mask)
+TRACE_GL_VOID(glSamplerParameterIivEXT, (GLuint sampler, GLenum pname, const GLint * param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLint *", param)
+TRACE_GL_VOID(glSamplerParameterIuivEXT, (GLuint sampler, GLenum pname, const GLuint * param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLuint *", param)
 TRACE_GL_VOID(glSamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glSamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat* param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLfloat*", param)
+TRACE_GL_VOID(glSamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat * param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLfloat *", param)
 TRACE_GL_VOID(glSamplerParameteri, (GLuint sampler, GLenum pname, GLint param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glSamplerParameteriv, (GLuint sampler, GLenum pname, const GLint* param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLint*", param)
+TRACE_GL_VOID(glSamplerParameteriv, (GLuint sampler, GLenum pname, const GLint * param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLint *", param)
 TRACE_GL_VOID(glScalef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
 TRACE_GL_VOID(glScalex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
 TRACE_GL_VOID(glScalexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
 TRACE_GL_VOID(glScissor, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height), 4, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
-TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList), (monitor, enable, group, numCounters, countersList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", countersList)
+TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList), (monitor, enable, group, numCounters, counterList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", counterList)
 TRACE_GL_VOID(glSetFenceNV, (GLuint fence, GLenum condition), (fence, condition), 2, "GLuint", fence, "GLenum", condition)
 TRACE_GL_VOID(glShadeModel, (GLenum mode), (mode), 1, "GLenum", mode)
-TRACE_GL_VOID(glShaderBinary, (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length), (n, shaders, binaryformat, binary, length), 5, "GLsizei", n, "const GLuint*", shaders, "GLenum", binaryformat, "const GLvoid*", binary, "GLsizei", length)
-TRACE_GL_VOID(glShaderSource, (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length), (shader, count, string, length), 4, "GLuint", shader, "GLsizei", count, "const GLchar* const*", string, "const GLint*", length)
+TRACE_GL_VOID(glShaderBinary, (GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length), (count, shaders, binaryformat, binary, length), 5, "GLsizei", count, "const GLuint *", shaders, "GLenum", binaryformat, "const void *", binary, "GLsizei", length)
+TRACE_GL_VOID(glShaderSource, (GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length), (shader, count, string, length), 4, "GLuint", shader, "GLsizei", count, "const GLchar *const*", string, "const GLint *", length)
 TRACE_GL_VOID(glStartTilingQCOM, (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask), (x, y, width, height, preserveMask), 5, "GLuint", x, "GLuint", y, "GLuint", width, "GLuint", height, "GLbitfield", preserveMask)
 TRACE_GL_VOID(glStencilFunc, (GLenum func, GLint ref, GLuint mask), (func, ref, mask), 3, "GLenum", func, "GLint", ref, "GLuint", mask)
 TRACE_GL_VOID(glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask), (face, func, ref, mask), 4, "GLenum", face, "GLenum", func, "GLint", ref, "GLuint", mask)
 TRACE_GL_VOID(glStencilMask, (GLuint mask), (mask), 1, "GLuint", mask)
 TRACE_GL_VOID(glStencilMaskSeparate, (GLenum face, GLuint mask), (face, mask), 2, "GLenum", face, "GLuint", mask)
 TRACE_GL_VOID(glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass), (fail, zfail, zpass), 3, "GLenum", fail, "GLenum", zfail, "GLenum", zpass)
-TRACE_GL_VOID(glStencilOpSeparate, (GLenum face, GLenum fail, GLenum zfail, GLenum zpass), (face, fail, zfail, zpass), 4, "GLenum", face, "GLenum", fail, "GLenum", zfail, "GLenum", zpass)
+TRACE_GL_VOID(glStencilOpSeparate, (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass), (face, sfail, dpfail, dppass), 4, "GLenum", face, "GLenum", sfail, "GLenum", dpfail, "GLenum", dppass)
 TRACE_GL(GLboolean, glTestFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
-TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
+TRACE_GL_VOID(glTexBufferEXT, (GLenum target, GLenum internalformat, GLuint buffer), (target, internalformat, buffer), 3, "GLenum", target, "GLenum", internalformat, "GLuint", buffer)
+TRACE_GL_VOID(glTexBufferRangeEXT, (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size), (target, internalformat, buffer, offset, size), 5, "GLenum", target, "GLenum", internalformat, "GLuint", buffer, "GLintptr", offset, "GLsizeiptr", size)
+TRACE_GL_VOID(glTexCoord1bOES, (GLbyte s), (s), 1, "GLbyte", s)
+TRACE_GL_VOID(glTexCoord1bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glTexCoord2bOES, (GLbyte s, GLbyte t), (s, t), 2, "GLbyte", s, "GLbyte", t)
+TRACE_GL_VOID(glTexCoord2bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glTexCoord3bOES, (GLbyte s, GLbyte t, GLbyte r), (s, t, r), 3, "GLbyte", s, "GLbyte", t, "GLbyte", r)
+TRACE_GL_VOID(glTexCoord3bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glTexCoord4bOES, (GLbyte s, GLbyte t, GLbyte r, GLbyte q), (s, t, r, q), 4, "GLbyte", s, "GLbyte", t, "GLbyte", r, "GLbyte", q)
+TRACE_GL_VOID(glTexCoord4bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const void * pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const void *", pointer)
 TRACE_GL_VOID(glTexEnvf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glTexEnvi, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
+TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
 TRACE_GL_VOID(glTexEnvx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
 TRACE_GL_VOID(glTexGenfOES, (GLenum coord, GLenum pname, GLfloat param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat * params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glTexGeniOES, (GLenum coord, GLenum pname, GLint param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params)
+TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint * params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params)
 TRACE_GL_VOID(glTexGenxOES, (GLenum coord, GLenum pname, GLfixed param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target, level, internalformat, width, height, border, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid *", pixels)
-TRACE_GL_VOID(glTexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
+TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed * params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels), (target, level, internalformat, width, height, border, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLenum", format, "GLenum", type, "const void *", pixels)
+TRACE_GL_VOID(glTexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const void *", pixels)
+TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const void *", pixels)
+TRACE_GL_VOID(glTexParameterIivEXT, (GLenum target, GLenum pname, const GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
+TRACE_GL_VOID(glTexParameterIuivEXT, (GLenum target, GLenum pname, const GLuint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLuint *", params)
 TRACE_GL_VOID(glTexParameterf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param)
-TRACE_GL_VOID(glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
+TRACE_GL_VOID(glTexParameterfv, (GLenum target, GLenum pname, const GLfloat * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params)
 TRACE_GL_VOID(glTexParameteri, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param)
-TRACE_GL_VOID(glTexParameteriv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
+TRACE_GL_VOID(glTexParameteriv, (GLenum target, GLenum pname, const GLint * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params)
 TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
 TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
-TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
-TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed * params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
 TRACE_GL_VOID(glTexStorage1DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (target, levels, internalformat, width), 4, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width)
 TRACE_GL_VOID(glTexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (target, levels, internalformat, width, height), 5, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glTexStorage2DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (target, levels, internalformat, width, height), 5, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glTexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations), (target, samples, internalformat, width, height, fixedsamplelocations), 6, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLboolean", fixedsamplelocations)
 TRACE_GL_VOID(glTexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (target, levels, internalformat, width, height, depth), 6, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
 TRACE_GL_VOID(glTexStorage3DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (target, levels, internalformat, width, height, depth), 6, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
-TRACE_GL_VOID(glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (target, level, xoffset, yoffset, width, height, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "const GLvoid *", pixels)
-TRACE_GL_VOID(glTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
-TRACE_GL_VOID(glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
+TRACE_GL_VOID(glTexStorage3DMultisampleOES, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations), (target, samples, internalformat, width, height, depth, fixedsamplelocations), 7, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLboolean", fixedsamplelocations)
+TRACE_GL_VOID(glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels), (target, level, xoffset, yoffset, width, height, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "const void *", pixels)
+TRACE_GL_VOID(glTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const void *", pixels)
+TRACE_GL_VOID(glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const void *", pixels)
 TRACE_GL_VOID(glTextureStorage1DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (texture, target, levels, internalformat, width), 5, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width)
 TRACE_GL_VOID(glTextureStorage2DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (texture, target, levels, internalformat, width, height), 6, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glTextureStorage3DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (texture, target, levels, internalformat, width, height, depth), 7, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
-TRACE_GL_VOID(glTransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode), (program, count, varyings, bufferMode), 4, "GLuint", program, "GLsizei", count, "const GLchar* const*", varyings, "GLenum", bufferMode)
+TRACE_GL_VOID(glTextureViewEXT, (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers), (texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers), 8, "GLuint", texture, "GLenum", target, "GLuint", origtexture, "GLenum", internalformat, "GLuint", minlevel, "GLuint", numlevels, "GLuint", minlayer, "GLuint", numlayers)
+TRACE_GL_VOID(glTransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode), (program, count, varyings, bufferMode), 4, "GLuint", program, "GLsizei", count, "const GLchar *const*", varyings, "GLenum", bufferMode)
 TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
 TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
 TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
-TRACE_GL_VOID(glUniform1f, (GLint location, GLfloat x), (location, x), 2, "GLint", location, "GLfloat", x)
-TRACE_GL_VOID(glUniform1fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform1i, (GLint location, GLint x), (location, x), 2, "GLint", location, "GLint", x)
-TRACE_GL_VOID(glUniform1iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
+TRACE_GL_VOID(glUniform1f, (GLint location, GLfloat v0), (location, v0), 2, "GLint", location, "GLfloat", v0)
+TRACE_GL_VOID(glUniform1fv, (GLint location, GLsizei count, const GLfloat * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glUniform1i, (GLint location, GLint v0), (location, v0), 2, "GLint", location, "GLint", v0)
+TRACE_GL_VOID(glUniform1iv, (GLint location, GLsizei count, const GLint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLint *", value)
 TRACE_GL_VOID(glUniform1ui, (GLint location, GLuint v0), (location, v0), 2, "GLint", location, "GLuint", v0)
-TRACE_GL_VOID(glUniform1uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value)
-TRACE_GL_VOID(glUniform2f, (GLint location, GLfloat x, GLfloat y), (location, x, y), 3, "GLint", location, "GLfloat", x, "GLfloat", y)
-TRACE_GL_VOID(glUniform2fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform2i, (GLint location, GLint x, GLint y), (location, x, y), 3, "GLint", location, "GLint", x, "GLint", y)
-TRACE_GL_VOID(glUniform2iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
+TRACE_GL_VOID(glUniform1uiv, (GLint location, GLsizei count, const GLuint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glUniform2f, (GLint location, GLfloat v0, GLfloat v1), (location, v0, v1), 3, "GLint", location, "GLfloat", v0, "GLfloat", v1)
+TRACE_GL_VOID(glUniform2fv, (GLint location, GLsizei count, const GLfloat * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glUniform2i, (GLint location, GLint v0, GLint v1), (location, v0, v1), 3, "GLint", location, "GLint", v0, "GLint", v1)
+TRACE_GL_VOID(glUniform2iv, (GLint location, GLsizei count, const GLint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLint *", value)
 TRACE_GL_VOID(glUniform2ui, (GLint location, GLuint v0, GLuint v1), (location, v0, v1), 3, "GLint", location, "GLuint", v0, "GLuint", v1)
-TRACE_GL_VOID(glUniform2uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value)
-TRACE_GL_VOID(glUniform3f, (GLint location, GLfloat x, GLfloat y, GLfloat z), (location, x, y, z), 4, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glUniform3fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform3i, (GLint location, GLint x, GLint y, GLint z), (location, x, y, z), 4, "GLint", location, "GLint", x, "GLint", y, "GLint", z)
-TRACE_GL_VOID(glUniform3iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
+TRACE_GL_VOID(glUniform2uiv, (GLint location, GLsizei count, const GLuint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glUniform3f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2), (location, v0, v1, v2), 4, "GLint", location, "GLfloat", v0, "GLfloat", v1, "GLfloat", v2)
+TRACE_GL_VOID(glUniform3fv, (GLint location, GLsizei count, const GLfloat * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glUniform3i, (GLint location, GLint v0, GLint v1, GLint v2), (location, v0, v1, v2), 4, "GLint", location, "GLint", v0, "GLint", v1, "GLint", v2)
+TRACE_GL_VOID(glUniform3iv, (GLint location, GLsizei count, const GLint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLint *", value)
 TRACE_GL_VOID(glUniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2), (location, v0, v1, v2), 4, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2)
-TRACE_GL_VOID(glUniform3uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value)
-TRACE_GL_VOID(glUniform4f, (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (location, x, y, z, w), 5, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
-TRACE_GL_VOID(glUniform4fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v)
-TRACE_GL_VOID(glUniform4i, (GLint location, GLint x, GLint y, GLint z, GLint w), (location, x, y, z, w), 5, "GLint", location, "GLint", x, "GLint", y, "GLint", z, "GLint", w)
-TRACE_GL_VOID(glUniform4iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v)
+TRACE_GL_VOID(glUniform3uiv, (GLint location, GLsizei count, const GLuint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint *", value)
+TRACE_GL_VOID(glUniform4f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3), (location, v0, v1, v2, v3), 5, "GLint", location, "GLfloat", v0, "GLfloat", v1, "GLfloat", v2, "GLfloat", v3)
+TRACE_GL_VOID(glUniform4fv, (GLint location, GLsizei count, const GLfloat * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glUniform4i, (GLint location, GLint v0, GLint v1, GLint v2, GLint v3), (location, v0, v1, v2, v3), 5, "GLint", location, "GLint", v0, "GLint", v1, "GLint", v2, "GLint", v3)
+TRACE_GL_VOID(glUniform4iv, (GLint location, GLsizei count, const GLint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLint *", value)
 TRACE_GL_VOID(glUniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3), (location, v0, v1, v2, v3), 5, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2, "GLuint", v3)
-TRACE_GL_VOID(glUniform4uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value)
+TRACE_GL_VOID(glUniform4uiv, (GLint location, GLsizei count, const GLuint * value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint *", value)
 TRACE_GL_VOID(glUniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding), (program, uniformBlockIndex, uniformBlockBinding), 3, "GLuint", program, "GLuint", uniformBlockIndex, "GLuint", uniformBlockBinding)
-TRACE_GL_VOID(glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
-TRACE_GL_VOID(glUniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
+TRACE_GL_VOID(glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix2x3fvNV, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix2x4fvNV, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix3x2fvNV, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix3x4fvNV, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix4x2fvNV, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glUniformMatrix4x3fvNV, (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
 TRACE_GL(GLboolean, glUnmapBuffer, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target)
 TRACE_GL_VOID(glUseProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL_VOID(glUseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program), (pipeline, stages, program), 3, "GLuint", pipeline, "GLbitfield", stages, "GLuint", program)
 TRACE_GL_VOID(glUseProgramStagesEXT, (GLuint pipeline, GLbitfield stages, GLuint program), (pipeline, stages, program), 3, "GLuint", pipeline, "GLbitfield", stages, "GLuint", program)
 TRACE_GL_VOID(glValidateProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL_VOID(glValidateProgramPipeline, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
 TRACE_GL_VOID(glValidateProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
-TRACE_GL_VOID(glVertexAttrib1f, (GLuint indx, GLfloat x), (indx, x), 2, "GLuint", indx, "GLfloat", x)
-TRACE_GL_VOID(glVertexAttrib1fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttrib2f, (GLuint indx, GLfloat x, GLfloat y), (indx, x, y), 3, "GLuint", indx, "GLfloat", x, "GLfloat", y)
-TRACE_GL_VOID(glVertexAttrib2fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttrib3f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z), (indx, x, y, z), 4, "GLuint", indx, "GLfloat", x, "GLfloat", y, "GLfloat", z)
-TRACE_GL_VOID(glVertexAttrib3fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
-TRACE_GL_VOID(glVertexAttrib4f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (indx, x, y, z, w), 5, "GLuint", indx, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
-TRACE_GL_VOID(glVertexAttrib4fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
+TRACE_GL_VOID(glVertex2bOES, (GLbyte x), (x), 1, "GLbyte", x)
+TRACE_GL_VOID(glVertex2bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glVertex3bOES, (GLbyte x, GLbyte y), (x, y), 2, "GLbyte", x, "GLbyte", y)
+TRACE_GL_VOID(glVertex3bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glVertex4bOES, (GLbyte x, GLbyte y, GLbyte z), (x, y, z), 3, "GLbyte", x, "GLbyte", y, "GLbyte", z)
+TRACE_GL_VOID(glVertex4bvOES, (const GLbyte * coords), (coords), 1, "const GLbyte *", coords)
+TRACE_GL_VOID(glVertexAttrib1f, (GLuint index, GLfloat x), (index, x), 2, "GLuint", index, "GLfloat", x)
+TRACE_GL_VOID(glVertexAttrib1fv, (GLuint index, const GLfloat * v), (index, v), 2, "GLuint", index, "const GLfloat *", v)
+TRACE_GL_VOID(glVertexAttrib2f, (GLuint index, GLfloat x, GLfloat y), (index, x, y), 3, "GLuint", index, "GLfloat", x, "GLfloat", y)
+TRACE_GL_VOID(glVertexAttrib2fv, (GLuint index, const GLfloat * v), (index, v), 2, "GLuint", index, "const GLfloat *", v)
+TRACE_GL_VOID(glVertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z), (index, x, y, z), 4, "GLuint", index, "GLfloat", x, "GLfloat", y, "GLfloat", z)
+TRACE_GL_VOID(glVertexAttrib3fv, (GLuint index, const GLfloat * v), (index, v), 2, "GLuint", index, "const GLfloat *", v)
+TRACE_GL_VOID(glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (index, x, y, z, w), 5, "GLuint", index, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
+TRACE_GL_VOID(glVertexAttrib4fv, (GLuint index, const GLfloat * v), (index, v), 2, "GLuint", index, "const GLfloat *", v)
+TRACE_GL_VOID(glVertexAttribBinding, (GLuint attribindex, GLuint bindingindex), (attribindex, bindingindex), 2, "GLuint", attribindex, "GLuint", bindingindex)
 TRACE_GL_VOID(glVertexAttribDivisor, (GLuint index, GLuint divisor), (index, divisor), 2, "GLuint", index, "GLuint", divisor)
+TRACE_GL_VOID(glVertexAttribDivisorANGLE, (GLuint index, GLuint divisor), (index, divisor), 2, "GLuint", index, "GLuint", divisor)
+TRACE_GL_VOID(glVertexAttribDivisorEXT, (GLuint index, GLuint divisor), (index, divisor), 2, "GLuint", index, "GLuint", divisor)
+TRACE_GL_VOID(glVertexAttribDivisorNV, (GLuint index, GLuint divisor), (index, divisor), 2, "GLuint", index, "GLuint", divisor)
+TRACE_GL_VOID(glVertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset), (attribindex, size, type, normalized, relativeoffset), 5, "GLuint", attribindex, "GLint", size, "GLenum", type, "GLboolean", normalized, "GLuint", relativeoffset)
 TRACE_GL_VOID(glVertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w), (index, x, y, z, w), 5, "GLuint", index, "GLint", x, "GLint", y, "GLint", z, "GLint", w)
-TRACE_GL_VOID(glVertexAttribI4iv, (GLuint index, const GLint* v), (index, v), 2, "GLuint", index, "const GLint*", v)
+TRACE_GL_VOID(glVertexAttribI4iv, (GLuint index, const GLint * v), (index, v), 2, "GLuint", index, "const GLint *", v)
 TRACE_GL_VOID(glVertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w), (index, x, y, z, w), 5, "GLuint", index, "GLuint", x, "GLuint", y, "GLuint", z, "GLuint", w)
-TRACE_GL_VOID(glVertexAttribI4uiv, (GLuint index, const GLuint* v), (index, v), 2, "GLuint", index, "const GLuint*", v)
-TRACE_GL_VOID(glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer), (index, size, type, stride, pointer), 5, "GLuint", index, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid*", pointer)
-TRACE_GL_VOID(glVertexAttribPointer, (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr), (indx, size, type, normalized, stride, ptr), 6, "GLuint", indx, "GLint", size, "GLenum", type, "GLboolean", normalized, "GLsizei", stride, "const GLvoid*", ptr)
-TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
+TRACE_GL_VOID(glVertexAttribI4uiv, (GLuint index, const GLuint * v), (index, v), 2, "GLuint", index, "const GLuint *", v)
+TRACE_GL_VOID(glVertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset), (attribindex, size, type, relativeoffset), 4, "GLuint", attribindex, "GLint", size, "GLenum", type, "GLuint", relativeoffset)
+TRACE_GL_VOID(glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer), (index, size, type, stride, pointer), 5, "GLuint", index, "GLint", size, "GLenum", type, "GLsizei", stride, "const void *", pointer)
+TRACE_GL_VOID(glVertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer), (index, size, type, normalized, stride, pointer), 6, "GLuint", index, "GLint", size, "GLenum", type, "GLboolean", normalized, "GLsizei", stride, "const void *", pointer)
+TRACE_GL_VOID(glVertexBindingDivisor, (GLuint bindingindex, GLuint divisor), (bindingindex, divisor), 2, "GLuint", bindingindex, "GLuint", divisor)
+TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const void * pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const void *", pointer)
 TRACE_GL_VOID(glViewport, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height), 4, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height)
 TRACE_GL_VOID(glWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout), (sync, flags, timeout), 3, "GLsync", sync, "GLbitfield", flags, "GLuint64", timeout)
-TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer)
+TRACE_GL_VOID(glWaitSyncAPPLE, (GLsync sync, GLbitfield flags, GLuint64 timeout), (sync, flags, timeout), 3, "GLsync", sync, "GLbitfield", flags, "GLuint64", timeout)
+TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const void * pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const void *", pointer)
diff --git a/opengl/tests/EGLTest/EGL_test.cpp b/opengl/tests/EGLTest/EGL_test.cpp
index f6644fb..a4364c6 100644
--- a/opengl/tests/EGLTest/EGL_test.cpp
+++ b/opengl/tests/EGLTest/EGL_test.cpp
@@ -103,12 +103,15 @@
     struct DummyConsumer : public BnConsumerListener {
         virtual void onFrameAvailable() {}
         virtual void onBuffersReleased() {}
+        virtual void onSidebandStreamChanged() {}
     };
 
     // Create a EGLSurface
-    sp<BufferQueue> bq = new BufferQueue();
-    bq->consumerConnect(new DummyConsumer, false);
-    sp<Surface> mSTC = new Surface(static_cast<sp<IGraphicBufferProducer> >( bq));
+    sp<IGraphicBufferProducer> producer;
+    sp<IGraphicBufferConsumer> consumer;
+    BufferQueue::createBufferQueue(&producer, &consumer);
+    consumer->consumerConnect(new DummyConsumer, false);
+    sp<Surface> mSTC = new Surface(producer);
     sp<ANativeWindow> mANW = mSTC;
 
     EGLSurface eglSurface = eglCreateWindowSurface(mEglDisplay, config,
diff --git a/opengl/tests/angeles/Android.mk b/opengl/tests/angeles/Android.mk
index ae4f76d..c78224e 100644
--- a/opengl/tests/angeles/Android.mk
+++ b/opengl/tests/angeles/Android.mk
@@ -3,7 +3,8 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES:= app-linux.cpp demo.c.arm
-LOCAL_SHARED_LIBRARIES := libEGL libGLESv1_CM libui
+LOCAL_SHARED_LIBRARIES := libEGL libGLESv1_CM libui libgui libutils
+LOCAL_STATIC_LIBRARIES += libglTest
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 LOCAL_MODULE:= angeles
 LOCAL_MODULE_TAGS := optional
diff --git a/opengl/tests/angeles/app-linux.cpp b/opengl/tests/angeles/app-linux.cpp
index 6ac68a2..e490351 100644
--- a/opengl/tests/angeles/app-linux.cpp
+++ b/opengl/tests/angeles/app-linux.cpp
@@ -52,8 +52,8 @@
 #include <EGL/egl.h>
 #include <GLES/gl.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <EGLUtils.h>
+#include <WindowSurface.h>
 
 using namespace android;
 
@@ -118,7 +118,7 @@
         fprintf(stderr, "EGL Error: 0x%04x\n", (int)error);
 }
 
-static int initGraphics(unsigned samples)
+static int initGraphics(unsigned samples, const WindowSurface& windowSurface)
 {
     EGLint configAttribs[] = {
             EGL_DEPTH_SIZE, 16,
@@ -135,7 +135,7 @@
     EGLint w, h;
     EGLDisplay dpy;
 
-    EGLNativeWindowType window = android_createDisplaySurface();
+    EGLNativeWindowType window = windowSurface.getSurface();
 
     dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
     eglInitialize(dpy, &majorVersion, &minorVersion);
@@ -193,7 +193,8 @@
         printf("Multisample enabled: GL_SAMPLES = %u\n", samples);
     }
 
-    if (!initGraphics(samples))
+    WindowSurface windowSurface;
+    if (!initGraphics(samples, windowSurface))
     {
         fprintf(stderr, "Graphics initialization failed.\n");
         return EXIT_FAILURE;
diff --git a/opengl/tests/fillrate/Android.mk b/opengl/tests/fillrate/Android.mk
index 4dade21..21ff52a 100644
--- a/opengl/tests/fillrate/Android.mk
+++ b/opengl/tests/fillrate/Android.mk
@@ -9,7 +9,10 @@
 	libutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp
index a708647..1d9b026 100644
--- a/opengl/tests/fillrate/fillrate.cpp
+++ b/opengl/tests/fillrate/fillrate.cpp
@@ -25,8 +25,8 @@
 #include <GLES/glext.h>
 
 #include <utils/StopWatch.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -45,7 +45,8 @@
      EGLint w, h;
      EGLDisplay dpy;
 
-     EGLNativeWindowType window = android_createDisplaySurface();
+     WindowSurface windowSurface;
+     EGLNativeWindowType window = windowSurface.getSurface();
      
      dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
      eglInitialize(dpy, &majorVersion, &minorVersion);
diff --git a/opengl/tests/filter/Android.mk b/opengl/tests/filter/Android.mk
index d3e4d38..4cf9c96 100644
--- a/opengl/tests/filter/Android.mk
+++ b/opengl/tests/filter/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/filter/filter.cpp b/opengl/tests/filter/filter.cpp
index 0067327..289e6cc 100644
--- a/opengl/tests/filter/filter.cpp
+++ b/opengl/tests/filter/filter.cpp
@@ -5,8 +5,8 @@
 #include <GLES/gl.h>
 #include <GLES/glext.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -40,8 +40,10 @@
      EGLDisplay dpy;
 
      EGLNativeWindowType window = 0;
+     WindowSurface* windowSurface = NULL;
      if (!usePbuffer) {
-         window = android_createDisplaySurface();
+         windowSurface = new WindowSurface();
+         window = windowSurface->getSurface();
      }
      
      dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
@@ -186,5 +188,6 @@
      }
 
      eglTerminate(dpy);
+     delete windowSurface;
      return 0;
 }
diff --git a/opengl/tests/finish/Android.mk b/opengl/tests/finish/Android.mk
index aa8adca..0b9b7ea 100644
--- a/opengl/tests/finish/Android.mk
+++ b/opengl/tests/finish/Android.mk
@@ -9,7 +9,10 @@
 	libutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/finish/finish.cpp b/opengl/tests/finish/finish.cpp
index 11f0c22..ea3a60f 100644
--- a/opengl/tests/finish/finish.cpp
+++ b/opengl/tests/finish/finish.cpp
@@ -26,8 +26,8 @@
 
 #include <utils/Timers.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -46,7 +46,8 @@
      EGLint w, h;
      EGLDisplay dpy;
 
-     EGLNativeWindowType window = android_createDisplaySurface();
+     WindowSurface windowSurface;
+     EGLNativeWindowType window = windowSurface.getSurface();
      
      dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
      eglInitialize(dpy, &majorVersion, &minorVersion);
diff --git a/opengl/tests/gl2_basic/Android.mk b/opengl/tests/gl2_basic/Android.mk
index d7819a1..520395c 100644
--- a/opengl/tests/gl2_basic/Android.mk
+++ b/opengl/tests/gl2_basic/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv2 \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/gl2_basic/gl2_basic.cpp b/opengl/tests/gl2_basic/gl2_basic.cpp
index 7007871..cdbf1cf 100644
--- a/opengl/tests/gl2_basic/gl2_basic.cpp
+++ b/opengl/tests/gl2_basic/gl2_basic.cpp
@@ -26,8 +26,8 @@
 
 #include <utils/Timers.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -298,7 +298,8 @@
 
     checkEglError("printEGLConfigurations");
 
-    EGLNativeWindowType window = android_createDisplaySurface();

+    WindowSurface windowSurface;
+    EGLNativeWindowType window = windowSurface.getSurface();
     returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
     if (returnValue) {
         printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
diff --git a/opengl/tests/gl2_copyTexImage/Android.mk b/opengl/tests/gl2_copyTexImage/Android.mk
index 005c383..ff43558 100644
--- a/opengl/tests/gl2_copyTexImage/Android.mk
+++ b/opengl/tests/gl2_copyTexImage/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv2 \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
index 988d7ac..405a3f0 100644
--- a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
+++ b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp
@@ -26,8 +26,8 @@
 
 #include <utils/Timers.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -406,7 +406,8 @@
 
     checkEglError("printEGLConfigurations");
 
-    EGLNativeWindowType window = android_createDisplaySurface();
+    WindowSurface windowSurface;
+    EGLNativeWindowType window = windowSurface.getSurface();
     EGLint numConfigs = -1, n = 0;
     eglChooseConfig(dpy, s_configAttribs, 0, 0, &numConfigs);
     if (numConfigs) {
diff --git a/opengl/tests/gl2_yuvtex/Android.mk b/opengl/tests/gl2_yuvtex/Android.mk
index bb3cc0c..42cf771 100644
--- a/opengl/tests/gl2_yuvtex/Android.mk
+++ b/opengl/tests/gl2_yuvtex/Android.mk
@@ -9,7 +9,11 @@
     libEGL \
     libGLESv2 \
     libutils \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
index d3e4932..98d8aa8 100644
--- a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
+++ b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp
@@ -27,9 +27,9 @@
 
 #include <utils/Timers.h>
 
-#include <ui/FramebufferNativeWindow.h>
+#include <WindowSurface.h>
 #include <ui/GraphicBuffer.h>
-#include "EGLUtils.h"
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -364,7 +364,8 @@
         return 0;
     }
 
-    EGLNativeWindowType window = android_createDisplaySurface();
+    WindowSurface windowSurface;
+    EGLNativeWindowType window = windowSurface.getSurface();
     returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
     if (returnValue) {
         printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
diff --git a/opengl/tests/gl_basic/Android.mk b/opengl/tests/gl_basic/Android.mk
index 46bcc60..7f2259e 100644
--- a/opengl/tests/gl_basic/Android.mk
+++ b/opengl/tests/gl_basic/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/gl_basic/gl_basic.cpp b/opengl/tests/gl_basic/gl_basic.cpp
index 23ce934..e50d88f 100644
--- a/opengl/tests/gl_basic/gl_basic.cpp
+++ b/opengl/tests/gl_basic/gl_basic.cpp
@@ -5,8 +5,8 @@
 #include <GLES/gl.h>
 #include <GLES/glext.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 #include <stdio.h>
 
@@ -23,7 +23,7 @@
 #define FIXED_ONE 0x10000
 #define ITERATIONS 50
 
-int init_gl_surface(void);
+int init_gl_surface(const WindowSurface& windowSurface);
 void free_gl_surface(void);
 void init_scene(void);
 void render();
@@ -194,7 +194,8 @@
     int q;
     int start, end;
     printf("Initializing EGL...\n");
-    if(!init_gl_surface())
+    WindowSurface windowSurface;
+    if(!init_gl_surface(windowSurface))
     {
         printf("GL initialisation failed - exiting\n");
         return 0;
@@ -209,7 +210,7 @@
     return 0;
 }
 
-int init_gl_surface(void)
+int init_gl_surface(const WindowSurface& windowSurface)
 {
     EGLint numConfigs = 1;
     EGLConfig myConfig = {0};
@@ -236,7 +237,7 @@
         return 0;
     }
 
-    EGLNativeWindowType window = android_createDisplaySurface();
+    EGLNativeWindowType window = windowSurface.getSurface();
     EGLUtils::selectConfigForNativeWindow(eglDisplay, attrib, window, &myConfig);
 
     if ( (eglSurface = eglCreateWindowSurface(eglDisplay, myConfig,
diff --git a/opengl/tests/gl_perf/Android.mk b/opengl/tests/gl_perf/Android.mk
index b0f825c..9a93fab 100644
--- a/opengl/tests/gl_perf/Android.mk
+++ b/opengl/tests/gl_perf/Android.mk
@@ -10,7 +10,11 @@
     liblog \
     libEGL \
     libGLESv2 \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/gl_perf/gl2_perf.cpp b/opengl/tests/gl_perf/gl2_perf.cpp
index 224acaf..35df84f 100644
--- a/opengl/tests/gl_perf/gl2_perf.cpp
+++ b/opengl/tests/gl_perf/gl2_perf.cpp
@@ -26,8 +26,8 @@
 
 #include <utils/Timers.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -86,7 +86,8 @@
         return 0;
     }
 
-    EGLNativeWindowType window = android_createDisplaySurface();

+    WindowSurface windowSurface;
+    EGLNativeWindowType window = windowSurface.getSurface();
     returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
     if (returnValue) {
         printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
diff --git a/opengl/tests/gl_yuvtex/Android.mk b/opengl/tests/gl_yuvtex/Android.mk
index e0e2c16..7f2020a 100644
--- a/opengl/tests/gl_yuvtex/Android.mk
+++ b/opengl/tests/gl_yuvtex/Android.mk
@@ -9,7 +9,10 @@
     libEGL \
     libGLESv1_CM \
     libutils \
-    libui
+    libui \
+    libgui
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
index 7a00f76..c923b07 100644
--- a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
+++ b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp
@@ -27,9 +27,9 @@
 
 #include <utils/Timers.h>
 
-#include <ui/FramebufferNativeWindow.h>
+#include <WindowSurface.h>
 #include <ui/GraphicBuffer.h>
-#include "EGLUtils.h"
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -254,7 +254,8 @@
         return 0;
     }
 
-    EGLNativeWindowType window = android_createDisplaySurface();
+    WindowSurface windowSurface;
+    EGLNativeWindowType window = windowSurface.getSurface();
     returnValue = EGLUtils::selectConfigForNativeWindow(dpy, s_configAttribs, window, &myConfig);
     if (returnValue) {
         printf("EGLUtils::selectConfigForNativeWindow() returned %d", returnValue);
diff --git a/opengl/tests/hwc/hwcColorEquiv.cpp b/opengl/tests/hwc/hwcColorEquiv.cpp
index 160906d..c4624d2 100644
--- a/opengl/tests/hwc/hwcColorEquiv.cpp
+++ b/opengl/tests/hwc/hwcColorEquiv.cpp
@@ -85,7 +85,6 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#include <ui/FramebufferNativeWindow.h>
 #include <ui/GraphicBuffer.h>
 
 #define LOG_TAG "hwcColorEquivTest"
diff --git a/opengl/tests/hwc/hwcCommit.cpp b/opengl/tests/hwc/hwcCommit.cpp
index 3681fbb..1bd5fdf 100644
--- a/opengl/tests/hwc/hwcCommit.cpp
+++ b/opengl/tests/hwc/hwcCommit.cpp
@@ -96,7 +96,6 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#include <ui/FramebufferNativeWindow.h>
 #include <ui/GraphicBuffer.h>
 
 #define LOG_TAG "hwcCommitTest"
diff --git a/opengl/tests/hwc/hwcRects.cpp b/opengl/tests/hwc/hwcRects.cpp
index ec0403f..9b57623 100644
--- a/opengl/tests/hwc/hwcRects.cpp
+++ b/opengl/tests/hwc/hwcRects.cpp
@@ -104,7 +104,6 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#include <ui/FramebufferNativeWindow.h>
 #include <ui/GraphicBuffer.h>
 
 #define LOG_TAG "hwcRectsTest"
diff --git a/opengl/tests/hwc/hwcStress.cpp b/opengl/tests/hwc/hwcStress.cpp
index dfaa6c1..b1d6c76 100644
--- a/opengl/tests/hwc/hwcStress.cpp
+++ b/opengl/tests/hwc/hwcStress.cpp
@@ -101,7 +101,6 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#include <ui/FramebufferNativeWindow.h>
 #include <ui/GraphicBuffer.h>
 
 #define LOG_TAG "hwcStressTest"
diff --git a/opengl/tests/hwc/hwcTestLib.cpp b/opengl/tests/hwc/hwcTestLib.cpp
index 9b224e2..7fae5e5 100644
--- a/opengl/tests/hwc/hwcTestLib.cpp
+++ b/opengl/tests/hwc/hwcTestLib.cpp
@@ -80,7 +80,11 @@
         exit(71);
     }
 
-    EGLNativeWindowType window = android_createDisplaySurface();
+    // The tests want to stop the framework and play with the hardware
+    // composer, which means it doesn't make sense to use WindowSurface
+    // here.  android_createDisplaySurface() is going away, so just
+    // politely fail here.
+    EGLNativeWindowType window = NULL; //android_createDisplaySurface();
     if (window == NULL) {
         testPrintE("android_createDisplaySurface failed");
         exit(72);
diff --git a/opengl/tests/hwc/hwcTestLib.h b/opengl/tests/hwc/hwcTestLib.h
index d403308..a942c10 100644
--- a/opengl/tests/hwc/hwcTestLib.h
+++ b/opengl/tests/hwc/hwcTestLib.h
@@ -27,7 +27,6 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#include <ui/FramebufferNativeWindow.h>
 #include <ui/GraphicBuffer.h>
 
 #include <utils/Log.h>
diff --git a/opengl/tests/include/WindowSurface.h b/opengl/tests/include/WindowSurface.h
new file mode 100644
index 0000000..0ec1404
--- /dev/null
+++ b/opengl/tests/include/WindowSurface.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OPENGL_TESTS_WINDOWSURFACE_H
+#define OPENGL_TESTS_WINDOWSURFACE_H
+
+#include <gui/SurfaceControl.h>
+
+#include <EGL/egl.h>
+
+namespace android {
+
+/*
+ * A window that covers the entire display surface.
+ *
+ * The window is destroyed when this object is destroyed, so don't try
+ * to use the surface after that point.
+ */
+class WindowSurface {
+public:
+    // Creates the window.
+    WindowSurface();
+
+    // Retrieves a handle to the window.
+    EGLNativeWindowType getSurface() const;
+
+private:
+    WindowSurface(const WindowSurface&);
+    WindowSurface& operator=(const WindowSurface&);
+
+    sp<SurfaceControl> mSurfaceControl;
+};
+
+} // namespace android
+
+#endif /* OPENGL_TESTS_WINDOWSURFACE_H */
diff --git a/opengl/tests/lib/Android.mk b/opengl/tests/lib/Android.mk
index 0352a37..a2752cd 100644
--- a/opengl/tests/lib/Android.mk
+++ b/opengl/tests/lib/Android.mk
@@ -17,7 +17,7 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE_TAGS := tests
 LOCAL_MODULE:= libglTest
-LOCAL_SRC_FILES:= glTestLib.cpp
+LOCAL_SRC_FILES:= glTestLib.cpp WindowSurface.cpp
 LOCAL_C_INCLUDES += system/extras/tests/include \
     bionic \
     bionic/libstdc++/include \
diff --git a/opengl/tests/lib/WindowSurface.cpp b/opengl/tests/lib/WindowSurface.cpp
new file mode 100644
index 0000000..1428945
--- /dev/null
+++ b/opengl/tests/lib/WindowSurface.cpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <WindowSurface.h>
+
+#include <gui/SurfaceComposerClient.h>
+#include <gui/ISurfaceComposer.h>
+#include <gui/Surface.h>
+#include <ui/DisplayInfo.h>
+
+using namespace android;
+
+WindowSurface::WindowSurface() {
+    status_t err;
+
+    sp<SurfaceComposerClient> surfaceComposerClient = new SurfaceComposerClient;
+    err = surfaceComposerClient->initCheck();
+    if (err != NO_ERROR) {
+        fprintf(stderr, "SurfaceComposerClient::initCheck error: %#x\n", err);
+        return;
+    }
+
+    // Get main display parameters.
+    sp<IBinder> mainDpy = SurfaceComposerClient::getBuiltInDisplay(
+            ISurfaceComposer::eDisplayIdMain);
+    DisplayInfo mainDpyInfo;
+    err = SurfaceComposerClient::getDisplayInfo(mainDpy, &mainDpyInfo);
+    if (err != NO_ERROR) {
+        fprintf(stderr, "ERROR: unable to get display characteristics\n");
+        return;
+    }
+
+    uint32_t width, height;
+    if (mainDpyInfo.orientation != DISPLAY_ORIENTATION_0 &&
+            mainDpyInfo.orientation != DISPLAY_ORIENTATION_180) {
+        // rotated
+        width = mainDpyInfo.h;
+        height = mainDpyInfo.w;
+    } else {
+        width = mainDpyInfo.w;
+        height = mainDpyInfo.h;
+    }
+
+    sp<SurfaceControl> sc = surfaceComposerClient->createSurface(
+            String8("Benchmark"), width, height,
+            PIXEL_FORMAT_RGBX_8888, ISurfaceComposerClient::eOpaque);
+    if (sc == NULL || !sc->isValid()) {
+        fprintf(stderr, "Failed to create SurfaceControl\n");
+        return;
+    }
+
+    SurfaceComposerClient::openGlobalTransaction();
+    err = sc->setLayer(0x7FFFFFFF);     // always on top
+    if (err != NO_ERROR) {
+        fprintf(stderr, "SurfaceComposer::setLayer error: %#x\n", err);
+        return;
+    }
+
+    err = sc->show();
+    if (err != NO_ERROR) {
+        fprintf(stderr, "SurfaceComposer::show error: %#x\n", err);
+        return;
+    }
+    SurfaceComposerClient::closeGlobalTransaction();
+
+    mSurfaceControl = sc;
+}
+
+EGLNativeWindowType WindowSurface::getSurface() const {
+    sp<ANativeWindow> anw = mSurfaceControl->getSurface();
+    return (EGLNativeWindowType) anw.get();
+}
+
diff --git a/opengl/tests/linetex/Android.mk b/opengl/tests/linetex/Android.mk
index 5b6384e..968756a 100644
--- a/opengl/tests/linetex/Android.mk
+++ b/opengl/tests/linetex/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/linetex/linetex.cpp b/opengl/tests/linetex/linetex.cpp
index 8669492..7921f80 100644
--- a/opengl/tests/linetex/linetex.cpp
+++ b/opengl/tests/linetex/linetex.cpp
@@ -15,8 +15,6 @@
 ** limitations under the License.
 */
 
-#define LOG_TAG "fillrate"
-
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -26,8 +24,8 @@
 #include <GLES/glext.h>
 
 #include <utils/StopWatch.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -46,7 +44,8 @@
      EGLint w, h;
      EGLDisplay dpy;
 
-     EGLNativeWindowType window = android_createDisplaySurface();
+     WindowSurface windowSurface;
+     EGLNativeWindowType window = windowSurface.getSurface();
      
      dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
      eglInitialize(dpy, &majorVersion, &minorVersion);
diff --git a/opengl/tests/swapinterval/Android.mk b/opengl/tests/swapinterval/Android.mk
index 5517f60..b0b15eb 100644
--- a/opengl/tests/swapinterval/Android.mk
+++ b/opengl/tests/swapinterval/Android.mk
@@ -9,7 +9,10 @@
 	libutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/swapinterval/swapinterval.cpp b/opengl/tests/swapinterval/swapinterval.cpp
index a0f4bc4..3a8a8a1 100644
--- a/opengl/tests/swapinterval/swapinterval.cpp
+++ b/opengl/tests/swapinterval/swapinterval.cpp
@@ -23,8 +23,8 @@
 #include <GLES/glext.h>
 
 #include <utils/StopWatch.h>
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -45,7 +45,8 @@
     EGLDisplay dpy;
 
     
-    EGLNativeWindowType window = android_createDisplaySurface();
+    WindowSurface windowSurface;
+    EGLNativeWindowType window = windowSurface.getSurface();
 
     dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
     eglInitialize(dpy, &majorVersion, &minorVersion);
diff --git a/opengl/tests/textures/Android.mk b/opengl/tests/textures/Android.mk
index 97697d7..bee61f9 100644
--- a/opengl/tests/textures/Android.mk
+++ b/opengl/tests/textures/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/textures/textures.cpp b/opengl/tests/textures/textures.cpp
index 5d3d94e..1e55db0 100644
--- a/opengl/tests/textures/textures.cpp
+++ b/opengl/tests/textures/textures.cpp
@@ -22,8 +22,8 @@
 #include <GLES/gl.h>
 #include <GLES/glext.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 using namespace android;
 
@@ -42,7 +42,8 @@
      EGLint w, h;
      EGLDisplay dpy;
 
-     EGLNativeWindowType window = android_createDisplaySurface();
+     WindowSurface windowSurface;
+     EGLNativeWindowType window = windowSurface.getSurface();
      
      dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
      eglInitialize(dpy, &majorVersion, &minorVersion);
@@ -114,5 +115,7 @@
      glDrawTexiOES(dim/2, dim/2, 0, dim/2, dim/2);
 
      eglSwapBuffers(dpy, surface);
+
+     sleep(2);      // so you have a chance to admire it
      return 0;
 }
diff --git a/opengl/tests/tritex/Android.mk b/opengl/tests/tritex/Android.mk
index 89faa87..64382ed 100644
--- a/opengl/tests/tritex/Android.mk
+++ b/opengl/tests/tritex/Android.mk
@@ -8,7 +8,11 @@
 	libcutils \
     libEGL \
     libGLESv1_CM \
-    libui
+    libui \
+    libgui \
+    libutils
+
+LOCAL_STATIC_LIBRARIES += libglTest
 
 LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes)
 
diff --git a/opengl/tests/tritex/tritex.cpp b/opengl/tests/tritex/tritex.cpp
index f183483..2db73ef 100644
--- a/opengl/tests/tritex/tritex.cpp
+++ b/opengl/tests/tritex/tritex.cpp
@@ -8,8 +8,8 @@
 #include <GLES/gl.h>
 #include <GLES/glext.h>
 
-#include <ui/FramebufferNativeWindow.h>
-#include "EGLUtils.h"
+#include <WindowSurface.h>
+#include <EGLUtils.h>
 
 #include <stdio.h>

 #include <stdlib.h>
@@ -25,7 +25,7 @@
 #define FIXED_ONE 0x10000
 #define ITERATIONS 50

 

-int init_gl_surface(void);

+int init_gl_surface(const WindowSurface&);

 void free_gl_surface(void);

 void init_scene(void);

 void render(int quads);

@@ -98,7 +98,8 @@
 
     printf("Initializing EGL...\n");
 

-    if(!init_gl_surface())

+    WindowSurface windowSurface;
+    if(!init_gl_surface(windowSurface))

     {

         printf("GL initialisation failed - exiting\n");

         return 0;

@@ -117,7 +118,7 @@
     return 0;

 }

 

-int init_gl_surface(void)

+int init_gl_surface(const WindowSurface& windowSurface)

 {

     EGLint numConfigs = 1;

     EGLConfig myConfig = {0};

@@ -140,7 +141,7 @@
         return 0;

     }

 
-    EGLNativeWindowType window = android_createDisplaySurface();

+    EGLNativeWindowType window = windowSurface.getSurface();

     EGLUtils::selectConfigForNativeWindow(eglDisplay, attrib, window, &myConfig);

 

     if ( (eglSurface = eglCreateWindowSurface(eglDisplay, myConfig,
diff --git a/opengl/tools/glgen/gen b/opengl/tools/glgen/gen
index 7146a29..84a94c8 100755
--- a/opengl/tools/glgen/gen
+++ b/opengl/tools/glgen/gen
@@ -105,7 +105,9 @@
                     android/opengl/GLES11.java \
                     android/opengl/GLES11Ext.java \
                     android/opengl/GLES20.java \
-                    android/opengl/GLES30.java
+                    android/opengl/GLES30.java \
+                    android/opengl/GLES31.java \
+                    android/opengl/GLES31Ext.java
 popd > /dev/null
 JAVA_RESULT=$?
 if [ $JAVA_RESULT -ne 0 ]; then
@@ -152,7 +154,7 @@
     compareGenerated ../../../../base/opengl/java/javax/microedition/khronos/opengles generated/javax/microedition/khronos/opengles $x
 done
 
-for x in EGL14 EGLExt GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30
+for x in EGL14 EGLExt GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30 GLES31 GLES31Ext
 do
     compareGenerated ../../../../base/opengl/java/android/opengl generated/android/opengl ${x}.java
     compareGenerated ../../../../base/core/jni generated/C android_opengl_${x}.cpp
diff --git a/opengl/tools/glgen/specs/gles11/GLES31.spec b/opengl/tools/glgen/specs/gles11/GLES31.spec
new file mode 100644
index 0000000..28c1e8b
--- /dev/null
+++ b/opengl/tools/glgen/specs/gles11/GLES31.spec
@@ -0,0 +1,68 @@
+void glDispatchCompute ( GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z )
+void glDispatchComputeIndirect ( GLintptr indirect )
+void glDrawArraysIndirect ( GLenum mode, const void *indirect )
+void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect )
+void glFramebufferParameteri ( GLenum target, GLenum pname, GLint param )
+void glGetFramebufferParameteriv ( GLenum target, GLenum pname, GLint *params )
+void glGetProgramInterfaceiv ( GLuint program, GLenum programInterface, GLenum pname, GLint *params )
+GLuint glGetProgramResourceIndex ( GLuint program, GLenum programInterface, const GLchar *name )
+void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name )
+void glGetProgramResourceiv ( GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params )
+GLint glGetProgramResourceLocation ( GLuint program, GLenum programInterface, const GLchar *name )
+void glUseProgramStages ( GLuint pipeline, GLbitfield stages, GLuint program )
+void glActiveShaderProgram ( GLuint pipeline, GLuint program )
+GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings )
+void glBindProgramPipeline ( GLuint pipeline )
+void glDeleteProgramPipelines ( GLsizei n, const GLuint *pipelines )
+void glGenProgramPipelines ( GLsizei n, GLuint *pipelines )
+GLboolean glIsProgramPipeline ( GLuint pipeline )
+void glGetProgramPipelineiv ( GLuint pipeline, GLenum pname, GLint *params )
+void glProgramUniform1i ( GLuint program, GLint location, GLint v0 )
+void glProgramUniform2i ( GLuint program, GLint location, GLint v0, GLint v1 )
+void glProgramUniform3i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2 )
+void glProgramUniform4i ( GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3 )
+void glProgramUniform1ui ( GLuint program, GLint location, GLuint v0 )
+void glProgramUniform2ui ( GLuint program, GLint location, GLuint v0, GLuint v1 )
+void glProgramUniform3ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2 )
+void glProgramUniform4ui ( GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 )
+void glProgramUniform1f ( GLuint program, GLint location, GLfloat v0 )
+void glProgramUniform2f ( GLuint program, GLint location, GLfloat v0, GLfloat v1 )
+void glProgramUniform3f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2 )
+void glProgramUniform4f ( GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 )
+void glProgramUniform1iv ( GLuint program, GLint location, GLsizei count, const GLint *value )
+void glProgramUniform2iv ( GLuint program, GLint location, GLsizei count, const GLint *value )
+void glProgramUniform3iv ( GLuint program, GLint location, GLsizei count, const GLint *value )
+void glProgramUniform4iv ( GLuint program, GLint location, GLsizei count, const GLint *value )
+void glProgramUniform1uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value )
+void glProgramUniform2uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value )
+void glProgramUniform3uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value )
+void glProgramUniform4uiv ( GLuint program, GLint location, GLsizei count, const GLuint *value )
+void glProgramUniform1fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value )
+void glProgramUniform2fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value )
+void glProgramUniform3fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value )
+void glProgramUniform4fv ( GLuint program, GLint location, GLsizei count, const GLfloat *value )
+void glProgramUniformMatrix2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix2x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix3x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix2x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix4x2fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix3x4fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glProgramUniformMatrix4x3fv ( GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
+void glValidateProgramPipeline ( GLuint pipeline )
+void glGetProgramPipelineInfoLog ( GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog )
+void glBindImageTexture ( GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format )
+void glGetBooleani_v ( GLenum target, GLuint index, GLboolean *data )
+void glMemoryBarrier ( GLbitfield barriers )
+void glMemoryBarrierByRegion ( GLbitfield barriers )
+void glTexStorage2DMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations )
+void glGetMultisamplefv ( GLenum pname, GLuint index, GLfloat *val )
+void glSampleMaski ( GLuint maskNumber, GLbitfield mask )
+void glGetTexLevelParameteriv ( GLenum target, GLint level, GLenum pname, GLint *params )
+void glGetTexLevelParameterfv ( GLenum target, GLint level, GLenum pname, GLfloat *params )
+void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride )
+void glVertexAttribFormat ( GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset )
+void glVertexAttribIFormat ( GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset )
+void glVertexAttribBinding ( GLuint attribindex, GLuint bindingindex )
+void glVertexBindingDivisor ( GLuint bindingindex, GLuint divisor )
diff --git a/opengl/tools/glgen/specs/gles11/GLES31Ext.spec b/opengl/tools/glgen/specs/gles11/GLES31Ext.spec
new file mode 100644
index 0000000..2898c7f
--- /dev/null
+++ b/opengl/tools/glgen/specs/gles11/GLES31Ext.spec
@@ -0,0 +1,36 @@
+void glBlendBarrierKHR ( void )
+void glDebugMessageControlKHR ( GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled )
+void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf )
+void glDebugMessageCallbackKHR ( GLDEBUGPROCKHR callback, const void *userParam )
+GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+void glPushDebugGroupKHR ( GLenum source, GLuint id, GLsizei length, const GLchar *message )
+void glPopDebugGroupKHR ( void )
+void glObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label )
+void glGetObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label )
+void glObjectPtrLabelKHR ( const void *ptr, GLsizei length, const GLchar *label )
+void glGetObjectPtrLabelKHR ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label )
+void glGetPointervKHR ( GLenum pname, void **params )
+void glMinSampleShadingOES ( GLfloat value )
+void glTexStorage3DMultisampleOES ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations )
+void glCopyImageSubDataEXT ( GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth )
+void glEnableiEXT ( GLenum target, GLuint index )
+void glDisableiEXT ( GLenum target, GLuint index )
+void glBlendEquationiEXT ( GLuint buf, GLenum mode )
+void glBlendEquationSeparateiEXT ( GLuint buf, GLenum modeRGB, GLenum modeAlpha )
+void glBlendFunciEXT ( GLuint buf, GLenum src, GLenum dst )
+void glBlendFuncSeparateiEXT ( GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
+void glColorMaskiEXT ( GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a )
+GLboolean glIsEnablediEXT ( GLenum target, GLuint index )
+void glFramebufferTextureEXT ( GLenum target, GLenum attachment, GLuint texture, GLint level )
+void glPrimitiveBoundingBoxEXT ( GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW )
+void glPatchParameteriEXT ( GLenum pname, GLint value )
+void glTexParameterIivEXT ( GLenum target, GLenum pname, const GLint *params )
+void glTexParameterIuivEXT ( GLenum target, GLenum pname, const GLuint *params )
+void glGetTexParameterIivEXT ( GLenum target, GLenum pname, GLint *params )
+void glGetTexParameterIuivEXT ( GLenum target, GLenum pname, GLuint *params )
+void glSamplerParameterIivEXT ( GLuint sampler, GLenum pname, const GLint *param )
+void glSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, const GLuint *param )
+void glGetSamplerParameterIivEXT ( GLuint sampler, GLenum pname, GLint *params )
+void glGetSamplerParameterIuivEXT ( GLuint sampler, GLenum pname, GLuint *params )
+void glTexBufferEXT ( GLenum target, GLenum internalformat, GLuint buffer )
+void glTexBufferRangeEXT ( GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size )
diff --git a/opengl/tools/glgen/src/GenerateGLES.java b/opengl/tools/glgen/src/GenerateGLES.java
index c99c45d..5693ef3 100644
--- a/opengl/tools/glgen/src/GenerateGLES.java
+++ b/opengl/tools/glgen/src/GenerateGLES.java
@@ -84,7 +84,8 @@
 
         // Generate files
         for(String suffix: new String[] {"GLES10", "GLES10Ext",
-                "GLES11", "GLES11Ext", "GLES20", "GLES30"})
+                "GLES11", "GLES11Ext", "GLES20",
+                "GLES30", "GLES31", "GLES31Ext"})
         {
             BufferedReader spec11Reader =
                 new BufferedReader(new FileReader("specs/gles11/"
diff --git a/opengl/tools/glgen/static/egl/EGLObjectHandle.java b/opengl/tools/glgen/static/egl/EGLObjectHandle.java
index e6e3976..f961eb7 100644
--- a/opengl/tools/glgen/static/egl/EGLObjectHandle.java
+++ b/opengl/tools/glgen/static/egl/EGLObjectHandle.java
@@ -24,18 +24,28 @@
 public abstract class EGLObjectHandle {
     private final long mHandle;
 
-    // TODO Deprecate EGLObjectHandle(int) method
+    /**
+     * @deprecated Use {@link #EGLObjectHandle(long)} instead. Handles
+     *     on 64 bit platforms will be wider than java ints.
+     */
+    @Deprecated
     protected EGLObjectHandle(int handle) {
         mHandle = handle;
     }
-    // TODO Unhide the EGLObjectHandle(long) method
-    /**
-     * {@hide}
-     */
     protected EGLObjectHandle(long handle) {
         mHandle = handle;
     }
-    // TODO Deprecate getHandle() method in favor of getNativeHandle()
+    /**
+     * @deprecated Use {@link #getNativeHandle()} instead. Handles on
+     *     64 bit platforms will be wider than java ints.
+     */
+    @Deprecated
+    public int getHandle() {
+        if ((mHandle & 0xffffffffL) != mHandle) {
+            throw new UnsupportedOperationException();
+        }
+        return (int)mHandle;
+    }
     /**
      * Returns the native handle of the wrapped EGL object. This handle can be
      * cast to the corresponding native type on the native side.
@@ -44,17 +54,6 @@
      *
      * @return the native handle of the wrapped EGL object.
      */
-    public int getHandle() {
-        if ((mHandle & 0xffffffffL) != mHandle) {
-            throw new UnsupportedOperationException();
-        }
-        return (int)mHandle;
-    }
-
-    // TODO Unhide getNativeHandle() method
-    /**
-     * {@hide}
-     */
     public long getNativeHandle() {
         return mHandle;
     }
diff --git a/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if
index 146d883..648fa82 100644
--- a/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if
+++ b/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if
@@ -22,6 +22,6 @@
 public class GLES10Ext {
     native private static void _nativeClassInit();
     static {
-	    _nativeClassInit();
+        _nativeClassInit();
     }
     
\ No newline at end of file
diff --git a/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if
index 16cab04..baabbed 100644
--- a/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if
+++ b/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if
@@ -262,7 +262,7 @@
 
     native private static void _nativeClassInit();
     static {
-	    _nativeClassInit();
+        _nativeClassInit();
     }
 
     private static Buffer _colorPointer;
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if
index efaf867..233562e 100644
--- a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if
+++ b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if
@@ -132,7 +132,7 @@
 
     native private static void _nativeClassInit();
     static {
-	    _nativeClassInit();
+        _nativeClassInit();
     }
     
     private static final int GL_BYTE = GLES10.GL_BYTE;
diff --git a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if
index e63d470..2b3e40e 100644
--- a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if
+++ b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if
@@ -147,7 +147,7 @@
 
     native private static void _nativeClassInit();
     static {
-	    _nativeClassInit();
+        _nativeClassInit();
     }
 
     private static Buffer _pointSizePointerOES;
diff --git a/opengl/tools/glgen/stubs/gles11/GLES31ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES31ExtHeader.java-if
new file mode 100644
index 0000000..8fc2f1c
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/GLES31ExtHeader.java-if
@@ -0,0 +1,256 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+package android.opengl;
+
+public class GLES31Ext {
+
+    // GL_KHR_blend_equation_advanced
+    public static final int GL_BLEND_ADVANCED_COHERENT_KHR                          = 0x9285;
+    public static final int GL_MULTIPLY_KHR                                         = 0x9294;
+    public static final int GL_SCREEN_KHR                                           = 0x9295;
+    public static final int GL_OVERLAY_KHR                                          = 0x9296;
+    public static final int GL_DARKEN_KHR                                           = 0x9297;
+    public static final int GL_LIGHTEN_KHR                                          = 0x9298;
+    public static final int GL_COLORDODGE_KHR                                       = 0x9299;
+    public static final int GL_COLORBURN_KHR                                        = 0x929A;
+    public static final int GL_HARDLIGHT_KHR                                        = 0x929B;
+    public static final int GL_SOFTLIGHT_KHR                                        = 0x929C;
+    public static final int GL_DIFFERENCE_KHR                                       = 0x929E;
+    public static final int GL_EXCLUSION_KHR                                        = 0x92A0;
+    public static final int GL_HSL_HUE_KHR                                          = 0x92AD;
+    public static final int GL_HSL_SATURATION_KHR                                   = 0x92AE;
+    public static final int GL_HSL_COLOR_KHR                                        = 0x92AF;
+    public static final int GL_HSL_LUMINOSITY_KHR                                   = 0x92B0;
+
+    // GL_KHR_debug
+    public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR                         = 0x8242;
+    public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR                 = 0x8243;
+    public static final int GL_DEBUG_CALLBACK_FUNCTION_KHR                          = 0x8244;
+    public static final int GL_DEBUG_CALLBACK_USER_PARAM_KHR                        = 0x8245;
+    public static final int GL_DEBUG_SOURCE_API_KHR                                 = 0x8246;
+    public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR                       = 0x8247;
+    public static final int GL_DEBUG_SOURCE_SHADER_COMPILER_KHR                     = 0x8248;
+    public static final int GL_DEBUG_SOURCE_THIRD_PARTY_KHR                         = 0x8249;
+    public static final int GL_DEBUG_SOURCE_APPLICATION_KHR                         = 0x824A;
+    public static final int GL_DEBUG_SOURCE_OTHER_KHR                               = 0x824B;
+    public static final int GL_DEBUG_TYPE_ERROR_KHR                                 = 0x824C;
+    public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR                   = 0x824D;
+    public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR                    = 0x824E;
+    public static final int GL_DEBUG_TYPE_PORTABILITY_KHR                           = 0x824F;
+    public static final int GL_DEBUG_TYPE_PERFORMANCE_KHR                           = 0x8250;
+    public static final int GL_DEBUG_TYPE_OTHER_KHR                                 = 0x8251;
+    public static final int GL_DEBUG_TYPE_MARKER_KHR                                = 0x8268;
+    public static final int GL_DEBUG_TYPE_PUSH_GROUP_KHR                            = 0x8269;
+    public static final int GL_DEBUG_TYPE_POP_GROUP_KHR                             = 0x826A;
+    public static final int GL_DEBUG_SEVERITY_NOTIFICATION_KHR                      = 0x826B;
+    public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR                      = 0x826C;
+    public static final int GL_DEBUG_GROUP_STACK_DEPTH_KHR                          = 0x826D;
+    public static final int GL_BUFFER_KHR                                           = 0x82E0;
+    public static final int GL_SHADER_KHR                                           = 0x82E1;
+    public static final int GL_PROGRAM_KHR                                          = 0x82E2;
+    public static final int GL_VERTEX_ARRAY_KHR                                     = 0x8074;
+    public static final int GL_QUERY_KHR                                            = 0x82E3;
+    public static final int GL_SAMPLER_KHR                                          = 0x82E6;
+    public static final int GL_MAX_LABEL_LENGTH_KHR                                 = 0x82E8;
+    public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_KHR                         = 0x9143;
+    public static final int GL_MAX_DEBUG_LOGGED_MESSAGES_KHR                        = 0x9144;
+    public static final int GL_DEBUG_LOGGED_MESSAGES_KHR                            = 0x9145;
+    public static final int GL_DEBUG_SEVERITY_HIGH_KHR                              = 0x9146;
+    public static final int GL_DEBUG_SEVERITY_MEDIUM_KHR                            = 0x9147;
+    public static final int GL_DEBUG_SEVERITY_LOW_KHR                               = 0x9148;
+    public static final int GL_DEBUG_OUTPUT_KHR                                     = 0x92E0;
+    public static final int GL_CONTEXT_FLAG_DEBUG_BIT_KHR                           = 0x00000002;
+    public static final int GL_STACK_OVERFLOW_KHR                                   = 0x0503;
+    public static final int GL_STACK_UNDERFLOW_KHR                                  = 0x0504;
+
+    // GL_KHR_texture_compression_astc_ldr
+    public static final int GL_COMPRESSED_RGBA_ASTC_4x4_KHR                         = 0x93B0;
+    public static final int GL_COMPRESSED_RGBA_ASTC_5x4_KHR                         = 0x93B1;
+    public static final int GL_COMPRESSED_RGBA_ASTC_5x5_KHR                         = 0x93B2;
+    public static final int GL_COMPRESSED_RGBA_ASTC_6x5_KHR                         = 0x93B3;
+    public static final int GL_COMPRESSED_RGBA_ASTC_6x6_KHR                         = 0x93B4;
+    public static final int GL_COMPRESSED_RGBA_ASTC_8x5_KHR                         = 0x93B5;
+    public static final int GL_COMPRESSED_RGBA_ASTC_8x6_KHR                         = 0x93B6;
+    public static final int GL_COMPRESSED_RGBA_ASTC_8x8_KHR                         = 0x93B7;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x5_KHR                        = 0x93B8;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x6_KHR                        = 0x93B9;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x8_KHR                        = 0x93BA;
+    public static final int GL_COMPRESSED_RGBA_ASTC_10x10_KHR                       = 0x93BB;
+    public static final int GL_COMPRESSED_RGBA_ASTC_12x10_KHR                       = 0x93BC;
+    public static final int GL_COMPRESSED_RGBA_ASTC_12x12_KHR                       = 0x93BD;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR                 = 0x93D0;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR                 = 0x93D1;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR                 = 0x93D2;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR                 = 0x93D3;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR                 = 0x93D4;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR                 = 0x93D5;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR                 = 0x93D6;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR                 = 0x93D7;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR                = 0x93D8;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR                = 0x93D9;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR                = 0x93DA;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR               = 0x93DB;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR               = 0x93DC;
+    public static final int GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR               = 0x93DD;
+
+    // GL_OES_sample_shading
+    public static final int GL_SAMPLE_SHADING_OES                                   = 0x8C36;
+    public static final int GL_MIN_SAMPLE_SHADING_VALUE_OES                         = 0x8C37;
+
+    // GL_OES_shader_multisample_interpolation
+    public static final int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES                = 0x8E5B;
+    public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES                = 0x8E5C;
+    public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES               = 0x8E5D;
+
+    // GL_OES_texture_stencil8
+    public static final int GL_STENCIL_INDEX_OES                                    = 0x1901;
+    public static final int GL_STENCIL_INDEX8_OES                                   = 0x8D48;
+
+    // GL_OES_texture_storage_multisample_2d_array
+    public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES                     = 0x9102;
+    public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES             = 0x9105;
+    public static final int GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES                     = 0x910B;
+    public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES                 = 0x910C;
+    public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES        = 0x910D;
+
+    // GL_EXT_geometry_shader
+    public static final int GL_GEOMETRY_SHADER_EXT                                  = 0x8DD9;
+    public static final int GL_GEOMETRY_SHADER_BIT_EXT                              = 0x00000004;
+    public static final int GL_GEOMETRY_LINKED_VERTICES_OUT_EXT                     = 0x8916;
+    public static final int GL_GEOMETRY_LINKED_INPUT_TYPE_EXT                       = 0x8917;
+    public static final int GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT                      = 0x8918;
+    public static final int GL_GEOMETRY_SHADER_INVOCATIONS_EXT                      = 0x887F;
+    public static final int GL_LAYER_PROVOKING_VERTEX_EXT                           = 0x825E;
+    public static final int GL_LINES_ADJACENCY_EXT                                  = 0x000A;
+    public static final int GL_LINE_STRIP_ADJACENCY_EXT                             = 0x000B;
+    public static final int GL_TRIANGLES_ADJACENCY_EXT                              = 0x000C;
+    public static final int GL_TRIANGLE_STRIP_ADJACENCY_EXT                         = 0x000D;
+    public static final int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT                  = 0x8DDF;
+    public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT                      = 0x8A2C;
+    public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT         = 0x8A32;
+    public static final int GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT                    = 0x9123;
+    public static final int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT                   = 0x9124;
+    public static final int GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT                     = 0x8DE0;
+    public static final int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT             = 0x8DE1;
+    public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT                  = 0x8E5A;
+    public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT                 = 0x8C29;
+    public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT              = 0x92CF;
+    public static final int GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT                     = 0x92D5;
+    public static final int GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT                      = 0x90CD;
+    public static final int GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT               = 0x90D7;
+    public static final int GL_FIRST_VERTEX_CONVENTION_EXT                          = 0x8E4D;
+    public static final int GL_LAST_VERTEX_CONVENTION_EXT                           = 0x8E4E;
+    public static final int GL_UNDEFINED_VERTEX_EXT                                 = 0x8260;
+    public static final int GL_PRIMITIVES_GENERATED_EXT                             = 0x8C87;
+    public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT                       = 0x9312;
+    public static final int GL_MAX_FRAMEBUFFER_LAYERS_EXT                           = 0x9317;
+    public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT             = 0x8DA8;
+    public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT                   = 0x8DA7;
+    public static final int GL_REFERENCED_BY_GEOMETRY_SHADER_EXT                    = 0x9309;
+
+    // GL_EXT_primitive_bounding_box
+    public static final int GL_PRIMITIVE_BOUNDING_BOX_EXT                           = 0x92BE;
+
+    // GL_EXT_tessellation_shader
+    public static final int GL_PATCHES_EXT                                          = 0x000E;
+    public static final int GL_PATCH_VERTICES_EXT                                   = 0x8E72;
+    public static final int GL_TESS_CONTROL_OUTPUT_VERTICES_EXT                     = 0x8E75;
+    public static final int GL_TESS_GEN_MODE_EXT                                    = 0x8E76;
+    public static final int GL_TESS_GEN_SPACING_EXT                                 = 0x8E77;
+    public static final int GL_TESS_GEN_VERTEX_ORDER_EXT                            = 0x8E78;
+    public static final int GL_TESS_GEN_POINT_MODE_EXT                              = 0x8E79;
+    public static final int GL_ISOLINES_EXT                                         = 0x8E7A;
+    public static final int GL_QUADS_EXT                                            = 0x0007;
+    public static final int GL_FRACTIONAL_ODD_EXT                                   = 0x8E7B;
+    public static final int GL_FRACTIONAL_EVEN_EXT                                  = 0x8E7C;
+    public static final int GL_MAX_PATCH_VERTICES_EXT                               = 0x8E7D;
+    public static final int GL_MAX_TESS_GEN_LEVEL_EXT                               = 0x8E7E;
+    public static final int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT              = 0x8E7F;
+    public static final int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT           = 0x8E80;
+    public static final int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT             = 0x8E81;
+    public static final int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT          = 0x8E82;
+    public static final int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT               = 0x8E83;
+    public static final int GL_MAX_TESS_PATCH_COMPONENTS_EXT                        = 0x8E84;
+    public static final int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT         = 0x8E85;
+    public static final int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT            = 0x8E86;
+    public static final int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT                  = 0x8E89;
+    public static final int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT               = 0x8E8A;
+    public static final int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT                = 0x886C;
+    public static final int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT             = 0x886D;
+    public static final int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT     = 0x8E1E;
+    public static final int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT  = 0x8E1F;
+    public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT          = 0x92CD;
+    public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT       = 0x92CE;
+    public static final int GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT                 = 0x92D3;
+    public static final int GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT              = 0x92D4;
+    public static final int GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT                  = 0x90CB;
+    public static final int GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT               = 0x90CC;
+    public static final int GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT           = 0x90D8;
+    public static final int GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT        = 0x90D9;
+    public static final int GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED              = 0x8221;
+    public static final int GL_IS_PER_PATCH_EXT                                     = 0x92E7;
+    public static final int GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT                = 0x9307;
+    public static final int GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT             = 0x9308;
+    public static final int GL_TESS_CONTROL_SHADER_EXT                              = 0x8E88;
+    public static final int GL_TESS_EVALUATION_SHADER_EXT                           = 0x8E87;
+    public static final int GL_TESS_CONTROL_SHADER_BIT_EXT                          = 0x00000008;
+    public static final int GL_TESS_EVALUATION_SHADER_BIT_EXT                       = 0x00000010;
+
+    // GL_EXT_texture_border_clamp
+    public static final int GL_TEXTURE_BORDER_COLOR_EXT                             = 0x1004;
+    public static final int GL_CLAMP_TO_BORDER_EXT                                  = 0x812D;
+
+    // GL_EXT_texture_buffer
+    public static final int GL_TEXTURE_BUFFER_EXT                                   = 0x8C2A;
+    public static final int GL_TEXTURE_BUFFER_BINDING_EXT                           = 0x8C2A;
+    public static final int GL_MAX_TEXTURE_BUFFER_SIZE_EXT                          = 0x8C2B;
+    public static final int GL_TEXTURE_BINDING_BUFFER_EXT                           = 0x8C2C;
+    public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT                = 0x8C2D;
+    public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT                  = 0x919F;
+    public static final int GL_SAMPLER_BUFFER_EXT                                   = 0x8DC2;
+    public static final int GL_INT_SAMPLER_BUFFER_EXT                               = 0x8DD0;
+    public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT                      = 0x8DD8;
+    public static final int GL_IMAGE_BUFFER_EXT                                     = 0x9051;
+    public static final int GL_INT_IMAGE_BUFFER_EXT                                 = 0x905C;
+    public static final int GL_UNSIGNED_INT_IMAGE_BUFFER_EXT                        = 0x9067;
+    public static final int GL_TEXTURE_BUFFER_OFFSET_EXT                            = 0x919D;
+    public static final int GL_TEXTURE_BUFFER_SIZE_EXT                              = 0x919E;
+
+    // GL_EXT_texture_cube_map_array
+    public static final int GL_TEXTURE_CUBE_MAP_ARRAY_EXT                           = 0x9009;
+    public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT                   = 0x900A;
+    public static final int GL_SAMPLER_CUBE_MAP_ARRAY_EXT                           = 0x900C;
+    public static final int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT                    = 0x900D;
+    public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT                       = 0x900E;
+    public static final int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT              = 0x900F;
+    public static final int GL_IMAGE_CUBE_MAP_ARRAY_EXT                             = 0x9054;
+    public static final int GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT                         = 0x905F;
+    public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT                = 0x906A;
+
+    // GL_EXT_texture_sRGB_decode
+    public static final int GL_TEXTURE_SRGB_DECODE_EXT                              = 0x8A48;
+    public static final int GL_DECODE_EXT                                           = 0x8A49;
+    public static final int GL_SKIP_DECODE_EXT                                      = 0x8A4A;
+
+    native private static void _nativeClassInit();
+    static {
+        _nativeClassInit();
+    }
+
+    private GLES31Ext() {}
diff --git a/opengl/tools/glgen/stubs/gles11/GLES31ExtcHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES31ExtcHeader.cpp
new file mode 100644
index 0000000..e7e3561
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/GLES31ExtcHeader.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+#include <GLES3/gl31.h>
+#include <GLES2/gl2ext.h>
+
diff --git a/opengl/tools/glgen/stubs/gles11/GLES31Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES31Header.java-if
new file mode 100644
index 0000000..5b45df4
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/GLES31Header.java-if
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+package android.opengl;
+
+/** OpenGL ES 3.1
+ */
+public class GLES31 extends GLES30 {
+
+    public static final int GL_VERTEX_SHADER_BIT                            = 0x00000001;
+    public static final int GL_FRAGMENT_SHADER_BIT                          = 0x00000002;
+    public static final int GL_UNIFORM_BARRIER_BIT                          = 0x00000004;
+    public static final int GL_TEXTURE_FETCH_BARRIER_BIT                    = 0x00000008;
+    public static final int GL_COMPUTE_SHADER_BIT                           = 0x00000020;
+    public static final int GL_COMMAND_BARRIER_BIT                          = 0x00000040;
+    public static final int GL_PIXEL_BUFFER_BARRIER_BIT                     = 0x00000080;
+    public static final int GL_TEXTURE_UPDATE_BARRIER_BIT                   = 0x00000100;
+    public static final int GL_BUFFER_UPDATE_BARRIER_BIT                    = 0x00000200;
+    public static final int GL_FRAMEBUFFER_BARRIER_BIT                      = 0x00000400;
+    public static final int GL_TRANSFORM_FEEDBACK_BARRIER_BIT               = 0x00000800;
+    public static final int GL_ATOMIC_COUNTER_BARRIER_BIT                   = 0x00001000;
+    public static final int GL_SHADER_STORAGE_BARRIER_BIT                   = 0x00002000;
+    public static final int GL_ALL_SHADER_BITS                              = -1; // 0xFFFFFFFF
+
+    public static final int GL_TEXTURE_WIDTH                                = 0x1000;
+    public static final int GL_TEXTURE_HEIGHT                               = 0x1001;
+    public static final int GL_TEXTURE_INTERNAL_FORMAT                      = 0x1003;
+    public static final int GL_STENCIL_INDEX                                = 0x1901;
+    public static final int GL_TEXTURE_RED_SIZE                             = 0x805C;
+    public static final int GL_TEXTURE_GREEN_SIZE                           = 0x805D;
+    public static final int GL_TEXTURE_BLUE_SIZE                            = 0x805E;
+    public static final int GL_TEXTURE_ALPHA_SIZE                           = 0x805F;
+    public static final int GL_TEXTURE_DEPTH                                = 0x8071;
+    public static final int GL_PROGRAM_SEPARABLE                            = 0x8258;
+    public static final int GL_ACTIVE_PROGRAM                               = 0x8259;
+    public static final int GL_PROGRAM_PIPELINE_BINDING                     = 0x825A;
+    public static final int GL_MAX_COMPUTE_SHARED_MEMORY_SIZE               = 0x8262;
+    public static final int GL_MAX_COMPUTE_UNIFORM_COMPONENTS               = 0x8263;
+    public static final int GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS           = 0x8264;
+    public static final int GL_MAX_COMPUTE_ATOMIC_COUNTERS                  = 0x8265;
+    public static final int GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS      = 0x8266;
+    public static final int GL_COMPUTE_WORK_GROUP_SIZE                      = 0x8267;
+    public static final int GL_MAX_UNIFORM_LOCATIONS                        = 0x826E;
+    public static final int GL_VERTEX_ATTRIB_BINDING                        = 0x82D4;
+    public static final int GL_VERTEX_ATTRIB_RELATIVE_OFFSET                = 0x82D5;
+    public static final int GL_VERTEX_BINDING_DIVISOR                       = 0x82D6;
+    public static final int GL_VERTEX_BINDING_OFFSET                        = 0x82D7;
+    public static final int GL_VERTEX_BINDING_STRIDE                        = 0x82D8;
+    public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET            = 0x82D9;
+    public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS                   = 0x82DA;
+    public static final int GL_MAX_VERTEX_ATTRIB_STRIDE                     = 0x82E5;
+    public static final int GL_TEXTURE_COMPRESSED                           = 0x86A1;
+    public static final int GL_TEXTURE_DEPTH_SIZE                           = 0x884A;
+    public static final int GL_READ_ONLY                                    = 0x88B8;
+    public static final int GL_WRITE_ONLY                                   = 0x88B9;
+    public static final int GL_READ_WRITE                                   = 0x88BA;
+    public static final int GL_TEXTURE_STENCIL_SIZE                         = 0x88F1;
+    public static final int GL_TEXTURE_RED_TYPE                             = 0x8C10;
+    public static final int GL_TEXTURE_GREEN_TYPE                           = 0x8C11;
+    public static final int GL_TEXTURE_BLUE_TYPE                            = 0x8C12;
+    public static final int GL_TEXTURE_ALPHA_TYPE                           = 0x8C13;
+    public static final int GL_TEXTURE_DEPTH_TYPE                           = 0x8C16;
+    public static final int GL_TEXTURE_SHARED_SIZE                          = 0x8C3F;
+    public static final int GL_SAMPLE_POSITION                              = 0x8E50;
+    public static final int GL_SAMPLE_MASK                                  = 0x8E51;
+    public static final int GL_SAMPLE_MASK_VALUE                            = 0x8E52;
+    public static final int GL_MAX_SAMPLE_MASK_WORDS                        = 0x8E59;
+    public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET            = 0x8E5E;
+    public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET            = 0x8E5F;
+    public static final int GL_MAX_IMAGE_UNITS                              = 0x8F38;
+    public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES         = 0x8F39;
+    public static final int GL_IMAGE_BINDING_NAME                           = 0x8F3A;
+    public static final int GL_IMAGE_BINDING_LEVEL                          = 0x8F3B;
+    public static final int GL_IMAGE_BINDING_LAYERED                        = 0x8F3C;
+    public static final int GL_IMAGE_BINDING_LAYER                          = 0x8F3D;
+    public static final int GL_IMAGE_BINDING_ACCESS                         = 0x8F3E;
+    public static final int GL_DRAW_INDIRECT_BUFFER                         = 0x8F3F;
+    public static final int GL_DRAW_INDIRECT_BUFFER_BINDING                 = 0x8F43;
+    public static final int GL_VERTEX_BINDING_BUFFER                        = 0x8F4F;
+    public static final int GL_IMAGE_2D                                     = 0x904D;
+    public static final int GL_IMAGE_3D                                     = 0x904E;
+    public static final int GL_IMAGE_CUBE                                   = 0x9050;
+    public static final int GL_IMAGE_2D_ARRAY                               = 0x9053;
+    public static final int GL_INT_IMAGE_2D                                 = 0x9058;
+    public static final int GL_INT_IMAGE_3D                                 = 0x9059;
+    public static final int GL_INT_IMAGE_CUBE                               = 0x905B;
+    public static final int GL_INT_IMAGE_2D_ARRAY                           = 0x905E;
+    public static final int GL_UNSIGNED_INT_IMAGE_2D                        = 0x9063;
+    public static final int GL_UNSIGNED_INT_IMAGE_3D                        = 0x9064;
+    public static final int GL_UNSIGNED_INT_IMAGE_CUBE                      = 0x9066;
+    public static final int GL_UNSIGNED_INT_IMAGE_2D_ARRAY                  = 0x9069;
+    public static final int GL_IMAGE_BINDING_FORMAT                         = 0x906E;
+    public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE              = 0x90C7;
+    public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE           = 0x90C8;
+    public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS          = 0x90C9;
+    public static final int GL_MAX_VERTEX_IMAGE_UNIFORMS                    = 0x90CA;
+    public static final int GL_MAX_FRAGMENT_IMAGE_UNIFORMS                  = 0x90CE;
+    public static final int GL_MAX_COMBINED_IMAGE_UNIFORMS                  = 0x90CF;
+    public static final int GL_SHADER_STORAGE_BUFFER                        = 0x90D2;
+    public static final int GL_SHADER_STORAGE_BUFFER_BINDING                = 0x90D3;
+    public static final int GL_SHADER_STORAGE_BUFFER_START                  = 0x90D4;
+    public static final int GL_SHADER_STORAGE_BUFFER_SIZE                   = 0x90D5;
+    public static final int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS             = 0x90D6;
+    public static final int GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS           = 0x90DA;
+    public static final int GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS            = 0x90DB;
+    public static final int GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS           = 0x90DC;
+    public static final int GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS           = 0x90DD;
+    public static final int GL_MAX_SHADER_STORAGE_BLOCK_SIZE                = 0x90DE;
+    public static final int GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT       = 0x90DF;
+    public static final int GL_DEPTH_STENCIL_TEXTURE_MODE                   = 0x90EA;
+    public static final int GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS           = 0x90EB;
+    public static final int GL_DISPATCH_INDIRECT_BUFFER                     = 0x90EE;
+    public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING             = 0x90EF;
+    public static final int GL_TEXTURE_2D_MULTISAMPLE                       = 0x9100;
+    public static final int GL_TEXTURE_BINDING_2D_MULTISAMPLE               = 0x9104;
+    public static final int GL_TEXTURE_SAMPLES                              = 0x9106;
+    public static final int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS               = 0x9107;
+    public static final int GL_SAMPLER_2D_MULTISAMPLE                       = 0x9108;
+    public static final int GL_INT_SAMPLER_2D_MULTISAMPLE                   = 0x9109;
+    public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE          = 0x910A;
+    public static final int GL_MAX_COLOR_TEXTURE_SAMPLES                    = 0x910E;
+    public static final int GL_MAX_DEPTH_TEXTURE_SAMPLES                    = 0x910F;
+    public static final int GL_MAX_INTEGER_SAMPLES                          = 0x9110;
+    public static final int GL_COMPUTE_SHADER                               = 0x91B9;
+    public static final int GL_MAX_COMPUTE_UNIFORM_BLOCKS                   = 0x91BB;
+    public static final int GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS              = 0x91BC;
+    public static final int GL_MAX_COMPUTE_IMAGE_UNIFORMS                   = 0x91BD;
+    public static final int GL_MAX_COMPUTE_WORK_GROUP_COUNT                 = 0x91BE;
+    public static final int GL_MAX_COMPUTE_WORK_GROUP_SIZE                  = 0x91BF;
+    public static final int GL_ATOMIC_COUNTER_BUFFER                        = 0x92C0;
+    public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING                = 0x92C1;
+    public static final int GL_ATOMIC_COUNTER_BUFFER_START                  = 0x92C2;
+    public static final int GL_ATOMIC_COUNTER_BUFFER_SIZE                   = 0x92C3;
+    public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS            = 0x92CC;
+    public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS          = 0x92D0;
+    public static final int GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS          = 0x92D1;
+    public static final int GL_MAX_VERTEX_ATOMIC_COUNTERS                   = 0x92D2;
+    public static final int GL_MAX_FRAGMENT_ATOMIC_COUNTERS                 = 0x92D6;
+    public static final int GL_MAX_COMBINED_ATOMIC_COUNTERS                 = 0x92D7;
+    public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE               = 0x92D8;
+    public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS                = 0x92D9;
+    public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER                  = 0x92DB;
+    public static final int GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS           = 0x92DC;
+    public static final int GL_UNIFORM                                      = 0x92E1;
+    public static final int GL_UNIFORM_BLOCK                                = 0x92E2;
+    public static final int GL_PROGRAM_INPUT                                = 0x92E3;
+    public static final int GL_PROGRAM_OUTPUT                               = 0x92E4;
+    public static final int GL_BUFFER_VARIABLE                              = 0x92E5;
+    public static final int GL_SHADER_STORAGE_BLOCK                         = 0x92E6;
+    public static final int GL_TRANSFORM_FEEDBACK_VARYING                   = 0x92F4;
+    public static final int GL_ACTIVE_RESOURCES                             = 0x92F5;
+    public static final int GL_MAX_NAME_LENGTH                              = 0x92F6;
+    public static final int GL_MAX_NUM_ACTIVE_VARIABLES                     = 0x92F7;
+    public static final int GL_NAME_LENGTH                                  = 0x92F9;
+    public static final int GL_TYPE                                         = 0x92FA;
+    public static final int GL_ARRAY_SIZE                                   = 0x92FB;
+    public static final int GL_OFFSET                                       = 0x92FC;
+    public static final int GL_BLOCK_INDEX                                  = 0x92FD;
+    public static final int GL_ARRAY_STRIDE                                 = 0x92FE;
+    public static final int GL_MATRIX_STRIDE                                = 0x92FF;
+    public static final int GL_IS_ROW_MAJOR                                 = 0x9300;
+    public static final int GL_ATOMIC_COUNTER_BUFFER_INDEX                  = 0x9301;
+    public static final int GL_BUFFER_BINDING                               = 0x9302;
+    public static final int GL_BUFFER_DATA_SIZE                             = 0x9303;
+    public static final int GL_NUM_ACTIVE_VARIABLES                         = 0x9304;
+    public static final int GL_ACTIVE_VARIABLES                             = 0x9305;
+    public static final int GL_REFERENCED_BY_VERTEX_SHADER                  = 0x9306;
+    public static final int GL_REFERENCED_BY_FRAGMENT_SHADER                = 0x930A;
+    public static final int GL_REFERENCED_BY_COMPUTE_SHADER                 = 0x930B;
+    public static final int GL_TOP_LEVEL_ARRAY_SIZE                         = 0x930C;
+    public static final int GL_TOP_LEVEL_ARRAY_STRIDE                       = 0x930D;
+    public static final int GL_LOCATION                                     = 0x930E;
+    public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH                    = 0x9310;
+    public static final int GL_FRAMEBUFFER_DEFAULT_HEIGHT                   = 0x9311;
+    public static final int GL_FRAMEBUFFER_DEFAULT_SAMPLES                  = 0x9313;
+    public static final int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS   = 0x9314;
+    public static final int GL_MAX_FRAMEBUFFER_WIDTH                        = 0x9315;
+    public static final int GL_MAX_FRAMEBUFFER_HEIGHT                       = 0x9316;
+    public static final int GL_MAX_FRAMEBUFFER_SAMPLES                      = 0x9318;
+
+    native private static void _nativeClassInit();
+    static {
+        _nativeClassInit();
+    }
+
+    private GLES31() {}
diff --git a/opengl/tools/glgen/stubs/gles11/GLES31cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES31cHeader.cpp
new file mode 100644
index 0000000..c48ec7c
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/GLES31cHeader.cpp
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This source file is automatically generated
+
+#include <stdint.h>
+#include <GLES3/gl31.h>
diff --git a/opengl/tools/glgen/stubs/gles11/common.cpp b/opengl/tools/glgen/stubs/gles11/common.cpp
index c5a7a24..f7bcb9d 100644
--- a/opengl/tools/glgen/stubs/gles11/common.cpp
+++ b/opengl/tools/glgen/stubs/gles11/common.cpp
@@ -1,5 +1,5 @@
-#include "jni.h"
-#include "JNIHelp.h"
+#include <jni.h>
+#include <JNIHelp.h>
 #include <android_runtime/AndroidRuntime.h>
 #include <utils/misc.h>
 #include <assert.h>
diff --git a/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.cpp b/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.cpp
new file mode 100644
index 0000000..b3b70cc
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.cpp
@@ -0,0 +1,15 @@
+/* void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride ) */
+static void
+android_glBindVertexBuffer__IIJI
+  (JNIEnv *_env, jobject _this, jint bindingindex, jint buffer, jlong offset, jint stride) {
+    if (sizeof(GLintptr) != sizeof(jlong) && (offset < LONG_MIN || offset > LONG_MAX)) {
+        jniThrowException(_env, "java/lang/IllegalArgumentException", "offset too large");
+        return;
+    }
+    glBindVertexBuffer(
+        (GLuint)bindingindex,
+        (GLuint)buffer,
+        (GLintptr)offset,
+        (GLsizei)stride
+    );
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.java b/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.java
new file mode 100644
index 0000000..bab2e89
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.java
@@ -0,0 +1,9 @@
+    // C function void glBindVertexBuffer ( GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride )
+
+    public static native void glBindVertexBuffer(
+        int bindingindex,
+        int buffer,
+        long offset,
+        int stride
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.nativeReg b/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.nativeReg
new file mode 100644
index 0000000..f3d5979
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glBindVertexBuffer.nativeReg
@@ -0,0 +1 @@
+{"glBindVertexBuffer", "(IIJI)V", (void *) android_glBindVertexBuffer__IIJI },
diff --git a/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.cpp b/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.cpp
new file mode 100644
index 0000000..e701481
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.cpp
@@ -0,0 +1,8 @@
+/* GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings ) */
+static jint
+android_glCreateShaderProgramv
+  (JNIEnv *_env, jobject _this, jint type, jobjectArray strings) {
+
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.java b/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.java
new file mode 100644
index 0000000..5f7b41b
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.java
@@ -0,0 +1,7 @@
+    // C function GLuint glCreateShaderProgramv ( GLenum type, GLsizei count, const GLchar *const *strings )
+
+    public static native int glCreateShaderProgramv(
+        int type,
+        String[] strings
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.nativeReg b/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.nativeReg
new file mode 100644
index 0000000..2079d83
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glCreateShaderProgramv.nativeReg
@@ -0,0 +1 @@
+{"glCreateShaderProgramv", "(I[Ljava/lang/String;)I", (void *) android_glCreateShaderProgramv },
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.cpp b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.cpp
new file mode 100644
index 0000000..8601242
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.cpp
@@ -0,0 +1,5 @@
+/* void glDebugMessageCallbackKHR ( GLDEBUGPROCKHR callback, const void *userParam ) */
+static void
+android_glDebugMessageCallbackKHR(JNIEnv *_env, jobject _this, jobject callback) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.java b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.java
new file mode 100644
index 0000000..3e8cf22
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.java
@@ -0,0 +1,8 @@
+    // C function void glDebugMessageCallbackKHR ( GLDEBUGPROCKHR callback, const void *userParam )
+
+    public interface DebugProcKHR {
+        void onMessage(int source, int type, int id, int severity, String message);
+    }
+
+    public static native void glDebugMessageCallbackKHR(DebugProcKHR callback);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.nativeReg
new file mode 100644
index 0000000..8e94658
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDebugMessageCallbackKHR.nativeReg
@@ -0,0 +1 @@
+{"glDebugMessageCallbackKHR", "(Landroid/opengl/GLES31Ext$DebugProcKHR;)V", (void *) android_glDebugMessageCallbackKHR },
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.cpp b/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.cpp
new file mode 100644
index 0000000..9633c93
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.cpp
@@ -0,0 +1,38 @@
+/* void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf ) */
+static void
+android_glDebugMessageInsertKHR__IIIILjava_lang_String_2
+  (JNIEnv *_env, jobject _this, jint source, jint type, jint id, jint severity, jstring buf) {
+    jint _exception = 0;
+    const char * _exceptionType = NULL;
+    const char * _exceptionMessage = NULL;
+    const char* _nativebuf = 0;
+    jint _length = 0;
+
+    if (!buf) {
+        _exception = 1;
+        _exceptionType = "java/lang/IllegalArgumentException";
+        _exceptionMessage = "buf == null";
+        goto exit;
+    }
+    _nativebuf = _env->GetStringUTFChars(buf, 0);
+    _length = _env->GetStringUTFLength(buf);
+
+    glDebugMessageInsertKHR(
+        (GLenum)source,
+        (GLenum)type,
+        (GLuint)id,
+        (GLenum)severity,
+        (GLsizei)_length,
+        (GLchar *)_nativebuf
+    );
+
+exit:
+    if (_nativebuf) {
+        _env->ReleaseStringUTFChars(buf, _nativebuf);
+    }
+
+    if (_exception) {
+        jniThrowException(_env, _exceptionType, _exceptionMessage);
+    }
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.java b/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.java
new file mode 100644
index 0000000..eb471c6
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.java
@@ -0,0 +1,10 @@
+    // C function void glDebugMessageInsertKHR ( GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf )
+
+    public static native void glDebugMessageInsertKHR(
+        int source,
+        int type,
+        int id,
+        int severity,
+        String buf
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.nativeReg
new file mode 100644
index 0000000..7e6e975
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDebugMessageInsertKHR.nativeReg
@@ -0,0 +1 @@
+{"glDebugMessageInsertKHR", "(IIIILjava/lang/String;)V", (void *) android_glDebugMessageInsertKHR__IIIILjava_lang_String_2 },
diff --git a/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.cpp b/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.cpp
new file mode 100644
index 0000000..3f89a8b
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.cpp
@@ -0,0 +1,13 @@
+/* void glDispatchComputeIndirect ( GLintptr indirect ) */
+static void android_glDispatchComputeIndirect(JNIEnv *_env, jobject, jlong indirect) {
+    // 'indirect' is a byte offset, not a pointer. GL checks for negative and too-large values.
+    // Here we only need to check for successful 64-bit to 32-bit conversion.
+    // - jlong is a int64_t (jni.h)
+    // - GLintptr is a long (khrplatform.h)
+    if (sizeof(GLintptr) != sizeof(jlong) && (indirect < LONG_MIN || indirect > LONG_MAX)) {
+        jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
+        return;
+    }
+    glDispatchComputeIndirect((GLintptr)indirect);
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.java b/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.java
new file mode 100644
index 0000000..92862f3
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.java
@@ -0,0 +1,4 @@
+    // C function void glDispatchComputeIndirect ( GLintptr indirect );
+
+    public static native void glDispatchComputeIndirect(long indirect);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.nativeReg b/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.nativeReg
new file mode 100644
index 0000000..9ed264a
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDispatchComputeIndirect.nativeReg
@@ -0,0 +1 @@
+{"glDispatchComputeIndirect", "(J)V", (void *) android_glDispatchComputeIndirect },
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.cpp b/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.cpp
new file mode 100644
index 0000000..ce3bc8f
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.cpp
@@ -0,0 +1,12 @@
+/* void glDrawArraysIndirect ( GLenum mode, const void *indirect ) */
+static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong indirect) {
+    // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
+    // GL checks for too-large values. Here we only need to check for successful signed 64-bit
+    // to unsigned 32-bit conversion.
+    if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
+        jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
+        return;
+    }
+    glDrawArraysIndirect(mode, (const void*)indirect);
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.java b/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.java
new file mode 100644
index 0000000..a8f0a80
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.java
@@ -0,0 +1,4 @@
+    // C function void glDrawArraysIndirect ( GLenum mode, const void *indirect );
+
+    public static native void glDrawArraysIndirect(int mode, long indirect);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.nativeReg b/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.nativeReg
new file mode 100644
index 0000000..7e6b0e6
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDrawArraysIndirect.nativeReg
@@ -0,0 +1 @@
+{"glDrawArraysIndirect", "(IJ)V", (void *) android_glDrawArraysIndirect },
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp
new file mode 100644
index 0000000..1833ee9
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.cpp
@@ -0,0 +1,12 @@
+/* void glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect ) */
+static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jint type, jlong indirect) {
+    // In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
+    // GL checks for too-large values. Here we only need to check for successful signed 64-bit
+    // to unsigned 32-bit conversion.
+    if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
+        jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
+        return;
+    }
+    glDrawElementsIndirect(mode, type, (const void*)indirect);
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.java b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.java
new file mode 100644
index 0000000..4a8d84d
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.java
@@ -0,0 +1,4 @@
+    // C function glDrawElementsIndirect ( GLenum mode, GLenum type, const void *indirect );
+
+    public static native void glDrawElementsIndirect(int mode, int type, long indirect);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.nativeReg b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.nativeReg
new file mode 100644
index 0000000..0c11fd2
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsIndirect.nativeReg
@@ -0,0 +1 @@
+{"glDrawElementsIndirect", "(IIJ)V", (void *) android_glDrawElementsIndirect },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.java b/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.java
index bad2137..d66200f 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.java
+++ b/opengl/tools/glgen/stubs/gles11/glGetActiveAttrib.java
@@ -16,6 +16,7 @@
 
     // C function void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
 
+    /** @hide Method is broken, but used to be public (b/6006380) */
     public static native void glGetActiveAttrib(
         int program,
         int index,
diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.java b/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.java
index 28aaa78..8c8d5a2 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.java
+++ b/opengl/tools/glgen/stubs/gles11/glGetActiveUniform.java
@@ -16,6 +16,7 @@
 
     // C function void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
 
+    /** @hide Method is broken, but used to be public (b/6006380) */
     public static native void glGetActiveUniform(
         int program,
         int index,
diff --git a/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.cpp b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.cpp
new file mode 100644
index 0000000..98bcbdf
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.cpp
@@ -0,0 +1,31 @@
+/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jint
+android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI
+  (JNIEnv *_env, jobject _this, jint count, jint bufSize, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset, jintArray lengths_ref, jint lengthsOffset, jbyteArray messageLog_ref, jint messageLogOffset) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
+
+/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static uint
+android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2
+  (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref, jobject lengths_ref, jobject messageLog_ref) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
+
+/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jobjectArray
+android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II
+  (JNIEnv *_env, jobject _this, jint count, jintArray sources_ref, jint sourcesOffset, jintArray types_ref, jint typesOffset, jintArray ids_ref, jint idsOffset, jintArray severities_ref, jint severitiesOffset) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
+
+/* GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog ) */
+static jobjectArray
+android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2
+  (JNIEnv *_env, jobject _this, jint count, jobject sources_ref, jobject types_ref, jobject ids_ref, jobject severities_ref) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return 0;
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.java b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.java
new file mode 100644
index 0000000..a3c4a42
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.java
@@ -0,0 +1,51 @@
+    // C function GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native int glGetDebugMessageLogKHR(
+        int count,
+        int bufSize,
+        int[] sources,
+        int sourcesOffset,
+        int[] types,
+        int typesOffset,
+        int[] ids,
+        int idsOffset,
+        int[] severities,
+        int severitiesOffset,
+        int[] lengths,
+        int lengthsOffset,
+        byte[] messageLog,
+        int messageLogOffset);
+
+    // C function GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native int glGetDebugMessageLogKHR(
+        int count,
+        java.nio.IntBuffer sources,
+        java.nio.IntBuffer types,
+        java.nio.IntBuffer ids,
+        java.nio.IntBuffer severities,
+        java.nio.IntBuffer lengths,
+        java.nio.ByteBuffer messageLog);
+
+    // C function GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native String[] glGetDebugMessageLogKHR(
+        int count,
+        int[] sources,
+        int sourcesOffset,
+        int[] types,
+        int typesOffset,
+        int[] ids,
+        int idsOffset,
+        int[] severities,
+        int severitiesOffset);
+
+    // C function GLuint glGetDebugMessageLogKHR ( GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog )
+
+    public static native String[] glGetDebugMessageLogKHR(
+        int count,
+        java.nio.IntBuffer sources,
+        java.nio.IntBuffer types,
+        java.nio.IntBuffer ids,
+        java.nio.IntBuffer severities);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.nativeReg
new file mode 100644
index 0000000..9a311ad
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetDebugMessageLogKHR.nativeReg
@@ -0,0 +1,4 @@
+{"glGetDebugMessageLogKHR", "(II[II[II[II[II[II[BI)I", (void *) android_glGetDebugMessageLogKHR__II_3II_3II_3II_3II_3II_3BI },
+{"glGetDebugMessageLogKHR", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)I", (void *) android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_ByteBuffer_2 },
+{"glGetDebugMessageLogKHR", "(I[II[II[II[II)[Ljava/lang/String;", (void *) android_glGetDebugMessageLogKHR__I_3II_3II_3II_3II },
+{"glGetDebugMessageLogKHR", "(ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)[Ljava/lang/String;", (void *) android_glGetDebugMessageLogKHR__ILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2 },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.cpp b/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.cpp
new file mode 100644
index 0000000..49d237b
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.cpp
@@ -0,0 +1,7 @@
+/* void glGetObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label ) */
+static jstring
+android_glGetObjectLabelKHR(JNIEnv *_env, jobject _this, jint identifier, jint name) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.java b/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.java
new file mode 100644
index 0000000..d38c4f1
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.java
@@ -0,0 +1,4 @@
+    // C function void glGetObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label )
+
+    public static native String glGetObjectLabelKHR(int identifier, int name);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.nativeReg
new file mode 100644
index 0000000..8b7167e
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetObjectLabelKHR.nativeReg
@@ -0,0 +1 @@
+{"glGetObjectLabelKHR", "(II)Ljava/lang/String;", (void *) android_glGetObjectLabelKHR },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.cpp b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.cpp
new file mode 100644
index 0000000..e107867
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.cpp
@@ -0,0 +1,7 @@
+/* void glGetObjectPtrLabelKHR ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label ) */
+static jstring
+android_glGetObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.java b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.java
new file mode 100644
index 0000000..874e003
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.java
@@ -0,0 +1,4 @@
+    // C function void glGetObjectPtrLabelKHR ( const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label )
+
+    public static native String glGetObjectPtrLabelKHR(long ptr);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.nativeReg
new file mode 100644
index 0000000..e84f006
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetObjectPtrLabelKHR.nativeReg
@@ -0,0 +1 @@
+{"glGetObjectPtrLabelKHR", "(J)Ljava/lang/String;", (void *) android_glGetObjectPtrLabelKHR },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.cpp b/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.cpp
new file mode 100644
index 0000000..0498507
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.cpp
@@ -0,0 +1,7 @@
+/* void glGetPointervKHR ( GLenum pname, void **params ) */
+static jobject
+android_glGetDebugMessageCallbackKHR(JNIEnv *_env, jobject _this) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.java b/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.java
new file mode 100644
index 0000000..cfb13a3
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.java
@@ -0,0 +1,4 @@
+    // C function void glGetPointervKHR ( GLenum pname, void **params )
+
+    public static native DebugProcKHR glGetDebugMessageCallbackKHR();
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.nativeReg
new file mode 100644
index 0000000..d835696
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetPointervKHR.nativeReg
@@ -0,0 +1 @@
+{"glGetDebugMessageCallbackKHR", "()Landroid/opengl/GLES31Ext$DebugProcKHR;", (void *) android_glGetDebugMessageCallbackKHR },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.cpp b/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.cpp
new file mode 100644
index 0000000..5b556d5
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.cpp
@@ -0,0 +1,19 @@
+#include <stdlib.h>
+
+/* void glGetProgramPipelineInfoLog ( GLuint shader, GLsizei maxLength, GLsizei* length, GLchar* infoLog ) */
+static jstring android_glGetProgramPipelineInfoLog(JNIEnv *_env, jobject, jint shader) {
+    GLint infoLen = 0;
+    glGetProgramPipelineiv(shader, GL_INFO_LOG_LENGTH, &infoLen);
+    if (!infoLen) {
+        return _env->NewStringUTF("");
+    }
+    char* buf = (char*) malloc(infoLen);
+    if (buf == NULL) {
+        jniThrowException(_env, "java/lang/OutOfMemoryError", "out of memory");
+        return NULL;
+    }
+    glGetProgramPipelineInfoLog(shader, infoLen, NULL, buf);
+    jstring result = _env->NewStringUTF(buf);
+    free(buf);
+    return result;
+}
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.java b/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.java
new file mode 100644
index 0000000..f6b0f7b
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.java
@@ -0,0 +1,6 @@
+    // C function void glGetProgramPipelineInfoLog( GLuint program, GLsizei maxLength, GLsizei * length, GLchar * infoLog);
+
+    public static native String glGetProgramPipelineInfoLog(
+        int program
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.nativeReg
new file mode 100644
index 0000000..9a99e08
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetProgramPipelineInfoLog.nativeReg
@@ -0,0 +1 @@
+{"glGetProgramPipelineInfoLog", "(I)Ljava/lang/String;", (void *) android_glGetProgramPipelineInfoLog },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.cpp b/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.cpp
new file mode 100644
index 0000000..b07e59c
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.cpp
@@ -0,0 +1,8 @@
+/* void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name ) */
+static jstring
+android_glGetProgramResourceName
+  (JNIEnv *_env, jobject _this, jint program, jint programInterface, jint index) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+    return NULL;
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.java b/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.java
new file mode 100644
index 0000000..43d6806
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.java
@@ -0,0 +1,8 @@
+    // C function void glGetProgramResourceName ( GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name )
+
+    public static native String glGetProgramResourceName(
+        int program,
+        int programInterface,
+        int index
+    );
+
diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.nativeReg
new file mode 100644
index 0000000..f0b5fe1
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glGetProgramResourceName.nativeReg
@@ -0,0 +1 @@
+{"glGetProgramResourceName", "(III)Ljava/lang/String;", (void *) android_glGetProgramResourceName },
diff --git a/opengl/tools/glgen/stubs/gles11/glGetShaderSource.java b/opengl/tools/glgen/stubs/gles11/glGetShaderSource.java
index 199d93a..afbaaca 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetShaderSource.java
+++ b/opengl/tools/glgen/stubs/gles11/glGetShaderSource.java
@@ -11,6 +11,7 @@
 
     // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
 
+    /** @hide Method is broken, but used to be public (b/6006380) */
     public static native void glGetShaderSource(
         int shader,
         int bufsize,
diff --git a/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java
index 719429b..7780e23 100644
--- a/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java
+++ b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java
@@ -1,11 +1,11 @@
-	// C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
+    // C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
 
-	public static native void glGetUniformIndices(
+    public static native void glGetUniformIndices(
         int program,
         String[] uniformNames,
         int[] uniformIndices,
         int uniformIndicesOffset
-	);
+    );
 
     // C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices )
 
diff --git a/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.cpp b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.cpp
new file mode 100644
index 0000000..2bd851a
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.cpp
@@ -0,0 +1,6 @@
+/* void glObjectPtrLabelKHR ( const void *ptr, GLsizei length, const GLchar *label ) */
+static void
+android_glObjectPtrLabelKHR(JNIEnv *_env, jobject _this, jlong ptr, jstring label) {
+    jniThrowException(_env, "java/lang/UnsupportedOperationException", "not yet implemented");
+}
+
diff --git a/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.java b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.java
new file mode 100644
index 0000000..1198898
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.java
@@ -0,0 +1,4 @@
+    // C function void glObjectPtrLabelKHR ( const void *ptr, GLsizei length, const GLchar *label )
+
+    public static native void glObjectPtrLabelKHR(long ptr, String label);
+
diff --git a/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.nativeReg b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.nativeReg
new file mode 100644
index 0000000..7b7add1
--- /dev/null
+++ b/opengl/tools/glgen/stubs/gles11/glObjectPtrLabelKHR.nativeReg
@@ -0,0 +1 @@
+{"glObjectPtrLabelKHR", "(JLjava/lang/String;)V", (void *) android_glObjectPtrLabelKHR },
diff --git a/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java
index c824344..b63a11d 100644
--- a/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java
+++ b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java
@@ -1,8 +1,8 @@
-	// C function void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode )
+    // C function void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode )
 
-	public static native void glTransformFeedbackVaryings(
+    public static native void glTransformFeedbackVaryings(
         int program,
         String[] varyings,
         int bufferMode
-	);
+    );
 
diff --git a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl
index 9740235..afcc3eb 100644
--- a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl
+++ b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl
@@ -38,7 +38,7 @@
 
     native private static void _nativeClassInit();
     static {
-	_nativeClassInit();
+        _nativeClassInit();
     }
 
     Buffer _colorPointer = null;
diff --git a/opengl/tools/glgen2/.gitignore b/opengl/tools/glgen2/.gitignore
new file mode 100644
index 0000000..6d459f7
--- /dev/null
+++ b/opengl/tools/glgen2/.gitignore
@@ -0,0 +1 @@
+registry/reg.pyc
diff --git a/opengl/tools/glgen2/glgen.py b/opengl/tools/glgen2/glgen.py
new file mode 100755
index 0000000..ed6b451
--- /dev/null
+++ b/opengl/tools/glgen2/glgen.py
@@ -0,0 +1,314 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from __future__ import print_function
+from operator import itemgetter
+import collections
+import os.path
+import re
+import sys
+
+
+# Avoid endlessly adding to the path if this module is imported multiple
+# times, e.g. in an interactive session
+regpath = os.path.join(sys.path[0], "registry")
+if sys.path[1] != regpath:
+    sys.path.insert(1, regpath)
+import reg
+
+
+AEP_EXTENSIONS = [
+    'GL_KHR_blend_equation_advanced',
+    'GL_KHR_debug',
+    'GL_KHR_texture_compression_astc_ldr',
+    'GL_OES_sample_shading',
+    'GL_OES_sample_variables',
+    'GL_OES_shader_image_atomic',
+    'GL_OES_shader_multisample_interpolation',
+    'GL_OES_texture_stencil8',
+    'GL_OES_texture_storage_multisample_2d_array',
+    'GL_EXT_copy_image',
+    'GL_EXT_draw_buffers_indexed',
+    'GL_EXT_geometry_shader',
+    'GL_EXT_gpu_shader5',
+    'GL_EXT_primitive_bounding_box',
+    'GL_EXT_shader_io_blocks',
+    'GL_EXT_tessellation_shader',
+    'GL_EXT_texture_border_clamp',
+    'GL_EXT_texture_buffer',
+    'GL_EXT_texture_cube_map_array',
+    'GL_EXT_texture_sRGB_decode']
+
+
+def nonestr(s):
+    return s if s else ""
+
+
+def parseTypedName(elem):
+    type = [nonestr(elem.text)]
+    name = None
+    for subelem in elem:
+        text = nonestr(subelem.text)
+        tail = nonestr(subelem.tail)
+        if subelem.tag == 'name':
+            name = text
+            break
+        else:
+            type.extend([text, tail])
+    return (''.join(type).strip(), name)
+
+
+# Format a list of (type, name) tuples as a C-style parameter list
+def fmtParams(params):
+    if not params:
+        return 'void'
+    return ', '.join(['%s %s' % (p[0], p[1]) for p in params])
+
+# Format a list of (type, name) tuples as a C-style argument list
+def fmtArgs(params):
+    return ', '.join(p[1] for p in params)
+
+# Format a list of (type, name) tuples as comma-separated '"type", name'
+def fmtTypeNameList(params):
+    return ', '.join(['"%s", %s' % (p[0], p[1]) for p in params])
+
+
+def overrideSymbolName(sym):
+    # The wrapper intercepts glGetString and (sometimes) calls the generated
+    # __glGetString thunk which dispatches to the driver's glGetString
+    if sym == 'glGetString':
+        return '__glGetString'
+    else:
+        return sym
+
+
+# Generate API trampoline templates:
+#   <rtype> API_ENTRY(<name>)(<params>) {
+#       CALL_GL_API(<name>, <args>);
+#       // or
+#       CALL_GL_API_RETURN(<name>, <args>);
+#   }
+class TrampolineGen(reg.OutputGenerator):
+    def __init__(self):
+        reg.OutputGenerator.__init__(self, sys.stderr, sys.stderr, None)
+
+    def genCmd(self, cmd, name):
+        reg.OutputGenerator.genCmd(self, cmd, name)
+
+        rtype, fname = parseTypedName(cmd.elem.find('proto'))
+        params = [parseTypedName(p) for p in cmd.elem.findall('param')]
+
+        call = 'CALL_GL_API' if rtype == 'void' else 'CALL_GL_API_RETURN'
+        print('%s API_ENTRY(%s)(%s) {\n'
+              '    %s(%s%s%s);\n'
+              '}'
+              % (rtype, overrideSymbolName(fname), fmtParams(params),
+                 call, fname,
+                 ', ' if len(params) > 0 else '',
+                 fmtArgs(params)),
+              file=self.outFile)
+
+
+
+# Collect all API prototypes across all families, remove duplicates,
+# emit to entries.in and trace.in files.
+class ApiGenerator(reg.OutputGenerator):
+    def __init__(self):
+        reg.OutputGenerator.__init__(self, sys.stderr, sys.stderr, None)
+        self.cmds = []
+        self.enums = collections.OrderedDict()
+
+    def genCmd(self, cmd, name):
+        reg.OutputGenerator.genCmd(self, cmd, name)
+        rtype, fname = parseTypedName(cmd.elem.find('proto'))
+        params = [parseTypedName(p) for p in cmd.elem.findall('param')]
+        self.cmds.append({'rtype': rtype, 'name': fname, 'params': params})
+
+    def genEnum(self, enuminfo, name):
+        reg.OutputGenerator.genEnum(self, enuminfo, name)
+        value = enuminfo.elem.get('value')
+
+        # Skip bitmask enums. Pattern matches:
+        # - GL_DEPTH_BUFFER_BIT
+        # - GL_MAP_INVALIDATE_BUFFER_BIT_EXT
+        # - GL_COLOR_BUFFER_BIT1_QCOM
+        # but not
+        # - GL_DEPTH_BITS
+        # - GL_QUERY_COUNTER_BITS_EXT
+        #
+        # TODO: Assuming a naming pattern and using a regex is what the
+        # old glenumsgen script did. But the registry XML knows which enums are
+        # parts of bitmask groups, so we should just use that. I'm not sure how
+        # to get the information out though, and it's not critical right now,
+        # so leaving for later.
+        if re.search('_BIT($|\d*_)', name):
+            return
+
+        # Skip non-hex values (GL_TRUE, GL_FALSE, header guard junk)
+        if not re.search('0x[0-9A-Fa-f]+', value):
+            return
+
+        # Append 'u' or 'ull' type suffix if present
+        type = enuminfo.elem.get('type')
+        if type and type != 'i':
+            value += type
+
+        if value not in self.enums:
+            self.enums[value] = name
+
+    def finish(self):
+        # sort by function name, remove duplicates
+        self.cmds.sort(key=itemgetter('name'))
+        cmds = []
+        for cmd in self.cmds:
+            if len(cmds) == 0 or cmd != cmds[-1]:
+                cmds.append(cmd)
+        self.cmds = cmds
+
+    # Write entries.in
+    def writeEntries(self, outfile):
+        for cmd in self.cmds:
+            print('GL_ENTRY(%s, %s, %s)'
+                  % (cmd['rtype'], cmd['name'], fmtParams(cmd['params'])),
+                  file=outfile)
+
+    # Write traces.in
+    def writeTrace(self, outfile):
+        for cmd in self.cmds:
+            if cmd['rtype'] == 'void':
+                ret = '_VOID('
+            else:
+                ret = '(%s, ' % cmd['rtype']
+
+            params = cmd['params']
+            if len(params) > 0:
+                typeNameList = ', ' + fmtTypeNameList(params)
+            else:
+                typeNameList = ''
+
+            print('TRACE_GL%s%s, (%s), (%s), %d%s)'
+                  % (ret, cmd['name'],
+                     fmtParams(params), fmtArgs(params),
+                     len(params), typeNameList),
+                  file=outfile)
+
+    # Write enums.in
+    def writeEnums(self, outfile):
+        for enum in self.enums.iteritems():
+            print('GL_ENUM(%s,%s)' % (enum[0], enum[1]), file=outfile)
+
+
+# Generate .spec entries for use by legacy 'gen' script
+class SpecGenerator(reg.OutputGenerator):
+    def __init__(self):
+        reg.OutputGenerator.__init__(self, sys.stderr, sys.stderr, None)
+
+    def genCmd(self, cmd, name):
+        reg.OutputGenerator.genCmd(self, cmd, name)
+        rtype, fname = parseTypedName(cmd.elem.find('proto'))
+        params = [parseTypedName(p) for p in cmd.elem.findall('param')]
+
+        print('%s %s ( %s )' % (rtype, fname, fmtParams(params)),
+              file=self.outFile)
+
+
+if __name__ == '__main__':
+    registry = reg.Registry()
+    registry.loadFile('registry/gl.xml')
+
+    registry.setGenerator(TrampolineGen())
+    TRAMPOLINE_OPTIONS = [
+        reg.GeneratorOptions(
+            apiname             = 'gles1',
+            profile             = 'common',
+            filename            = '../../libs/GLES_CM/gl_api.in'),
+        reg.GeneratorOptions(
+            apiname             = 'gles1',
+            profile             = 'common',
+            emitversions        = None,
+            defaultExtensions   = 'gles1',
+            filename            = '../../libs/GLES_CM/glext_api.in'),
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common',
+            filename            = '../../libs/GLES2/gl2_api.in'),
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common',
+            emitversions        = None,
+            defaultExtensions   = 'gles2',
+            filename            = '../../libs/GLES2/gl2ext_api.in')]
+    for opts in TRAMPOLINE_OPTIONS:
+        registry.apiGen(opts)
+
+    apigen = ApiGenerator()
+    registry.setGenerator(apigen)
+    API_OPTIONS = [
+        # Generate non-extension versions of each API first, then extensions,
+        # so that if an extension enum was later standardized, we see the non-
+        # suffixed version first.
+        reg.GeneratorOptions(
+            apiname             = 'gles1',
+            profile             = 'common'),
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common'),
+        reg.GeneratorOptions(
+            apiname             = 'gles1',
+            profile             = 'common',
+            emitversions        = None,
+            defaultExtensions   = 'gles1'),
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common',
+            emitversions        = None,
+            defaultExtensions   = 'gles2')]
+    for opts in API_OPTIONS:
+        registry.apiGen(opts)
+    apigen.finish()
+    with open('../../libs/entries.in', 'w') as f:
+        apigen.writeEntries(f)
+    with open('../../libs/trace.in', 'w') as f:
+        apigen.writeTrace(f)
+    with open('../../libs/enums.in', 'w') as f:
+        apigen.writeEnums(f)
+
+    registry.setGenerator(SpecGenerator())
+    SPEC_OPTIONS = [
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common',
+            versions            = '3\.1',
+            filename            = '../glgen/specs/gles11/GLES31.spec'),
+        reg.GeneratorOptions(
+            apiname             = 'gles2',
+            profile             = 'common',
+            emitversions        = None,
+            defaultExtensions   = None,
+            addExtensions       = '^({})$'.format('|'.join(AEP_EXTENSIONS)),
+            filename            = '../glgen/specs/gles11/GLES31Ext.spec')]
+    # SpecGenerator creates a good starting point, but the CFunc.java parser is
+    # so terrible that the .spec file needs a lot of manual massaging before
+    # it works. Commenting this out to avoid accidentally overwriting all the
+    # manual modifications.
+    #
+    # Eventually this script should generate the Java and JNI code directly,
+    # skipping the intermediate .spec step, and obsoleting the existing
+    # ../glgen system.
+    #
+    # for opts in SPEC_OPTIONS:
+    #     registry.apiGen(opts)
+
diff --git a/opengl/tools/glgen2/registry/egl.xml b/opengl/tools/glgen2/registry/egl.xml
new file mode 100755
index 0000000..6f6ebc3
--- /dev/null
+++ b/opengl/tools/glgen2/registry/egl.xml
@@ -0,0 +1,1966 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<registry>
+    <!--
+    Copyright (c) 2013-2014 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.
+    -->
+    <!--
+    This file, egl.xml, is the EGL API Registry. The older ".spec" file
+    format has been retired and will no longer be updated with new
+    extensions and API versions. The canonical version of the registry,
+    together with documentation, schema, and Python generator scripts used
+    to generate C header files for EGL, can be found in the Khronos Registry
+    at
+        http://www.opengl.org/registry/
+    -->
+
+    <!-- SECTION: EGL type definitions. Does not include GL types. -->
+    <types>
+            <!-- These are dependencies EGL types require to be declared legally -->
+        <type name="khrplatform">#include &lt;KHR/khrplatform.h&gt;</type>
+        <type name="eglplatform" requires="khrplatform">#include &lt;EGL/eglplatform.h&gt;</type>
+        <type name="khronos_utime_nanoseconds_t" requires="khrplatform"/>
+        <type name="khronos_uint64_t" requires="khrplatform"/>
+        <type name="khronos_ssize_t" requires="khrplatform"/>
+        <type name="EGLNativeDisplayType" requires="eglplatform"/>
+        <type name="EGLNativePixmapType" requires="eglplatform"/>
+        <type name="EGLNativeWindowType" requires="eglplatform"/>
+        <type name="EGLint" requires="eglplatform"/>
+        <type name="NativeDisplayType" requires="eglplatform"/>
+        <type name="NativePixmapType" requires="eglplatform"/>
+        <type name="NativeWindowType" requires="eglplatform"/>
+        <!-- Dummy placeholders for non-EGL types -->
+        <type name="Bool"/>
+            <!-- These are actual EGL types.  -->
+        <type>typedef unsigned int <name>EGLBoolean</name>;</type>
+        <type>typedef unsigned int <name>EGLenum</name>;</type>
+        <type requires="khrplatform">typedef intptr_t <name>EGLAttribKHR</name>;</type>
+        <type requires="khrplatform">typedef intptr_t <name>EGLAttrib</name>;</type>
+        <type>typedef void *<name>EGLConfig</name>;</type>
+        <type>typedef void *<name>EGLContext</name>;</type>
+        <type>typedef void *<name>EGLDisplay</name>;</type>
+        <type>typedef void *<name>EGLSurface</name>;</type>
+        <type>typedef void *<name>EGLClientBuffer</name>;</type>
+        <type>typedef void (*<name>__eglMustCastToProperFunctionPointerType</name>)(void);</type>
+        <type>typedef void *<name>EGLImageKHR</name>;</type>
+        <type>typedef void *<name>EGLImage</name>;</type>
+        <type>typedef void *<name>EGLSyncKHR</name>;</type>
+        <type>typedef void *<name>EGLSync</name>;</type>
+        <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLTimeKHR</name>;</type>
+        <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLTime</name>;</type>
+        <type>typedef void *<name>EGLSyncNV</name>;</type>
+        <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLTimeNV</name>;</type>
+        <type requires="khrplatform">typedef khronos_utime_nanoseconds_t <name>EGLuint64NV</name>;</type>
+        <type>typedef void *<name>EGLStreamKHR</name>;</type>
+        <type requires="khrplatform">typedef khronos_uint64_t <name>EGLuint64KHR</name>;</type>
+        <type>typedef int <name>EGLNativeFileDescriptorKHR</name>;</type>
+        <type requires="khrplatform">typedef khronos_ssize_t <name>EGLsizeiANDROID</name>;</type>
+        <type requires="EGLsizeiANDROID">typedef void (*<name>EGLSetBlobFuncANDROID</name>) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);</type>
+        <type requires="EGLsizeiANDROID">typedef EGLsizeiANDROID (*<name>EGLGetBlobFuncANDROID</name>) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);</type>
+        <type>struct <name>EGLClientPixmapHI</name> {
+    void  *pData;
+    EGLint iWidth;
+    EGLint iHeight;
+    EGLint iStride;
+};</type>
+    </types>
+
+    <!-- SECTION: EGL enumerant (token) definitions. -->
+
+    <!-- Bitmasks each have their own namespace, as do a few other
+         categories of enumeration -->
+
+    <enums namespace="EGLSurfaceTypeMask" type="bitmask" comment="EGL_SURFACE_TYPE bits">
+        <enum value="0x0001" name="EGL_PBUFFER_BIT"/>
+        <enum value="0x0002" name="EGL_PIXMAP_BIT"/>
+        <enum value="0x0004" name="EGL_WINDOW_BIT"/>
+        <enum value="0x0008" name="EGL_PBUFFER_IMAGE_BIT_TAO" comment="Unreleased TAO extension"/>
+        <enum value="0x0010" name="EGL_PBUFFER_PALETTE_IMAGE_BIT_TAO" comment="Unreleased TAO extension"/>
+        <enum value="0x0020" name="EGL_VG_COLORSPACE_LINEAR_BIT"/>
+        <enum value="0x0020" name="EGL_VG_COLORSPACE_LINEAR_BIT_KHR"/>
+        <enum value="0x0040" name="EGL_VG_ALPHA_FORMAT_PRE_BIT"/>
+        <enum value="0x0040" name="EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR"/>
+        <enum value="0x0080" name="EGL_LOCK_SURFACE_BIT_KHR"/>
+        <enum value="0x0100" name="EGL_OPTIMAL_FORMAT_BIT_KHR"/>
+        <enum value="0x0200" name="EGL_MULTISAMPLE_RESOLVE_BOX_BIT"/>
+        <enum value="0x0400" name="EGL_SWAP_BEHAVIOR_PRESERVED_BIT"/>
+        <enum value="0x0800" name="EGL_STREAM_BIT_KHR"/>
+            <!--
+        <enum value="0x0800"      name="EGL_STREAM_BIT_NV" comment="Draft EGL_NV_stream_producer_eglsurface extension (bug 8064)"/>
+            -->
+    </enums>
+
+    <enums namespace="EGLRenderableTypeMask" type="bitmask" comment="EGL_RENDERABLE_TYPE bits">
+        <enum value="0x0001" name="EGL_OPENGL_ES_BIT"/>
+        <enum value="0x0002" name="EGL_OPENVG_BIT"/>
+        <enum value="0x0004" name="EGL_OPENGL_ES2_BIT"/>
+        <enum value="0x0008" name="EGL_OPENGL_BIT"/>
+        <enum value="0x0010" name="EGL_INTEROP_BIT_KHR" comment="EGL_KHR_interop"/>
+        <enum value="0x0020" name="EGL_OPENMAX_IL_BIT_KHR" comment="EGL_KHR_interop"/>
+        <enum value="0x00000040" name="EGL_OPENGL_ES3_BIT"/>
+        <enum value="0x00000040" name="EGL_OPENGL_ES3_BIT_KHR" alias="EGL_OPENGL_ES3_BIT"/>
+    </enums>
+
+    <enums namespace="EGLLockUsageHintKHRMask" type="bitmask" comment="EGL_LOCK_USAGE_HINT_KHR bits">
+        <enum value="0x0001" name="EGL_READ_SURFACE_BIT_KHR"/>
+        <enum value="0x0002" name="EGL_WRITE_SURFACE_BIT_KHR"/>
+    </enums>
+
+    <enums namespace="EGLSyncFlagsKHR" type="bitmask" comment="Fence/reusable sync wait bits">
+        <enum value="0x0001" name="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
+        <enum value="0x0001" name="EGL_SYNC_FLUSH_COMMANDS_BIT_KHR" alias="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
+        <enum value="0x0001" name="EGL_SYNC_FLUSH_COMMANDS_BIT_NV" alias="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
+    </enums>
+
+    <enums namespace="EGLDRMBufferUseMESAMask" type="bitmask" comment="EGL_DRM_BUFFER_USE_MESA bits">
+        <enum value="0x00000001" name="EGL_DRM_BUFFER_USE_SCANOUT_MESA"/>
+        <enum value="0x00000002" name="EGL_DRM_BUFFER_USE_SHARE_MESA"/>
+    </enums>
+
+    <!-- Should be shared with GL, but aren't aren't since the
+         FORWARD_COMPATIBLE and DEBUG_BIT values are swapped in the
+         corresponding GL enums. Oops :-( -->
+    <enums namespace="EGLContextFlagMask" type="bitmask" comment="EGL_CONTEXT_FLAGS_KHR bits">
+        <enum value="0x00000001" name="EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR"/>
+        <enum value="0x00000002" name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR"/>
+        <enum value="0x00000004" name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR"/>
+    </enums>
+
+    <enums namespace="EGLContextProfileMask" type="bitmask" comment="Shared with GL">
+        <enum value="0x00000001" name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT"/>
+        <enum value="0x00000001" name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR" alias="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT"/>
+        <enum value="0x00000002" name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT"/>
+        <enum value="0x00000002" name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR" alias="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT"/>
+    </enums>
+
+    <!-- The default ("API") enum namespace starts here. While some
+         assigned values may overlap, and different parts of the
+         namespace are reserved for different purposes, it is a single
+         namespace. The "class" attribute indicates some of the reserved
+         purposes but is by no means complete (and cannot be, since many
+         tokens are reused for different purposes in different
+         extensions and API versions). -->
+
+    <enums namespace="EGL" start="0x0000" end="0x2FFF" vendor="ARB"/>
+
+    <enums namespace="EGL" group="Boolean" vendor="ARB">
+        <enum value="0" name="EGL_FALSE"/>
+        <enum value="1" name="EGL_TRUE"/>
+    </enums>
+
+    <enums namespace="EGL" group="SpecialNumbers" vendor="ARB" comment="Tokens whose numeric value is intrinsically meaningful">
+        <enum value="((EGLint)-1)" name="EGL_DONT_CARE"/>
+        <enum value="((EGLint)-1)" name="EGL_UNKNOWN"/>
+        <enum value="-1" name="EGL_NO_NATIVE_FENCE_FD_ANDROID"/>
+        <enum value="0" name="EGL_DEPTH_ENCODING_NONE_NV"/>
+        <enum value="((EGLContext)0)" name="EGL_NO_CONTEXT"/>
+        <enum value="((EGLDisplay)0)" name="EGL_NO_DISPLAY"/>
+        <enum value="((EGLImageKHR)0)" name="EGL_NO_IMAGE_KHR"/>
+        <enum value="((EGLNativeDisplayType)0)" name="EGL_DEFAULT_DISPLAY"/>
+        <enum value="((EGLNativeFileDescriptorKHR)(-1))" name="EGL_NO_FILE_DESCRIPTOR_KHR"/>
+        <enum value="((EGLStreamKHR)0)" name="EGL_NO_STREAM_KHR"/>
+        <enum value="((EGLSurface)0)" name="EGL_NO_SURFACE"/>
+        <enum value="((EGLSync)0)" name="EGL_NO_SYNC"/>
+        <enum value="((EGLSyncKHR)0)" name="EGL_NO_SYNC_KHR" alias="EGL_NO_SYNC"/>
+        <enum value="((EGLSyncNV)0)" name="EGL_NO_SYNC_NV" alias="EGL_NO_SYNC"/>
+        <enum value="10000" name="EGL_DISPLAY_SCALING"/>
+        <enum value="0xFFFFFFFFFFFFFFFF" name="EGL_FOREVER" type="ull"/>
+        <enum value="0xFFFFFFFFFFFFFFFF" name="EGL_FOREVER_KHR" type="ull" alias="EGL_FOREVER"/>
+        <enum value="0xFFFFFFFFFFFFFFFF" name="EGL_FOREVER_NV" type="ull" alias="EGL_FOREVER"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3000" end="0x305F" vendor="KHR">
+        <enum value="0x3000" name="EGL_SUCCESS"/>
+        <enum value="0x3001" name="EGL_NOT_INITIALIZED"/>
+        <enum value="0x3002" name="EGL_BAD_ACCESS"/>
+        <enum value="0x3003" name="EGL_BAD_ALLOC"/>
+        <enum value="0x3004" name="EGL_BAD_ATTRIBUTE"/>
+        <enum value="0x3005" name="EGL_BAD_CONFIG"/>
+        <enum value="0x3006" name="EGL_BAD_CONTEXT"/>
+        <enum value="0x3007" name="EGL_BAD_CURRENT_SURFACE"/>
+        <enum value="0x3008" name="EGL_BAD_DISPLAY"/>
+        <enum value="0x3009" name="EGL_BAD_MATCH"/>
+        <enum value="0x300A" name="EGL_BAD_NATIVE_PIXMAP"/>
+        <enum value="0x300B" name="EGL_BAD_NATIVE_WINDOW"/>
+        <enum value="0x300C" name="EGL_BAD_PARAMETER"/>
+        <enum value="0x300D" name="EGL_BAD_SURFACE"/>
+        <enum value="0x300E" name="EGL_CONTEXT_LOST"/>
+            <unused start="0x300F" end="0x301F" comment="for additional errors"/>
+        <enum value="0x3020" name="EGL_BUFFER_SIZE"/>
+        <enum value="0x3021" name="EGL_ALPHA_SIZE"/>
+        <enum value="0x3022" name="EGL_BLUE_SIZE"/>
+        <enum value="0x3023" name="EGL_GREEN_SIZE"/>
+        <enum value="0x3024" name="EGL_RED_SIZE"/>
+        <enum value="0x3025" name="EGL_DEPTH_SIZE"/>
+        <enum value="0x3026" name="EGL_STENCIL_SIZE"/>
+        <enum value="0x3027" name="EGL_CONFIG_CAVEAT"/>
+        <enum value="0x3028" name="EGL_CONFIG_ID"/>
+        <enum value="0x3029" name="EGL_LEVEL"/>
+        <enum value="0x302A" name="EGL_MAX_PBUFFER_HEIGHT"/>
+        <enum value="0x302B" name="EGL_MAX_PBUFFER_PIXELS"/>
+        <enum value="0x302C" name="EGL_MAX_PBUFFER_WIDTH"/>
+        <enum value="0x302D" name="EGL_NATIVE_RENDERABLE"/>
+        <enum value="0x302E" name="EGL_NATIVE_VISUAL_ID"/>
+        <enum value="0x302F" name="EGL_NATIVE_VISUAL_TYPE"/>
+        <enum value="0x3031" name="EGL_SAMPLES"/>
+        <enum value="0x3032" name="EGL_SAMPLE_BUFFERS"/>
+        <enum value="0x3033" name="EGL_SURFACE_TYPE"/>
+        <enum value="0x3034" name="EGL_TRANSPARENT_TYPE"/>
+        <enum value="0x3035" name="EGL_TRANSPARENT_BLUE_VALUE"/>
+        <enum value="0x3036" name="EGL_TRANSPARENT_GREEN_VALUE"/>
+        <enum value="0x3037" name="EGL_TRANSPARENT_RED_VALUE"/>
+        <enum value="0x3038" name="EGL_NONE" comment="Attribute list terminator"/>
+        <enum value="0x3039" name="EGL_BIND_TO_TEXTURE_RGB"/>
+        <enum value="0x303A" name="EGL_BIND_TO_TEXTURE_RGBA"/>
+        <enum value="0x303B" name="EGL_MIN_SWAP_INTERVAL"/>
+        <enum value="0x303C" name="EGL_MAX_SWAP_INTERVAL"/>
+        <enum value="0x303D" name="EGL_LUMINANCE_SIZE"/>
+        <enum value="0x303E" name="EGL_ALPHA_MASK_SIZE"/>
+        <enum value="0x303F" name="EGL_COLOR_BUFFER_TYPE"/>
+        <enum value="0x3040" name="EGL_RENDERABLE_TYPE"/>
+        <enum value="0x3041" name="EGL_MATCH_NATIVE_PIXMAP"/>
+        <enum value="0x3042" name="EGL_CONFORMANT"/>
+        <enum value="0x3042" name="EGL_CONFORMANT_KHR"/>
+        <enum value="0x3043" name="EGL_MATCH_FORMAT_KHR"/>
+            <unused start="0x3044" end="0x304F" comment="for additional config attributes"/>
+        <enum value="0x3050" name="EGL_SLOW_CONFIG"/>
+        <enum value="0x3051" name="EGL_NON_CONFORMANT_CONFIG"/>
+        <enum value="0x3052" name="EGL_TRANSPARENT_RGB"/>
+        <enum value="0x3053" name="EGL_VENDOR"/>
+        <enum value="0x3054" name="EGL_VERSION"/>
+        <enum value="0x3055" name="EGL_EXTENSIONS"/>
+        <enum value="0x3056" name="EGL_HEIGHT"/>
+        <enum value="0x3057" name="EGL_WIDTH"/>
+        <enum value="0x3058" name="EGL_LARGEST_PBUFFER"/>
+        <enum value="0x3059" name="EGL_DRAW"/>
+        <enum value="0x305A" name="EGL_READ"/>
+        <enum value="0x305B" name="EGL_CORE_NATIVE_ENGINE"/>
+        <enum value="0x305C" name="EGL_NO_TEXTURE"/>
+        <enum value="0x305D" name="EGL_TEXTURE_RGB"/>
+        <enum value="0x305E" name="EGL_TEXTURE_RGBA"/>
+        <enum value="0x305F" name="EGL_TEXTURE_2D"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3060-0x306F" vendor="TAO" comment="Reserved for Phil Huxley">
+        <unused start="0x3060" end="0x306F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3070-0x307F" vendor="NOK" comment="Reserved for Jani Vaarala">
+        <unused start="0x3070" end="0x307E"/>
+        <enum value="0x307F" name="EGL_Y_INVERTED_NOK"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3080-0x30AF" vendor="KHR">
+        <enum value="0x3080" name="EGL_TEXTURE_FORMAT"/>
+        <enum value="0x3081" name="EGL_TEXTURE_TARGET"/>
+        <enum value="0x3082" name="EGL_MIPMAP_TEXTURE"/>
+        <enum value="0x3083" name="EGL_MIPMAP_LEVEL"/>
+        <enum value="0x3084" name="EGL_BACK_BUFFER"/>
+        <enum value="0x3085" name="EGL_SINGLE_BUFFER"/>
+        <enum value="0x3086" name="EGL_RENDER_BUFFER"/>
+        <enum value="0x3087" name="EGL_COLORSPACE" alias="EGL_VG_COLORSPACE"/>
+        <enum value="0x3087" name="EGL_VG_COLORSPACE"/>
+        <enum value="0x3088" name="EGL_ALPHA_FORMAT" alias="EGL_VG_ALPHA_FORMAT"/>
+        <enum value="0x3088" name="EGL_VG_ALPHA_FORMAT"/>
+        <enum value="0x3089" name="EGL_COLORSPACE_sRGB"/>
+        <enum value="0x3089" name="EGL_GL_COLORSPACE_SRGB" alias="EGL_COLORSPACE_sRGB"/>
+        <enum value="0x3089" name="EGL_GL_COLORSPACE_SRGB_KHR" alias="EGL_COLORSPACE_sRGB"/>
+        <enum value="0x3089" name="EGL_VG_COLORSPACE_sRGB" alias="EGL_COLORSPACE_sRGB"/>
+        <enum value="0x308A" name="EGL_COLORSPACE_LINEAR"/>
+        <enum value="0x308A" name="EGL_GL_COLORSPACE_LINEAR" alias="EGL_COLORSPACE_LINEAR"/>
+        <enum value="0x308A" name="EGL_GL_COLORSPACE_LINEAR_KHR" alias="EGL_COLORSPACE_LINEAR"/>
+        <enum value="0x308A" name="EGL_VG_COLORSPACE_LINEAR" alias="EGL_COLORSPACE_LINEAR"/>
+        <enum value="0x308B" name="EGL_ALPHA_FORMAT_NONPRE" alias="EGL_VG_ALPHA_FORMAT_NONPRE"/>
+        <enum value="0x308B" name="EGL_VG_ALPHA_FORMAT_NONPRE"/>
+        <enum value="0x308C" name="EGL_ALPHA_FORMAT_PRE" alias="EGL_VG_ALPHA_FORMAT_PRE"/>
+        <enum value="0x308C" name="EGL_VG_ALPHA_FORMAT_PRE"/>
+        <enum value="0x308D" name="EGL_CLIENT_APIS"/>
+        <enum value="0x308E" name="EGL_RGB_BUFFER"/>
+        <enum value="0x308F" name="EGL_LUMINANCE_BUFFER"/>
+        <enum value="0x3090" name="EGL_HORIZONTAL_RESOLUTION"/>
+        <enum value="0x3091" name="EGL_VERTICAL_RESOLUTION"/>
+        <enum value="0x3092" name="EGL_PIXEL_ASPECT_RATIO"/>
+        <enum value="0x3093" name="EGL_SWAP_BEHAVIOR"/>
+        <enum value="0x3094" name="EGL_BUFFER_PRESERVED"/>
+        <enum value="0x3095" name="EGL_BUFFER_DESTROYED"/>
+        <enum value="0x3096" name="EGL_OPENVG_IMAGE"/>
+        <enum value="0x3097" name="EGL_CONTEXT_CLIENT_TYPE"/>
+        <enum value="0x3098" name="EGL_CONTEXT_CLIENT_VERSION"/>
+        <enum value="0x3098" name="EGL_CONTEXT_MAJOR_VERSION" alias="EGL_CONTEXT_CLIENT_VERSION"/>
+        <enum value="0x3098" name="EGL_CONTEXT_MAJOR_VERSION_KHR" alias="EGL_CONTEXT_CLIENT_VERSION"/>
+        <enum value="0x3099" name="EGL_MULTISAMPLE_RESOLVE"/>
+        <enum value="0x309A" name="EGL_MULTISAMPLE_RESOLVE_DEFAULT"/>
+        <enum value="0x309B" name="EGL_MULTISAMPLE_RESOLVE_BOX"/>
+        <enum value="0x309C" name="EGL_CL_EVENT_HANDLE"/>
+        <enum value="0x309C" name="EGL_CL_EVENT_HANDLE_KHR" alias="EGL_CL_EVENT_HANDLE"/>
+        <enum value="0x309D" name="EGL_GL_COLORSPACE"/>
+        <enum value="0x309D" name="EGL_GL_COLORSPACE_KHR" alias="EGL_GL_COLORSPACE"/>
+            <unused start="0x309E" end="0x309F"/>
+        <enum value="0x30A0" name="EGL_OPENGL_ES_API"/>
+        <enum value="0x30A1" name="EGL_OPENVG_API"/>
+        <enum value="0x30A2" name="EGL_OPENGL_API"/>
+            <unused start="0x30A3" end="0x30AF" comment="for additional client API names"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x30B0-0x30BF" vendor="NV" comment="Reserved for Ignacio Llamas">
+        <enum value="0x30B0" name="EGL_NATIVE_PIXMAP_KHR"/>
+        <enum value="0x30B1" name="EGL_GL_TEXTURE_2D"/>
+        <enum value="0x30B1" name="EGL_GL_TEXTURE_2D_KHR" alias="EGL_GL_TEXTURE_2D"/>
+        <enum value="0x30B2" name="EGL_GL_TEXTURE_3D"/>
+        <enum value="0x30B2" name="EGL_GL_TEXTURE_3D_KHR" alias="EGL_GL_TEXTURE_3D"/>
+        <enum value="0x30B3" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
+        <enum value="0x30B3" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
+        <enum value="0x30B4" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
+        <enum value="0x30B4" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
+        <enum value="0x30B5" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
+        <enum value="0x30B5" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
+        <enum value="0x30B6" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
+        <enum value="0x30B6" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
+        <enum value="0x30B7" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
+        <enum value="0x30B7" name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
+        <enum value="0x30B8" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
+        <enum value="0x30B8" name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR" alias="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
+        <enum value="0x30B9" name="EGL_GL_RENDERBUFFER"/>
+        <enum value="0x30B9" name="EGL_GL_RENDERBUFFER_KHR" alias="EGL_GL_RENDERBUFFER"/>
+        <enum value="0x30BA" name="EGL_VG_PARENT_IMAGE_KHR"/>
+        <enum value="0x30BC" name="EGL_GL_TEXTURE_LEVEL"/>
+        <enum value="0x30BC" name="EGL_GL_TEXTURE_LEVEL_KHR" alias="EGL_GL_TEXTURE_LEVEL"/>
+        <enum value="0x30BD" name="EGL_GL_TEXTURE_ZOFFSET"/>
+        <enum value="0x30BD" name="EGL_GL_TEXTURE_ZOFFSET_KHR" alias="EGL_GL_TEXTURE_ZOFFSET"/>
+        <enum value="0x30BE" name="EGL_POST_SUB_BUFFER_SUPPORTED_NV"/>
+        <enum value="0x30BF" name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT" alias="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x30C0-0x30CF" vendor="KHR">
+        <enum value="0x30C0" name="EGL_FORMAT_RGB_565_EXACT_KHR"/>
+        <enum value="0x30C1" name="EGL_FORMAT_RGB_565_KHR"/>
+        <enum value="0x30C2" name="EGL_FORMAT_RGBA_8888_EXACT_KHR"/>
+        <enum value="0x30C3" name="EGL_FORMAT_RGBA_8888_KHR"/>
+        <enum value="0x30C4" name="EGL_MAP_PRESERVE_PIXELS_KHR"/>
+        <enum value="0x30C5" name="EGL_LOCK_USAGE_HINT_KHR"/>
+        <enum value="0x30C6" name="EGL_BITMAP_POINTER_KHR"/>
+        <enum value="0x30C7" name="EGL_BITMAP_PITCH_KHR"/>
+        <enum value="0x30C8" name="EGL_BITMAP_ORIGIN_KHR"/>
+        <enum value="0x30C9" name="EGL_BITMAP_PIXEL_RED_OFFSET_KHR"/>
+        <enum value="0x30CA" name="EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR"/>
+        <enum value="0x30CB" name="EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR"/>
+        <enum value="0x30CC" name="EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR"/>
+        <enum value="0x30CD" name="EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR"/>
+        <enum value="0x30CE" name="EGL_LOWER_LEFT_KHR"/>
+        <enum value="0x30CF" name="EGL_UPPER_LEFT_KHR"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x30D0" end="0x30DF" vendor="Symbian" comment="Reserved for Robert Palmer (bug #2545)">
+            <unused start="0x30D0" end="0x30D1"/>
+        <enum value="0x30D2" name="EGL_IMAGE_PRESERVED_KHR"/>
+            <unused start="0x30D3" end="0x30D9"/>
+        <enum value="0x30DA" name="EGL_SHARED_IMAGE_NOK" comment="Unreleased extension"/>
+            <unused start="0x30DB" end="0x30DF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x30E0" end="0x30EF" vendor="NV" comment="Reserved for Russell Pflughaupt (bug #3314)">
+        <enum value="0x30E0" name="EGL_COVERAGE_BUFFERS_NV"/>
+        <enum value="0x30E1" name="EGL_COVERAGE_SAMPLES_NV"/>
+        <enum value="0x30E2" name="EGL_DEPTH_ENCODING_NV"/>
+        <enum value="0x30E3" name="EGL_DEPTH_ENCODING_NONLINEAR_NV"/>
+            <unused start="0x30E4" end="0x30E5"/>
+        <enum value="0x30E6" name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV"/>
+        <enum value="0x30E7" name="EGL_SYNC_STATUS_NV"/>
+        <enum value="0x30E8" name="EGL_SIGNALED_NV"/>
+        <enum value="0x30E9" name="EGL_UNSIGNALED_NV"/>
+        <enum value="0x30EA" name="EGL_ALREADY_SIGNALED_NV"/>
+        <enum value="0x30EB" name="EGL_TIMEOUT_EXPIRED_NV"/>
+        <enum value="0x30EC" name="EGL_CONDITION_SATISFIED_NV"/>
+        <enum value="0x30ED" name="EGL_SYNC_TYPE_NV"/>
+        <enum value="0x30EE" name="EGL_SYNC_CONDITION_NV"/>
+        <enum value="0x30EF" name="EGL_SYNC_FENCE_NV"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x30F0" end="0x30FF" vendor="KHR">
+        <enum value="0x30F0" name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
+        <enum value="0x30F0" name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR" alias="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
+        <enum value="0x30F1" name="EGL_SYNC_STATUS"/>
+        <enum value="0x30F1" name="EGL_SYNC_STATUS_KHR" alias="EGL_SYNC_STATUS"/>
+        <enum value="0x30F2" name="EGL_SIGNALED"/>
+        <enum value="0x30F2" name="EGL_SIGNALED_KHR" alias="EGL_SIGNALED"/>
+        <enum value="0x30F3" name="EGL_UNSIGNALED"/>
+        <enum value="0x30F3" name="EGL_UNSIGNALED_KHR" alias="EGL_UNSIGNALED"/>
+        <enum value="0x30F5" name="EGL_TIMEOUT_EXPIRED"/>
+        <enum value="0x30F5" name="EGL_TIMEOUT_EXPIRED_KHR" alias="EGL_TIMEOUT_EXPIRED"/>
+        <enum value="0x30F6" name="EGL_CONDITION_SATISFIED"/>
+        <enum value="0x30F6" name="EGL_CONDITION_SATISFIED_KHR" alias="EGL_CONDITION_SATISFIED"/>
+        <enum value="0x30F7" name="EGL_SYNC_TYPE"/>
+        <enum value="0x30F7" name="EGL_SYNC_TYPE_KHR" alias="EGL_SYNC_TYPE"/>
+        <enum value="0x30F8" name="EGL_SYNC_CONDITION"/>
+        <enum value="0x30F8" name="EGL_SYNC_CONDITION_KHR" alias="EGL_SYNC_CONDITION"/>
+        <enum value="0x30F9" name="EGL_SYNC_FENCE"/>
+        <enum value="0x30F9" name="EGL_SYNC_FENCE_KHR" alias="EGL_SYNC_FENCE"/>
+        <enum value="0x30FA" name="EGL_SYNC_REUSABLE_KHR"/>
+        <enum value="0x30FB" name="EGL_CONTEXT_MINOR_VERSION"/>
+        <enum value="0x30FB" name="EGL_CONTEXT_MINOR_VERSION_KHR" alias="EGL_CONTEXT_MINOR_VERSION"/>
+        <enum value="0x30FC" name="EGL_CONTEXT_FLAGS_KHR"/>
+        <enum value="0x30FD" name="EGL_CONTEXT_OPENGL_PROFILE_MASK"/>
+        <enum value="0x30FD" name="EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR" alias="EGL_CONTEXT_OPENGL_PROFILE_MASK"/>
+        <enum value="0x30FE" name="EGL_SYNC_CL_EVENT"/>
+        <enum value="0x30FE" name="EGL_SYNC_CL_EVENT_KHR" alias="EGL_SYNC_CL_EVENT"/>
+        <enum value="0x30FF" name="EGL_SYNC_CL_EVENT_COMPLETE"/>
+        <enum value="0x30FF" name="EGL_SYNC_CL_EVENT_COMPLETE_KHR" alias="EGL_SYNC_CL_EVENT_COMPLETE"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3100" end="0x310F" vendor="IMG" comment="Reserved for Ben Bowman (Khronos bug 4748)">
+        <enum value="0x3100" name="EGL_CONTEXT_PRIORITY_LEVEL_IMG"/>
+        <enum value="0x3101" name="EGL_CONTEXT_PRIORITY_HIGH_IMG"/>
+        <enum value="0x3102" name="EGL_CONTEXT_PRIORITY_MEDIUM_IMG"/>
+        <enum value="0x3103" name="EGL_CONTEXT_PRIORITY_LOW_IMG"/>
+            <unused start="0x3104" end="0x310F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3110" end="0x311F" vendor="ATX" comment="Reserved for Tim Renouf, Antix (Khronos bug 4949)">
+        <enum value="0x3110" name="EGL_BITMAP_PIXEL_SIZE_KHR"/>
+            <unused start="0x3111" end="0x311F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3120" end="0x312F" vendor="AMD" comment="Reserved for David Garcia (Khronos bug 5149)">
+            <unused start="0x3120" end="0x312F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3130" end="0x313F" vendor="NV" comment="Reserved for Greg Prisament (Khronos bug 5166)">
+            <unused start="0x3130"/>
+        <enum value="0x3131" name="EGL_COVERAGE_SAMPLE_RESOLVE_NV"/>
+        <enum value="0x3132" name="EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV"/>
+        <enum value="0x3133" name="EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV"/>
+        <enum value="0x3134" name="EGL_MULTIVIEW_VIEW_COUNT_EXT"/>
+            <unused start="0x3135"/>
+        <enum value="0x3136" name="EGL_AUTO_STEREO_NV"/>
+            <unused start="0x3137"/>
+        <enum value="0x3138" name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT"/>
+            <unused start="0x3139" end="0x313C"/>
+        <enum value="0x313D" name="EGL_BUFFER_AGE_EXT"/>
+            <unused start="0x313E" end="0x313F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3140" end="0x314F" vendor="Google" comment="Reserved for Mathias Agopian (Khronos bug 5199)">
+        <enum value="0x3140" name="EGL_NATIVE_BUFFER_ANDROID"/>
+        <enum value="0x3141" name="EGL_PLATFORM_ANDROID_KHR"/>
+        <enum value="0x3142" name="EGL_RECORDABLE_ANDROID"/>
+            <unused start="0x3143"/>
+        <enum value="0x3144" name="EGL_SYNC_NATIVE_FENCE_ANDROID"/>
+        <enum value="0x3145" name="EGL_SYNC_NATIVE_FENCE_FD_ANDROID"/>
+        <enum value="0x3146" name="EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID"/>
+        <enum value="0x3147" name="EGL_FRAMEBUFFER_TARGET_ANDROID"/>
+            <unused start="0x3148" end="0x314F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3150" end="0x315F" vendor="NOK" comment="Reserved for Robert Palmer (Khronos bug 5368)">
+            <unused start="0x3150" end="0x315F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3160" end="0x316F" vendor="Seaweed" comment="Reserved for Sree Sridharan (Khronos public bug 198)">
+            <unused start="0x3160" end="0x316F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3170" end="0x318F" vendor="QNX" comment="Reserved for Joel Pilon (Khronos bug 5834)">
+            <unused start="0x3170" end="0x318F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3190" end="0x31AF" vendor="FSL" comment="Reserved for Brian Murray, Freescale (Khronos bug 5939)">
+            <unused start="0x3190" end="0x31AF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x31B0" end="0x31BF" vendor="KHR" comment="Reserved for Marcus Lorentzon (Khronos bug 6437)">
+        <enum value="0x31B0" name="EGL_CONTEXT_OPENGL_DEBUG"/>
+        <enum value="0x31B1" name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE"/>
+        <enum value="0x31B2" name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
+            <unused start="0x31B3" end="0x31BC" comment="Formerly reserved for EGL_image_stream"/>
+        <enum value="0x31BD" name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR" alias="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
+        <enum value="0x31BD" name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
+        <enum value="0x31BE" name="EGL_NO_RESET_NOTIFICATION"/>
+        <enum value="0x31BE" name="EGL_NO_RESET_NOTIFICATION_KHR" alias="EGL_NO_RESET_NOTIFICATION"/>
+        <enum value="0x31BE" name="EGL_NO_RESET_NOTIFICATION_EXT" alias="EGL_NO_RESET_NOTIFICATION"/>
+        <enum value="0x31BF" name="EGL_LOSE_CONTEXT_ON_RESET"/>
+        <enum value="0x31BF" name="EGL_LOSE_CONTEXT_ON_RESET_KHR" alias="EGL_LOSE_CONTEXT_ON_RESET"/>
+        <enum value="0x31BF" name="EGL_LOSE_CONTEXT_ON_RESET_EXT" alias="EGL_LOSE_CONTEXT_ON_RESET"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x31C0" end="0x31CF" vendor="QCOM" comment="Reserved for Maurice Ribble (Khronos bug 6644) - EGL_QCOM_create_image spec TBD">
+            <unused start="0x31C0" end="0x31CF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x31D0" end="0x31DF" vendor="MESA" comment="Reserved for Kristian H&#248;gsberg (Khronos bug 6757)">
+        <enum value="0x31D0" name="EGL_DRM_BUFFER_FORMAT_MESA"/>
+        <enum value="0x31D1" name="EGL_DRM_BUFFER_USE_MESA"/>
+        <enum value="0x31D2" name="EGL_DRM_BUFFER_FORMAT_ARGB32_MESA"/>
+        <enum value="0x31D3" name="EGL_DRM_BUFFER_MESA"/>
+        <enum value="0x31D4" name="EGL_DRM_BUFFER_STRIDE_MESA"/>
+        <enum value="0x31D5" name="EGL_PLATFORM_X11_KHR"/>
+        <enum value="0x31D5" name="EGL_PLATFORM_X11_EXT" alias="EGL_PLATFORM_X11_KHR"/>
+        <enum value="0x31D6" name="EGL_PLATFORM_X11_SCREEN_KHR"/>
+        <enum value="0x31D6" name="EGL_PLATFORM_X11_SCREEN_EXT" alias="EGL_PLATFORM_X11_SCREEN_KHR"/>
+        <enum value="0x31D7" name="EGL_PLATFORM_GBM_KHR"/>
+        <enum value="0x31D7" name="EGL_PLATFORM_GBM_MESA" alias="EGL_PLATFORM_GBM_KHR"/>
+        <enum value="0x31D8" name="EGL_PLATFORM_WAYLAND_KHR"/>
+        <enum value="0x31D8" name="EGL_PLATFORM_WAYLAND_EXT" alias="EGL_PLATFORM_WAYLAND_KHR"/>
+            <unused start="0x31D9" end="0x31DF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x31E0" end="0x31EF" vendor="HI" comment="Reserved for Mark Callow (Khronos bug 6799)">
+            <unused start="0x31E0" end="0x31EF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x31F0" end="0x31FF" vendor="KHR">
+            <unused start="0x31F0" end="0x31FB" comment="Placeholders for draft extensions follow"/>
+        <!--
+            <enum value="0x31F0" name="EGL_IMAGE_USE_AS_OPENGL_ES1_RENDERBUFFER_KHR"        comment="Draft KHR_image_use_gl1_renderbuffer"/>
+            <enum value="0x31F1" name="EGL_IMAGE_USE_AS_OPENGL_ES1_TEXTURE_2D_KHR"          comment="Draft KHR_image_use_gl1_texture_2d"/>
+            <enum value="0x31F2" name="EGL_IMAGE_USE_AS_OPENGL_ES1_TEXTURE_EXTERNAL_KHR"    comment="Draft KHR_image_use_gl1_texture_external"/>
+            <enum value="0x31F3" name="EGL_IMAGE_USE_AS_OPENGL_ES2_RENDERBUFFER_KHR"        comment="Draft KHR_image_use_gl2_renderbuffer"/>
+            <enum value="0x31F4" name="EGL_IMAGE_USE_AS_OPENGL_ES2_TEXTURE_2D_KHR"          comment="Draft KHR_image_use_gl2_texture_2d"/>
+            <enum value="0x31F5" name="EGL_IMAGE_USE_AS_OPENGL_ES2_TEXTURE_EXTERNAL_KHR"    comment="Draft KHR_image_use_gl2_texture_external"/>
+            <enum value="0x31F6" name="EGL_IMAGE_USE_AS_OPENVG_IMAGE_KHR"                   comment="Draft KHR_image_use_vg_vgimage"/>
+            <enum value="0x31F7" name="EGL_STREAM_CONSUMER_ATTACHMENT_MESA"                 comment="Draft EGL_MESA_image_stream_internal"/>
+            <enum value="0x31F8" name="EGL_NO_FORMAT_MESA"                                  comment="Draft EGL_MESA_image_stream_internal"/>
+            <enum value="0x31F9" name="EGL_FORMAT_RGBA8888_MESA"                            comment="Draft EGL_MESA_image_stream_internal"/>
+            <enum value="0x31FA" name="EGL_FORMAT_RGB888_MESA"                              comment="Draft EGL_MESA_image_stream_internal"/>
+            <enum value="0x31FB" name="EGL_FORMAT_RGB565_MESA"                              comment="Draft EGL_MESA_image_stream_internal"/>
+        -->
+        <enum value="0x31FC" name="EGL_STREAM_FIFO_LENGTH_KHR"/>
+        <enum value="0x31FD" name="EGL_STREAM_TIME_NOW_KHR"/>
+        <enum value="0x31FE" name="EGL_STREAM_TIME_CONSUMER_KHR"/>
+        <enum value="0x31FF" name="EGL_STREAM_TIME_PRODUCER_KHR"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3200" end="0x320F" vendor="ANGLE" comment="Reserved for Daniel Koch, ANGLE Project (Khronos bug 7139)">
+        <enum value="0x3200" name="EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE"/>
+            <unused start="0x3201" end="0x320F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3210" end="0x321F" vendor="KHR">
+        <enum value="0x3210" name="EGL_CONSUMER_LATENCY_USEC_KHR"/>
+            <unused start="0x3211"/>
+        <enum value="0x3212" name="EGL_PRODUCER_FRAME_KHR"/>
+        <enum value="0x3213" name="EGL_CONSUMER_FRAME_KHR"/>
+        <enum value="0x3214" name="EGL_STREAM_STATE_KHR"/>
+        <enum value="0x3215" name="EGL_STREAM_STATE_CREATED_KHR"/>
+        <enum value="0x3216" name="EGL_STREAM_STATE_CONNECTING_KHR"/>
+        <enum value="0x3217" name="EGL_STREAM_STATE_EMPTY_KHR"/>
+        <enum value="0x3218" name="EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR"/>
+        <enum value="0x3219" name="EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR"/>
+        <enum value="0x321A" name="EGL_STREAM_STATE_DISCONNECTED_KHR"/>
+        <enum value="0x321B" name="EGL_BAD_STREAM_KHR"/>
+        <enum value="0x321C" name="EGL_BAD_STATE_KHR"/>
+        <enum value="0x321D" name="EGL_BUFFER_COUNT_NV" comment="From EGL_NV_stream_producer_eglsurface, which has no known specification and was replaced by a KHR extension"/>
+        <enum value="0x321E" name="EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR"/>
+        <enum value="0x321F" name="EGL_SYNC_NEW_FRAME_NV"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3220" end="0x325F" vendor="NV" comment="Reserved for Greg Roth (Bug 8220)">
+            <unused start="0x3220" end="0x325F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3260" end="0x326F" vendor="BCOM" comment="Reserved for Gary Sweet, Broadcom (Public bug 620)">
+            <unused start="0x3260" end="0x326F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3270" end="0x328F" vendor="ARM" comment="Reserved for Tom Cooksey (Bug 9963)">
+        <enum value="0x3270" name="EGL_LINUX_DMA_BUF_EXT"/>
+        <enum value="0x3271" name="EGL_LINUX_DRM_FOURCC_EXT"/>
+        <enum value="0x3272" name="EGL_DMA_BUF_PLANE0_FD_EXT"/>
+        <enum value="0x3273" name="EGL_DMA_BUF_PLANE0_OFFSET_EXT"/>
+        <enum value="0x3274" name="EGL_DMA_BUF_PLANE0_PITCH_EXT"/>
+        <enum value="0x3275" name="EGL_DMA_BUF_PLANE1_FD_EXT"/>
+        <enum value="0x3276" name="EGL_DMA_BUF_PLANE1_OFFSET_EXT"/>
+        <enum value="0x3277" name="EGL_DMA_BUF_PLANE1_PITCH_EXT"/>
+        <enum value="0x3278" name="EGL_DMA_BUF_PLANE2_FD_EXT"/>
+        <enum value="0x3279" name="EGL_DMA_BUF_PLANE2_OFFSET_EXT"/>
+        <enum value="0x327A" name="EGL_DMA_BUF_PLANE2_PITCH_EXT"/>
+        <enum value="0x327B" name="EGL_YUV_COLOR_SPACE_HINT_EXT"/>
+        <enum value="0x327C" name="EGL_SAMPLE_RANGE_HINT_EXT"/>
+        <enum value="0x327D" name="EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT"/>
+        <enum value="0x327E" name="EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT"/>
+        <enum value="0x327F" name="EGL_ITU_REC601_EXT"/>
+        <enum value="0x3280" name="EGL_ITU_REC709_EXT"/>
+        <enum value="0x3281" name="EGL_ITU_REC2020_EXT"/>
+        <enum value="0x3282" name="EGL_YUV_FULL_RANGE_EXT"/>
+        <enum value="0x3283" name="EGL_YUV_NARROW_RANGE_EXT"/>
+        <enum value="0x3284" name="EGL_YUV_CHROMA_SITING_0_EXT"/>
+        <enum value="0x3285" name="EGL_YUV_CHROMA_SITING_0_5_EXT"/>
+        <enum value="0x3286" name="EGL_DISCARD_SAMPLES_ARM"/>
+            <unused start="0x3287" end="0x328F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x3290" end="0x329F" vendor="MESA" comment="Reserved for John K&#229;re Alsaker (Public bug 757)">
+            <unused start="0x3290" end="0x329F"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x32A0" end="0x32AF" vendor="Samsung" comment="Reserved for Dongyeon Kim (Public bug 880)">
+            <unused start="0x32A0" end="0x32AF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x32B0" end="0x32BF" vendor="QCOM" comment="Reserved for Jeff Vigil (Bug 10663) - EGL_QCOM_lock_image spec TBD">
+            <unused start="0x32B0" end="0x32BF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x32C0" end="0x32CF" vendor="Vivante" comment="Reserved for Yanjun Zhang (Bug 11498)">
+        <enum value="0x32C0" name="EGL_PROTECTED_CONTENT_EXT"/>
+            <unused start="0x32C1" end="0x32CF"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x32D0" end="0x32DF" vendor="QCOM" comment="Reserved for Jeff Vigil (Bug 11735) - EGL_QCOM_gpu_perf spec TBD">
+            <unused start="0x32D0" end="0x32DF"/>
+    </enums>
+
+<!-- Please remember that new enumerant allocations must be obtained by
+     request to the Khronos API registrar (see comments at the top of this
+     file) File requests in the Khronos Bugzilla, EGL project, Registry
+     component. Also note that some EGL enum values are shared with other
+     Khronos APIs, and new ranges should be allocated with such overlaps in
+     mind. -->
+
+<!-- Reservable for future use: 0x32E0-0x3FFF.
+     To generate a new range, allocate multiples of 16 starting at the
+     lowest available point in this block. -->
+    <enums namespace="EGL" start="0x32E0" end="0x3FFF" vendor="KHR">
+            <unused start="0x32E0" end="0x3FFF" comment="Reserved for future use"/>
+    </enums>
+
+    <enums namespace="EGL" start="0x8F70" end="0x8F7F" vendor="HI" comment="For Mark Callow, Khronos bug 4055. Shared with GL.">
+        <enum value="0x8F70" name="EGL_COLOR_FORMAT_HI"/>
+        <enum value="0x8F71" name="EGL_COLOR_RGB_HI"/>
+        <enum value="0x8F72" name="EGL_COLOR_RGBA_HI"/>
+        <enum value="0x8F73" name="EGL_COLOR_ARGB_HI"/>
+        <enum value="0x8F74" name="EGL_CLIENT_PIXMAP_POINTER_HI"/>
+    </enums>
+
+    <!-- SECTION: EGL command definitions. -->
+    <commands namespace="EGL">
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglBindAPI</name></proto>
+            <param><ptype>EGLenum</ptype> <name>api</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglBindTexImage</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglChooseConfig</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+            <param><ptype>EGLConfig</ptype> *<name>configs</name></param>
+            <param><ptype>EGLint</ptype> <name>config_size</name></param>
+            <param><ptype>EGLint</ptype> *<name>num_config</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLint</ptype> <name>eglClientWaitSync</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSync</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>flags</name></param>
+            <param><ptype>EGLTime</ptype> <name>timeout</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLint</ptype> <name>eglClientWaitSyncKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>flags</name></param>
+            <param><ptype>EGLTimeKHR</ptype> <name>timeout</name></param>
+            <alias name="eglClientWaitSync"/>
+        </command>
+        <command>
+            <proto><ptype>EGLint</ptype> <name>eglClientWaitSyncNV</name></proto>
+            <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>flags</name></param>
+            <param><ptype>EGLTimeNV</ptype> <name>timeout</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglCopyBuffers</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLNativePixmapType</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLContext</ptype> <name>eglCreateContext</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param><ptype>EGLContext</ptype> <name>share_context</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLImageKHR</ptype> <name>eglCreateDRMImageMESA</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSyncNV</ptype> <name>eglCreateFenceSyncNV</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLenum</ptype> <name>condition</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLImageKHR</ptype> <name>eglCreateImageKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLContext</ptype> <name>ctx</name></param>
+            <param><ptype>EGLenum</ptype> <name>target</name></param>
+            <param><ptype>EGLClientBuffer</ptype> <name>buffer</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePbufferFromClientBuffer</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLenum</ptype> <name>buftype</name></param>
+            <param><ptype>EGLClientBuffer</ptype> <name>buffer</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePbufferSurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePixmapSurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param><ptype>EGLNativePixmapType</ptype> <name>pixmap</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePixmapSurfaceHI</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>struct <ptype>EGLClientPixmapHI</ptype> *<name>pixmap</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformPixmapSurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>void *<name>native_pixmap</name></param>
+            <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformPixmapSurfaceEXT</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>void *<name>native_pixmap</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformWindowSurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>void *<name>native_window</name></param>
+            <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreatePlatformWindowSurfaceEXT</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param>void *<name>native_window</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLStreamKHR</ptype> <name>eglCreateStreamFromFileDescriptorKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLNativeFileDescriptorKHR</ptype> <name>file_descriptor</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLStreamKHR</ptype> <name>eglCreateStreamKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreateStreamProducerSurfaceKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSyncKHR</ptype> <name>eglCreateStreamSyncNV</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+            <param><ptype>EGLenum</ptype> <name>type</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSync</ptype> <name>eglCreateSync</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLenum</ptype> <name>type</name></param>
+            <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSyncKHR</ptype> <name>eglCreateSyncKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLenum</ptype> <name>type</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLSyncKHR</ptype> <name>eglCreateSync64KHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLenum</ptype> <name>type</name></param>
+            <param>const <ptype>EGLAttribKHR</ptype> *<name>attrib_list</name></param>
+            <alias name="eglCreateSync"/>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglCreateWindowSurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param><ptype>EGLNativeWindowType</ptype> <name>win</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroyContext</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLContext</ptype> <name>ctx</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroyImageKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroyStreamKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroySurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroySync</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSync</ptype> <name>sync</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroySyncKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
+            <alias name="eglDestroySync"/>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglDestroySyncNV</name></proto>
+            <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLint</ptype> <name>eglDupNativeFenceFDANDROID</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglExportDRMImageMESA</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLImageKHR</ptype> <name>image</name></param>
+            <param><ptype>EGLint</ptype> *<name>name</name></param>
+            <param><ptype>EGLint</ptype> *<name>handle</name></param>
+            <param><ptype>EGLint</ptype> *<name>stride</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglFenceNV</name></proto>
+            <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglGetConfigAttrib</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> <name>config</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglGetConfigs</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLConfig</ptype> *<name>configs</name></param>
+            <param><ptype>EGLint</ptype> <name>config_size</name></param>
+            <param><ptype>EGLint</ptype> *<name>num_config</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLContext</ptype> <name>eglGetCurrentContext</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLDisplay</ptype> <name>eglGetCurrentDisplay</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLSurface</ptype> <name>eglGetCurrentSurface</name></proto>
+            <param><ptype>EGLint</ptype> <name>readdraw</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLDisplay</ptype> <name>eglGetDisplay</name></proto>
+            <param><ptype>EGLNativeDisplayType</ptype> <name>display_id</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLint</ptype> <name>eglGetError</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLDisplay</ptype> <name>eglGetPlatformDisplay</name></proto>
+            <param><ptype>EGLenum</ptype> <name>platform</name></param>
+            <param>void *<name>native_display</name></param>
+            <param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLDisplay</ptype> <name>eglGetPlatformDisplayEXT</name></proto>
+            <param><ptype>EGLenum</ptype> <name>platform</name></param>
+            <param>void *<name>native_display</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>__eglMustCastToProperFunctionPointerType</ptype> <name>eglGetProcAddress</name></proto>
+            <param>const char *<name>procname</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLNativeFileDescriptorKHR</ptype> <name>eglGetStreamFileDescriptorKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglGetSyncAttrib</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSync</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLAttrib</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglGetSyncAttribKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglGetSyncAttribNV</name></proto>
+            <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLuint64NV</ptype> <name>eglGetSystemTimeFrequencyNV</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLuint64NV</ptype> <name>eglGetSystemTimeNV</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglInitialize</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLint</ptype> *<name>major</name></param>
+            <param><ptype>EGLint</ptype> *<name>minor</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglLockSurfaceKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>attrib_list</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglMakeCurrent</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>draw</name></param>
+            <param><ptype>EGLSurface</ptype> <name>read</name></param>
+            <param><ptype>EGLContext</ptype> <name>ctx</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglPostSubBufferNV</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>x</name></param>
+            <param><ptype>EGLint</ptype> <name>y</name></param>
+            <param><ptype>EGLint</ptype> <name>width</name></param>
+            <param><ptype>EGLint</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLenum</ptype> <name>eglQueryAPI</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryContext</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLContext</ptype> <name>ctx</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryNativeDisplayNV</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLNativeDisplayType</ptype> *<name>display_id</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryNativePixmapNV</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surf</name></param>
+            <param><ptype>EGLNativePixmapType</ptype> *<name>pixmap</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryNativeWindowNV</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surf</name></param>
+            <param><ptype>EGLNativeWindowType</ptype> *<name>window</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryStreamKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+            <param><ptype>EGLenum</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryStreamTimeKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+            <param><ptype>EGLenum</ptype> <name>attribute</name></param>
+            <param><ptype>EGLTimeKHR</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQueryStreamu64KHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+            <param><ptype>EGLenum</ptype> <name>attribute</name></param>
+            <param><ptype>EGLuint64KHR</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>const char *<name>eglQueryString</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLint</ptype> <name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQuerySurface</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQuerySurface64KHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLAttribKHR</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglQuerySurfacePointerANGLE</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param>void **<name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglReleaseTexImage</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglReleaseThread</name></proto>
+        </command>
+        <command>
+            <proto>void <name>eglSetBlobCacheFuncsANDROID</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSetBlobFuncANDROID</ptype> <name>set</name></param>
+            <param><ptype>EGLGetBlobFuncANDROID</ptype> <name>get</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSignalSyncKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
+            <param><ptype>EGLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSignalSyncNV</name></proto>
+            <param><ptype>EGLSyncNV</ptype> <name>sync</name></param>
+            <param><ptype>EGLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglStreamAttribKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+            <param><ptype>EGLenum</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerAcquireKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerGLTextureExternalKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglStreamConsumerReleaseKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSurfaceAttrib</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>attribute</name></param>
+            <param><ptype>EGLint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffers</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersWithDamageEXT</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> *<name>rects</name></param>
+            <param><ptype>EGLint</ptype> <name>n_rects</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersRegionNOK</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>numRects</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>rects</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSwapBuffersRegion2NOK</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+            <param><ptype>EGLint</ptype> <name>numRects</name></param>
+            <param>const <ptype>EGLint</ptype> *<name>rects</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglSwapInterval</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLint</ptype> <name>interval</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglTerminate</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglUnlockSurfaceKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSurface</ptype> <name>surface</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglWaitClient</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglWaitGL</name></proto>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglWaitNative</name></proto>
+            <param><ptype>EGLint</ptype> <name>engine</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLBoolean</ptype> <name>eglWaitSync</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSync</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto><ptype>EGLint</ptype> <name>eglWaitSyncKHR</name></proto>
+            <param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
+            <param><ptype>EGLSyncKHR</ptype> <name>sync</name></param>
+            <param><ptype>EGLint</ptype> <name>flags</name></param>
+        </command>
+    </commands>
+
+    <!-- SECTION: EGL API interface definitions. -->
+    <feature api="egl" name="EGL_VERSION_1_0" number="1.0">
+        <require>
+            <enum name="EGL_ALPHA_SIZE"/>
+            <enum name="EGL_BAD_ACCESS"/>
+            <enum name="EGL_BAD_ALLOC"/>
+            <enum name="EGL_BAD_ATTRIBUTE"/>
+            <enum name="EGL_BAD_CONFIG"/>
+            <enum name="EGL_BAD_CONTEXT"/>
+            <enum name="EGL_BAD_CURRENT_SURFACE"/>
+            <enum name="EGL_BAD_DISPLAY"/>
+            <enum name="EGL_BAD_MATCH"/>
+            <enum name="EGL_BAD_NATIVE_PIXMAP"/>
+            <enum name="EGL_BAD_NATIVE_WINDOW"/>
+            <enum name="EGL_BAD_PARAMETER"/>
+            <enum name="EGL_BAD_SURFACE"/>
+            <enum name="EGL_BLUE_SIZE"/>
+            <enum name="EGL_BUFFER_SIZE"/>
+            <enum name="EGL_CONFIG_CAVEAT"/>
+            <enum name="EGL_CONFIG_ID"/>
+            <enum name="EGL_CORE_NATIVE_ENGINE"/>
+            <enum name="EGL_DEPTH_SIZE"/>
+            <enum name="EGL_DONT_CARE"/>
+            <enum name="EGL_DRAW"/>
+            <enum name="EGL_EXTENSIONS"/>
+            <enum name="EGL_FALSE"/>
+            <enum name="EGL_GREEN_SIZE"/>
+            <enum name="EGL_HEIGHT"/>
+            <enum name="EGL_LARGEST_PBUFFER"/>
+            <enum name="EGL_LEVEL"/>
+            <enum name="EGL_MAX_PBUFFER_HEIGHT"/>
+            <enum name="EGL_MAX_PBUFFER_PIXELS"/>
+            <enum name="EGL_MAX_PBUFFER_WIDTH"/>
+            <enum name="EGL_NATIVE_RENDERABLE"/>
+            <enum name="EGL_NATIVE_VISUAL_ID"/>
+            <enum name="EGL_NATIVE_VISUAL_TYPE"/>
+            <enum name="EGL_NONE"/>
+            <enum name="EGL_NON_CONFORMANT_CONFIG"/>
+            <enum name="EGL_NOT_INITIALIZED"/>
+            <enum name="EGL_NO_CONTEXT"/>
+            <enum name="EGL_NO_DISPLAY"/>
+            <enum name="EGL_NO_SURFACE"/>
+            <enum name="EGL_PBUFFER_BIT"/>
+            <enum name="EGL_PIXMAP_BIT"/>
+            <enum name="EGL_READ"/>
+            <enum name="EGL_RED_SIZE"/>
+            <enum name="EGL_SAMPLES"/>
+            <enum name="EGL_SAMPLE_BUFFERS"/>
+            <enum name="EGL_SLOW_CONFIG"/>
+            <enum name="EGL_STENCIL_SIZE"/>
+            <enum name="EGL_SUCCESS"/>
+            <enum name="EGL_SURFACE_TYPE"/>
+            <enum name="EGL_TRANSPARENT_BLUE_VALUE"/>
+            <enum name="EGL_TRANSPARENT_GREEN_VALUE"/>
+            <enum name="EGL_TRANSPARENT_RED_VALUE"/>
+            <enum name="EGL_TRANSPARENT_RGB"/>
+            <enum name="EGL_TRANSPARENT_TYPE"/>
+            <enum name="EGL_TRUE"/>
+            <enum name="EGL_VENDOR"/>
+            <enum name="EGL_VERSION"/>
+            <enum name="EGL_WIDTH"/>
+            <enum name="EGL_WINDOW_BIT"/>
+            <command name="eglChooseConfig"/>
+            <command name="eglCopyBuffers"/>
+            <command name="eglCreateContext"/>
+            <command name="eglCreatePbufferSurface"/>
+            <command name="eglCreatePixmapSurface"/>
+            <command name="eglCreateWindowSurface"/>
+            <command name="eglDestroyContext"/>
+            <command name="eglDestroySurface"/>
+            <command name="eglGetConfigAttrib"/>
+            <command name="eglGetConfigs"/>
+            <command name="eglGetCurrentDisplay"/>
+            <command name="eglGetCurrentSurface"/>
+            <command name="eglGetDisplay"/>
+            <command name="eglGetError"/>
+            <command name="eglGetProcAddress"/>
+            <command name="eglInitialize"/>
+            <command name="eglMakeCurrent"/>
+            <command name="eglQueryContext"/>
+            <command name="eglQueryString"/>
+            <command name="eglQuerySurface"/>
+            <command name="eglSwapBuffers"/>
+            <command name="eglTerminate"/>
+            <command name="eglWaitGL"/>
+            <command name="eglWaitNative"/>
+        </require>
+    </feature>
+    <feature api="egl" name="EGL_VERSION_1_1" number="1.1">
+        <require>
+            <enum name="EGL_BACK_BUFFER"/>
+            <enum name="EGL_BIND_TO_TEXTURE_RGB"/>
+            <enum name="EGL_BIND_TO_TEXTURE_RGBA"/>
+            <enum name="EGL_CONTEXT_LOST"/>
+            <enum name="EGL_MIN_SWAP_INTERVAL"/>
+            <enum name="EGL_MAX_SWAP_INTERVAL"/>
+            <enum name="EGL_MIPMAP_TEXTURE"/>
+            <enum name="EGL_MIPMAP_LEVEL"/>
+            <enum name="EGL_NO_TEXTURE"/>
+            <enum name="EGL_TEXTURE_2D"/>
+            <enum name="EGL_TEXTURE_FORMAT"/>
+            <enum name="EGL_TEXTURE_RGB"/>
+            <enum name="EGL_TEXTURE_RGBA"/>
+            <enum name="EGL_TEXTURE_TARGET"/>
+            <command name="eglBindTexImage"/>
+            <command name="eglReleaseTexImage"/>
+            <command name="eglSurfaceAttrib"/>
+            <command name="eglSwapInterval"/>
+        </require>
+    </feature>
+    <feature api="egl" name="EGL_VERSION_1_2" number="1.2">
+        <require>
+            <enum name="EGL_ALPHA_FORMAT"/>
+            <enum name="EGL_ALPHA_FORMAT_NONPRE"/>
+            <enum name="EGL_ALPHA_FORMAT_PRE"/>
+            <enum name="EGL_ALPHA_MASK_SIZE"/>
+            <enum name="EGL_BUFFER_PRESERVED"/>
+            <enum name="EGL_BUFFER_DESTROYED"/>
+            <enum name="EGL_CLIENT_APIS"/>
+            <enum name="EGL_COLORSPACE"/>
+            <enum name="EGL_COLORSPACE_sRGB"/>
+            <enum name="EGL_COLORSPACE_LINEAR"/>
+            <enum name="EGL_COLOR_BUFFER_TYPE"/>
+            <enum name="EGL_CONTEXT_CLIENT_TYPE"/>
+            <enum name="EGL_DISPLAY_SCALING"/>
+            <enum name="EGL_HORIZONTAL_RESOLUTION"/>
+            <enum name="EGL_LUMINANCE_BUFFER"/>
+            <enum name="EGL_LUMINANCE_SIZE"/>
+            <enum name="EGL_OPENGL_ES_BIT"/>
+            <enum name="EGL_OPENVG_BIT"/>
+            <enum name="EGL_OPENGL_ES_API"/>
+            <enum name="EGL_OPENVG_API"/>
+            <enum name="EGL_OPENVG_IMAGE"/>
+            <enum name="EGL_PIXEL_ASPECT_RATIO"/>
+            <enum name="EGL_RENDERABLE_TYPE"/>
+            <enum name="EGL_RENDER_BUFFER"/>
+            <enum name="EGL_RGB_BUFFER"/>
+            <enum name="EGL_SINGLE_BUFFER"/>
+            <enum name="EGL_SWAP_BEHAVIOR"/>
+            <enum name="EGL_UNKNOWN"/>
+            <enum name="EGL_VERTICAL_RESOLUTION"/>
+            <command name="eglBindAPI"/>
+            <command name="eglQueryAPI"/>
+            <command name="eglCreatePbufferFromClientBuffer"/>
+            <command name="eglReleaseThread"/>
+            <command name="eglWaitClient"/>
+        </require>
+    </feature>
+    <feature api="egl" name="EGL_VERSION_1_3" number="1.3">
+        <require>
+            <enum name="EGL_CONFORMANT"/>
+            <enum name="EGL_CONTEXT_CLIENT_VERSION"/>
+            <enum name="EGL_MATCH_NATIVE_PIXMAP"/>
+            <enum name="EGL_OPENGL_ES2_BIT"/>
+            <enum name="EGL_VG_ALPHA_FORMAT"/>
+            <enum name="EGL_VG_ALPHA_FORMAT_NONPRE"/>
+            <enum name="EGL_VG_ALPHA_FORMAT_PRE"/>
+            <enum name="EGL_VG_ALPHA_FORMAT_PRE_BIT"/>
+            <enum name="EGL_VG_COLORSPACE"/>
+            <enum name="EGL_VG_COLORSPACE_sRGB"/>
+            <enum name="EGL_VG_COLORSPACE_LINEAR"/>
+            <enum name="EGL_VG_COLORSPACE_LINEAR_BIT"/>
+        </require>
+    </feature>
+    <feature api="egl" name="EGL_VERSION_1_4" number="1.4">
+        <require>
+            <enum name="EGL_DEFAULT_DISPLAY"/>
+            <enum name="EGL_MULTISAMPLE_RESOLVE_BOX_BIT"/>
+            <enum name="EGL_MULTISAMPLE_RESOLVE"/>
+            <enum name="EGL_MULTISAMPLE_RESOLVE_DEFAULT"/>
+            <enum name="EGL_MULTISAMPLE_RESOLVE_BOX"/>
+            <enum name="EGL_OPENGL_API"/>
+            <enum name="EGL_OPENGL_BIT"/>
+            <enum name="EGL_SWAP_BEHAVIOR_PRESERVED_BIT"/>
+            <command name="eglGetCurrentContext"/>
+        </require>
+    </feature>
+    <feature api="egl" name="EGL_VERSION_1_5" number="1.5">
+        <require comment="EGL_KHR_create_context features">
+            <enum name="EGL_CONTEXT_MAJOR_VERSION"/>
+            <enum name="EGL_CONTEXT_MINOR_VERSION"/>
+            <enum name="EGL_CONTEXT_OPENGL_PROFILE_MASK"/>
+            <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
+            <enum name="EGL_NO_RESET_NOTIFICATION"/>
+            <enum name="EGL_LOSE_CONTEXT_ON_RESET"/>
+            <enum name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT"/>
+            <enum name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT"/>
+            <enum name="EGL_CONTEXT_OPENGL_DEBUG"/>
+            <enum name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE"/>
+            <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
+            <enum name="EGL_OPENGL_ES3_BIT"/>
+        </require>
+        <require comment="EGL_EXT_create_context_robustness">
+            <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS"/>
+            <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY"/>
+        </require>
+        <require comment="EGL_EXT_client_extensions"/>
+        <require comment="EGL_KHR_cl_event2">
+            <enum name="EGL_CL_EVENT_HANDLE"/>
+            <enum name="EGL_SYNC_CL_EVENT"/>
+            <enum name="EGL_SYNC_CL_EVENT_COMPLETE"/>
+        </require>
+        <require comment="EGL_KHR_fence_sync">
+            <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE"/>
+            <enum name="EGL_SYNC_TYPE"/>
+            <enum name="EGL_SYNC_STATUS"/>
+            <enum name="EGL_SYNC_CONDITION"/>
+            <enum name="EGL_SIGNALED"/>
+            <enum name="EGL_UNSIGNALED"/>
+            <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT"/>
+            <enum name="EGL_FOREVER"/>
+            <enum name="EGL_TIMEOUT_EXPIRED"/>
+            <enum name="EGL_CONDITION_SATISFIED"/>
+            <enum name="EGL_NO_SYNC"/>
+            <enum name="EGL_SYNC_FENCE"/>
+            <command name="eglCreateSync"/>
+            <command name="eglDestroySync"/>
+            <command name="eglClientWaitSync"/>
+            <command name="eglGetSyncAttrib"/>
+        </require>
+        <require comment="EGL_KHR_get_all_proc_addresses"/>
+        <require comment="EGL_KHR_client_get_all_proc_addresses"/>
+        <require comment="EGL_KHR_gl_colorspace">
+            <enum name="EGL_GL_COLORSPACE"/>
+            <enum name="EGL_GL_COLORSPACE_SRGB"/>
+            <enum name="EGL_GL_COLORSPACE_LINEAR"/>
+        </require>
+        <require comment="EGL_KHR_gl_renderbuffer_image">
+            <enum name="EGL_GL_RENDERBUFFER"/>
+        </require>
+        <require comment="EGL_KHR_gl_texture_2D_image">
+            <enum name="EGL_GL_TEXTURE_2D"/>
+            <enum name="EGL_GL_TEXTURE_LEVEL"/>
+        </require>
+        <require comment="EGL_KHR_gl_texture_3D_image">
+            <enum name="EGL_GL_TEXTURE_3D"/>
+            <enum name="EGL_GL_TEXTURE_ZOFFSET"/>
+        </require>
+        <require comment="EGL_KHR_gl_texture_cubemap_image">
+            <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
+            <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
+            <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
+            <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
+            <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
+            <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
+        </require>
+        <require comment="EGL_EXT_platform_base">
+            <command name="eglGetPlatformDisplay"/>
+            <command name="eglCreatePlatformWindowSurface"/>
+            <command name="eglCreatePlatformPixmapSurface"/>
+        </require>
+        <require comment="EGL_KHR_surfaceless_context - just relaxes an error condition"/>
+        <require comment="EGL_KHR_wait_sync">
+            <command name="eglWaitSync"/>
+        </require>
+    </feature>
+
+    <!-- SECTION: EGL extension interface definitions -->
+    <extensions>
+        <extension name="EGL_ANDROID_blob_cache" supported="egl">
+            <require>
+                <command name="eglSetBlobCacheFuncsANDROID"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANDROID_framebuffer_target" supported="egl">
+            <require>
+                <enum name="EGL_FRAMEBUFFER_TARGET_ANDROID"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANDROID_image_native_buffer" supported="egl">
+            <require>
+                <enum name="EGL_NATIVE_BUFFER_ANDROID"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANDROID_native_fence_sync" supported="egl">
+            <require>
+                <enum name="EGL_SYNC_NATIVE_FENCE_ANDROID"/>
+                <enum name="EGL_SYNC_NATIVE_FENCE_FD_ANDROID"/>
+                <enum name="EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID"/>
+                <enum name="EGL_NO_NATIVE_FENCE_FD_ANDROID"/>
+                <command name="eglDupNativeFenceFDANDROID"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANDROID_recordable" supported="egl">
+            <require>
+                <enum name="EGL_RECORDABLE_ANDROID"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANGLE_d3d_share_handle_client_buffer" supported="egl">
+            <require>
+                <enum name="EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANGLE_query_surface_pointer" supported="egl">
+            <require>
+                <command name="eglQuerySurfacePointerANGLE"/>
+            </require>
+        </extension>
+        <extension name="EGL_ANGLE_surface_d3d_texture_2d_share_handle" supported="egl">
+            <require>
+                <enum name="EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="EGL_ARM_pixmap_multisample_discard" supported="egl">
+            <require>
+                <enum name="EGL_DISCARD_SAMPLES_ARM"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_buffer_age" supported="egl">
+            <require>
+                <enum name="EGL_BUFFER_AGE_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_client_extensions" supported="egl"/>
+        <extension name="EGL_EXT_create_context_robustness" supported="egl">
+            <require>
+                <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT"/>
+                <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT"/>
+                <enum name="EGL_NO_RESET_NOTIFICATION_EXT"/>
+                <enum name="EGL_LOSE_CONTEXT_ON_RESET_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_image_dma_buf_import" supported="egl">
+            <require>
+                <enum name="EGL_LINUX_DMA_BUF_EXT"/>
+                <enum name="EGL_LINUX_DRM_FOURCC_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE0_FD_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE0_OFFSET_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE0_PITCH_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE1_FD_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE1_OFFSET_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE1_PITCH_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE2_FD_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE2_OFFSET_EXT"/>
+                <enum name="EGL_DMA_BUF_PLANE2_PITCH_EXT"/>
+                <enum name="EGL_YUV_COLOR_SPACE_HINT_EXT"/>
+                <enum name="EGL_SAMPLE_RANGE_HINT_EXT"/>
+                <enum name="EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT"/>
+                <enum name="EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT"/>
+                <enum name="EGL_ITU_REC601_EXT"/>
+                <enum name="EGL_ITU_REC709_EXT"/>
+                <enum name="EGL_ITU_REC2020_EXT"/>
+                <enum name="EGL_YUV_FULL_RANGE_EXT"/>
+                <enum name="EGL_YUV_NARROW_RANGE_EXT"/>
+                <enum name="EGL_YUV_CHROMA_SITING_0_EXT"/>
+                <enum name="EGL_YUV_CHROMA_SITING_0_5_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_multiview_window" supported="egl">
+            <require>
+                <enum name="EGL_MULTIVIEW_VIEW_COUNT_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_platform_base" supported="egl">
+            <require>
+                <command name="eglGetPlatformDisplayEXT"/>
+                <command name="eglCreatePlatformWindowSurfaceEXT"/>
+                <command name="eglCreatePlatformPixmapSurfaceEXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_platform_wayland" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_WAYLAND_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_platform_x11" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_X11_EXT"/>
+                <enum name="EGL_PLATFORM_X11_SCREEN_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_protected_surface" supported="egl">
+            <require>
+                <enum name="EGL_PROTECTED_CONTENT_EXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_EXT_swap_buffers_with_damage" supported="egl">
+            <require>
+                <command name="eglSwapBuffersWithDamageEXT"/>
+            </require>
+        </extension>
+        <extension name="EGL_HI_clientpixmap" supported="egl">
+            <require>
+                <enum name="EGL_CLIENT_PIXMAP_POINTER_HI"/>
+                <command name="eglCreatePixmapSurfaceHI"/>
+            </require>
+        </extension>
+        <extension name="EGL_HI_colorformats" supported="egl">
+            <require>
+                <enum name="EGL_COLOR_FORMAT_HI"/>
+                <enum name="EGL_COLOR_RGB_HI"/>
+                <enum name="EGL_COLOR_RGBA_HI"/>
+                <enum name="EGL_COLOR_ARGB_HI"/>
+            </require>
+        </extension>
+        <extension name="EGL_IMG_context_priority" supported="egl">
+            <require>
+                <enum name="EGL_CONTEXT_PRIORITY_LEVEL_IMG"/>
+                <enum name="EGL_CONTEXT_PRIORITY_HIGH_IMG"/>
+                <enum name="EGL_CONTEXT_PRIORITY_MEDIUM_IMG"/>
+                <enum name="EGL_CONTEXT_PRIORITY_LOW_IMG"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_cl_event" supported="egl">
+            <require>
+                <enum name="EGL_CL_EVENT_HANDLE_KHR"/>
+                <enum name="EGL_SYNC_CL_EVENT_KHR"/>
+                <enum name="EGL_SYNC_CL_EVENT_COMPLETE_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_cl_event2" supported="egl">
+            <require>
+                <enum name="EGL_CL_EVENT_HANDLE_KHR"/>
+                <enum name="EGL_SYNC_CL_EVENT_KHR"/>
+                <enum name="EGL_SYNC_CL_EVENT_COMPLETE_KHR"/>
+                <command name="eglCreateSync64KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_config_attribs" supported="egl">
+            <require>
+                <enum name="EGL_CONFORMANT_KHR"/>
+                <enum name="EGL_VG_COLORSPACE_LINEAR_BIT_KHR"/>
+                <enum name="EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_client_get_all_proc_addresses" supported="egl" comment="Alias of EGL_KHR_get_all_proc_addresses"/>
+        <extension name="EGL_KHR_create_context" supported="egl">
+            <require>
+                <enum name="EGL_CONTEXT_MAJOR_VERSION_KHR"/>
+                <enum name="EGL_CONTEXT_MINOR_VERSION_KHR"/>
+                <enum name="EGL_CONTEXT_FLAGS_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR"/>
+                <enum name="EGL_NO_RESET_NOTIFICATION_KHR"/>
+                <enum name="EGL_LOSE_CONTEXT_ON_RESET_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR"/>
+                <enum name="EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR"/>
+                <enum name="EGL_OPENGL_ES3_BIT"/>
+                <enum name="EGL_OPENGL_ES3_BIT_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_fence_sync" protect="KHRONOS_SUPPORT_INT64" supported="egl">
+            <require>
+                <!-- @ Most interfaces defined by EGL_KHR_reusable sync -->
+                <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR"/>
+                <enum name="EGL_SYNC_CONDITION_KHR"/>
+                <enum name="EGL_SYNC_FENCE_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_get_all_proc_addresses" supported="egl"/>
+        <extension name="EGL_KHR_gl_colorspace" supported="egl">
+            <require>
+                <enum name="EGL_GL_COLORSPACE_KHR"/>
+                <enum name="EGL_GL_COLORSPACE_SRGB_KHR"/>
+                <enum name="EGL_GL_COLORSPACE_LINEAR_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_gl_renderbuffer_image" supported="egl">
+            <require>
+                <enum name="EGL_GL_RENDERBUFFER_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_gl_texture_2D_image" supported="egl">
+            <require>
+                <enum name="EGL_GL_TEXTURE_2D_KHR"/>
+                <enum name="EGL_GL_TEXTURE_LEVEL_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_gl_texture_3D_image" supported="egl">
+            <require>
+                <enum name="EGL_GL_TEXTURE_3D_KHR"/>
+                <enum name="EGL_GL_TEXTURE_ZOFFSET_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_gl_texture_cubemap_image" supported="egl">
+            <require>
+                <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR"/>
+                <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR"/>
+                <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR"/>
+                <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR"/>
+                <enum name="EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR"/>
+                <enum name="EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_image" supported="egl">
+            <require>
+                <enum name="EGL_NATIVE_PIXMAP_KHR"/>
+                <enum name="EGL_NO_IMAGE_KHR"/>
+                <command name="eglCreateImageKHR"/>
+                <command name="eglDestroyImageKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_image_base" supported="egl">
+            <require>
+                <enum name="EGL_IMAGE_PRESERVED_KHR"/>
+                <enum name="EGL_NO_IMAGE_KHR"/>
+                <command name="eglCreateImageKHR"/>
+                <command name="eglDestroyImageKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_image_pixmap" supported="egl">
+            <require>
+                <enum name="EGL_NATIVE_PIXMAP_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_lock_surface" supported="egl">
+            <require>
+                <enum name="EGL_READ_SURFACE_BIT_KHR"/>
+                <enum name="EGL_WRITE_SURFACE_BIT_KHR"/>
+                <enum name="EGL_LOCK_SURFACE_BIT_KHR"/>
+                <enum name="EGL_OPTIMAL_FORMAT_BIT_KHR"/>
+                <enum name="EGL_MATCH_FORMAT_KHR"/>
+                <enum name="EGL_FORMAT_RGB_565_EXACT_KHR"/>
+                <enum name="EGL_FORMAT_RGB_565_KHR"/>
+                <enum name="EGL_FORMAT_RGBA_8888_EXACT_KHR"/>
+                <enum name="EGL_FORMAT_RGBA_8888_KHR"/>
+                <enum name="EGL_MAP_PRESERVE_PIXELS_KHR"/>
+                <enum name="EGL_LOCK_USAGE_HINT_KHR"/>
+                <enum name="EGL_BITMAP_POINTER_KHR"/>
+                <enum name="EGL_BITMAP_PITCH_KHR"/>
+                <enum name="EGL_BITMAP_ORIGIN_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_RED_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR"/>
+                <enum name="EGL_LOWER_LEFT_KHR"/>
+                <enum name="EGL_UPPER_LEFT_KHR"/>
+                <command name="eglLockSurfaceKHR"/>
+                <command name="eglUnlockSurfaceKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_lock_surface2" supported="egl">
+            <require>
+                <enum name="EGL_BITMAP_PIXEL_SIZE_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_lock_surface3" supported="egl">
+            <require>
+                <enum name="EGL_READ_SURFACE_BIT_KHR"/>
+                <enum name="EGL_WRITE_SURFACE_BIT_KHR"/>
+                <enum name="EGL_LOCK_SURFACE_BIT_KHR"/>
+                <enum name="EGL_OPTIMAL_FORMAT_BIT_KHR"/>
+                <enum name="EGL_MATCH_FORMAT_KHR"/>
+                <enum name="EGL_FORMAT_RGB_565_EXACT_KHR"/>
+                <enum name="EGL_FORMAT_RGB_565_KHR"/>
+                <enum name="EGL_FORMAT_RGBA_8888_EXACT_KHR"/>
+                <enum name="EGL_FORMAT_RGBA_8888_KHR"/>
+                <enum name="EGL_MAP_PRESERVE_PIXELS_KHR"/>
+                <enum name="EGL_LOCK_USAGE_HINT_KHR"/>
+                <enum name="EGL_BITMAP_PITCH_KHR"/>
+                <enum name="EGL_BITMAP_ORIGIN_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_RED_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR"/>
+                <enum name="EGL_BITMAP_PIXEL_SIZE_KHR"/>
+                <enum name="EGL_BITMAP_POINTER_KHR"/>
+                <enum name="EGL_LOWER_LEFT_KHR"/>
+                <enum name="EGL_UPPER_LEFT_KHR"/>
+                <command name="eglLockSurfaceKHR"/>
+                <command name="eglUnlockSurfaceKHR"/>
+                <command name="eglQuerySurface64KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_platform_android" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_ANDROID_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_platform_gbm" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_GBM_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_platform_wayland" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_WAYLAND_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_platform_x11" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_X11_KHR"/>
+                <enum name="EGL_PLATFORM_X11_SCREEN_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_reusable_sync" protect="KHRONOS_SUPPORT_INT64" supported="egl">
+            <require>
+                <enum name="EGL_SYNC_STATUS_KHR"/>
+                <enum name="EGL_SIGNALED_KHR"/>
+                <enum name="EGL_UNSIGNALED_KHR"/>
+                <enum name="EGL_TIMEOUT_EXPIRED_KHR"/>
+                <enum name="EGL_CONDITION_SATISFIED_KHR"/>
+                <enum name="EGL_SYNC_TYPE_KHR"/>
+                <enum name="EGL_SYNC_REUSABLE_KHR"/>
+                <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT_KHR"/>
+                <enum name="EGL_FOREVER_KHR"/>
+                <enum name="EGL_NO_SYNC_KHR"/>
+                <command name="eglCreateSyncKHR"/>
+                <command name="eglDestroySyncKHR"/>
+                <command name="eglClientWaitSyncKHR"/>
+                <command name="eglSignalSyncKHR"/>
+                <command name="eglGetSyncAttribKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_stream" protect="KHRONOS_SUPPORT_INT64" supported="egl">
+            <require>
+                <enum name="EGL_NO_STREAM_KHR"/>
+                <enum name="EGL_CONSUMER_LATENCY_USEC_KHR"/>
+                <enum name="EGL_PRODUCER_FRAME_KHR"/>
+                <enum name="EGL_CONSUMER_FRAME_KHR"/>
+                <enum name="EGL_STREAM_STATE_KHR"/>
+                <enum name="EGL_STREAM_STATE_CREATED_KHR"/>
+                <enum name="EGL_STREAM_STATE_CONNECTING_KHR"/>
+                <enum name="EGL_STREAM_STATE_EMPTY_KHR"/>
+                <enum name="EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR"/>
+                <enum name="EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR"/>
+                <enum name="EGL_STREAM_STATE_DISCONNECTED_KHR"/>
+                <enum name="EGL_BAD_STREAM_KHR"/>
+                <enum name="EGL_BAD_STATE_KHR"/>
+                <command name="eglCreateStreamKHR"/>
+                <command name="eglDestroyStreamKHR"/>
+                <command name="eglStreamAttribKHR"/>
+                <command name="eglQueryStreamKHR"/>
+                <command name="eglQueryStreamu64KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_stream_consumer_gltexture" protect="EGL_KHR_stream" supported="egl">
+            <require>
+                <enum name="EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR"/>
+                <command name="eglStreamConsumerGLTextureExternalKHR"/>
+                <command name="eglStreamConsumerAcquireKHR"/>
+                <command name="eglStreamConsumerReleaseKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_stream_cross_process_fd" protect="EGL_KHR_stream" supported="egl">
+            <require>
+                <enum name="EGL_NO_FILE_DESCRIPTOR_KHR"/>
+                <command name="eglGetStreamFileDescriptorKHR"/>
+                <command name="eglCreateStreamFromFileDescriptorKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_stream_fifo" protect="EGL_KHR_stream" supported="egl">
+            <require>
+                <enum name="EGL_STREAM_FIFO_LENGTH_KHR"/>
+                <enum name="EGL_STREAM_TIME_NOW_KHR"/>
+                <enum name="EGL_STREAM_TIME_CONSUMER_KHR"/>
+                <enum name="EGL_STREAM_TIME_PRODUCER_KHR"/>
+                <command name="eglQueryStreamTimeKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_stream_producer_aldatalocator" protect="EGL_KHR_stream" supported="egl"/>
+        <extension name="EGL_KHR_stream_producer_eglsurface" protect="EGL_KHR_stream" supported="egl">
+            <require>
+                <enum name="EGL_STREAM_BIT_KHR"/>
+                <command name="eglCreateStreamProducerSurfaceKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_surfaceless_context" supported="egl" comment="Just relaxes an error condition"/>
+        <extension name="EGL_KHR_vg_parent_image" supported="egl">
+            <require>
+                <enum name="EGL_VG_PARENT_IMAGE_KHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_KHR_wait_sync" supported="egl">
+            <require>
+                <command name="eglWaitSyncKHR"/>
+            </require>
+        </extension>
+        <extension name="EGL_MESA_drm_image" supported="egl">
+            <require>
+                <enum name="EGL_DRM_BUFFER_FORMAT_MESA"/>
+                <enum name="EGL_DRM_BUFFER_USE_MESA"/>
+                <enum name="EGL_DRM_BUFFER_FORMAT_ARGB32_MESA"/>
+                <enum name="EGL_DRM_BUFFER_MESA"/>
+                <enum name="EGL_DRM_BUFFER_STRIDE_MESA"/>
+                <enum name="EGL_DRM_BUFFER_USE_SCANOUT_MESA"/>
+                <enum name="EGL_DRM_BUFFER_USE_SHARE_MESA"/>
+                <command name="eglCreateDRMImageMESA"/>
+                <command name="eglExportDRMImageMESA"/>
+            </require>
+        </extension>
+        <extension name="EGL_MESA_platform_gbm" supported="egl">
+            <require>
+                <enum name="EGL_PLATFORM_GBM_MESA"/>
+            </require>
+        </extension>
+        <extension name="EGL_NOK_swap_region" supported="egl">
+            <require>
+                <command name="eglSwapBuffersRegionNOK"/>
+            </require>
+        </extension>
+        <extension name="EGL_NOK_swap_region2" supported="egl">
+            <require>
+                <command name="eglSwapBuffersRegion2NOK"/>
+            </require>
+        </extension>
+        <extension name="EGL_NOK_texture_from_pixmap" supported="egl">
+            <require>
+                <enum name="EGL_Y_INVERTED_NOK"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_3dvision_surface" supported="egl">
+            <require>
+                <enum name="EGL_AUTO_STEREO_NV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_coverage_sample" supported="egl">
+            <require>
+                <enum name="EGL_COVERAGE_BUFFERS_NV"/>
+                <enum name="EGL_COVERAGE_SAMPLES_NV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_coverage_sample_resolve" supported="egl">
+            <require>
+                <enum name="EGL_COVERAGE_SAMPLE_RESOLVE_NV"/>
+                <enum name="EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV"/>
+                <enum name="EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_depth_nonlinear" supported="egl">
+            <require>
+                <enum name="EGL_DEPTH_ENCODING_NV"/>
+                <enum name="EGL_DEPTH_ENCODING_NONE_NV"/>
+                <enum name="EGL_DEPTH_ENCODING_NONLINEAR_NV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_native_query" supported="egl">
+            <require>
+                <command name="eglQueryNativeDisplayNV"/>
+                <command name="eglQueryNativeWindowNV"/>
+                <command name="eglQueryNativePixmapNV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_post_convert_rounding" supported="egl">
+            <require>
+            </require>
+        </extension>
+        <extension name="EGL_NV_post_sub_buffer" supported="egl">
+            <require>
+                <enum name="EGL_POST_SUB_BUFFER_SUPPORTED_NV"/>
+                <command name="eglPostSubBufferNV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_stream_sync" supported="egl">
+            <require>
+                <enum name="EGL_SYNC_TYPE_KHR"/>
+                <enum name="EGL_SYNC_NEW_FRAME_NV"/>
+                <command name="eglCreateStreamSyncNV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_sync" protect="KHRONOS_SUPPORT_INT64" supported="egl">
+            <require>
+                <enum name="EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV"/>
+                <enum name="EGL_SYNC_STATUS_NV"/>
+                <enum name="EGL_SIGNALED_NV"/>
+                <enum name="EGL_UNSIGNALED_NV"/>
+                <enum name="EGL_SYNC_FLUSH_COMMANDS_BIT_NV"/>
+                <enum name="EGL_FOREVER_NV"/>
+                <enum name="EGL_ALREADY_SIGNALED_NV"/>
+                <enum name="EGL_TIMEOUT_EXPIRED_NV"/>
+                <enum name="EGL_CONDITION_SATISFIED_NV"/>
+                <enum name="EGL_SYNC_TYPE_NV"/>
+                <enum name="EGL_SYNC_CONDITION_NV"/>
+                <enum name="EGL_SYNC_FENCE_NV"/>
+                <enum name="EGL_NO_SYNC_NV"/>
+                <command name="eglCreateFenceSyncNV"/>
+                <command name="eglDestroySyncNV"/>
+                <command name="eglFenceNV"/>
+                <command name="eglClientWaitSyncNV"/>
+                <command name="eglSignalSyncNV"/>
+                <command name="eglGetSyncAttribNV"/>
+            </require>
+        </extension>
+        <extension name="EGL_NV_system_time" protect="KHRONOS_SUPPORT_INT64" supported="egl">
+            <require>
+                <command name="eglGetSystemTimeFrequencyNV"/>
+                <command name="eglGetSystemTimeNV"/>
+            </require>
+        </extension>
+    </extensions>
+</registry>
diff --git a/opengl/tools/glgen2/registry/genheaders.py b/opengl/tools/glgen2/registry/genheaders.py
new file mode 100755
index 0000000..78a4a43
--- /dev/null
+++ b/opengl/tools/glgen2/registry/genheaders.py
@@ -0,0 +1,578 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2013-2014 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.
+
+import sys, time, pdb, string, cProfile
+from reg import *
+
+# debug - start header generation in debugger
+# dump - dump registry after loading
+# profile - enable Python profiling
+# protect - whether to use #ifndef protections
+# registry <filename> - use specified XML registry instead of gl.xml
+# target - string name of target header, or all targets if None
+# timeit - time length of registry loading & header generation
+# validate - validate return & parameter group tags against <group>
+debug   = False
+dump    = False
+profile = False
+protect = True
+target  = None
+timeit  = False
+validate= False
+# Default input / log files
+errFilename = None
+diagFilename = 'diag.txt'
+regFilename = 'gl.xml'
+
+if __name__ == '__main__':
+    i = 1
+    while (i < len(sys.argv)):
+        arg = sys.argv[i]
+        i = i + 1
+        if (arg == '-debug'):
+            write('Enabling debug (-debug)', file=sys.stderr)
+            debug = True
+        elif (arg == '-dump'):
+            write('Enabling dump (-dump)', file=sys.stderr)
+            dump = True
+        elif (arg == '-noprotect'):
+            write('Disabling inclusion protection in output headers', file=sys.stderr)
+            protect = False
+        elif (arg == '-profile'):
+            write('Enabling profiling (-profile)', file=sys.stderr)
+            profile = True
+        elif (arg == '-registry'):
+            regFilename = sys.argv[i]
+            i = i+1
+            write('Using registry ', regFilename, file=sys.stderr)
+        elif (arg == '-time'):
+            write('Enabling timing (-time)', file=sys.stderr)
+            timeit = True
+        elif (arg == '-validate'):
+            write('Enabling group validation (-validate)', file=sys.stderr)
+            validate = True
+        elif (arg[0:1] == '-'):
+            write('Unrecognized argument:', arg, file=sys.stderr)
+            exit(1)
+        else:
+            target = arg
+            write('Using target', target, file=sys.stderr)
+
+# Simple timer functions
+startTime = None
+def startTimer():
+    global startTime
+    startTime = time.clock()
+def endTimer(msg):
+    global startTime
+    endTime = time.clock()
+    if (timeit):
+        write(msg, endTime - startTime)
+        startTime = None
+
+# Load & parse registry
+reg = Registry()
+
+startTimer()
+tree = etree.parse(regFilename)
+endTimer('Time to make ElementTree =')
+
+startTimer()
+reg.loadElementTree(tree)
+endTimer('Time to parse ElementTree =')
+
+if (validate):
+    reg.validateGroups()
+
+if (dump):
+    write('***************************************')
+    write('Performing Registry dump to regdump.txt')
+    write('***************************************')
+    reg.dumpReg(filehandle = open('regdump.txt','w'))
+
+# Turn a list of strings into a regexp string matching exactly those strings
+def makeREstring(list):
+    return '^(' + '|'.join(list) + ')$'
+
+# These are "mandatory" OpenGL ES 1 extensions, to
+# be included in the core GLES/gl.h header.
+es1CoreList = [
+    'GL_OES_read_format',
+    'GL_OES_compressed_paletted_texture',
+    'GL_OES_point_size_array',
+    'GL_OES_point_sprite'
+]
+
+# Descriptive names for various regexp patterns used to select
+# versions and extensions
+
+allVersions     = allExtensions = '.*'
+noVersions      = noExtensions = None
+gl12andLaterPat = '1\.[2-9]|[234]\.[0-9]'
+gles2onlyPat    = '2\.[0-9]'
+gles2and30Pat   = '2\.[0-9]|3.0'
+gles2and30and31Pat    = '2.[0-9]|3.[01]'
+es1CorePat      = makeREstring(es1CoreList)
+# Extensions in old glcorearb.h but not yet tagged accordingly in gl.xml
+glCoreARBPat    = None
+glx13andLaterPat = '1\.[3-9]'
+
+# Copyright text prefixing all headers (list of strings).
+prefixStrings = [
+    '/*',
+    '** Copyright (c) 2013-2014 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.',
+    '*/',
+    '/*',
+    '** This header is generated from the Khronos OpenGL / OpenGL ES XML',
+    '** API Registry. The current version of the Registry, generator scripts',
+    '** used to make the header, and the header can be found at',
+    '**   http://www.opengl.org/registry/',
+    '**',
+    '** Khronos $' + 'Revision$ on $' + 'Date$',
+    '*/',
+    ''
+]
+
+# glext.h / glcorearb.h define calling conventions inline (no GL *platform.h)
+glExtPlatformStrings = [
+    '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)',
+    '#ifndef WIN32_LEAN_AND_MEAN',
+    '#define WIN32_LEAN_AND_MEAN 1',
+    '#endif',
+    '#include <windows.h>',
+    '#endif',
+    '',
+    '#ifndef APIENTRY',
+    '#define APIENTRY',
+    '#endif',
+    '#ifndef APIENTRYP',
+    '#define APIENTRYP APIENTRY *',
+    '#endif',
+    '#ifndef GLAPI',
+    '#define GLAPI extern',
+    '#endif',
+    ''
+]
+
+glCorearbPlatformStrings = glExtPlatformStrings + [
+    '/* glcorearb.h is for use with OpenGL core profile implementations.',
+    '** It should should be placed in the same directory as gl.h and',
+    '** included as <GL/glcorearb.h>.',
+    '**',
+    '** glcorearb.h includes only APIs in the latest OpenGL core profile',
+    '** implementation together with APIs in newer ARB extensions which ',
+    '** can be supported by the core profile. It does not, and never will',
+    '** include functionality removed from the core profile, such as',
+    '** fixed-function vertex and fragment processing.',
+    '**',
+    '** Do not #include both <GL/glcorearb.h> and either of <GL/gl.h> or',
+    '** <GL/glext.h> in the same source file.',
+    '*/',
+    ''
+]
+
+# wglext.h needs Windows include
+wglPlatformStrings = [
+    '#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)',
+    '#define WIN32_LEAN_AND_MEAN 1',
+    '#include <windows.h>',
+    '#endif',
+    '',
+]
+
+# GLES 1/2/3 core .h have separate *platform.h files to define calling conventions
+gles1PlatformStrings = [ '#include <GLES/glplatform.h>', '' ]
+gles2PlatformStrings = [ '#include <GLES2/gl2platform.h>', '' ]
+gles3PlatformStrings = [ '#include <GLES3/gl3platform.h>', '' ]
+eglPlatformStrings   = [ '#include <EGL/eglplatform.h>', '' ]
+
+# GLES 1/2 extension .h have small addition to calling convention headers
+gles1ExtPlatformStrings = gles2ExtPlatformStrings = [
+    '#ifndef GL_APIENTRYP',
+    '#define GL_APIENTRYP GL_APIENTRY*',
+    '#endif',
+    ''
+]
+
+# Insert generation date in a comment for headers not having *GLEXT_VERSION macros
+genDateCommentString = [
+    format("/* Generated on date %s */" % time.strftime("%Y%m%d")),
+    ''
+]
+
+# GL_GLEXT_VERSION is defined only in glext.h
+glextVersionStrings = [
+    format("#define GL_GLEXT_VERSION %s" % time.strftime("%Y%m%d")),
+    ''
+]
+# WGL_WGLEXT_VERSION is defined only in wglext.h
+wglextVersionStrings = [
+    format("#define WGL_WGLEXT_VERSION %s" % time.strftime("%Y%m%d")),
+    ''
+]
+# GLX_GLXEXT_VERSION is defined only in glxext.h
+glxextVersionStrings = [
+    format("#define GLX_GLXEXT_VERSION %s" % time.strftime("%Y%m%d")),
+    ''
+]
+# EGL_EGLEXT_VERSION is defined only in eglext.h
+eglextVersionStrings = [
+    format("#define EGL_EGLEXT_VERSION %s" % time.strftime("%Y%m%d")),
+    ''
+]
+
+# Defaults for generating re-inclusion protection wrappers (or not)
+protectFile = protect
+protectFeature = protect
+protectProto = protect
+
+buildList = [
+    # GL API 1.2+ + extensions - GL/glext.h
+    CGeneratorOptions(
+        filename          = 'GL/glext.h',
+        apiname           = 'gl',
+        profile           = 'compatibility',
+        versions          = allVersions,
+        emitversions      = gl12andLaterPat,
+        defaultExtensions = 'gl',                   # Default extensions for GL
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + glExtPlatformStrings + glextVersionStrings,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GLAPI ',
+        apientry          = 'APIENTRY ',
+        apientryp         = 'APIENTRYP '),
+    # GL core profile + extensions - GL/glcorearb.h
+    CGeneratorOptions(
+        filename          = 'GL/glcorearb.h',
+        apiname           = 'gl',
+        profile           = 'core',
+        versions          = allVersions,
+        emitversions      = allVersions,
+        defaultExtensions = 'glcore',               # Default extensions for GL core profile (only)
+        addExtensions     = glCoreARBPat,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + glCorearbPlatformStrings,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GLAPI ',
+        apientry          = 'APIENTRY ',
+        apientryp         = 'APIENTRYP '),
+    # GLES 1.x API + mandatory extensions - GLES/gl.h (no function pointers)
+    CGeneratorOptions(
+        filename          = 'GLES/gl.h',
+        apiname           = 'gles1',
+        profile           = 'common',
+        versions          = allVersions,
+        emitversions      = allVersions,
+        defaultExtensions = None,                   # No default extensions
+        addExtensions     = es1CorePat,             # Add mandatory ES1 extensions in GLES1/gl.h
+        removeExtensions  = None,
+        prefixText        = prefixStrings + gles1PlatformStrings + genDateCommentString,
+        genFuncPointers   = False,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = False,                  # Core ES API functions are in the static link libraries
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GL_API ',
+        apientry          = 'GL_APIENTRY ',
+        apientryp         = 'GL_APIENTRYP '),
+    # GLES 1.x extensions - GLES/glext.h
+    CGeneratorOptions(
+        filename          = 'GLES/glext.h',
+        apiname           = 'gles1',
+        profile           = 'common',
+        versions          = allVersions,
+        emitversions      = noVersions,
+        defaultExtensions = 'gles1',                # Default extensions for GLES 1
+        addExtensions     = None,
+        removeExtensions  = es1CorePat,             # Remove mandatory ES1 extensions in GLES1/glext.h
+        prefixText        = prefixStrings + gles1ExtPlatformStrings + genDateCommentString,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GL_API ',
+        apientry          = 'GL_APIENTRY ',
+        apientryp         = 'GL_APIENTRYP '),
+    # GLES 2.0 API - GLES2/gl2.h (no function pointers)
+    CGeneratorOptions(
+        filename          = 'GLES2/gl2.h',
+        apiname           = 'gles2',
+        profile           = 'common',
+        versions          = gles2onlyPat,
+        emitversions      = allVersions,
+        defaultExtensions = None,                   # No default extensions
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + gles2PlatformStrings + genDateCommentString,
+        genFuncPointers   = False,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = False,                  # Core ES API functions are in the static link libraries
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GL_APICALL ',
+        apientry          = 'GL_APIENTRY ',
+        apientryp         = 'GL_APIENTRYP '),
+    # GLES 3.1 / 3.0 / 2.0 extensions - GLES2/gl2ext.h
+    CGeneratorOptions(
+        filename          = 'GLES2/gl2ext.h',
+        apiname           = 'gles2',
+        profile           = 'common',
+        versions          = gles2onlyPat,
+        emitversions      = None,
+        defaultExtensions = 'gles2',                # Default extensions for GLES 2
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + gles2ExtPlatformStrings + genDateCommentString,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GL_APICALL ',
+        apientry          = 'GL_APIENTRY ',
+        apientryp         = 'GL_APIENTRYP '),
+    # GLES 3.1 API - GLES3/gl31.h (no function pointers)
+    CGeneratorOptions(
+        filename          = 'GLES3/gl31.h',
+        apiname           = 'gles2',
+        profile           = 'common',
+        versions          = gles2and30and31Pat,
+        emitversions      = allVersions,
+        defaultExtensions = None,                   # No default extensions
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + gles3PlatformStrings + genDateCommentString,
+        genFuncPointers   = False,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = False,                  # Core ES API functions are in the static link libraries
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GL_APICALL ',
+        apientry          = 'GL_APIENTRY ',
+        apientryp         = 'GL_APIENTRYP '),
+    # GLES 3.0 API - GLES3/gl3.h (no function pointers)
+    CGeneratorOptions(
+        filename          = 'GLES3/gl3.h',
+        apiname           = 'gles2',
+        profile           = 'common',
+        versions          = gles2and30Pat,
+        emitversions      = allVersions,
+        defaultExtensions = None,                   # No default extensions
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + gles3PlatformStrings + genDateCommentString,
+        genFuncPointers   = False,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = False,                  # Core ES API functions are in the static link libraries
+        protectProtoStr   = 'GL_GLEXT_PROTOTYPES',
+        apicall           = 'GL_APICALL ',
+        apientry          = 'GL_APIENTRY ',
+        apientryp         = 'GL_APIENTRYP '),
+    # EGL API - EGL/egl.h (no function pointers, yet @@@)
+    CGeneratorOptions(
+        filename          = 'EGL/egl.h',
+        apiname           = 'egl',
+        profile           = None,
+        versions          = allVersions,
+        emitversions      = allVersions,
+        defaultExtensions = None,                   # No default extensions
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + eglPlatformStrings + genDateCommentString,
+        genFuncPointers   = False,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = False,
+        protectProtoStr   = 'EGL_EGLEXT_PROTOTYPES',
+        apicall           = 'EGLAPI ',
+        apientry          = 'EGLAPIENTRY ',
+        apientryp         = 'EGLAPIENTRYP '),
+    # EGL extensions - EGL/eglext.h (no function pointers, yet @@@)
+    CGeneratorOptions(
+        filename          = 'EGL/eglext.h',
+        apiname           = 'egl',
+        profile           = None,
+        versions          = allVersions,
+        emitversions      = None,
+        defaultExtensions = 'egl',                  # Default extensions for EGL
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + eglPlatformStrings + eglextVersionStrings,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'EGL_EGLEXT_PROTOTYPES',
+        apicall           = 'EGLAPI ',
+        apientry          = 'EGLAPIENTRY ',
+        apientryp         = 'EGLAPIENTRYP '),
+    # GLX 1.* API - GL/glx.h
+    CGeneratorOptions(
+        filename          = 'GL/glx.h',
+        apiname           = 'glx',
+        profile           = None,
+        versions          = allVersions,
+        emitversions      = allVersions,
+        defaultExtensions = None,                   # No default extensions
+        addExtensions     = None,
+        removeExtensions  = None,
+        # add glXPlatformStrings?
+        prefixText        = prefixStrings + genDateCommentString,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'GLX_GLXEXT_PROTOTYPES',
+        apicall           = '',
+        apientry          = '',
+        apientryp         = ' *'),
+    # GLX 1.3+ API + extensions - GL/glxext.h (no function pointers, yet @@@)
+    CGeneratorOptions(
+        filename          = 'GL/glxext.h',
+        apiname           = 'glx',
+        profile           = None,
+        versions          = allVersions,
+        emitversions      = glx13andLaterPat,
+        defaultExtensions = 'glx',                  # Default extensions for GLX
+        addExtensions     = None,
+        removeExtensions  = None,
+        # add glXPlatformStrings?
+        prefixText        = prefixStrings + glxextVersionStrings,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'GLX_GLXEXT_PROTOTYPES',
+        apicall           = '',
+        apientry          = '',
+        apientryp         = ' *'),
+    # WGL API + extensions - GL/wgl.h (no function pointers, yet @@@)
+    CGeneratorOptions(
+        filename          = 'GL/wgl.h',
+        apiname           = 'wgl',
+        profile           = None,
+        versions          = allVersions,
+        emitversions      = allVersions,
+        defaultExtensions = 'wgl',                  # Default extensions for WGL
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + wglPlatformStrings + genDateCommentString,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'WGL_WGLEXT_PROTOTYPES',
+        apicall           = '',
+        apientry          = 'WINAPI ',
+        apientryp         = 'WINAPI * '),
+    # WGL extensions - GL/wglext.h (no function pointers, yet @@@)
+    CGeneratorOptions(
+        filename          = 'GL/wglext.h',
+        apiname           = 'wgl',
+        profile           = None,
+        versions          = allVersions,
+        emitversions      = None,
+        defaultExtensions = 'wgl',                  # Default extensions for WGL
+        addExtensions     = None,
+        removeExtensions  = None,
+        prefixText        = prefixStrings + wglPlatformStrings + wglextVersionStrings,
+        genFuncPointers   = True,
+        protectFile       = protectFile,
+        protectFeature    = protectFeature,
+        protectProto      = protectProto,
+        protectProtoStr   = 'WGL_WGLEXT_PROTOTYPES',
+        apicall           = '',
+        apientry          = 'WINAPI ',
+        apientryp         = 'WINAPI * '),
+    # End of list
+    None
+]
+
+# create error/warning & diagnostic files
+if (errFilename):
+    errWarn = open(errFilename,'w')
+else:
+    errWarn = sys.stderr
+diag = open(diagFilename, 'w')
+
+def genHeaders():
+    # Loop over targets, building each
+    generated = 0
+    for genOpts in buildList:
+        if (genOpts == None):
+            break
+        if (target and target != genOpts.filename):
+            # write('*** Skipping', genOpts.filename)
+            continue
+        write('*** Building', genOpts.filename)
+        generated = generated + 1
+        startTimer()
+        gen = COutputGenerator(errFile=errWarn,
+                               warnFile=errWarn,
+                               diagFile=diag)
+        reg.setGenerator(gen)
+        reg.apiGen(genOpts)
+        write('** Generated', genOpts.filename)
+        endTimer('Time to generate ' + genOpts.filename + ' =')
+    if (target and generated == 0):
+        write('Failed to generate target:', target)
+
+if (debug):
+    pdb.run('genHeaders()')
+elif (profile):
+    import cProfile, pstats
+    cProfile.run('genHeaders()', 'profile.txt')
+    p = pstats.Stats('profile.txt')
+    p.strip_dirs().sort_stats('time').print_stats(50)
+else:
+    genHeaders()
diff --git a/opengl/tools/glgen2/registry/gl.xml b/opengl/tools/glgen2/registry/gl.xml
new file mode 100755
index 0000000..3f0697a
--- /dev/null
+++ b/opengl/tools/glgen2/registry/gl.xml
@@ -0,0 +1,42184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<registry>
+    <comment>
+Copyright (c) 2013-2014 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.
+
+------------------------------------------------------------------------
+
+This file, gl.xml, is the OpenGL and OpenGL API Registry. The older
+".spec" file format has been retired and will no longer be updated with
+new extensions and API versions. The canonical version of the registry,
+together with documentation, schema, and Python generator scripts used
+to generate C header files for OpenGL and OpenGL ES, can always be found
+in the Khronos Registry at
+        http://www.opengl.org/registry/
+    </comment>
+
+    <!-- SECTION: GL type definitions. -->
+    <types>
+            <!-- These are dependencies GL types require to be declared legally -->
+        <type name="stddef">#include &lt;stddef.h&gt;</type>
+        <type name="khrplatform">#include &lt;KHR/khrplatform.h&gt;</type>
+        <type name="inttypes">#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 GL_EXT_timer_query extension). */
+#if defined(__STDC_VERSION__) &amp;&amp; __STDC_VERSION__ &gt;= 199901L
+#include &lt;inttypes.h&gt;
+#elif defined(__sun__) || defined(__digital__)
+#include &lt;inttypes.h&gt;
+#if defined(__STDC__)
+#if defined(__arch64__) || defined(_LP64)
+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 ) || defined(__sgi)
+#include &lt;inttypes.h&gt;
+#elif defined(__SCO__) || defined(__USLC__)
+#include &lt;stdint.h&gt;
+#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) &amp;&amp; defined(__GNUC__)
+#include &lt;stdint.h&gt;
+#elif defined(_WIN32)
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+/* Fallback if nothing above works */
+#include &lt;inttypes.h&gt;
+#endif
+#endif</type>
+            <!-- These are actual GL types -->
+        <type>typedef unsigned int <name>GLenum</name>;</type>
+        <type>typedef unsigned char <name>GLboolean</name>;</type>
+        <type>typedef unsigned int <name>GLbitfield</name>;</type>
+        <type comment="Not an actual GL type, though used in headers in the past">typedef void <name>GLvoid</name>;</type>
+        <type>typedef signed char <name>GLbyte</name>;</type>
+        <type>typedef short <name>GLshort</name>;</type>
+        <type>typedef int <name>GLint</name>;</type>
+        <type>typedef int <name>GLclampx</name>;</type>
+        <type>typedef unsigned char <name>GLubyte</name>;</type>
+        <type>typedef unsigned short <name>GLushort</name>;</type>
+        <type>typedef unsigned int <name>GLuint</name>;</type>
+        <type>typedef int <name>GLsizei</name>;</type>
+        <type>typedef float <name>GLfloat</name>;</type>
+        <type>typedef float <name>GLclampf</name>;</type>
+        <type>typedef double <name>GLdouble</name>;</type>
+        <type>typedef double <name>GLclampd</name>;</type>
+        <type>typedef void *<name>GLeglImageOES</name>;</type>
+        <type>typedef char <name>GLchar</name>;</type>
+        <type>typedef char <name>GLcharARB</name>;</type>
+        <type name="GLhandleARB">#ifdef __APPLE__
+typedef void *GLhandleARB;
+#else
+typedef unsigned int GLhandleARB;
+#endif</type>
+        <type>typedef unsigned short <name>GLhalfARB</name>;</type>
+        <type>typedef unsigned short <name>GLhalf</name>;</type>
+        <type comment="Must be 32 bits">typedef GLint <name>GLfixed</name>;</type>
+        <type requires="stddef">typedef ptrdiff_t <name>GLintptr</name>;</type>
+        <type requires="stddef">typedef ptrdiff_t <name>GLsizeiptr</name>;</type>
+        <type requires="inttypes">typedef int64_t <name>GLint64</name>;</type>
+        <type requires="inttypes">typedef uint64_t <name>GLuint64</name>;</type>
+        <type requires="stddef">typedef ptrdiff_t <name>GLintptrARB</name>;</type>
+        <type requires="stddef">typedef ptrdiff_t <name>GLsizeiptrARB</name>;</type>
+        <type requires="inttypes">typedef int64_t <name>GLint64EXT</name>;</type>
+        <type requires="inttypes">typedef uint64_t <name>GLuint64EXT</name>;</type>
+        <type>typedef struct __GLsync *<name>GLsync</name>;</type>
+        <type comment="compatible with OpenCL cl_context"><name>struct _cl_context</name>;</type>
+        <type comment="compatible with OpenCL cl_event"><name>struct _cl_event</name>;</type>
+        <type>typedef void (<apientry/> *<name>GLDEBUGPROC</name>)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);</type>
+        <type>typedef void (<apientry/> *<name>GLDEBUGPROCARB</name>)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);</type>
+        <type>typedef void (<apientry/> *<name>GLDEBUGPROCKHR</name>)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);</type>
+            <!-- GLES 1 types -->
+        <type api="gles1" requires="khrplatform">typedef khronos_int32_t <name>GLclampx</name>;</type>
+            <!-- GLES 1/2 types (tagged for GLES 1) -->
+        <type api="gles1" requires="khrplatform">typedef khronos_int8_t <name>GLbyte</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_uint8_t <name>GLubyte</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_float_t <name>GLfloat</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_float_t <name>GLclampf</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_int32_t <name>GLfixed</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_int64_t <name>GLint64</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_uint64_t <name>GLuint64</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_intptr_t <name>GLintptr</name>;</type>
+        <type api="gles1" requires="khrplatform">typedef khronos_ssize_t <name>GLsizeiptr</name>;</type>
+            <!-- GLES 1/2 types (tagged for GLES 2 - attribute syntax is limited) -->
+        <type api="gles2" requires="khrplatform">typedef khronos_int8_t <name>GLbyte</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_uint8_t <name>GLubyte</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_float_t <name>GLfloat</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_float_t <name>GLclampf</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_int32_t <name>GLfixed</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_int64_t <name>GLint64</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_uint64_t <name>GLuint64</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_int64_t <name>GLint64EXT</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_uint64_t <name>GLuint64EXT</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_intptr_t <name>GLintptr</name>;</type>
+        <type api="gles2" requires="khrplatform">typedef khronos_ssize_t <name>GLsizeiptr</name>;</type>
+            <!-- GLES 2 types (none currently) -->
+            <!-- Vendor extension types -->
+        <type>typedef void (<apientry/> *<name>GLDEBUGPROCAMD</name>)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);</type>
+        <type>typedef unsigned short <name>GLhalfNV</name>;</type>
+        <type requires="GLintptr">typedef GLintptr <name>GLvdpauSurfaceNV</name>;</type>
+    </types>
+
+    <!-- SECTION: GL parameter class type definitions. -->
+
+    <groups>
+        <group name="AccumOp">
+            <enum name="GL_ACCUM"/>
+            <enum name="GL_LOAD"/>
+            <enum name="GL_RETURN"/>
+            <enum name="GL_MULT"/>
+            <enum name="GL_ADD"/>
+        </group>
+
+        <group name="AttribMask">
+            <enum name="GL_ACCUM_BUFFER_BIT"/>
+            <enum name="GL_ALL_ATTRIB_BITS"/>
+            <enum name="GL_COLOR_BUFFER_BIT"/>
+            <enum name="GL_CURRENT_BIT"/>
+            <enum name="GL_DEPTH_BUFFER_BIT"/>
+            <enum name="GL_ENABLE_BIT"/>
+            <enum name="GL_EVAL_BIT"/>
+            <enum name="GL_FOG_BIT"/>
+            <enum name="GL_HINT_BIT"/>
+            <enum name="GL_LIGHTING_BIT"/>
+            <enum name="GL_LINE_BIT"/>
+            <enum name="GL_LIST_BIT"/>
+            <enum name="GL_MULTISAMPLE_BIT"/>
+            <enum name="GL_MULTISAMPLE_BIT_3DFX"/>
+            <enum name="GL_MULTISAMPLE_BIT_ARB"/>
+            <enum name="GL_MULTISAMPLE_BIT_EXT"/>
+            <enum name="GL_PIXEL_MODE_BIT"/>
+            <enum name="GL_POINT_BIT"/>
+            <enum name="GL_POLYGON_BIT"/>
+            <enum name="GL_POLYGON_STIPPLE_BIT"/>
+            <enum name="GL_SCISSOR_BIT"/>
+            <enum name="GL_STENCIL_BUFFER_BIT"/>
+            <enum name="GL_TEXTURE_BIT"/>
+            <enum name="GL_TRANSFORM_BIT"/>
+            <enum name="GL_VIEWPORT_BIT"/>
+        </group>
+
+        <group name="AlphaFunction">
+            <enum name="GL_ALWAYS"/>
+            <enum name="GL_EQUAL"/>
+            <enum name="GL_GEQUAL"/>
+            <enum name="GL_GREATER"/>
+            <enum name="GL_LEQUAL"/>
+            <enum name="GL_LESS"/>
+            <enum name="GL_NEVER"/>
+            <enum name="GL_NOTEQUAL"/>
+        </group>
+
+        <group name="BlendEquationModeEXT">
+            <enum name="GL_ALPHA_MAX_SGIX"/>
+            <enum name="GL_ALPHA_MIN_SGIX"/>
+            <enum name="GL_FUNC_ADD_EXT"/>
+            <enum name="GL_FUNC_REVERSE_SUBTRACT_EXT"/>
+            <enum name="GL_FUNC_SUBTRACT_EXT"/>
+            <enum name="GL_LOGIC_OP"/>
+            <enum name="GL_MAX_EXT"/>
+            <enum name="GL_MIN_EXT"/>
+        </group>
+
+        <group name="BlendingFactorDest">
+            <enum name="GL_CONSTANT_ALPHA_EXT"/>
+            <enum name="GL_CONSTANT_COLOR_EXT"/>
+            <enum name="GL_DST_ALPHA"/>
+            <enum name="GL_ONE"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_ALPHA_EXT"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_COLOR_EXT"/>
+            <enum name="GL_ONE_MINUS_DST_ALPHA"/>
+            <enum name="GL_ONE_MINUS_SRC_ALPHA"/>
+            <enum name="GL_ONE_MINUS_SRC_COLOR"/>
+            <enum name="GL_SRC_ALPHA"/>
+            <enum name="GL_SRC_COLOR"/>
+            <enum name="GL_ZERO"/>
+        </group>
+
+        <group name="BlendingFactorSrc">
+            <enum name="GL_CONSTANT_ALPHA_EXT"/>
+            <enum name="GL_CONSTANT_COLOR_EXT"/>
+            <enum name="GL_DST_ALPHA"/>
+            <enum name="GL_DST_COLOR"/>
+            <enum name="GL_ONE"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_ALPHA_EXT"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_COLOR_EXT"/>
+            <enum name="GL_ONE_MINUS_DST_ALPHA"/>
+            <enum name="GL_ONE_MINUS_DST_COLOR"/>
+            <enum name="GL_ONE_MINUS_SRC_ALPHA"/>
+            <enum name="GL_SRC_ALPHA"/>
+            <enum name="GL_SRC_ALPHA_SATURATE"/>
+            <enum name="GL_ZERO"/>
+        </group>
+
+        <group name="Boolean">
+            <enum name="GL_FALSE"/>
+            <enum name="GL_TRUE"/>
+        </group>
+
+        <group name="ClearBufferMask">
+            <enum name="GL_ACCUM_BUFFER_BIT"/>
+            <enum name="GL_COLOR_BUFFER_BIT"/>
+            <enum name="GL_COVERAGE_BUFFER_BIT_NV"/>
+            <enum name="GL_DEPTH_BUFFER_BIT"/>
+            <enum name="GL_STENCIL_BUFFER_BIT"/>
+        </group>
+
+        <group name="ClientAttribMask">
+            <enum name="GL_CLIENT_ALL_ATTRIB_BITS"/>
+            <enum name="GL_CLIENT_PIXEL_STORE_BIT"/>
+            <enum name="GL_CLIENT_VERTEX_ARRAY_BIT"/>
+        </group>
+
+        <group name="ClipPlaneName">
+            <enum name="GL_CLIP_DISTANCE0"/>
+            <enum name="GL_CLIP_DISTANCE1"/>
+            <enum name="GL_CLIP_DISTANCE2"/>
+            <enum name="GL_CLIP_DISTANCE3"/>
+            <enum name="GL_CLIP_DISTANCE4"/>
+            <enum name="GL_CLIP_DISTANCE5"/>
+            <enum name="GL_CLIP_DISTANCE6"/>
+            <enum name="GL_CLIP_DISTANCE7"/>
+            <enum name="GL_CLIP_PLANE0"/>
+            <enum name="GL_CLIP_PLANE1"/>
+            <enum name="GL_CLIP_PLANE2"/>
+            <enum name="GL_CLIP_PLANE3"/>
+            <enum name="GL_CLIP_PLANE4"/>
+            <enum name="GL_CLIP_PLANE5"/>
+        </group>
+
+        <group name="ColorMaterialFace">
+            <enum name="GL_BACK"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+        </group>
+
+        <group name="ColorMaterialParameter">
+            <enum name="GL_AMBIENT"/>
+            <enum name="GL_AMBIENT_AND_DIFFUSE"/>
+            <enum name="GL_DIFFUSE"/>
+            <enum name="GL_EMISSION"/>
+            <enum name="GL_SPECULAR"/>
+        </group>
+
+        <group name="ColorPointerType">
+            <enum name="GL_BYTE"/>
+            <enum name="GL_DOUBLE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+            <enum name="GL_UNSIGNED_BYTE"/>
+            <enum name="GL_UNSIGNED_INT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+        </group>
+
+        <group name="ColorTableParameterPNameSGI">
+            <enum name="GL_COLOR_TABLE_BIAS"/>
+            <enum name="GL_COLOR_TABLE_BIAS_SGI"/>
+            <enum name="GL_COLOR_TABLE_SCALE"/>
+            <enum name="GL_COLOR_TABLE_SCALE_SGI"/>
+        </group>
+
+        <group name="ColorTableTargetSGI">
+            <enum name="GL_COLOR_TABLE"/>
+            <enum name="GL_COLOR_TABLE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_COLOR_TABLE"/>
+            <enum name="GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+            <enum name="GL_POST_CONVOLUTION_COLOR_TABLE"/>
+            <enum name="GL_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+            <enum name="GL_PROXY_COLOR_TABLE"/>
+            <enum name="GL_PROXY_COLOR_TABLE_SGI"/>
+            <enum name="GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE"/>
+            <enum name="GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+            <enum name="GL_PROXY_POST_CONVOLUTION_COLOR_TABLE"/>
+            <enum name="GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+            <enum name="GL_PROXY_TEXTURE_COLOR_TABLE_SGI"/>
+            <enum name="GL_TEXTURE_COLOR_TABLE_SGI"/>
+        </group>
+
+        <group name="ContextFlagMask">
+            <enum name="GL_CONTEXT_FLAG_DEBUG_BIT"/>
+            <enum name="GL_CONTEXT_FLAG_DEBUG_BIT_KHR"/>
+            <enum name="GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT"/>
+            <enum name="GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB"/>
+        </group>
+
+        <group name="ContextProfileMask">
+            <enum name="GL_CONTEXT_COMPATIBILITY_PROFILE_BIT"/>
+            <enum name="GL_CONTEXT_CORE_PROFILE_BIT"/>
+        </group>
+
+        <group name="ConvolutionBorderModeEXT">
+            <enum name="GL_REDUCE"/>
+            <enum name="GL_REDUCE_EXT"/>
+        </group>
+
+        <group name="ConvolutionParameterEXT">
+            <enum name="GL_CONVOLUTION_BORDER_MODE"/>
+            <enum name="GL_CONVOLUTION_BORDER_MODE_EXT"/>
+            <enum name="GL_CONVOLUTION_FILTER_BIAS"/>
+            <enum name="GL_CONVOLUTION_FILTER_BIAS_EXT"/>
+            <enum name="GL_CONVOLUTION_FILTER_SCALE"/>
+            <enum name="GL_CONVOLUTION_FILTER_SCALE_EXT"/>
+        </group>
+
+        <group name="ConvolutionTargetEXT">
+            <enum name="GL_CONVOLUTION_1D"/>
+            <enum name="GL_CONVOLUTION_1D_EXT"/>
+            <enum name="GL_CONVOLUTION_2D"/>
+            <enum name="GL_CONVOLUTION_2D_EXT"/>
+        </group>
+
+        <group name="CullFaceMode">
+            <enum name="GL_BACK"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+        </group>
+
+        <group name="DataType" comment="See enums block below"/>
+
+        <group name="DepthFunction">
+            <enum name="GL_ALWAYS"/>
+            <enum name="GL_EQUAL"/>
+            <enum name="GL_GEQUAL"/>
+            <enum name="GL_GREATER"/>
+            <enum name="GL_LEQUAL"/>
+            <enum name="GL_LESS"/>
+            <enum name="GL_NEVER"/>
+            <enum name="GL_NOTEQUAL"/>
+        </group>
+
+        <group name="DrawBufferMode">
+            <enum name="GL_AUX0"/>
+            <enum name="GL_AUX1"/>
+            <enum name="GL_AUX2"/>
+            <enum name="GL_AUX3"/>
+            <enum name="GL_BACK"/>
+            <enum name="GL_BACK_LEFT"/>
+            <enum name="GL_BACK_RIGHT"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+            <enum name="GL_FRONT_LEFT"/>
+            <enum name="GL_FRONT_RIGHT"/>
+            <enum name="GL_LEFT"/>
+            <enum name="GL_NONE"/>
+            <enum name="GL_NONE_OES"/>
+            <enum name="GL_RIGHT"/>
+        </group>
+
+        <group name="EnableCap">
+            <enum name="GL_ALPHA_TEST"/>
+            <enum name="GL_ASYNC_DRAW_PIXELS_SGIX"/>
+            <enum name="GL_ASYNC_HISTOGRAM_SGIX"/>
+            <enum name="GL_ASYNC_READ_PIXELS_SGIX"/>
+            <enum name="GL_ASYNC_TEX_IMAGE_SGIX"/>
+            <enum name="GL_AUTO_NORMAL"/>
+            <enum name="GL_BLEND"/>
+            <enum name="GL_CALLIGRAPHIC_FRAGMENT_SGIX"/>
+            <enum name="GL_CLIP_PLANE0"/>
+            <enum name="GL_CLIP_PLANE1"/>
+            <enum name="GL_CLIP_PLANE2"/>
+            <enum name="GL_CLIP_PLANE3"/>
+            <enum name="GL_CLIP_PLANE4"/>
+            <enum name="GL_CLIP_PLANE5"/>
+            <enum name="GL_COLOR_ARRAY"/>
+            <enum name="GL_COLOR_LOGIC_OP"/>
+            <enum name="GL_COLOR_MATERIAL"/>
+            <enum name="GL_COLOR_TABLE_SGI"/>
+            <enum name="GL_CONVOLUTION_1D_EXT"/>
+            <enum name="GL_CONVOLUTION_2D_EXT"/>
+            <enum name="GL_CULL_FACE"/>
+            <enum name="GL_DEPTH_TEST"/>
+            <enum name="GL_DITHER"/>
+            <enum name="GL_EDGE_FLAG_ARRAY"/>
+            <enum name="GL_FOG"/>
+            <enum name="GL_FOG_OFFSET_SGIX"/>
+            <enum name="GL_FRAGMENT_COLOR_MATERIAL_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT0_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT1_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT2_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT3_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT4_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT5_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT6_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT7_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHTING_SGIX"/>
+            <enum name="GL_FRAMEZOOM_SGIX"/>
+            <enum name="GL_HISTOGRAM_EXT"/>
+            <enum name="GL_INDEX_ARRAY"/>
+            <enum name="GL_INDEX_LOGIC_OP"/>
+            <enum name="GL_INTERLACE_SGIX"/>
+            <enum name="GL_IR_INSTRUMENT1_SGIX"/>
+            <enum name="GL_LIGHT0"/>
+            <enum name="GL_LIGHT1"/>
+            <enum name="GL_LIGHT2"/>
+            <enum name="GL_LIGHT3"/>
+            <enum name="GL_LIGHT4"/>
+            <enum name="GL_LIGHT5"/>
+            <enum name="GL_LIGHT6"/>
+            <enum name="GL_LIGHT7"/>
+            <enum name="GL_LIGHTING"/>
+            <enum name="GL_LINE_SMOOTH"/>
+            <enum name="GL_LINE_STIPPLE"/>
+            <enum name="GL_MAP1_COLOR_4"/>
+            <enum name="GL_MAP1_INDEX"/>
+            <enum name="GL_MAP1_NORMAL"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP1_VERTEX_3"/>
+            <enum name="GL_MAP1_VERTEX_4"/>
+            <enum name="GL_MAP2_COLOR_4"/>
+            <enum name="GL_MAP2_INDEX"/>
+            <enum name="GL_MAP2_NORMAL"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP2_VERTEX_3"/>
+            <enum name="GL_MAP2_VERTEX_4"/>
+            <enum name="GL_MINMAX_EXT"/>
+            <enum name="GL_MULTISAMPLE_SGIS"/>
+            <enum name="GL_NORMALIZE"/>
+            <enum name="GL_NORMAL_ARRAY"/>
+            <enum name="GL_PIXEL_TEXTURE_SGIS"/>
+            <enum name="GL_PIXEL_TEX_GEN_SGIX"/>
+            <enum name="GL_POINT_SMOOTH"/>
+            <enum name="GL_POLYGON_OFFSET_FILL"/>
+            <enum name="GL_POLYGON_OFFSET_LINE"/>
+            <enum name="GL_POLYGON_OFFSET_POINT"/>
+            <enum name="GL_POLYGON_SMOOTH"/>
+            <enum name="GL_POLYGON_STIPPLE"/>
+            <enum name="GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+            <enum name="GL_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+            <enum name="GL_REFERENCE_PLANE_SGIX"/>
+            <enum name="GL_RESCALE_NORMAL_EXT"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_MASK_SGIS"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_ONE_SGIS"/>
+            <enum name="GL_SAMPLE_MASK_SGIS"/>
+            <enum name="GL_SCISSOR_TEST"/>
+            <enum name="GL_SEPARABLE_2D_EXT"/>
+            <enum name="GL_SHARED_TEXTURE_PALETTE_EXT"/>
+            <enum name="GL_SPRITE_SGIX"/>
+            <enum name="GL_STENCIL_TEST"/>
+            <enum name="GL_TEXTURE_1D"/>
+            <enum name="GL_TEXTURE_2D"/>
+            <enum name="GL_TEXTURE_3D_EXT"/>
+            <enum name="GL_TEXTURE_4D_SGIS"/>
+            <enum name="GL_TEXTURE_COLOR_TABLE_SGI"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY"/>
+            <enum name="GL_TEXTURE_GEN_Q"/>
+            <enum name="GL_TEXTURE_GEN_R"/>
+            <enum name="GL_TEXTURE_GEN_S"/>
+            <enum name="GL_TEXTURE_GEN_T"/>
+            <enum name="GL_VERTEX_ARRAY"/>
+        </group>
+
+        <group name="ErrorCode">
+            <enum name="GL_INVALID_ENUM"/>
+            <enum name="GL_INVALID_FRAMEBUFFER_OPERATION"/>
+            <enum name="GL_INVALID_FRAMEBUFFER_OPERATION_EXT"/>
+            <enum name="GL_INVALID_FRAMEBUFFER_OPERATION_OES"/>
+            <enum name="GL_INVALID_OPERATION"/>
+            <enum name="GL_INVALID_VALUE"/>
+            <enum name="GL_NO_ERROR"/>
+            <enum name="GL_OUT_OF_MEMORY"/>
+            <enum name="GL_STACK_OVERFLOW"/>
+            <enum name="GL_STACK_UNDERFLOW"/>
+            <enum name="GL_TABLE_TOO_LARGE"/>
+            <enum name="GL_TABLE_TOO_LARGE_EXT"/>
+            <enum name="GL_TEXTURE_TOO_LARGE_EXT"/>
+        </group>
+
+        <group name="FeedbackType">
+            <enum name="GL_2D"/>
+            <enum name="GL_3D"/>
+            <enum name="GL_3D_COLOR"/>
+            <enum name="GL_3D_COLOR_TEXTURE"/>
+            <enum name="GL_4D_COLOR_TEXTURE"/>
+        </group>
+
+        <group name="FeedBackToken">
+            <enum name="GL_BITMAP_TOKEN"/>
+            <enum name="GL_COPY_PIXEL_TOKEN"/>
+            <enum name="GL_DRAW_PIXEL_TOKEN"/>
+            <enum name="GL_LINE_RESET_TOKEN"/>
+            <enum name="GL_LINE_TOKEN"/>
+            <enum name="GL_PASS_THROUGH_TOKEN"/>
+            <enum name="GL_POINT_TOKEN"/>
+            <enum name="GL_POLYGON_TOKEN"/>
+        </group>
+
+        <group name="FfdMaskSGIX" comment="See enums section below. Was SGIXFfdMask"/>
+
+        <group name="FfdTargetSGIX">
+            <enum name="GL_GEOMETRY_DEFORMATION_SGIX"/>
+            <enum name="GL_TEXTURE_DEFORMATION_SGIX"/>
+        </group>
+
+        <group name="FogCoordinatePointerType">
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_DOUBLE"/>
+        </group>
+
+        <group name="FogMode">
+            <enum name="GL_EXP"/>
+            <enum name="GL_EXP2"/>
+            <enum name="GL_FOG_FUNC_SGIS"/>
+            <enum name="GL_LINEAR"/>
+        </group>
+
+        <group name="FogParameter">
+            <enum name="GL_FOG_COLOR"/>
+            <enum name="GL_FOG_DENSITY"/>
+            <enum name="GL_FOG_END"/>
+            <enum name="GL_FOG_INDEX"/>
+            <enum name="GL_FOG_MODE"/>
+            <enum name="GL_FOG_OFFSET_VALUE_SGIX"/>
+            <enum name="GL_FOG_START"/>
+        </group>
+
+        <group name="FogPointerTypeEXT">
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_DOUBLE"/>
+        </group>
+
+        <group name="FogPointerTypeIBM">
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_DOUBLE"/>
+        </group>
+
+        <group name="FragmentLightModelParameterSGIX">
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX"/>
+        </group>
+
+        <group name="FrontFaceDirection">
+            <enum name="GL_CCW"/>
+            <enum name="GL_CW"/>
+        </group>
+
+        <group name="GetColorTableParameterPNameSGI">
+            <enum name="GL_COLOR_TABLE_ALPHA_SIZE_SGI"/>
+            <enum name="GL_COLOR_TABLE_BIAS_SGI"/>
+            <enum name="GL_COLOR_TABLE_BLUE_SIZE_SGI"/>
+            <enum name="GL_COLOR_TABLE_FORMAT_SGI"/>
+            <enum name="GL_COLOR_TABLE_GREEN_SIZE_SGI"/>
+            <enum name="GL_COLOR_TABLE_INTENSITY_SIZE_SGI"/>
+            <enum name="GL_COLOR_TABLE_LUMINANCE_SIZE_SGI"/>
+            <enum name="GL_COLOR_TABLE_RED_SIZE_SGI"/>
+            <enum name="GL_COLOR_TABLE_SCALE_SGI"/>
+            <enum name="GL_COLOR_TABLE_WIDTH_SGI"/>
+        </group>
+
+        <group name="GetConvolutionParameter">
+            <enum name="GL_CONVOLUTION_BORDER_MODE_EXT"/>
+            <enum name="GL_CONVOLUTION_FILTER_BIAS_EXT"/>
+            <enum name="GL_CONVOLUTION_FILTER_SCALE_EXT"/>
+            <enum name="GL_CONVOLUTION_FORMAT_EXT"/>
+            <enum name="GL_CONVOLUTION_HEIGHT_EXT"/>
+            <enum name="GL_CONVOLUTION_WIDTH_EXT"/>
+            <enum name="GL_MAX_CONVOLUTION_HEIGHT_EXT"/>
+            <enum name="GL_MAX_CONVOLUTION_WIDTH_EXT"/>
+        </group>
+
+        <group name="GetHistogramParameterPNameEXT">
+            <enum name="GL_HISTOGRAM_ALPHA_SIZE_EXT"/>
+            <enum name="GL_HISTOGRAM_BLUE_SIZE_EXT"/>
+            <enum name="GL_HISTOGRAM_FORMAT_EXT"/>
+            <enum name="GL_HISTOGRAM_GREEN_SIZE_EXT"/>
+            <enum name="GL_HISTOGRAM_LUMINANCE_SIZE_EXT"/>
+            <enum name="GL_HISTOGRAM_RED_SIZE_EXT"/>
+            <enum name="GL_HISTOGRAM_SINK_EXT"/>
+            <enum name="GL_HISTOGRAM_WIDTH_EXT"/>
+        </group>
+
+        <group name="GetMapQuery">
+            <enum name="GL_COEFF"/>
+            <enum name="GL_DOMAIN"/>
+            <enum name="GL_ORDER"/>
+        </group>
+
+        <group name="GetMinmaxParameterPNameEXT">
+            <enum name="GL_MINMAX_FORMAT"/>
+            <enum name="GL_MINMAX_FORMAT_EXT"/>
+            <enum name="GL_MINMAX_SINK"/>
+            <enum name="GL_MINMAX_SINK_EXT"/>
+        </group>
+
+        <group name="GetPixelMap">
+            <enum name="GL_PIXEL_MAP_A_TO_A"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S"/>
+        </group>
+
+        <group name="GetPName">
+            <enum name="GL_ACCUM_ALPHA_BITS"/>
+            <enum name="GL_ACCUM_BLUE_BITS"/>
+            <enum name="GL_ACCUM_CLEAR_VALUE"/>
+            <enum name="GL_ACCUM_GREEN_BITS"/>
+            <enum name="GL_ACCUM_RED_BITS"/>
+            <enum name="GL_ALIASED_LINE_WIDTH_RANGE"/>
+            <enum name="GL_ALIASED_POINT_SIZE_RANGE"/>
+            <enum name="GL_ALPHA_BIAS"/>
+            <enum name="GL_ALPHA_BITS"/>
+            <enum name="GL_ALPHA_SCALE"/>
+            <enum name="GL_ALPHA_TEST"/>
+            <enum name="GL_ALPHA_TEST_FUNC"/>
+            <enum name="GL_ALPHA_TEST_FUNC_QCOM"/>
+            <enum name="GL_ALPHA_TEST_QCOM"/>
+            <enum name="GL_ALPHA_TEST_REF"/>
+            <enum name="GL_ALPHA_TEST_REF_QCOM"/>
+            <enum name="GL_ASYNC_DRAW_PIXELS_SGIX"/>
+            <enum name="GL_ASYNC_HISTOGRAM_SGIX"/>
+            <enum name="GL_ASYNC_MARKER_SGIX"/>
+            <enum name="GL_ASYNC_READ_PIXELS_SGIX"/>
+            <enum name="GL_ASYNC_TEX_IMAGE_SGIX"/>
+            <enum name="GL_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_AUTO_NORMAL"/>
+            <enum name="GL_AUX_BUFFERS"/>
+            <enum name="GL_BLEND"/>
+            <enum name="GL_BLEND_COLOR_EXT"/>
+            <enum name="GL_BLEND_DST"/>
+            <enum name="GL_BLEND_EQUATION_EXT"/>
+            <enum name="GL_BLEND_SRC"/>
+            <enum name="GL_BLUE_BIAS"/>
+            <enum name="GL_BLUE_BITS"/>
+            <enum name="GL_BLUE_SCALE"/>
+            <enum name="GL_CALLIGRAPHIC_FRAGMENT_SGIX"/>
+            <enum name="GL_CLIENT_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_CLIP_PLANE0"/>
+            <enum name="GL_CLIP_PLANE1"/>
+            <enum name="GL_CLIP_PLANE2"/>
+            <enum name="GL_CLIP_PLANE3"/>
+            <enum name="GL_CLIP_PLANE4"/>
+            <enum name="GL_CLIP_PLANE5"/>
+            <enum name="GL_COLOR_ARRAY"/>
+            <enum name="GL_COLOR_ARRAY_COUNT_EXT"/>
+            <enum name="GL_COLOR_ARRAY_SIZE"/>
+            <enum name="GL_COLOR_ARRAY_STRIDE"/>
+            <enum name="GL_COLOR_ARRAY_TYPE"/>
+            <enum name="GL_COLOR_CLEAR_VALUE"/>
+            <enum name="GL_COLOR_LOGIC_OP"/>
+            <enum name="GL_COLOR_MATERIAL"/>
+            <enum name="GL_COLOR_MATERIAL_FACE"/>
+            <enum name="GL_COLOR_MATERIAL_PARAMETER"/>
+            <enum name="GL_COLOR_MATRIX_SGI"/>
+            <enum name="GL_COLOR_MATRIX_STACK_DEPTH_SGI"/>
+            <enum name="GL_COLOR_TABLE_SGI"/>
+            <enum name="GL_COLOR_WRITEMASK"/>
+            <enum name="GL_CONVOLUTION_1D_EXT"/>
+            <enum name="GL_CONVOLUTION_2D_EXT"/>
+            <enum name="GL_CONVOLUTION_HINT_SGIX"/>
+            <enum name="GL_CULL_FACE"/>
+            <enum name="GL_CULL_FACE_MODE"/>
+            <enum name="GL_CURRENT_COLOR"/>
+            <enum name="GL_CURRENT_INDEX"/>
+            <enum name="GL_CURRENT_NORMAL"/>
+            <enum name="GL_CURRENT_RASTER_COLOR"/>
+            <enum name="GL_CURRENT_RASTER_DISTANCE"/>
+            <enum name="GL_CURRENT_RASTER_INDEX"/>
+            <enum name="GL_CURRENT_RASTER_POSITION"/>
+            <enum name="GL_CURRENT_RASTER_POSITION_VALID"/>
+            <enum name="GL_CURRENT_RASTER_TEXTURE_COORDS"/>
+            <enum name="GL_CURRENT_TEXTURE_COORDS"/>
+            <enum name="GL_DEFORMATIONS_MASK_SGIX"/>
+            <enum name="GL_DEPTH_BIAS"/>
+            <enum name="GL_DEPTH_BITS"/>
+            <enum name="GL_DEPTH_CLEAR_VALUE"/>
+            <enum name="GL_DEPTH_FUNC"/>
+            <enum name="GL_DEPTH_RANGE"/>
+            <enum name="GL_DEPTH_SCALE"/>
+            <enum name="GL_DEPTH_TEST"/>
+            <enum name="GL_DEPTH_WRITEMASK"/>
+            <enum name="GL_DETAIL_TEXTURE_2D_BINDING_SGIS"/>
+            <enum name="GL_DISTANCE_ATTENUATION_SGIS"/>
+            <enum name="GL_DITHER"/>
+            <enum name="GL_DOUBLEBUFFER"/>
+            <enum name="GL_DRAW_BUFFER"/>
+            <enum name="GL_DRAW_BUFFER_EXT"/>
+            <enum name="GL_EDGE_FLAG"/>
+            <enum name="GL_EDGE_FLAG_ARRAY"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_COUNT_EXT"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_STRIDE"/>
+            <enum name="GL_FEEDBACK_BUFFER_SIZE"/>
+            <enum name="GL_FEEDBACK_BUFFER_TYPE"/>
+            <enum name="GL_FOG"/>
+            <enum name="GL_FOG_COLOR"/>
+            <enum name="GL_FOG_DENSITY"/>
+            <enum name="GL_FOG_END"/>
+            <enum name="GL_FOG_FUNC_POINTS_SGIS"/>
+            <enum name="GL_FOG_HINT"/>
+            <enum name="GL_FOG_INDEX"/>
+            <enum name="GL_FOG_MODE"/>
+            <enum name="GL_FOG_OFFSET_SGIX"/>
+            <enum name="GL_FOG_OFFSET_VALUE_SGIX"/>
+            <enum name="GL_FOG_START"/>
+            <enum name="GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX"/>
+            <enum name="GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX"/>
+            <enum name="GL_FRAGMENT_COLOR_MATERIAL_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT0_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHTING_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX"/>
+            <enum name="GL_FRAMEZOOM_FACTOR_SGIX"/>
+            <enum name="GL_FRAMEZOOM_SGIX"/>
+            <enum name="GL_FRONT_FACE"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT_SGIS"/>
+            <enum name="GL_GREEN_BIAS"/>
+            <enum name="GL_GREEN_BITS"/>
+            <enum name="GL_GREEN_SCALE"/>
+            <enum name="GL_HISTOGRAM_EXT"/>
+            <enum name="GL_INDEX_ARRAY"/>
+            <enum name="GL_INDEX_ARRAY_COUNT_EXT"/>
+            <enum name="GL_INDEX_ARRAY_STRIDE"/>
+            <enum name="GL_INDEX_ARRAY_TYPE"/>
+            <enum name="GL_INDEX_BITS"/>
+            <enum name="GL_INDEX_CLEAR_VALUE"/>
+            <enum name="GL_INDEX_LOGIC_OP"/>
+            <enum name="GL_INDEX_MODE"/>
+            <enum name="GL_INDEX_OFFSET"/>
+            <enum name="GL_INDEX_SHIFT"/>
+            <enum name="GL_INDEX_WRITEMASK"/>
+            <enum name="GL_INSTRUMENT_MEASUREMENTS_SGIX"/>
+            <enum name="GL_INTERLACE_SGIX"/>
+            <enum name="GL_IR_INSTRUMENT1_SGIX"/>
+            <enum name="GL_LIGHT0"/>
+            <enum name="GL_LIGHT1"/>
+            <enum name="GL_LIGHT2"/>
+            <enum name="GL_LIGHT3"/>
+            <enum name="GL_LIGHT4"/>
+            <enum name="GL_LIGHT5"/>
+            <enum name="GL_LIGHT6"/>
+            <enum name="GL_LIGHT7"/>
+            <enum name="GL_LIGHTING"/>
+            <enum name="GL_LIGHT_ENV_MODE_SGIX"/>
+            <enum name="GL_LIGHT_MODEL_AMBIENT"/>
+            <enum name="GL_LIGHT_MODEL_COLOR_CONTROL"/>
+            <enum name="GL_LIGHT_MODEL_LOCAL_VIEWER"/>
+            <enum name="GL_LIGHT_MODEL_TWO_SIDE"/>
+            <enum name="GL_LINE_SMOOTH"/>
+            <enum name="GL_LINE_SMOOTH_HINT"/>
+            <enum name="GL_LINE_STIPPLE"/>
+            <enum name="GL_LINE_STIPPLE_PATTERN"/>
+            <enum name="GL_LINE_STIPPLE_REPEAT"/>
+            <enum name="GL_LINE_WIDTH"/>
+            <enum name="GL_LINE_WIDTH_GRANULARITY"/>
+            <enum name="GL_LINE_WIDTH_RANGE"/>
+            <enum name="GL_LIST_BASE"/>
+            <enum name="GL_LIST_INDEX"/>
+            <enum name="GL_LIST_MODE"/>
+            <enum name="GL_LOGIC_OP"/>
+            <enum name="GL_LOGIC_OP_MODE"/>
+            <enum name="GL_MAP1_COLOR_4"/>
+            <enum name="GL_MAP1_GRID_DOMAIN"/>
+            <enum name="GL_MAP1_GRID_SEGMENTS"/>
+            <enum name="GL_MAP1_INDEX"/>
+            <enum name="GL_MAP1_NORMAL"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP1_VERTEX_3"/>
+            <enum name="GL_MAP1_VERTEX_4"/>
+            <enum name="GL_MAP2_COLOR_4"/>
+            <enum name="GL_MAP2_GRID_DOMAIN"/>
+            <enum name="GL_MAP2_GRID_SEGMENTS"/>
+            <enum name="GL_MAP2_INDEX"/>
+            <enum name="GL_MAP2_NORMAL"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP2_VERTEX_3"/>
+            <enum name="GL_MAP2_VERTEX_4"/>
+            <enum name="GL_MAP_COLOR"/>
+            <enum name="GL_MAP_STENCIL"/>
+            <enum name="GL_MATRIX_MODE"/>
+            <enum name="GL_MAX_3D_TEXTURE_SIZE_EXT"/>
+            <enum name="GL_MAX_4D_TEXTURE_SIZE_SGIS"/>
+            <enum name="GL_MAX_ACTIVE_LIGHTS_SGIX"/>
+            <enum name="GL_MAX_ASYNC_DRAW_PIXELS_SGIX"/>
+            <enum name="GL_MAX_ASYNC_HISTOGRAM_SGIX"/>
+            <enum name="GL_MAX_ASYNC_READ_PIXELS_SGIX"/>
+            <enum name="GL_MAX_ASYNC_TEX_IMAGE_SGIX"/>
+            <enum name="GL_MAX_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_MAX_CLIENT_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_MAX_CLIPMAP_DEPTH_SGIX"/>
+            <enum name="GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+            <enum name="GL_MAX_CLIP_DISTANCES"/>
+            <enum name="GL_MAX_CLIP_PLANES"/>
+            <enum name="GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI"/>
+            <enum name="GL_MAX_EVAL_ORDER"/>
+            <enum name="GL_MAX_FOG_FUNC_POINTS_SGIS"/>
+            <enum name="GL_MAX_FRAGMENT_LIGHTS_SGIX"/>
+            <enum name="GL_MAX_FRAMEZOOM_FACTOR_SGIX"/>
+            <enum name="GL_MAX_LIGHTS"/>
+            <enum name="GL_MAX_LIST_NESTING"/>
+            <enum name="GL_MAX_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_MAX_NAME_STACK_DEPTH"/>
+            <enum name="GL_MAX_PIXEL_MAP_TABLE"/>
+            <enum name="GL_MAX_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_MAX_TEXTURE_SIZE"/>
+            <enum name="GL_MAX_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MAX_VIEWPORT_DIMS"/>
+            <enum name="GL_MINMAX_EXT"/>
+            <enum name="GL_MODELVIEW0_MATRIX_EXT"/>
+            <enum name="GL_MODELVIEW0_STACK_DEPTH_EXT"/>
+            <enum name="GL_MODELVIEW_MATRIX"/>
+            <enum name="GL_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_MULTISAMPLE_SGIS"/>
+            <enum name="GL_NAME_STACK_DEPTH"/>
+            <enum name="GL_NORMALIZE"/>
+            <enum name="GL_NORMAL_ARRAY"/>
+            <enum name="GL_NORMAL_ARRAY_COUNT_EXT"/>
+            <enum name="GL_NORMAL_ARRAY_STRIDE"/>
+            <enum name="GL_NORMAL_ARRAY_TYPE"/>
+            <enum name="GL_PACK_ALIGNMENT"/>
+            <enum name="GL_PACK_CMYK_HINT_EXT"/>
+            <enum name="GL_PACK_IMAGE_DEPTH_SGIS"/>
+            <enum name="GL_PACK_IMAGE_HEIGHT_EXT"/>
+            <enum name="GL_PACK_LSB_FIRST"/>
+            <enum name="GL_PACK_RESAMPLE_SGIX"/>
+            <enum name="GL_PACK_ROW_LENGTH"/>
+            <enum name="GL_PACK_SKIP_IMAGES_EXT"/>
+            <enum name="GL_PACK_SKIP_PIXELS"/>
+            <enum name="GL_PACK_SKIP_ROWS"/>
+            <enum name="GL_PACK_SKIP_VOLUMES_SGIS"/>
+            <enum name="GL_PACK_SUBSAMPLE_RATE_SGIX"/>
+            <enum name="GL_PACK_SWAP_BYTES"/>
+            <enum name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+            <enum name="GL_PIXEL_MAP_A_TO_A_SIZE"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B_SIZE"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R_SIZE"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R_SIZE"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S_SIZE"/>
+            <enum name="GL_PIXEL_TEXTURE_SGIS"/>
+            <enum name="GL_PIXEL_TEX_GEN_MODE_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_SGIX"/>
+            <enum name="GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX"/>
+            <enum name="GL_PIXEL_TILE_CACHE_INCREMENT_SGIX"/>
+            <enum name="GL_PIXEL_TILE_CACHE_SIZE_SGIX"/>
+            <enum name="GL_PIXEL_TILE_GRID_DEPTH_SGIX"/>
+            <enum name="GL_PIXEL_TILE_GRID_HEIGHT_SGIX"/>
+            <enum name="GL_PIXEL_TILE_GRID_WIDTH_SGIX"/>
+            <enum name="GL_PIXEL_TILE_HEIGHT_SGIX"/>
+            <enum name="GL_PIXEL_TILE_WIDTH_SGIX"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE_SGIS"/>
+            <enum name="GL_POINT_SIZE"/>
+            <enum name="GL_POINT_SIZE_GRANULARITY"/>
+            <enum name="GL_POINT_SIZE_MAX_SGIS"/>
+            <enum name="GL_POINT_SIZE_MIN_SGIS"/>
+            <enum name="GL_POINT_SIZE_RANGE"/>
+            <enum name="GL_POINT_SMOOTH"/>
+            <enum name="GL_POINT_SMOOTH_HINT"/>
+            <enum name="GL_POLYGON_MODE"/>
+            <enum name="GL_POLYGON_OFFSET_BIAS_EXT"/>
+            <enum name="GL_POLYGON_OFFSET_FACTOR"/>
+            <enum name="GL_POLYGON_OFFSET_FILL"/>
+            <enum name="GL_POLYGON_OFFSET_LINE"/>
+            <enum name="GL_POLYGON_OFFSET_POINT"/>
+            <enum name="GL_POLYGON_OFFSET_UNITS"/>
+            <enum name="GL_POLYGON_SMOOTH"/>
+            <enum name="GL_POLYGON_SMOOTH_HINT"/>
+            <enum name="GL_POLYGON_STIPPLE"/>
+            <enum name="GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_RED_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_RED_SCALE_SGI"/>
+            <enum name="GL_POST_CONVOLUTION_ALPHA_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_ALPHA_SCALE_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_BLUE_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_BLUE_SCALE_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+            <enum name="GL_POST_CONVOLUTION_GREEN_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_GREEN_SCALE_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_RED_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_RED_SCALE_EXT"/>
+            <enum name="GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX"/>
+            <enum name="GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX"/>
+            <enum name="GL_PRIMITIVE_BOUNDING_BOX_EXT"/>
+            <enum name="GL_PROJECTION_MATRIX"/>
+            <enum name="GL_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_READ_BUFFER"/>
+            <enum name="GL_READ_BUFFER_EXT"/>
+            <enum name="GL_READ_BUFFER_NV"/>
+            <enum name="GL_RED_BIAS"/>
+            <enum name="GL_RED_BITS"/>
+            <enum name="GL_RED_SCALE"/>
+            <enum name="GL_REFERENCE_PLANE_EQUATION_SGIX"/>
+            <enum name="GL_REFERENCE_PLANE_SGIX"/>
+            <enum name="GL_RENDER_MODE"/>
+            <enum name="GL_RESCALE_NORMAL_EXT"/>
+            <enum name="GL_RGBA_MODE"/>
+            <enum name="GL_SAMPLES_SGIS"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_MASK_SGIS"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_ONE_SGIS"/>
+            <enum name="GL_SAMPLE_BUFFERS_SGIS"/>
+            <enum name="GL_SAMPLE_MASK_INVERT_SGIS"/>
+            <enum name="GL_SAMPLE_MASK_SGIS"/>
+            <enum name="GL_SAMPLE_MASK_VALUE_SGIS"/>
+            <enum name="GL_SAMPLE_PATTERN_SGIS"/>
+            <enum name="GL_SCISSOR_BOX"/>
+            <enum name="GL_SCISSOR_TEST"/>
+            <enum name="GL_SELECTION_BUFFER_SIZE"/>
+            <enum name="GL_SEPARABLE_2D_EXT"/>
+            <enum name="GL_SHADE_MODEL"/>
+            <enum name="GL_SHARED_TEXTURE_PALETTE_EXT"/>
+            <enum name="GL_SMOOTH_LINE_WIDTH_GRANULARITY"/>
+            <enum name="GL_SMOOTH_LINE_WIDTH_RANGE"/>
+            <enum name="GL_SMOOTH_POINT_SIZE_GRANULARITY"/>
+            <enum name="GL_SMOOTH_POINT_SIZE_RANGE"/>
+            <enum name="GL_SPRITE_AXIS_SGIX"/>
+            <enum name="GL_SPRITE_MODE_SGIX"/>
+            <enum name="GL_SPRITE_SGIX"/>
+            <enum name="GL_SPRITE_TRANSLATION_SGIX"/>
+            <enum name="GL_STENCIL_BITS"/>
+            <enum name="GL_STENCIL_CLEAR_VALUE"/>
+            <enum name="GL_STENCIL_FAIL"/>
+            <enum name="GL_STENCIL_FUNC"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_PASS"/>
+            <enum name="GL_STENCIL_REF"/>
+            <enum name="GL_STENCIL_TEST"/>
+            <enum name="GL_STENCIL_VALUE_MASK"/>
+            <enum name="GL_STENCIL_WRITEMASK"/>
+            <enum name="GL_STEREO"/>
+            <enum name="GL_SUBPIXEL_BITS"/>
+            <enum name="GL_TEXTURE_1D"/>
+            <enum name="GL_TEXTURE_2D"/>
+            <enum name="GL_TEXTURE_3D_BINDING_EXT"/>
+            <enum name="GL_TEXTURE_3D_EXT"/>
+            <enum name="GL_TEXTURE_4D_BINDING_SGIS"/>
+            <enum name="GL_TEXTURE_4D_SGIS"/>
+            <enum name="GL_TEXTURE_BINDING_1D"/>
+            <enum name="GL_TEXTURE_BINDING_2D"/>
+            <enum name="GL_TEXTURE_BINDING_3D"/>
+            <enum name="GL_TEXTURE_COLOR_TABLE_SGI"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_COUNT_EXT"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_SIZE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_STRIDE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_TYPE"/>
+            <enum name="GL_TEXTURE_GEN_Q"/>
+            <enum name="GL_TEXTURE_GEN_R"/>
+            <enum name="GL_TEXTURE_GEN_S"/>
+            <enum name="GL_TEXTURE_GEN_T"/>
+            <enum name="GL_TEXTURE_MATRIX"/>
+            <enum name="GL_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_UNPACK_ALIGNMENT"/>
+            <enum name="GL_UNPACK_CMYK_HINT_EXT"/>
+            <enum name="GL_UNPACK_IMAGE_DEPTH_SGIS"/>
+            <enum name="GL_UNPACK_IMAGE_HEIGHT_EXT"/>
+            <enum name="GL_UNPACK_LSB_FIRST"/>
+            <enum name="GL_UNPACK_RESAMPLE_SGIX"/>
+            <enum name="GL_UNPACK_ROW_LENGTH"/>
+            <enum name="GL_UNPACK_SKIP_IMAGES_EXT"/>
+            <enum name="GL_UNPACK_SKIP_PIXELS"/>
+            <enum name="GL_UNPACK_SKIP_ROWS"/>
+            <enum name="GL_UNPACK_SKIP_VOLUMES_SGIS"/>
+            <enum name="GL_UNPACK_SUBSAMPLE_RATE_SGIX"/>
+            <enum name="GL_UNPACK_SWAP_BYTES"/>
+            <enum name="GL_VERTEX_ARRAY"/>
+            <enum name="GL_VERTEX_ARRAY_COUNT_EXT"/>
+            <enum name="GL_VERTEX_ARRAY_SIZE"/>
+            <enum name="GL_VERTEX_ARRAY_STRIDE"/>
+            <enum name="GL_VERTEX_ARRAY_TYPE"/>
+            <enum name="GL_VERTEX_PRECLIP_HINT_SGIX"/>
+            <enum name="GL_VERTEX_PRECLIP_SGIX"/>
+            <enum name="GL_VIEWPORT"/>
+            <enum name="GL_ZOOM_X"/>
+            <enum name="GL_ZOOM_Y"/>
+        </group>
+
+        <group name="GetPointervPName">
+            <enum name="GL_COLOR_ARRAY_POINTER"/>
+            <enum name="GL_COLOR_ARRAY_POINTER_EXT"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_POINTER"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_POINTER_EXT"/>
+            <enum name="GL_FEEDBACK_BUFFER_POINTER"/>
+            <enum name="GL_INDEX_ARRAY_POINTER"/>
+            <enum name="GL_INDEX_ARRAY_POINTER_EXT"/>
+            <enum name="GL_INSTRUMENT_BUFFER_POINTER_SGIX"/>
+            <enum name="GL_NORMAL_ARRAY_POINTER"/>
+            <enum name="GL_NORMAL_ARRAY_POINTER_EXT"/>
+            <enum name="GL_SELECTION_BUFFER_POINTER"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_POINTER_EXT"/>
+            <enum name="GL_VERTEX_ARRAY_POINTER"/>
+            <enum name="GL_VERTEX_ARRAY_POINTER_EXT"/>
+        </group>
+
+        <group name="GetTextureParameter">
+            <enum name="GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS"/>
+            <enum name="GL_DETAIL_TEXTURE_LEVEL_SGIS"/>
+            <enum name="GL_DETAIL_TEXTURE_MODE_SGIS"/>
+            <enum name="GL_DUAL_TEXTURE_SELECT_SGIS"/>
+            <enum name="GL_GENERATE_MIPMAP_SGIS"/>
+            <enum name="GL_POST_TEXTURE_FILTER_BIAS_SGIX"/>
+            <enum name="GL_POST_TEXTURE_FILTER_SCALE_SGIX"/>
+            <enum name="GL_QUAD_TEXTURE_SELECT_SGIS"/>
+            <enum name="GL_SHADOW_AMBIENT_SGIX"/>
+            <enum name="GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS"/>
+            <enum name="GL_TEXTURE_4DSIZE_SGIS"/>
+            <enum name="GL_TEXTURE_ALPHA_SIZE"/>
+            <enum name="GL_TEXTURE_BASE_LEVEL_SGIS"/>
+            <enum name="GL_TEXTURE_BLUE_SIZE"/>
+            <enum name="GL_TEXTURE_BORDER"/>
+            <enum name="GL_TEXTURE_BORDER_COLOR"/>
+            <enum name="GL_TEXTURE_BORDER_COLOR_NV"/>
+            <enum name="GL_TEXTURE_CLIPMAP_CENTER_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_DEPTH_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_FRAME_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_OFFSET_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+            <enum name="GL_TEXTURE_COMPARE_OPERATOR_SGIX"/>
+            <enum name="GL_TEXTURE_COMPARE_SGIX"/>
+            <enum name="GL_TEXTURE_COMPONENTS"/>
+            <enum name="GL_TEXTURE_DEPTH_EXT"/>
+            <enum name="GL_TEXTURE_FILTER4_SIZE_SGIS"/>
+            <enum name="GL_TEXTURE_GEQUAL_R_SGIX"/>
+            <enum name="GL_TEXTURE_GREEN_SIZE"/>
+            <enum name="GL_TEXTURE_HEIGHT"/>
+            <enum name="GL_TEXTURE_INTENSITY_SIZE"/>
+            <enum name="GL_TEXTURE_INTERNAL_FORMAT"/>
+            <enum name="GL_TEXTURE_LEQUAL_R_SGIX"/>
+            <enum name="GL_TEXTURE_LOD_BIAS_R_SGIX"/>
+            <enum name="GL_TEXTURE_LOD_BIAS_S_SGIX"/>
+            <enum name="GL_TEXTURE_LOD_BIAS_T_SGIX"/>
+            <enum name="GL_TEXTURE_LUMINANCE_SIZE"/>
+            <enum name="GL_TEXTURE_MAG_FILTER"/>
+            <enum name="GL_TEXTURE_MAX_CLAMP_R_SGIX"/>
+            <enum name="GL_TEXTURE_MAX_CLAMP_S_SGIX"/>
+            <enum name="GL_TEXTURE_MAX_CLAMP_T_SGIX"/>
+            <enum name="GL_TEXTURE_MAX_LEVEL_SGIS"/>
+            <enum name="GL_TEXTURE_MAX_LOD_SGIS"/>
+            <enum name="GL_TEXTURE_MIN_FILTER"/>
+            <enum name="GL_TEXTURE_MIN_LOD_SGIS"/>
+            <enum name="GL_TEXTURE_PRIORITY"/>
+            <enum name="GL_TEXTURE_RED_SIZE"/>
+            <enum name="GL_TEXTURE_RESIDENT"/>
+            <enum name="GL_TEXTURE_WIDTH"/>
+            <enum name="GL_TEXTURE_WRAP_Q_SGIS"/>
+            <enum name="GL_TEXTURE_WRAP_R_EXT"/>
+            <enum name="GL_TEXTURE_WRAP_S"/>
+            <enum name="GL_TEXTURE_WRAP_T"/>
+        </group>
+
+        <group name="HintMode">
+            <enum name="GL_DONT_CARE"/>
+            <enum name="GL_FASTEST"/>
+            <enum name="GL_NICEST"/>
+        </group>
+
+        <group name="HintTarget">
+            <enum name="GL_ALLOW_DRAW_FRG_HINT_PGI"/>
+            <enum name="GL_ALLOW_DRAW_MEM_HINT_PGI"/>
+            <enum name="GL_ALLOW_DRAW_OBJ_HINT_PGI"/>
+            <enum name="GL_ALLOW_DRAW_WIN_HINT_PGI"/>
+            <enum name="GL_ALWAYS_FAST_HINT_PGI"/>
+            <enum name="GL_ALWAYS_SOFT_HINT_PGI"/>
+            <enum name="GL_BACK_NORMALS_HINT_PGI"/>
+            <enum name="GL_BINNING_CONTROL_HINT_QCOM"/>
+            <enum name="GL_CLIP_FAR_HINT_PGI"/>
+            <enum name="GL_CLIP_NEAR_HINT_PGI"/>
+            <enum name="GL_CLIP_VOLUME_CLIPPING_HINT_EXT"/>
+            <enum name="GL_CONSERVE_MEMORY_HINT_PGI"/>
+            <enum name="GL_CONVOLUTION_HINT_SGIX"/>
+            <enum name="GL_FOG_HINT"/>
+            <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT"/>
+            <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB"/>
+            <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES"/>
+            <enum name="GL_FULL_STIPPLE_HINT_PGI"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT_SGIS"/>
+            <enum name="GL_LINE_QUALITY_HINT_SGIX"/>
+            <enum name="GL_LINE_SMOOTH_HINT"/>
+            <enum name="GL_MATERIAL_SIDE_HINT_PGI"/>
+            <enum name="GL_MAX_VERTEX_HINT_PGI"/>
+            <enum name="GL_MULTISAMPLE_FILTER_HINT_NV"/>
+            <enum name="GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI"/>
+            <enum name="GL_NATIVE_GRAPHICS_END_HINT_PGI"/>
+            <enum name="GL_PACK_CMYK_HINT_EXT"/>
+            <enum name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+            <enum name="GL_PHONG_HINT_WIN"/>
+            <enum name="GL_POINT_SMOOTH_HINT"/>
+            <enum name="GL_POLYGON_SMOOTH_HINT"/>
+            <enum name="GL_PREFER_DOUBLEBUFFER_HINT_PGI"/>
+            <enum name="GL_PROGRAM_BINARY_RETRIEVABLE_HINT"/>
+            <enum name="GL_RECLAIM_MEMORY_HINT_PGI"/>
+            <enum name="GL_SCALEBIAS_HINT_SGIX"/>
+            <enum name="GL_STRICT_DEPTHFUNC_HINT_PGI"/>
+            <enum name="GL_STRICT_LIGHTING_HINT_PGI"/>
+            <enum name="GL_STRICT_SCISSOR_HINT_PGI"/>
+            <enum name="GL_TEXTURE_COMPRESSION_HINT"/>
+            <enum name="GL_TEXTURE_COMPRESSION_HINT_ARB"/>
+            <enum name="GL_TEXTURE_MULTI_BUFFER_HINT_SGIX"/>
+            <enum name="GL_TEXTURE_STORAGE_HINT_APPLE"/>
+            <enum name="GL_TRANSFORM_HINT_APPLE"/>
+            <enum name="GL_UNPACK_CMYK_HINT_EXT"/>
+            <enum name="GL_VERTEX_ARRAY_STORAGE_HINT_APPLE"/>
+            <enum name="GL_VERTEX_CONSISTENT_HINT_PGI"/>
+            <enum name="GL_VERTEX_DATA_HINT_PGI"/>
+            <enum name="GL_VERTEX_PRECLIP_HINT_SGIX"/>
+            <enum name="GL_VERTEX_PRECLIP_SGIX"/>
+            <enum name="GL_WIDE_LINE_HINT_PGI"/>
+        </group>
+
+        <group name="HistogramTargetEXT">
+            <enum name="GL_HISTOGRAM"/>
+            <enum name="GL_HISTOGRAM_EXT"/>
+            <enum name="GL_PROXY_HISTOGRAM"/>
+            <enum name="GL_PROXY_HISTOGRAM_EXT"/>
+        </group>
+
+        <group name="IndexPointerType">
+            <enum name="GL_DOUBLE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+        </group>
+
+        <group name="InterleavedArrayFormat">
+            <enum name="GL_C3F_V3F"/>
+            <enum name="GL_C4F_N3F_V3F"/>
+            <enum name="GL_C4UB_V2F"/>
+            <enum name="GL_C4UB_V3F"/>
+            <enum name="GL_N3F_V3F"/>
+            <enum name="GL_T2F_C3F_V3F"/>
+            <enum name="GL_T2F_C4F_N3F_V3F"/>
+            <enum name="GL_T2F_C4UB_V3F"/>
+            <enum name="GL_T2F_N3F_V3F"/>
+            <enum name="GL_T2F_V3F"/>
+            <enum name="GL_T4F_C4F_N3F_V4F"/>
+            <enum name="GL_T4F_V4F"/>
+            <enum name="GL_V2F"/>
+            <enum name="GL_V3F"/>
+        </group>
+
+        <group name="LightEnvModeSGIX">
+            <enum name="GL_ADD"/>
+            <enum name="GL_MODULATE"/>
+            <enum name="GL_REPLACE"/>
+        </group>
+
+        <group name="LightEnvParameterSGIX">
+            <enum name="GL_LIGHT_ENV_MODE_SGIX"/>
+        </group>
+
+        <group name="LightModelColorControl">
+            <enum name="GL_SEPARATE_SPECULAR_COLOR"/>
+            <enum name="GL_SEPARATE_SPECULAR_COLOR_EXT"/>
+            <enum name="GL_SINGLE_COLOR"/>
+            <enum name="GL_SINGLE_COLOR_EXT"/>
+        </group>
+
+        <group name="LightModelParameter">
+            <enum name="GL_LIGHT_MODEL_AMBIENT"/>
+            <enum name="GL_LIGHT_MODEL_COLOR_CONTROL"/>
+            <enum name="GL_LIGHT_MODEL_COLOR_CONTROL_EXT"/>
+            <enum name="GL_LIGHT_MODEL_LOCAL_VIEWER"/>
+            <enum name="GL_LIGHT_MODEL_TWO_SIDE"/>
+        </group>
+
+        <group name="LightName">
+            <enum name="GL_FRAGMENT_LIGHT0_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT1_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT2_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT3_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT4_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT5_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT6_SGIX"/>
+            <enum name="GL_FRAGMENT_LIGHT7_SGIX"/>
+            <enum name="GL_LIGHT0"/>
+            <enum name="GL_LIGHT1"/>
+            <enum name="GL_LIGHT2"/>
+            <enum name="GL_LIGHT3"/>
+            <enum name="GL_LIGHT4"/>
+            <enum name="GL_LIGHT5"/>
+            <enum name="GL_LIGHT6"/>
+            <enum name="GL_LIGHT7"/>
+        </group>
+
+        <group name="LightParameter">
+            <enum name="GL_AMBIENT"/>
+            <enum name="GL_CONSTANT_ATTENUATION"/>
+            <enum name="GL_DIFFUSE"/>
+            <enum name="GL_LINEAR_ATTENUATION"/>
+            <enum name="GL_POSITION"/>
+            <enum name="GL_QUADRATIC_ATTENUATION"/>
+            <enum name="GL_SPECULAR"/>
+            <enum name="GL_SPOT_CUTOFF"/>
+            <enum name="GL_SPOT_DIRECTION"/>
+            <enum name="GL_SPOT_EXPONENT"/>
+        </group>
+
+        <group name="ListMode">
+            <enum name="GL_COMPILE"/>
+            <enum name="GL_COMPILE_AND_EXECUTE"/>
+        </group>
+
+        <group name="ListNameType">
+            <enum name="GL_2_BYTES"/>
+            <enum name="GL_3_BYTES"/>
+            <enum name="GL_4_BYTES"/>
+            <enum name="GL_BYTE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+            <enum name="GL_UNSIGNED_BYTE"/>
+            <enum name="GL_UNSIGNED_INT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+        </group>
+
+        <group name="ListParameterName">
+            <enum name="GL_LIST_PRIORITY_SGIX"/>
+        </group>
+
+        <group name="LogicOp">
+            <enum name="GL_AND"/>
+            <enum name="GL_AND_INVERTED"/>
+            <enum name="GL_AND_REVERSE"/>
+            <enum name="GL_CLEAR"/>
+            <enum name="GL_COPY"/>
+            <enum name="GL_COPY_INVERTED"/>
+            <enum name="GL_EQUIV"/>
+            <enum name="GL_INVERT"/>
+            <enum name="GL_NAND"/>
+            <enum name="GL_NOOP"/>
+            <enum name="GL_NOR"/>
+            <enum name="GL_OR"/>
+            <enum name="GL_OR_INVERTED"/>
+            <enum name="GL_OR_REVERSE"/>
+            <enum name="GL_SET"/>
+            <enum name="GL_XOR"/>
+        </group>
+
+        <group name="MapBufferUsageMask">
+            <enum name="GL_CLIENT_STORAGE_BIT"/>
+            <enum name="GL_DYNAMIC_STORAGE_BIT"/>
+            <enum name="GL_MAP_COHERENT_BIT"/>
+            <enum name="GL_MAP_FLUSH_EXPLICIT_BIT"/>
+            <enum name="GL_MAP_FLUSH_EXPLICIT_BIT_EXT"/>
+            <enum name="GL_MAP_INVALIDATE_BUFFER_BIT"/>
+            <enum name="GL_MAP_INVALIDATE_BUFFER_BIT_EXT"/>
+            <enum name="GL_MAP_INVALIDATE_RANGE_BIT"/>
+            <enum name="GL_MAP_INVALIDATE_RANGE_BIT_EXT"/>
+            <enum name="GL_MAP_PERSISTENT_BIT"/>
+            <enum name="GL_MAP_READ_BIT"/>
+            <enum name="GL_MAP_READ_BIT_EXT"/>
+            <enum name="GL_MAP_UNSYNCHRONIZED_BIT"/>
+            <enum name="GL_MAP_UNSYNCHRONIZED_BIT_EXT"/>
+            <enum name="GL_MAP_WRITE_BIT"/>
+            <enum name="GL_MAP_WRITE_BIT_EXT"/>
+        </group>
+
+        <group name="MapTarget">
+            <enum name="GL_GEOMETRY_DEFORMATION_SGIX"/>
+            <enum name="GL_MAP1_COLOR_4"/>
+            <enum name="GL_MAP1_INDEX"/>
+            <enum name="GL_MAP1_NORMAL"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP1_VERTEX_3"/>
+            <enum name="GL_MAP1_VERTEX_4"/>
+            <enum name="GL_MAP2_COLOR_4"/>
+            <enum name="GL_MAP2_INDEX"/>
+            <enum name="GL_MAP2_NORMAL"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP2_VERTEX_3"/>
+            <enum name="GL_MAP2_VERTEX_4"/>
+            <enum name="GL_TEXTURE_DEFORMATION_SGIX"/>
+        </group>
+
+        <group name="MapTextureFormatINTEL">
+            <enum name="GL_LAYOUT_DEFAULT_INTEL"/>
+            <enum name="GL_LAYOUT_LINEAR_CPU_CACHED_INTEL"/>
+            <enum name="GL_LAYOUT_LINEAR_INTEL"/>
+        </group>
+
+        <group name="MaterialFace">
+            <enum name="GL_BACK"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+        </group>
+
+        <group name="MaterialParameter">
+            <enum name="GL_AMBIENT"/>
+            <enum name="GL_AMBIENT_AND_DIFFUSE"/>
+            <enum name="GL_COLOR_INDEXES"/>
+            <enum name="GL_DIFFUSE"/>
+            <enum name="GL_EMISSION"/>
+            <enum name="GL_SHININESS"/>
+            <enum name="GL_SPECULAR"/>
+        </group>
+
+        <group name="MatrixMode">
+            <enum name="GL_MODELVIEW"/>
+            <enum name="GL_MODELVIEW0_EXT"/>
+            <enum name="GL_PROJECTION"/>
+            <enum name="GL_TEXTURE"/>
+        </group>
+
+        <group name="MemoryBarrierMask">
+            <enum name="GL_ALL_BARRIER_BITS"/>
+            <enum name="GL_ALL_BARRIER_BITS_EXT"/>
+            <enum name="GL_ATOMIC_COUNTER_BARRIER_BIT"/>
+            <enum name="GL_ATOMIC_COUNTER_BARRIER_BIT_EXT"/>
+            <enum name="GL_BUFFER_UPDATE_BARRIER_BIT"/>
+            <enum name="GL_BUFFER_UPDATE_BARRIER_BIT_EXT"/>
+            <enum name="GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_COMMAND_BARRIER_BIT"/>
+            <enum name="GL_COMMAND_BARRIER_BIT_EXT"/>
+            <enum name="GL_ELEMENT_ARRAY_BARRIER_BIT"/>
+            <enum name="GL_ELEMENT_ARRAY_BARRIER_BIT_EXT"/>
+            <enum name="GL_FRAMEBUFFER_BARRIER_BIT"/>
+            <enum name="GL_FRAMEBUFFER_BARRIER_BIT_EXT"/>
+            <enum name="GL_PIXEL_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_PIXEL_BUFFER_BARRIER_BIT_EXT"/>
+            <enum name="GL_QUERY_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV"/>
+            <enum name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT"/>
+            <enum name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT"/>
+            <enum name="GL_SHADER_STORAGE_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_FETCH_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_FETCH_BARRIER_BIT_EXT"/>
+            <enum name="GL_TEXTURE_UPDATE_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_UPDATE_BARRIER_BIT_EXT"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT"/>
+            <enum name="GL_UNIFORM_BARRIER_BIT"/>
+            <enum name="GL_UNIFORM_BARRIER_BIT_EXT"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT"/>
+        </group>
+
+        <group name="MeshMode1">
+            <enum name="GL_LINE"/>
+            <enum name="GL_POINT"/>
+        </group>
+
+        <group name="MeshMode2">
+            <enum name="GL_FILL"/>
+            <enum name="GL_LINE"/>
+            <enum name="GL_POINT"/>
+        </group>
+
+        <group name="MinmaxTargetEXT">
+            <enum name="GL_MINMAX"/>
+            <enum name="GL_MINMAX_EXT"/>
+        </group>
+
+        <group name="NormalPointerType">
+            <enum name="GL_BYTE"/>
+            <enum name="GL_DOUBLE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+        </group>
+
+        <group name="PixelCopyType">
+            <enum name="GL_COLOR"/>
+            <enum name="GL_COLOR_EXT"/>
+            <enum name="GL_DEPTH"/>
+            <enum name="GL_DEPTH_EXT"/>
+            <enum name="GL_STENCIL"/>
+            <enum name="GL_STENCIL_EXT"/>
+        </group>
+
+        <group name="PixelFormat">
+            <enum name="GL_ABGR_EXT"/>
+            <enum name="GL_ALPHA"/>
+            <enum name="GL_BLUE"/>
+            <enum name="GL_CMYKA_EXT"/>
+            <enum name="GL_CMYK_EXT"/>
+            <enum name="GL_COLOR_INDEX"/>
+            <enum name="GL_DEPTH_COMPONENT"/>
+            <enum name="GL_GREEN"/>
+            <enum name="GL_LUMINANCE"/>
+            <enum name="GL_LUMINANCE_ALPHA"/>
+            <enum name="GL_RED"/>
+            <enum name="GL_RED_EXT"/>
+            <enum name="GL_RGB"/>
+            <enum name="GL_RGBA"/>
+            <enum name="GL_STENCIL_INDEX"/>
+            <enum name="GL_UNSIGNED_INT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+            <enum name="GL_YCRCB_422_SGIX"/>
+            <enum name="GL_YCRCB_444_SGIX"/>
+        </group>
+
+        <group name="InternalFormat" comment="Was PixelInternalFormat">
+            <enum name="GL_ALPHA12"/>
+            <enum name="GL_ALPHA16"/>
+            <enum name="GL_ALPHA16_ICC_SGIX"/>
+            <enum name="GL_ALPHA4"/>
+            <enum name="GL_ALPHA8"/>
+            <enum name="GL_ALPHA_ICC_SGIX"/>
+            <enum name="GL_DEPTH_COMPONENT16_SGIX"/>
+            <enum name="GL_DEPTH_COMPONENT24_SGIX"/>
+            <enum name="GL_DEPTH_COMPONENT32_SGIX"/>
+            <enum name="GL_DUAL_ALPHA12_SGIS"/>
+            <enum name="GL_DUAL_ALPHA16_SGIS"/>
+            <enum name="GL_DUAL_ALPHA4_SGIS"/>
+            <enum name="GL_DUAL_ALPHA8_SGIS"/>
+            <enum name="GL_DUAL_INTENSITY12_SGIS"/>
+            <enum name="GL_DUAL_INTENSITY16_SGIS"/>
+            <enum name="GL_DUAL_INTENSITY4_SGIS"/>
+            <enum name="GL_DUAL_INTENSITY8_SGIS"/>
+            <enum name="GL_DUAL_LUMINANCE12_SGIS"/>
+            <enum name="GL_DUAL_LUMINANCE16_SGIS"/>
+            <enum name="GL_DUAL_LUMINANCE4_SGIS"/>
+            <enum name="GL_DUAL_LUMINANCE8_SGIS"/>
+            <enum name="GL_DUAL_LUMINANCE_ALPHA4_SGIS"/>
+            <enum name="GL_DUAL_LUMINANCE_ALPHA8_SGIS"/>
+            <enum name="GL_INTENSITY"/>
+            <enum name="GL_INTENSITY12"/>
+            <enum name="GL_INTENSITY16"/>
+            <enum name="GL_INTENSITY16_ICC_SGIX"/>
+            <enum name="GL_INTENSITY4"/>
+            <enum name="GL_INTENSITY8"/>
+            <enum name="GL_INTENSITY_ICC_SGIX"/>
+            <enum name="GL_LUMINANCE12"/>
+            <enum name="GL_LUMINANCE12_ALPHA12"/>
+            <enum name="GL_LUMINANCE12_ALPHA4"/>
+            <enum name="GL_LUMINANCE16"/>
+            <enum name="GL_LUMINANCE16_ALPHA16"/>
+            <enum name="GL_LUMINANCE16_ALPHA8_ICC_SGIX"/>
+            <enum name="GL_LUMINANCE16_ICC_SGIX"/>
+            <enum name="GL_LUMINANCE4"/>
+            <enum name="GL_LUMINANCE4_ALPHA4"/>
+            <enum name="GL_LUMINANCE6_ALPHA2"/>
+            <enum name="GL_LUMINANCE8"/>
+            <enum name="GL_LUMINANCE8_ALPHA8"/>
+            <enum name="GL_LUMINANCE_ALPHA_ICC_SGIX"/>
+            <enum name="GL_LUMINANCE_ICC_SGIX"/>
+            <enum name="GL_QUAD_ALPHA4_SGIS"/>
+            <enum name="GL_QUAD_ALPHA8_SGIS"/>
+            <enum name="GL_QUAD_INTENSITY4_SGIS"/>
+            <enum name="GL_QUAD_INTENSITY8_SGIS"/>
+            <enum name="GL_QUAD_LUMINANCE4_SGIS"/>
+            <enum name="GL_QUAD_LUMINANCE8_SGIS"/>
+            <enum name="GL_R3_G3_B2"/>
+            <enum name="GL_R5_G6_B5_A8_ICC_SGIX"/>
+            <enum name="GL_R5_G6_B5_ICC_SGIX"/>
+            <enum name="GL_RGB10"/>
+            <enum name="GL_RGB10_A2"/>
+            <enum name="GL_RGB12"/>
+            <enum name="GL_RGB16"/>
+            <enum name="GL_RGB2_EXT"/>
+            <enum name="GL_RGB4"/>
+            <enum name="GL_RGB5"/>
+            <enum name="GL_RGB5_A1"/>
+            <enum name="GL_RGB8"/>
+            <enum name="GL_RGBA12"/>
+            <enum name="GL_RGBA16"/>
+            <enum name="GL_RGBA2"/>
+            <enum name="GL_RGBA4"/>
+            <enum name="GL_RGBA8"/>
+            <enum name="GL_RGBA_ICC_SGIX"/>
+            <enum name="GL_RGB_ICC_SGIX"/>
+        </group>
+
+        <group name="PixelMap">
+            <enum name="GL_PIXEL_MAP_A_TO_A"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S"/>
+        </group>
+
+        <group name="PixelStoreParameter">
+            <enum name="GL_PACK_ALIGNMENT"/>
+            <enum name="GL_PACK_IMAGE_DEPTH_SGIS"/>
+            <enum name="GL_PACK_IMAGE_HEIGHT"/>
+            <enum name="GL_PACK_IMAGE_HEIGHT_EXT"/>
+            <enum name="GL_PACK_LSB_FIRST"/>
+            <enum name="GL_PACK_RESAMPLE_OML"/>
+            <enum name="GL_PACK_RESAMPLE_SGIX"/>
+            <enum name="GL_PACK_ROW_LENGTH"/>
+            <enum name="GL_PACK_SKIP_IMAGES"/>
+            <enum name="GL_PACK_SKIP_IMAGES_EXT"/>
+            <enum name="GL_PACK_SKIP_PIXELS"/>
+            <enum name="GL_PACK_SKIP_ROWS"/>
+            <enum name="GL_PACK_SKIP_VOLUMES_SGIS"/>
+            <enum name="GL_PACK_SUBSAMPLE_RATE_SGIX"/>
+            <enum name="GL_PACK_SWAP_BYTES"/>
+            <enum name="GL_PIXEL_TILE_CACHE_SIZE_SGIX"/>
+            <enum name="GL_PIXEL_TILE_GRID_DEPTH_SGIX"/>
+            <enum name="GL_PIXEL_TILE_GRID_HEIGHT_SGIX"/>
+            <enum name="GL_PIXEL_TILE_GRID_WIDTH_SGIX"/>
+            <enum name="GL_PIXEL_TILE_HEIGHT_SGIX"/>
+            <enum name="GL_PIXEL_TILE_WIDTH_SGIX"/>
+            <enum name="GL_UNPACK_ALIGNMENT"/>
+            <enum name="GL_UNPACK_IMAGE_DEPTH_SGIS"/>
+            <enum name="GL_UNPACK_IMAGE_HEIGHT"/>
+            <enum name="GL_UNPACK_IMAGE_HEIGHT_EXT"/>
+            <enum name="GL_UNPACK_LSB_FIRST"/>
+            <enum name="GL_UNPACK_RESAMPLE_OML"/>
+            <enum name="GL_UNPACK_RESAMPLE_SGIX"/>
+            <enum name="GL_UNPACK_ROW_LENGTH"/>
+            <enum name="GL_UNPACK_ROW_LENGTH_EXT"/>
+            <enum name="GL_UNPACK_SKIP_IMAGES"/>
+            <enum name="GL_UNPACK_SKIP_IMAGES_EXT"/>
+            <enum name="GL_UNPACK_SKIP_PIXELS"/>
+            <enum name="GL_UNPACK_SKIP_PIXELS_EXT"/>
+            <enum name="GL_UNPACK_SKIP_ROWS"/>
+            <enum name="GL_UNPACK_SKIP_ROWS_EXT"/>
+            <enum name="GL_UNPACK_SKIP_VOLUMES_SGIS"/>
+            <enum name="GL_UNPACK_SUBSAMPLE_RATE_SGIX"/>
+            <enum name="GL_UNPACK_SWAP_BYTES"/>
+        </group>
+
+        <group name="PixelStoreResampleMode">
+            <enum name="GL_RESAMPLE_DECIMATE_SGIX"/>
+            <enum name="GL_RESAMPLE_REPLICATE_SGIX"/>
+            <enum name="GL_RESAMPLE_ZERO_FILL_SGIX"/>
+        </group>
+
+        <group name="PixelStoreSubsampleRate">
+            <enum name="GL_PIXEL_SUBSAMPLE_2424_SGIX"/>
+            <enum name="GL_PIXEL_SUBSAMPLE_4242_SGIX"/>
+            <enum name="GL_PIXEL_SUBSAMPLE_4444_SGIX"/>
+        </group>
+
+        <group name="PixelTexGenMode">
+            <enum name="GL_LUMINANCE"/>
+            <enum name="GL_LUMINANCE_ALPHA"/>
+            <enum name="GL_NONE"/>
+            <enum name="GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX"/>
+            <enum name="GL_RGB"/>
+            <enum name="GL_RGBA"/>
+        </group>
+
+        <group name="PixelTexGenParameterNameSGIS">
+            <enum name="GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS"/>
+            <enum name="GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS"/>
+        </group>
+
+        <group name="PixelTransferParameter">
+            <enum name="GL_ALPHA_BIAS"/>
+            <enum name="GL_ALPHA_SCALE"/>
+            <enum name="GL_BLUE_BIAS"/>
+            <enum name="GL_BLUE_SCALE"/>
+            <enum name="GL_DEPTH_BIAS"/>
+            <enum name="GL_DEPTH_SCALE"/>
+            <enum name="GL_GREEN_BIAS"/>
+            <enum name="GL_GREEN_SCALE"/>
+            <enum name="GL_INDEX_OFFSET"/>
+            <enum name="GL_INDEX_SHIFT"/>
+            <enum name="GL_MAP_COLOR"/>
+            <enum name="GL_MAP_STENCIL"/>
+            <enum name="GL_POST_COLOR_MATRIX_ALPHA_BIAS"/>
+            <enum name="GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_ALPHA_SCALE"/>
+            <enum name="GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_BLUE_BIAS"/>
+            <enum name="GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_BLUE_SCALE"/>
+            <enum name="GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_GREEN_BIAS"/>
+            <enum name="GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_GREEN_SCALE"/>
+            <enum name="GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_RED_BIAS"/>
+            <enum name="GL_POST_COLOR_MATRIX_RED_BIAS_SGI"/>
+            <enum name="GL_POST_COLOR_MATRIX_RED_SCALE"/>
+            <enum name="GL_POST_COLOR_MATRIX_RED_SCALE_SGI"/>
+            <enum name="GL_POST_CONVOLUTION_ALPHA_BIAS"/>
+            <enum name="GL_POST_CONVOLUTION_ALPHA_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_ALPHA_SCALE"/>
+            <enum name="GL_POST_CONVOLUTION_ALPHA_SCALE_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_BLUE_BIAS"/>
+            <enum name="GL_POST_CONVOLUTION_BLUE_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_BLUE_SCALE"/>
+            <enum name="GL_POST_CONVOLUTION_BLUE_SCALE_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_GREEN_BIAS"/>
+            <enum name="GL_POST_CONVOLUTION_GREEN_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_GREEN_SCALE"/>
+            <enum name="GL_POST_CONVOLUTION_GREEN_SCALE_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_RED_BIAS"/>
+            <enum name="GL_POST_CONVOLUTION_RED_BIAS_EXT"/>
+            <enum name="GL_POST_CONVOLUTION_RED_SCALE"/>
+            <enum name="GL_POST_CONVOLUTION_RED_SCALE_EXT"/>
+            <enum name="GL_RED_BIAS"/>
+            <enum name="GL_RED_SCALE"/>
+        </group>
+
+        <group name="PixelType">
+            <enum name="GL_BITMAP"/>
+            <enum name="GL_BYTE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+            <enum name="GL_UNSIGNED_BYTE"/>
+            <enum name="GL_UNSIGNED_BYTE_3_3_2"/>
+            <enum name="GL_UNSIGNED_BYTE_3_3_2_EXT"/>
+            <enum name="GL_UNSIGNED_INT"/>
+            <enum name="GL_UNSIGNED_INT_10_10_10_2"/>
+            <enum name="GL_UNSIGNED_INT_10_10_10_2_EXT"/>
+            <enum name="GL_UNSIGNED_INT_8_8_8_8"/>
+            <enum name="GL_UNSIGNED_INT_8_8_8_8_EXT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+            <enum name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+            <enum name="GL_UNSIGNED_SHORT_4_4_4_4_EXT"/>
+            <enum name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+            <enum name="GL_UNSIGNED_SHORT_5_5_5_1_EXT"/>
+        </group>
+
+        <group name="PointParameterNameSGIS">
+            <enum name="GL_DISTANCE_ATTENUATION_EXT"/>
+            <enum name="GL_DISTANCE_ATTENUATION_SGIS"/>
+            <enum name="GL_POINT_DISTANCE_ATTENUATION"/>
+            <enum name="GL_POINT_DISTANCE_ATTENUATION_ARB"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE_ARB"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE_EXT"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE_SGIS"/>
+            <enum name="GL_POINT_SIZE_MAX"/>
+            <enum name="GL_POINT_SIZE_MAX_ARB"/>
+            <enum name="GL_POINT_SIZE_MAX_EXT"/>
+            <enum name="GL_POINT_SIZE_MAX_SGIS"/>
+            <enum name="GL_POINT_SIZE_MIN"/>
+            <enum name="GL_POINT_SIZE_MIN_ARB"/>
+            <enum name="GL_POINT_SIZE_MIN_EXT"/>
+            <enum name="GL_POINT_SIZE_MIN_SGIS"/>
+        </group>
+
+        <group name="PolygonMode">
+            <enum name="GL_FILL"/>
+            <enum name="GL_LINE"/>
+            <enum name="GL_POINT"/>
+        </group>
+
+        <group name="PrimitiveType">
+            <enum name="GL_LINES"/>
+            <enum name="GL_LINES_ADJACENCY"/>
+            <enum name="GL_LINES_ADJACENCY_ARB"/>
+            <enum name="GL_LINES_ADJACENCY_EXT"/>
+            <enum name="GL_LINE_LOOP"/>
+            <enum name="GL_LINE_STRIP"/>
+            <enum name="GL_LINE_STRIP_ADJACENCY"/>
+            <enum name="GL_LINE_STRIP_ADJACENCY_ARB"/>
+            <enum name="GL_LINE_STRIP_ADJACENCY_EXT"/>
+            <enum name="GL_PATCHES"/>
+            <enum name="GL_PATCHES_EXT"/>
+            <enum name="GL_POINTS"/>
+            <enum name="GL_POLYGON"/>
+            <enum name="GL_QUADS"/>
+            <enum name="GL_QUADS_EXT"/>
+            <enum name="GL_QUAD_STRIP"/>
+            <enum name="GL_TRIANGLES"/>
+            <enum name="GL_TRIANGLES_ADJACENCY"/>
+            <enum name="GL_TRIANGLES_ADJACENCY_ARB"/>
+            <enum name="GL_TRIANGLES_ADJACENCY_EXT"/>
+            <enum name="GL_TRIANGLE_FAN"/>
+            <enum name="GL_TRIANGLE_STRIP"/>
+            <enum name="GL_TRIANGLE_STRIP_ADJACENCY"/>
+            <enum name="GL_TRIANGLE_STRIP_ADJACENCY_ARB"/>
+            <enum name="GL_TRIANGLE_STRIP_ADJACENCY_EXT"/>
+        </group>
+
+        <group name="OcclusionQueryEventMaskAMD">
+            <enum name="GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD"/>
+            <enum name="GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD"/>
+            <enum name="GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD"/>
+            <enum name="GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD"/>
+            <enum name="GL_QUERY_ALL_EVENT_BITS_AMD"/>
+        </group>
+
+        <group name="ReadBufferMode">
+            <enum name="GL_AUX0"/>
+            <enum name="GL_AUX1"/>
+            <enum name="GL_AUX2"/>
+            <enum name="GL_AUX3"/>
+            <enum name="GL_BACK"/>
+            <enum name="GL_BACK_LEFT"/>
+            <enum name="GL_BACK_RIGHT"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_FRONT_LEFT"/>
+            <enum name="GL_FRONT_RIGHT"/>
+            <enum name="GL_LEFT"/>
+            <enum name="GL_RIGHT"/>
+        </group>
+
+        <group name="RenderingMode">
+            <enum name="GL_FEEDBACK"/>
+            <enum name="GL_RENDER"/>
+            <enum name="GL_SELECT"/>
+        </group>
+
+        <group name="SamplePatternSGIS">
+            <enum name="GL_1PASS_EXT"/>
+            <enum name="GL_1PASS_SGIS"/>
+            <enum name="GL_2PASS_0_EXT"/>
+            <enum name="GL_2PASS_0_SGIS"/>
+            <enum name="GL_2PASS_1_EXT"/>
+            <enum name="GL_2PASS_1_SGIS"/>
+            <enum name="GL_4PASS_0_EXT"/>
+            <enum name="GL_4PASS_0_SGIS"/>
+            <enum name="GL_4PASS_1_EXT"/>
+            <enum name="GL_4PASS_1_SGIS"/>
+            <enum name="GL_4PASS_2_EXT"/>
+            <enum name="GL_4PASS_2_SGIS"/>
+            <enum name="GL_4PASS_3_EXT"/>
+            <enum name="GL_4PASS_3_SGIS"/>
+        </group>
+
+        <group name="SeparableTargetEXT">
+            <enum name="GL_SEPARABLE_2D"/>
+            <enum name="GL_SEPARABLE_2D_EXT"/>
+        </group>
+
+        <group name="ShadingModel">
+            <enum name="GL_FLAT"/>
+            <enum name="GL_SMOOTH"/>
+        </group>
+
+        <group name="StencilFunction">
+            <enum name="GL_ALWAYS"/>
+            <enum name="GL_EQUAL"/>
+            <enum name="GL_GEQUAL"/>
+            <enum name="GL_GREATER"/>
+            <enum name="GL_LEQUAL"/>
+            <enum name="GL_LESS"/>
+            <enum name="GL_NEVER"/>
+            <enum name="GL_NOTEQUAL"/>
+        </group>
+
+        <group name="StencilOp">
+            <enum name="GL_DECR"/>
+            <enum name="GL_INCR"/>
+            <enum name="GL_INVERT"/>
+            <enum name="GL_KEEP"/>
+            <enum name="GL_REPLACE"/>
+            <enum name="GL_ZERO"/>
+        </group>
+
+        <group name="StringName">
+            <enum name="GL_EXTENSIONS"/>
+            <enum name="GL_RENDERER"/>
+            <enum name="GL_VENDOR"/>
+            <enum name="GL_VERSION"/>
+        </group>
+
+        <group name="TexCoordPointerType">
+            <enum name="GL_DOUBLE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+        </group>
+
+        <group name="TextureCoordName">
+            <enum name="GL_S"/>
+            <enum name="GL_T"/>
+            <enum name="GL_R"/>
+            <enum name="GL_Q"/>
+        </group>
+
+        <group name="TextureEnvMode">
+            <enum name="GL_ADD"/>
+            <enum name="GL_BLEND"/>
+            <enum name="GL_DECAL"/>
+            <enum name="GL_MODULATE"/>
+            <enum name="GL_REPLACE_EXT"/>
+            <enum name="GL_TEXTURE_ENV_BIAS_SGIX"/>
+        </group>
+
+        <group name="TextureEnvParameter">
+            <enum name="GL_TEXTURE_ENV_COLOR"/>
+            <enum name="GL_TEXTURE_ENV_MODE"/>
+        </group>
+
+        <group name="TextureEnvTarget">
+            <enum name="GL_TEXTURE_ENV"/>
+        </group>
+
+        <group name="TextureFilterFuncSGIS">
+            <enum name="GL_FILTER4_SGIS"/>
+        </group>
+
+        <group name="TextureGenMode">
+            <enum name="GL_EYE_DISTANCE_TO_LINE_SGIS"/>
+            <enum name="GL_EYE_DISTANCE_TO_POINT_SGIS"/>
+            <enum name="GL_EYE_LINEAR"/>
+            <enum name="GL_OBJECT_DISTANCE_TO_LINE_SGIS"/>
+            <enum name="GL_OBJECT_DISTANCE_TO_POINT_SGIS"/>
+            <enum name="GL_OBJECT_LINEAR"/>
+            <enum name="GL_SPHERE_MAP"/>
+        </group>
+
+        <group name="TextureGenParameter">
+            <enum name="GL_EYE_LINE_SGIS"/>
+            <enum name="GL_EYE_PLANE"/>
+            <enum name="GL_EYE_POINT_SGIS"/>
+            <enum name="GL_OBJECT_LINE_SGIS"/>
+            <enum name="GL_OBJECT_PLANE"/>
+            <enum name="GL_OBJECT_POINT_SGIS"/>
+            <enum name="GL_TEXTURE_GEN_MODE"/>
+        </group>
+
+        <group name="TextureMagFilter">
+            <enum name="GL_FILTER4_SGIS"/>
+            <enum name="GL_LINEAR"/>
+            <enum name="GL_LINEAR_DETAIL_ALPHA_SGIS"/>
+            <enum name="GL_LINEAR_DETAIL_COLOR_SGIS"/>
+            <enum name="GL_LINEAR_DETAIL_SGIS"/>
+            <enum name="GL_LINEAR_SHARPEN_ALPHA_SGIS"/>
+            <enum name="GL_LINEAR_SHARPEN_COLOR_SGIS"/>
+            <enum name="GL_LINEAR_SHARPEN_SGIS"/>
+            <enum name="GL_NEAREST"/>
+            <enum name="GL_PIXEL_TEX_GEN_Q_CEILING_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_Q_ROUND_SGIX"/>
+        </group>
+
+        <group name="TextureMinFilter">
+            <enum name="GL_FILTER4_SGIS"/>
+            <enum name="GL_LINEAR"/>
+            <enum name="GL_LINEAR_CLIPMAP_LINEAR_SGIX"/>
+            <enum name="GL_LINEAR_CLIPMAP_NEAREST_SGIX"/>
+            <enum name="GL_LINEAR_MIPMAP_LINEAR"/>
+            <enum name="GL_LINEAR_MIPMAP_NEAREST"/>
+            <enum name="GL_NEAREST"/>
+            <enum name="GL_NEAREST_CLIPMAP_LINEAR_SGIX"/>
+            <enum name="GL_NEAREST_CLIPMAP_NEAREST_SGIX"/>
+            <enum name="GL_NEAREST_MIPMAP_LINEAR"/>
+            <enum name="GL_NEAREST_MIPMAP_NEAREST"/>
+            <enum name="GL_PIXEL_TEX_GEN_Q_CEILING_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX"/>
+            <enum name="GL_PIXEL_TEX_GEN_Q_ROUND_SGIX"/>
+        </group>
+
+        <group name="TextureParameterName">
+            <enum name="GL_DETAIL_TEXTURE_LEVEL_SGIS"/>
+            <enum name="GL_DETAIL_TEXTURE_MODE_SGIS"/>
+            <enum name="GL_DUAL_TEXTURE_SELECT_SGIS"/>
+            <enum name="GL_GENERATE_MIPMAP"/>
+            <enum name="GL_GENERATE_MIPMAP_SGIS"/>
+            <enum name="GL_POST_TEXTURE_FILTER_BIAS_SGIX"/>
+            <enum name="GL_POST_TEXTURE_FILTER_SCALE_SGIX"/>
+            <enum name="GL_QUAD_TEXTURE_SELECT_SGIS"/>
+            <enum name="GL_SHADOW_AMBIENT_SGIX"/>
+            <enum name="GL_TEXTURE_BORDER_COLOR"/>
+            <enum name="GL_TEXTURE_CLIPMAP_CENTER_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_DEPTH_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_FRAME_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_OFFSET_SGIX"/>
+            <enum name="GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+            <enum name="GL_TEXTURE_COMPARE_SGIX"/>
+            <enum name="GL_TEXTURE_LOD_BIAS_R_SGIX"/>
+            <enum name="GL_TEXTURE_LOD_BIAS_S_SGIX"/>
+            <enum name="GL_TEXTURE_LOD_BIAS_T_SGIX"/>
+            <enum name="GL_TEXTURE_MAG_FILTER"/>
+            <enum name="GL_TEXTURE_MAX_CLAMP_R_SGIX"/>
+            <enum name="GL_TEXTURE_MAX_CLAMP_S_SGIX"/>
+            <enum name="GL_TEXTURE_MAX_CLAMP_T_SGIX"/>
+            <enum name="GL_TEXTURE_MIN_FILTER"/>
+            <enum name="GL_TEXTURE_PRIORITY"/>
+            <enum name="GL_TEXTURE_PRIORITY_EXT"/>
+            <enum name="GL_TEXTURE_WRAP_Q_SGIS"/>
+            <enum name="GL_TEXTURE_WRAP_R"/>
+            <enum name="GL_TEXTURE_WRAP_R_EXT"/>
+            <enum name="GL_TEXTURE_WRAP_R_OES"/>
+            <enum name="GL_TEXTURE_WRAP_S"/>
+            <enum name="GL_TEXTURE_WRAP_T"/>
+        </group>
+
+        <group name="TextureTarget">
+            <enum name="GL_DETAIL_TEXTURE_2D_SGIS"/>
+            <enum name="GL_PROXY_TEXTURE_1D"/>
+            <enum name="GL_PROXY_TEXTURE_1D_EXT"/>
+            <enum name="GL_PROXY_TEXTURE_2D"/>
+            <enum name="GL_PROXY_TEXTURE_2D_EXT"/>
+            <enum name="GL_PROXY_TEXTURE_3D"/>
+            <enum name="GL_PROXY_TEXTURE_3D_EXT"/>
+            <enum name="GL_PROXY_TEXTURE_4D_SGIS"/>
+            <enum name="GL_TEXTURE_1D"/>
+            <enum name="GL_TEXTURE_2D"/>
+            <enum name="GL_TEXTURE_3D"/>
+            <enum name="GL_TEXTURE_3D_EXT"/>
+            <enum name="GL_TEXTURE_3D_OES"/>
+            <enum name="GL_TEXTURE_4D_SGIS"/>
+            <enum name="GL_TEXTURE_BASE_LEVEL"/>
+            <enum name="GL_TEXTURE_BASE_LEVEL_SGIS"/>
+            <enum name="GL_TEXTURE_MAX_LEVEL"/>
+            <enum name="GL_TEXTURE_MAX_LEVEL_SGIS"/>
+            <enum name="GL_TEXTURE_MAX_LOD"/>
+            <enum name="GL_TEXTURE_MAX_LOD_SGIS"/>
+            <enum name="GL_TEXTURE_MIN_LOD"/>
+            <enum name="GL_TEXTURE_MIN_LOD_SGIS"/>
+        </group>
+
+        <group name="TextureWrapMode">
+            <enum name="GL_CLAMP"/>
+            <enum name="GL_CLAMP_TO_BORDER"/>
+            <enum name="GL_CLAMP_TO_BORDER_ARB"/>
+            <enum name="GL_CLAMP_TO_BORDER_NV"/>
+            <enum name="GL_CLAMP_TO_BORDER_SGIS"/>
+            <enum name="GL_CLAMP_TO_EDGE"/>
+            <enum name="GL_CLAMP_TO_EDGE_SGIS"/>
+            <enum name="GL_REPEAT"/>
+        </group>
+
+        <group name="UseProgramStageMask">
+            <enum name="GL_VERTEX_SHADER_BIT"/>
+            <enum name="GL_VERTEX_SHADER_BIT_EXT"/>
+            <enum name="GL_FRAGMENT_SHADER_BIT"/>
+            <enum name="GL_FRAGMENT_SHADER_BIT_EXT"/>
+            <enum name="GL_GEOMETRY_SHADER_BIT"/>
+            <enum name="GL_GEOMETRY_SHADER_BIT_EXT"/>
+            <enum name="GL_TESS_CONTROL_SHADER_BIT"/>
+            <enum name="GL_TESS_CONTROL_SHADER_BIT_EXT"/>
+            <enum name="GL_TESS_EVALUATION_SHADER_BIT"/>
+            <enum name="GL_TESS_EVALUATION_SHADER_BIT_EXT"/>
+            <enum name="GL_COMPUTE_SHADER_BIT"/>
+            <enum name="GL_ALL_SHADER_BITS"/>
+            <enum name="GL_ALL_SHADER_BITS_EXT"/>
+        </group>
+
+        <group name="VertexPointerType">
+            <enum name="GL_DOUBLE"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_SHORT"/>
+        </group>
+    </groups>
+
+    <!-- SECTION: GL enumerant (token) definitions. -->
+
+    <!-- Bitmasks each have their own namespace, although bits are
+         sometimes reused for other purposes -->
+
+    <enums namespace="GL" group="AttribMask" type="bitmask">
+        <enum value="0x00000001" name="GL_CURRENT_BIT"/>
+        <enum value="0x00000002" name="GL_POINT_BIT"/>
+        <enum value="0x00000004" name="GL_LINE_BIT"/>
+        <enum value="0x00000008" name="GL_POLYGON_BIT"/>
+        <enum value="0x00000010" name="GL_POLYGON_STIPPLE_BIT"/>
+        <enum value="0x00000020" name="GL_PIXEL_MODE_BIT"/>
+        <enum value="0x00000040" name="GL_LIGHTING_BIT"/>
+        <enum value="0x00000080" name="GL_FOG_BIT"/>
+        <enum value="0x00000100" name="GL_DEPTH_BUFFER_BIT"/>
+        <enum value="0x00000200" name="GL_ACCUM_BUFFER_BIT"/>
+        <enum value="0x00000400" name="GL_STENCIL_BUFFER_BIT"/>
+        <enum value="0x00000800" name="GL_VIEWPORT_BIT"/>
+        <enum value="0x00001000" name="GL_TRANSFORM_BIT"/>
+        <enum value="0x00002000" name="GL_ENABLE_BIT"/>
+        <enum value="0x00004000" name="GL_COLOR_BUFFER_BIT"/>
+        <enum value="0x00008000" name="GL_HINT_BIT"/>
+        <enum value="0x00010000" name="GL_EVAL_BIT"/>
+        <enum value="0x00020000" name="GL_LIST_BIT"/>
+        <enum value="0x00040000" name="GL_TEXTURE_BIT"/>
+        <enum value="0x00080000" name="GL_SCISSOR_BIT"/>
+        <enum value="0x20000000" name="GL_MULTISAMPLE_BIT"/>
+        <enum value="0x20000000" name="GL_MULTISAMPLE_BIT_ARB"/>
+        <enum value="0x20000000" name="GL_MULTISAMPLE_BIT_EXT"/>
+        <enum value="0x20000000" name="GL_MULTISAMPLE_BIT_3DFX"/>
+        <enum value="0xFFFFFFFF" name="GL_ALL_ATTRIB_BITS" comment="Guaranteed to mark all attribute groups at once"/>
+    </enums>
+
+    <enums namespace="GL" group="ClearBufferMask" type="bitmask" comment="GL_{DEPTH,ACCUM,STENCIL,COLOR}_BUFFER_BIT also lie in this namespace">
+        <enum value="0x00008000" name="GL_COVERAGE_BUFFER_BIT_NV" comment="Collides with AttribMask bit GL_HINT_BIT. OK since this token is for OpenGL ES 2, which doesn't have attribute groups."/>
+            <!-- Also used: 0x00004700 for bits reused from AttribMask above -->
+    </enums>
+
+    <enums namespace="GL" group="ClientAttribMask" type="bitmask">
+        <enum value="0x00000001" name="GL_CLIENT_PIXEL_STORE_BIT"/>
+        <enum value="0x00000002" name="GL_CLIENT_VERTEX_ARRAY_BIT"/>
+        <enum value="0xFFFFFFFF" name="GL_CLIENT_ALL_ATTRIB_BITS"/>
+    </enums>
+
+    <enums namespace="GL" group="ContextFlagMask" type="bitmask" comment="Should be shared with WGL/GLX, but aren't since the FORWARD_COMPATIBLE and DEBUG values are swapped vs. WGL/GLX.">
+        <enum value="0x00000001" name="GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT"/>
+        <enum value="0x00000002" name="GL_CONTEXT_FLAG_DEBUG_BIT"/>
+        <enum value="0x00000002" name="GL_CONTEXT_FLAG_DEBUG_BIT_KHR"/>
+        <enum value="0x00000004" name="GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB"/>
+    </enums>
+
+    <enums namespace="GL" group="ContextProfileMask" type="bitmask">
+        <enum value="0x00000001" name="GL_CONTEXT_CORE_PROFILE_BIT"/>
+        <enum value="0x00000002" name="GL_CONTEXT_COMPATIBILITY_PROFILE_BIT"/>
+    </enums>
+
+    <enums namespace="GL" group="MapBufferUsageMask" type="bitmask">
+        <enum value="0x0001" name="GL_MAP_READ_BIT"/>
+        <enum value="0x0001" name="GL_MAP_READ_BIT_EXT"/>
+        <enum value="0x0002" name="GL_MAP_WRITE_BIT"/>
+        <enum value="0x0002" name="GL_MAP_WRITE_BIT_EXT"/>
+        <enum value="0x0004" name="GL_MAP_INVALIDATE_RANGE_BIT"/>
+        <enum value="0x0004" name="GL_MAP_INVALIDATE_RANGE_BIT_EXT"/>
+        <enum value="0x0008" name="GL_MAP_INVALIDATE_BUFFER_BIT"/>
+        <enum value="0x0008" name="GL_MAP_INVALIDATE_BUFFER_BIT_EXT"/>
+        <enum value="0x0010" name="GL_MAP_FLUSH_EXPLICIT_BIT"/>
+        <enum value="0x0010" name="GL_MAP_FLUSH_EXPLICIT_BIT_EXT"/>
+        <enum value="0x0020" name="GL_MAP_UNSYNCHRONIZED_BIT"/>
+        <enum value="0x0020" name="GL_MAP_UNSYNCHRONIZED_BIT_EXT"/>
+        <enum value="0x0040" name="GL_MAP_PERSISTENT_BIT"/>
+        <enum value="0x0080" name="GL_MAP_COHERENT_BIT"/>
+        <enum value="0x0100" name="GL_DYNAMIC_STORAGE_BIT"/>
+        <enum value="0x0200" name="GL_CLIENT_STORAGE_BIT"/>
+    </enums>
+
+    <enums namespace="GL" group="MemoryBarrierMask" type="bitmask">
+        <enum value="0x00000001" name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT"/>
+        <enum value="0x00000001" name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT"/>
+        <enum value="0x00000002" name="GL_ELEMENT_ARRAY_BARRIER_BIT"/>
+        <enum value="0x00000002" name="GL_ELEMENT_ARRAY_BARRIER_BIT_EXT"/>
+        <enum value="0x00000004" name="GL_UNIFORM_BARRIER_BIT"/>
+        <enum value="0x00000004" name="GL_UNIFORM_BARRIER_BIT_EXT"/>
+        <enum value="0x00000008" name="GL_TEXTURE_FETCH_BARRIER_BIT"/>
+        <enum value="0x00000008" name="GL_TEXTURE_FETCH_BARRIER_BIT_EXT"/>
+        <enum value="0x00000010" name="GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV"/>
+        <enum value="0x00000020" name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT"/>
+        <enum value="0x00000020" name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT"/>
+        <enum value="0x00000040" name="GL_COMMAND_BARRIER_BIT"/>
+        <enum value="0x00000040" name="GL_COMMAND_BARRIER_BIT_EXT"/>
+        <enum value="0x00000080" name="GL_PIXEL_BUFFER_BARRIER_BIT"/>
+        <enum value="0x00000080" name="GL_PIXEL_BUFFER_BARRIER_BIT_EXT"/>
+        <enum value="0x00000100" name="GL_TEXTURE_UPDATE_BARRIER_BIT"/>
+        <enum value="0x00000100" name="GL_TEXTURE_UPDATE_BARRIER_BIT_EXT"/>
+        <enum value="0x00000200" name="GL_BUFFER_UPDATE_BARRIER_BIT"/>
+        <enum value="0x00000200" name="GL_BUFFER_UPDATE_BARRIER_BIT_EXT"/>
+        <enum value="0x00000400" name="GL_FRAMEBUFFER_BARRIER_BIT"/>
+        <enum value="0x00000400" name="GL_FRAMEBUFFER_BARRIER_BIT_EXT"/>
+        <enum value="0x00000800" name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT"/>
+        <enum value="0x00000800" name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT"/>
+        <enum value="0x00001000" name="GL_ATOMIC_COUNTER_BARRIER_BIT"/>
+        <enum value="0x00001000" name="GL_ATOMIC_COUNTER_BARRIER_BIT_EXT"/>
+        <enum value="0x00002000" name="GL_SHADER_STORAGE_BARRIER_BIT"/>
+        <enum value="0x00004000" name="GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT"/>
+        <enum value="0x00008000" name="GL_QUERY_BUFFER_BARRIER_BIT"/>
+        <enum value="0xFFFFFFFF" name="GL_ALL_BARRIER_BITS"/>
+        <enum value="0xFFFFFFFF" name="GL_ALL_BARRIER_BITS_EXT"/>
+    </enums>
+
+    <enums namespace="OcclusionQueryEventMaskAMD">
+        <enum value="0x00000001" name="GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD"/>
+        <enum value="0x00000002" name="GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD"/>
+        <enum value="0x00000004" name="GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD"/>
+        <enum value="0x00000008" name="GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD"/>
+        <enum value="0xFFFFFFFF" name="GL_QUERY_ALL_EVENT_BITS_AMD"/>
+    </enums>
+
+    <enums namespace="GL" group="SyncObjectMask" type="bitmask">
+        <enum value="0x00000001" name="GL_SYNC_FLUSH_COMMANDS_BIT"/>
+        <enum value="0x00000001" name="GL_SYNC_FLUSH_COMMANDS_BIT_APPLE"/>
+    </enums>
+
+    <enums namespace="GL" group="UseProgramStageMask" type="bitmask">
+        <enum value="0x00000001" name="GL_VERTEX_SHADER_BIT"/>
+        <enum value="0x00000001" name="GL_VERTEX_SHADER_BIT_EXT"/>
+        <enum value="0x00000002" name="GL_FRAGMENT_SHADER_BIT"/>
+        <enum value="0x00000002" name="GL_FRAGMENT_SHADER_BIT_EXT"/>
+        <enum value="0x00000004" name="GL_GEOMETRY_SHADER_BIT"/>
+        <enum value="0x00000004" name="GL_GEOMETRY_SHADER_BIT_EXT"/>                             
+        <enum value="0x00000008" name="GL_TESS_CONTROL_SHADER_BIT"/>
+        <enum value="0x00000008" name="GL_TESS_CONTROL_SHADER_BIT_EXT"/>
+        <enum value="0x00000010" name="GL_TESS_EVALUATION_SHADER_BIT"/>
+        <enum value="0x00000010" name="GL_TESS_EVALUATION_SHADER_BIT_EXT"/>
+        <enum value="0x00000020" name="GL_COMPUTE_SHADER_BIT"/>
+        <enum value="0xFFFFFFFF" name="GL_ALL_SHADER_BITS"/>
+        <enum value="0xFFFFFFFF" name="GL_ALL_SHADER_BITS_EXT"/>
+    </enums>
+
+    <!-- Bitmasks defined by vendor extensions -->
+
+    <enums namespace="GL" group="TextureStorageMaskAMD" type="bitmask">
+        <enum value="0x00000001" name="GL_TEXTURE_STORAGE_SPARSE_BIT_AMD"/>
+    </enums>
+
+    <enums namespace="GL" group="FragmentShaderDestMaskATI" type="bitmask">
+        <enum value="0x00000001" name="GL_RED_BIT_ATI"/>
+        <enum value="0x00000002" name="GL_GREEN_BIT_ATI"/>
+        <enum value="0x00000004" name="GL_BLUE_BIT_ATI"/>
+    </enums>
+
+    <enums namespace="GL" group="FragmentShaderDestModMaskATI" type="bitmask">
+        <enum value="0x00000001" name="GL_2X_BIT_ATI"/>
+        <enum value="0x00000002" name="GL_4X_BIT_ATI"/>
+        <enum value="0x00000004" name="GL_8X_BIT_ATI"/>
+        <enum value="0x00000008" name="GL_HALF_BIT_ATI"/>
+        <enum value="0x00000010" name="GL_QUARTER_BIT_ATI"/>
+        <enum value="0x00000020" name="GL_EIGHTH_BIT_ATI"/>
+        <enum value="0x00000040" name="GL_SATURATE_BIT_ATI"/>
+    </enums>
+
+    <enums namespace="GL" group="FragmentShaderColorModMaskATI" type="bitmask">
+            <!-- Also used: 0x00000001 for GL_2X_BIT_ATI reused from FragmentShaderDestModMaskAT above -->
+        <enum value="0x00000002" name="GL_COMP_BIT_ATI"/>
+        <enum value="0x00000004" name="GL_NEGATE_BIT_ATI"/>
+        <enum value="0x00000008" name="GL_BIAS_BIT_ATI"/>
+    </enums>
+
+    <enums namespace="GL" group="TraceMaskMESA" type="bitmask">
+        <enum value="0x0001" name="GL_TRACE_OPERATIONS_BIT_MESA"/>
+        <enum value="0x0002" name="GL_TRACE_PRIMITIVES_BIT_MESA"/>
+        <enum value="0x0004" name="GL_TRACE_ARRAYS_BIT_MESA"/>
+        <enum value="0x0008" name="GL_TRACE_TEXTURES_BIT_MESA"/>
+        <enum value="0x0010" name="GL_TRACE_PIXELS_BIT_MESA"/>
+        <enum value="0x0020" name="GL_TRACE_ERRORS_BIT_MESA"/>
+        <enum value="0xFFFF" name="GL_TRACE_ALL_BITS_MESA"/>
+    </enums>
+
+    <enums namespace="GL" group="PathRenderingMaskNV" type="bitmask">
+        <enum value="0x01" name="GL_BOLD_BIT_NV"/>
+        <enum value="0x02" name="GL_ITALIC_BIT_NV"/>
+        <enum value="0x01" name="GL_GLYPH_WIDTH_BIT_NV"/>
+        <enum value="0x02" name="GL_GLYPH_HEIGHT_BIT_NV"/>
+        <enum value="0x04" name="GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV"/>
+        <enum value="0x08" name="GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV"/>
+        <enum value="0x10" name="GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV"/>
+        <enum value="0x20" name="GL_GLYPH_VERTICAL_BEARING_X_BIT_NV"/>
+        <enum value="0x40" name="GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV"/>
+        <enum value="0x80" name="GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV"/>
+        <enum value="0x100" name="GL_GLYPH_HAS_KERNING_BIT_NV"/>
+        <enum value="0x00010000" name="GL_FONT_X_MIN_BOUNDS_BIT_NV"/>
+        <enum value="0x00020000" name="GL_FONT_Y_MIN_BOUNDS_BIT_NV"/>
+        <enum value="0x00040000" name="GL_FONT_X_MAX_BOUNDS_BIT_NV"/>
+        <enum value="0x00080000" name="GL_FONT_Y_MAX_BOUNDS_BIT_NV"/>
+        <enum value="0x00100000" name="GL_FONT_UNITS_PER_EM_BIT_NV"/>
+        <enum value="0x00200000" name="GL_FONT_ASCENDER_BIT_NV"/>
+        <enum value="0x00400000" name="GL_FONT_DESCENDER_BIT_NV"/>
+        <enum value="0x00800000" name="GL_FONT_HEIGHT_BIT_NV"/>
+        <enum value="0x01000000" name="GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV"/>
+        <enum value="0x02000000" name="GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV"/>
+        <enum value="0x04000000" name="GL_FONT_UNDERLINE_POSITION_BIT_NV"/>
+        <enum value="0x08000000" name="GL_FONT_UNDERLINE_THICKNESS_BIT_NV"/>
+        <enum value="0x10000000" name="GL_FONT_HAS_KERNING_BIT_NV"/>
+    </enums>
+
+    <enums namespace="GL" group="PerformanceQueryCapsMaskINTEL" type="bitmask">
+        <enum value="0x00000000" name="GL_PERFQUERY_SINGLE_CONTEXT_INTEL"/>
+        <enum value="0x00000001" name="GL_PERFQUERY_GLOBAL_CONTEXT_INTEL"/>
+    </enums>
+
+    <enums namespace="GL" group="VertexHintsMaskPGI" type="bitmask">
+        <enum value="0x00000004" name="GL_VERTEX23_BIT_PGI"/>
+        <enum value="0x00000008" name="GL_VERTEX4_BIT_PGI"/>
+        <enum value="0x00010000" name="GL_COLOR3_BIT_PGI"/>
+        <enum value="0x00020000" name="GL_COLOR4_BIT_PGI"/>
+        <enum value="0x00040000" name="GL_EDGEFLAG_BIT_PGI"/>
+        <enum value="0x00080000" name="GL_INDEX_BIT_PGI"/>
+        <enum value="0x00100000" name="GL_MAT_AMBIENT_BIT_PGI"/>
+        <enum value="0x00200000" name="GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI"/>
+        <enum value="0x00400000" name="GL_MAT_DIFFUSE_BIT_PGI"/>
+        <enum value="0x00800000" name="GL_MAT_EMISSION_BIT_PGI"/>
+        <enum value="0x01000000" name="GL_MAT_COLOR_INDEXES_BIT_PGI"/>
+        <enum value="0x02000000" name="GL_MAT_SHININESS_BIT_PGI"/>
+        <enum value="0x04000000" name="GL_MAT_SPECULAR_BIT_PGI"/>
+        <enum value="0x08000000" name="GL_NORMAL_BIT_PGI"/>
+        <enum value="0x10000000" name="GL_TEXCOORD1_BIT_PGI"/>
+        <enum value="0x20000000" name="GL_TEXCOORD2_BIT_PGI"/>
+        <enum value="0x40000000" name="GL_TEXCOORD3_BIT_PGI"/>
+        <enum value="0x80000000" name="GL_TEXCOORD4_BIT_PGI"/>
+    </enums>
+
+    <enums namespace="GL" group="BufferBitQCOM" type="bitmask">
+        <enum value="0x00000001" name="GL_COLOR_BUFFER_BIT0_QCOM"/>
+        <enum value="0x00000002" name="GL_COLOR_BUFFER_BIT1_QCOM"/>
+        <enum value="0x00000004" name="GL_COLOR_BUFFER_BIT2_QCOM"/>
+        <enum value="0x00000008" name="GL_COLOR_BUFFER_BIT3_QCOM"/>
+        <enum value="0x00000010" name="GL_COLOR_BUFFER_BIT4_QCOM"/>
+        <enum value="0x00000020" name="GL_COLOR_BUFFER_BIT5_QCOM"/>
+        <enum value="0x00000040" name="GL_COLOR_BUFFER_BIT6_QCOM"/>
+        <enum value="0x00000080" name="GL_COLOR_BUFFER_BIT7_QCOM"/>
+        <enum value="0x00000100" name="GL_DEPTH_BUFFER_BIT0_QCOM"/>
+        <enum value="0x00000200" name="GL_DEPTH_BUFFER_BIT1_QCOM"/>
+        <enum value="0x00000400" name="GL_DEPTH_BUFFER_BIT2_QCOM"/>
+        <enum value="0x00000800" name="GL_DEPTH_BUFFER_BIT3_QCOM"/>
+        <enum value="0x00001000" name="GL_DEPTH_BUFFER_BIT4_QCOM"/>
+        <enum value="0x00002000" name="GL_DEPTH_BUFFER_BIT5_QCOM"/>
+        <enum value="0x00004000" name="GL_DEPTH_BUFFER_BIT6_QCOM"/>
+        <enum value="0x00008000" name="GL_DEPTH_BUFFER_BIT7_QCOM"/>
+        <enum value="0x00010000" name="GL_STENCIL_BUFFER_BIT0_QCOM"/>
+        <enum value="0x00020000" name="GL_STENCIL_BUFFER_BIT1_QCOM"/>
+        <enum value="0x00040000" name="GL_STENCIL_BUFFER_BIT2_QCOM"/>
+        <enum value="0x00080000" name="GL_STENCIL_BUFFER_BIT3_QCOM"/>
+        <enum value="0x00100000" name="GL_STENCIL_BUFFER_BIT4_QCOM"/>
+        <enum value="0x00200000" name="GL_STENCIL_BUFFER_BIT5_QCOM"/>
+        <enum value="0x00400000" name="GL_STENCIL_BUFFER_BIT6_QCOM"/>
+        <enum value="0x00800000" name="GL_STENCIL_BUFFER_BIT7_QCOM"/>
+        <enum value="0x01000000" name="GL_MULTISAMPLE_BUFFER_BIT0_QCOM"/>
+        <enum value="0x02000000" name="GL_MULTISAMPLE_BUFFER_BIT1_QCOM"/>
+        <enum value="0x04000000" name="GL_MULTISAMPLE_BUFFER_BIT2_QCOM"/>
+        <enum value="0x08000000" name="GL_MULTISAMPLE_BUFFER_BIT3_QCOM"/>
+        <enum value="0x10000000" name="GL_MULTISAMPLE_BUFFER_BIT4_QCOM"/>
+        <enum value="0x20000000" name="GL_MULTISAMPLE_BUFFER_BIT5_QCOM"/>
+        <enum value="0x40000000" name="GL_MULTISAMPLE_BUFFER_BIT6_QCOM"/>
+        <enum value="0x80000000" name="GL_MULTISAMPLE_BUFFER_BIT7_QCOM"/>
+    </enums>
+
+    <enums namespace="GL" group="FfdMaskSGIX" type="bitmask">
+        <enum value="0x00000001" name="GL_TEXTURE_DEFORMATION_BIT_SGIX"/>
+        <enum value="0x00000002" name="GL_GEOMETRY_DEFORMATION_BIT_SGIX"/>
+    </enums>
+
+    <!-- Non-bitmask enums with their own namespace. Generally small numbers
+         used for indexed access. -->
+
+    <enums namespace="GL" group="TriangleListSUN" vendor="SUN">
+        <enum value="0x0001" name="GL_RESTART_SUN"/>
+        <enum value="0x0002" name="GL_REPLACE_MIDDLE_SUN"/>
+        <enum value="0x0003" name="GL_REPLACE_OLDEST_SUN"/>
+    </enums>
+
+    <enums namespace="GL" group="MapTextureFormatINTEL" vendor="INTEL" comment="Texture memory layouts for INTEL_map_texture">
+        <enum value="0" name="GL_LAYOUT_DEFAULT_INTEL"/>
+        <enum value="1" name="GL_LAYOUT_LINEAR_INTEL"/>
+        <enum value="2" name="GL_LAYOUT_LINEAR_CPU_CACHED_INTEL"/>
+    </enums>
+
+    <enums namespace="GL" group="TransformFeedbackTokenNV" vendor="NV" comment="For NV_transform_feedback. No clue why small negative values are used">
+        <enum value="-2" name="GL_NEXT_BUFFER_NV"/>
+        <enum value="-3" name="GL_SKIP_COMPONENTS4_NV"/>
+        <enum value="-4" name="GL_SKIP_COMPONENTS3_NV"/>
+        <enum value="-5" name="GL_SKIP_COMPONENTS2_NV"/>
+        <enum value="-6" name="GL_SKIP_COMPONENTS1_NV"/>
+    </enums>
+
+    <enums namespace="GL" group="PathRenderingTokenNV" vendor="NV">
+        <enum value="0x00" name="GL_CLOSE_PATH_NV"/>
+        <enum value="0x02" name="GL_MOVE_TO_NV"/>
+        <enum value="0x03" name="GL_RELATIVE_MOVE_TO_NV"/>
+        <enum value="0x04" name="GL_LINE_TO_NV"/>
+        <enum value="0x05" name="GL_RELATIVE_LINE_TO_NV"/>
+        <enum value="0x06" name="GL_HORIZONTAL_LINE_TO_NV"/>
+        <enum value="0x07" name="GL_RELATIVE_HORIZONTAL_LINE_TO_NV"/>
+        <enum value="0x08" name="GL_VERTICAL_LINE_TO_NV"/>
+        <enum value="0x09" name="GL_RELATIVE_VERTICAL_LINE_TO_NV"/>
+        <enum value="0x0A" name="GL_QUADRATIC_CURVE_TO_NV"/>
+        <enum value="0x0B" name="GL_RELATIVE_QUADRATIC_CURVE_TO_NV"/>
+        <enum value="0x0C" name="GL_CUBIC_CURVE_TO_NV"/>
+        <enum value="0x0D" name="GL_RELATIVE_CUBIC_CURVE_TO_NV"/>
+        <enum value="0x0E" name="GL_SMOOTH_QUADRATIC_CURVE_TO_NV"/>
+        <enum value="0x0F" name="GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV"/>
+        <enum value="0x10" name="GL_SMOOTH_CUBIC_CURVE_TO_NV"/>
+        <enum value="0x11" name="GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV"/>
+        <enum value="0x12" name="GL_SMALL_CCW_ARC_TO_NV"/>
+        <enum value="0x13" name="GL_RELATIVE_SMALL_CCW_ARC_TO_NV"/>
+        <enum value="0x14" name="GL_SMALL_CW_ARC_TO_NV"/>
+        <enum value="0x15" name="GL_RELATIVE_SMALL_CW_ARC_TO_NV"/>
+        <enum value="0x16" name="GL_LARGE_CCW_ARC_TO_NV"/>
+        <enum value="0x17" name="GL_RELATIVE_LARGE_CCW_ARC_TO_NV"/>
+        <enum value="0x18" name="GL_LARGE_CW_ARC_TO_NV"/>
+        <enum value="0x19" name="GL_RELATIVE_LARGE_CW_ARC_TO_NV"/>
+        <enum value="0xF0" name="GL_RESTART_PATH_NV"/>
+        <enum value="0xF2" name="GL_DUP_FIRST_CUBIC_CURVE_TO_NV"/>
+        <enum value="0xF4" name="GL_DUP_LAST_CUBIC_CURVE_TO_NV"/>
+        <enum value="0xF6" name="GL_RECT_NV"/>
+        <enum value="0xF8" name="GL_CIRCULAR_CCW_ARC_TO_NV"/>
+        <enum value="0xFA" name="GL_CIRCULAR_CW_ARC_TO_NV"/>
+        <enum value="0xFC" name="GL_CIRCULAR_TANGENT_ARC_TO_NV"/>
+        <enum value="0xFE" name="GL_ARC_TO_NV"/>
+        <enum value="0xFF" name="GL_RELATIVE_ARC_TO_NV"/>
+    </enums>
+
+    <!-- The default ("API") enum namespace starts here. While some
+         assigned values may overlap, and different parts of the
+         namespace are reserved for different purposes, it is a single
+         namespace. The "class" attribute indicates some of the reserved
+         purposes but is by no means complete (and cannot be, since many
+         tokens are reused for different purposes in different
+         extensions and API versions). -->
+
+    <enums namespace="GL" group="SpecialNumbers" vendor="ARB" comment="Tokens whose numeric value is intrinsically meaningful">
+        <enum value="0" name="GL_FALSE"/>
+        <enum value="0" name="GL_NO_ERROR"/>
+        <enum value="0" name="GL_ZERO"/>
+        <enum value="0" name="GL_NONE"/>
+        <enum value="0" name="GL_NONE_OES"/>
+        <enum value="1" name="GL_TRUE"/>
+        <enum value="1" name="GL_ONE"/>
+        <enum value="0xFFFFFFFF" name="GL_INVALID_INDEX" type="u" comment="Tagged as uint"/>
+        <enum value="0xFFFFFFFFFFFFFFFF" name="GL_TIMEOUT_IGNORED" type="ull" comment="Tagged as uint64"/>
+        <enum value="0xFFFFFFFFFFFFFFFF" name="GL_TIMEOUT_IGNORED_APPLE" type="ull" comment="Tagged as uint64"/>
+        <enum value="1" name="GL_VERSION_ES_CL_1_0" comment="Not an API enum. API definition macro for ES 1.0/1.1 headers"/>
+        <enum value="1" name="GL_VERSION_ES_CM_1_1" comment="Not an API enum. API definition macro for ES 1.0/1.1 headers"/>
+        <enum value="1" name="GL_VERSION_ES_CL_1_1" comment="Not an API enum. API definition macro for ES 1.0/1.1 headers"/>
+    </enums>
+
+    <enums namespace="GL" start="0x0000" end="0x7FFF" vendor="ARB" comment="Mostly OpenGL 1.0/1.1 enum assignments. Unused ranges should generally remain unused.">
+        <enum value="0x0000" name="GL_POINTS"/>
+        <enum value="0x0001" name="GL_LINES"/>
+        <enum value="0x0002" name="GL_LINE_LOOP"/>
+        <enum value="0x0003" name="GL_LINE_STRIP"/>
+        <enum value="0x0004" name="GL_TRIANGLES"/>
+        <enum value="0x0005" name="GL_TRIANGLE_STRIP"/>
+        <enum value="0x0006" name="GL_TRIANGLE_FAN"/>
+        <enum value="0x0007" name="GL_QUADS"/>
+        <enum value="0x0007" name="GL_QUADS_EXT"/>                                           
+        <enum value="0x0008" name="GL_QUAD_STRIP"/>
+        <enum value="0x0009" name="GL_POLYGON"/>
+        <enum value="0x000A" name="GL_LINES_ADJACENCY"/>
+        <enum value="0x000A" name="GL_LINES_ADJACENCY_ARB"/>
+        <enum value="0x000A" name="GL_LINES_ADJACENCY_EXT"/>
+        <enum value="0x000B" name="GL_LINE_STRIP_ADJACENCY"/>
+        <enum value="0x000B" name="GL_LINE_STRIP_ADJACENCY_ARB"/>
+        <enum value="0x000B" name="GL_LINE_STRIP_ADJACENCY_EXT"/>
+        <enum value="0x000C" name="GL_TRIANGLES_ADJACENCY"/>
+        <enum value="0x000C" name="GL_TRIANGLES_ADJACENCY_ARB"/>
+        <enum value="0x000C" name="GL_TRIANGLES_ADJACENCY_EXT"/>
+        <enum value="0x000D" name="GL_TRIANGLE_STRIP_ADJACENCY"/>
+        <enum value="0x000D" name="GL_TRIANGLE_STRIP_ADJACENCY_ARB"/>
+        <enum value="0x000D" name="GL_TRIANGLE_STRIP_ADJACENCY_EXT"/>
+        <enum value="0x000E" name="GL_PATCHES"/>
+        <enum value="0x000E" name="GL_PATCHES_EXT"/>                                         
+            <unused start="0x000F" end="0x00FF" comment="Unused for PrimitiveType"/>
+        <enum value="0x0100" name="GL_ACCUM"/>
+        <enum value="0x0101" name="GL_LOAD"/>
+        <enum value="0x0102" name="GL_RETURN"/>
+        <enum value="0x0103" name="GL_MULT"/>
+        <enum value="0x0104" name="GL_ADD"/>
+            <unused start="0x0105" end="0x01FF" comment="Unused for AccumOp"/>
+        <enum value="0x0200" name="GL_NEVER"/>
+        <enum value="0x0201" name="GL_LESS"/>
+        <enum value="0x0202" name="GL_EQUAL"/>
+        <enum value="0x0203" name="GL_LEQUAL"/>
+        <enum value="0x0204" name="GL_GREATER"/>
+        <enum value="0x0205" name="GL_NOTEQUAL"/>
+        <enum value="0x0206" name="GL_GEQUAL"/>
+        <enum value="0x0207" name="GL_ALWAYS"/>
+            <unused start="0x0208" end="0x02FF" comment="Unused for AlphaFunction"/>
+        <enum value="0x0300" name="GL_SRC_COLOR"/>
+        <enum value="0x0301" name="GL_ONE_MINUS_SRC_COLOR"/>
+        <enum value="0x0302" name="GL_SRC_ALPHA"/>
+        <enum value="0x0303" name="GL_ONE_MINUS_SRC_ALPHA"/>
+        <enum value="0x0304" name="GL_DST_ALPHA"/>
+        <enum value="0x0305" name="GL_ONE_MINUS_DST_ALPHA"/>
+        <enum value="0x0306" name="GL_DST_COLOR"/>
+        <enum value="0x0307" name="GL_ONE_MINUS_DST_COLOR"/>
+        <enum value="0x0308" name="GL_SRC_ALPHA_SATURATE"/>
+            <unused start="0x0309" end="0x03FF" comment="Unused for BlendingFactor"/>
+        <enum value="0x0400" name="GL_FRONT_LEFT"/>
+        <enum value="0x0401" name="GL_FRONT_RIGHT"/>
+        <enum value="0x0402" name="GL_BACK_LEFT"/>
+        <enum value="0x0403" name="GL_BACK_RIGHT"/>
+        <enum value="0x0404" name="GL_FRONT"/>
+        <enum value="0x0405" name="GL_BACK"/>
+        <enum value="0x0406" name="GL_LEFT"/>
+        <enum value="0x0407" name="GL_RIGHT"/>
+        <enum value="0x0408" name="GL_FRONT_AND_BACK"/>
+        <enum value="0x0409" name="GL_AUX0"/>
+        <enum value="0x040A" name="GL_AUX1"/>
+        <enum value="0x040B" name="GL_AUX2"/>
+        <enum value="0x040C" name="GL_AUX3"/>
+            <unused start="0x040D" end="0x04FF" comment="Unused for DrawBufferMode"/>
+        <enum value="0x0500" name="GL_INVALID_ENUM"/>
+        <enum value="0x0501" name="GL_INVALID_VALUE"/>
+        <enum value="0x0502" name="GL_INVALID_OPERATION"/>
+        <enum value="0x0503" name="GL_STACK_OVERFLOW"/>
+        <enum value="0x0503" name="GL_STACK_OVERFLOW_KHR"/>
+        <enum value="0x0504" name="GL_STACK_UNDERFLOW"/>
+        <enum value="0x0504" name="GL_STACK_UNDERFLOW_KHR"/>
+        <enum value="0x0505" name="GL_OUT_OF_MEMORY"/>
+        <enum value="0x0506" name="GL_INVALID_FRAMEBUFFER_OPERATION"/>
+        <enum value="0x0506" name="GL_INVALID_FRAMEBUFFER_OPERATION_EXT"/>
+        <enum value="0x0506" name="GL_INVALID_FRAMEBUFFER_OPERATION_OES"/>
+            <unused start="0x0507" end="0x05FF" comment="Unused for ErrorCode"/>
+        <enum value="0x0600" name="GL_2D"/>
+        <enum value="0x0601" name="GL_3D"/>
+        <enum value="0x0602" name="GL_3D_COLOR"/>
+        <enum value="0x0603" name="GL_3D_COLOR_TEXTURE"/>
+        <enum value="0x0604" name="GL_4D_COLOR_TEXTURE"/>
+            <unused start="0x0605" end="0x06FF" comment="Unused for FeedbackType"/>
+        <enum value="0x0700" name="GL_PASS_THROUGH_TOKEN"/>
+        <enum value="0x0701" name="GL_POINT_TOKEN"/>
+        <enum value="0x0702" name="GL_LINE_TOKEN"/>
+        <enum value="0x0703" name="GL_POLYGON_TOKEN"/>
+        <enum value="0x0704" name="GL_BITMAP_TOKEN"/>
+        <enum value="0x0705" name="GL_DRAW_PIXEL_TOKEN"/>
+        <enum value="0x0706" name="GL_COPY_PIXEL_TOKEN"/>
+        <enum value="0x0707" name="GL_LINE_RESET_TOKEN"/>
+            <unused start="0x0708" end="0x07FF" comment="Unused for FeedbackToken"/>
+        <enum value="0x0800" name="GL_EXP"/>
+        <enum value="0x0801" name="GL_EXP2"/>
+            <unused start="0x0802" end="0x08FF" comment="Unused for FogMode"/>
+        <enum value="0x0900" name="GL_CW"/>
+        <enum value="0x0901" name="GL_CCW"/>
+            <unused start="0x0902" end="0x09FF" comment="Unused for FrontFaceDirection"/>
+        <enum value="0x0A00" name="GL_COEFF"/>
+        <enum value="0x0A01" name="GL_ORDER"/>
+        <enum value="0x0A02" name="GL_DOMAIN"/>
+            <unused start="0x0A03" end="0x0AFF" comment="Unused for GetMapQuery"/>
+        <enum value="0x0B00" name="GL_CURRENT_COLOR"/>
+        <enum value="0x0B01" name="GL_CURRENT_INDEX"/>
+        <enum value="0x0B02" name="GL_CURRENT_NORMAL"/>
+        <enum value="0x0B03" name="GL_CURRENT_TEXTURE_COORDS"/>
+        <enum value="0x0B04" name="GL_CURRENT_RASTER_COLOR"/>
+        <enum value="0x0B05" name="GL_CURRENT_RASTER_INDEX"/>
+        <enum value="0x0B06" name="GL_CURRENT_RASTER_TEXTURE_COORDS"/>
+        <enum value="0x0B07" name="GL_CURRENT_RASTER_POSITION"/>
+        <enum value="0x0B08" name="GL_CURRENT_RASTER_POSITION_VALID"/>
+        <enum value="0x0B09" name="GL_CURRENT_RASTER_DISTANCE"/>
+
+        <enum value="0x0B10" name="GL_POINT_SMOOTH"/>
+        <enum value="0x0B11" name="GL_POINT_SIZE"/>
+        <enum value="0x0B12" name="GL_POINT_SIZE_RANGE"/>
+        <enum value="0x0B12" name="GL_SMOOTH_POINT_SIZE_RANGE" alias="GL_POINT_SIZE_RANGE"/>
+        <enum value="0x0B13" name="GL_POINT_SIZE_GRANULARITY"/>
+        <enum value="0x0B13" name="GL_SMOOTH_POINT_SIZE_GRANULARITY" alias="GL_POINT_SIZE_GRANULARITY"/>
+
+        <enum value="0x0B20" name="GL_LINE_SMOOTH"/>
+        <enum value="0x0B21" name="GL_LINE_WIDTH"/>
+        <enum value="0x0B22" name="GL_LINE_WIDTH_RANGE"/>
+        <enum value="0x0B22" name="GL_SMOOTH_LINE_WIDTH_RANGE" alias="GL_LINE_WIDTH_RANGE"/>
+        <enum value="0x0B23" name="GL_LINE_WIDTH_GRANULARITY"/>
+        <enum value="0x0B23" name="GL_SMOOTH_LINE_WIDTH_GRANULARITY" alias="GL_LINE_WIDTH_GRANULARITY"/>
+        <enum value="0x0B24" name="GL_LINE_STIPPLE"/>
+        <enum value="0x0B25" name="GL_LINE_STIPPLE_PATTERN"/>
+        <enum value="0x0B26" name="GL_LINE_STIPPLE_REPEAT"/>
+
+        <enum value="0x0B30" name="GL_LIST_MODE"/>
+        <enum value="0x0B31" name="GL_MAX_LIST_NESTING"/>
+        <enum value="0x0B32" name="GL_LIST_BASE"/>
+        <enum value="0x0B33" name="GL_LIST_INDEX"/>
+
+        <enum value="0x0B40" name="GL_POLYGON_MODE"/>
+        <enum value="0x0B41" name="GL_POLYGON_SMOOTH"/>
+        <enum value="0x0B42" name="GL_POLYGON_STIPPLE"/>
+        <enum value="0x0B43" name="GL_EDGE_FLAG"/>
+        <enum value="0x0B44" name="GL_CULL_FACE"/>
+        <enum value="0x0B45" name="GL_CULL_FACE_MODE"/>
+        <enum value="0x0B46" name="GL_FRONT_FACE"/>
+
+        <enum value="0x0B50" name="GL_LIGHTING"/>
+        <enum value="0x0B51" name="GL_LIGHT_MODEL_LOCAL_VIEWER"/>
+        <enum value="0x0B52" name="GL_LIGHT_MODEL_TWO_SIDE"/>
+        <enum value="0x0B53" name="GL_LIGHT_MODEL_AMBIENT"/>
+        <enum value="0x0B54" name="GL_SHADE_MODEL"/>
+        <enum value="0x0B55" name="GL_COLOR_MATERIAL_FACE"/>
+        <enum value="0x0B56" name="GL_COLOR_MATERIAL_PARAMETER"/>
+        <enum value="0x0B57" name="GL_COLOR_MATERIAL"/>
+
+        <enum value="0x0B60" name="GL_FOG"/>
+        <enum value="0x0B61" name="GL_FOG_INDEX"/>
+        <enum value="0x0B62" name="GL_FOG_DENSITY"/>
+        <enum value="0x0B63" name="GL_FOG_START"/>
+        <enum value="0x0B64" name="GL_FOG_END"/>
+        <enum value="0x0B65" name="GL_FOG_MODE"/>
+        <enum value="0x0B66" name="GL_FOG_COLOR"/>
+
+        <enum value="0x0B70" name="GL_DEPTH_RANGE"/>
+        <enum value="0x0B71" name="GL_DEPTH_TEST"/>
+        <enum value="0x0B72" name="GL_DEPTH_WRITEMASK"/>
+        <enum value="0x0B73" name="GL_DEPTH_CLEAR_VALUE"/>
+        <enum value="0x0B74" name="GL_DEPTH_FUNC"/>
+
+        <enum value="0x0B80" name="GL_ACCUM_CLEAR_VALUE"/>
+
+        <enum value="0x0B90" name="GL_STENCIL_TEST"/>
+        <enum value="0x0B91" name="GL_STENCIL_CLEAR_VALUE"/>
+        <enum value="0x0B92" name="GL_STENCIL_FUNC"/>
+        <enum value="0x0B93" name="GL_STENCIL_VALUE_MASK"/>
+        <enum value="0x0B94" name="GL_STENCIL_FAIL"/>
+        <enum value="0x0B95" name="GL_STENCIL_PASS_DEPTH_FAIL"/>
+        <enum value="0x0B96" name="GL_STENCIL_PASS_DEPTH_PASS"/>
+        <enum value="0x0B97" name="GL_STENCIL_REF"/>
+        <enum value="0x0B98" name="GL_STENCIL_WRITEMASK"/>
+
+        <enum value="0x0BA0" name="GL_MATRIX_MODE"/>
+        <enum value="0x0BA1" name="GL_NORMALIZE"/>
+        <enum value="0x0BA2" name="GL_VIEWPORT"/>
+        <enum value="0x0BA3" name="GL_MODELVIEW_STACK_DEPTH"/>
+        <enum value="0x0BA3" name="GL_MODELVIEW0_STACK_DEPTH_EXT"/>
+        <enum value="0x0BA4" name="GL_PROJECTION_STACK_DEPTH"/>
+        <enum value="0x0BA5" name="GL_TEXTURE_STACK_DEPTH"/>
+        <enum value="0x0BA6" name="GL_MODELVIEW_MATRIX"/>
+        <enum value="0x0BA6" name="GL_MODELVIEW0_MATRIX_EXT"/>
+        <enum value="0x0BA7" name="GL_PROJECTION_MATRIX"/>
+        <enum value="0x0BA8" name="GL_TEXTURE_MATRIX"/>
+
+        <enum value="0x0BB0" name="GL_ATTRIB_STACK_DEPTH"/>
+        <enum value="0x0BB1" name="GL_CLIENT_ATTRIB_STACK_DEPTH"/>
+
+        <enum value="0x0BC0" name="GL_ALPHA_TEST"/>
+        <enum value="0x0BC0" name="GL_ALPHA_TEST_QCOM"/>
+        <enum value="0x0BC1" name="GL_ALPHA_TEST_FUNC"/>
+        <enum value="0x0BC1" name="GL_ALPHA_TEST_FUNC_QCOM"/>
+        <enum value="0x0BC2" name="GL_ALPHA_TEST_REF"/>
+        <enum value="0x0BC2" name="GL_ALPHA_TEST_REF_QCOM"/>
+
+        <enum value="0x0BD0" name="GL_DITHER"/>
+
+        <enum value="0x0BE0" name="GL_BLEND_DST"/>
+        <enum value="0x0BE1" name="GL_BLEND_SRC"/>
+        <enum value="0x0BE2" name="GL_BLEND"/>
+
+        <enum value="0x0BF0" name="GL_LOGIC_OP_MODE"/>
+        <enum value="0x0BF1" name="GL_INDEX_LOGIC_OP"/>
+        <enum value="0x0BF1" name="GL_LOGIC_OP"/>
+        <enum value="0x0BF2" name="GL_COLOR_LOGIC_OP"/>
+
+        <enum value="0x0C00" name="GL_AUX_BUFFERS"/>
+        <enum value="0x0C01" name="GL_DRAW_BUFFER"/>
+        <enum value="0x0C01" name="GL_DRAW_BUFFER_EXT"/>
+        <enum value="0x0C02" name="GL_READ_BUFFER"/>
+        <enum value="0x0C02" name="GL_READ_BUFFER_EXT"/>
+        <enum value="0x0C02" name="GL_READ_BUFFER_NV"/>
+
+        <enum value="0x0C10" name="GL_SCISSOR_BOX"/>
+        <enum value="0x0C11" name="GL_SCISSOR_TEST"/>
+
+        <enum value="0x0C20" name="GL_INDEX_CLEAR_VALUE"/>
+        <enum value="0x0C21" name="GL_INDEX_WRITEMASK"/>
+        <enum value="0x0C22" name="GL_COLOR_CLEAR_VALUE"/>
+        <enum value="0x0C23" name="GL_COLOR_WRITEMASK"/>
+
+        <enum value="0x0C30" name="GL_INDEX_MODE"/>
+        <enum value="0x0C31" name="GL_RGBA_MODE"/>
+        <enum value="0x0C32" name="GL_DOUBLEBUFFER"/>
+        <enum value="0x0C33" name="GL_STEREO"/>
+
+        <enum value="0x0C40" name="GL_RENDER_MODE"/>
+
+        <enum value="0x0C50" name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+        <enum value="0x0C51" name="GL_POINT_SMOOTH_HINT"/>
+        <enum value="0x0C52" name="GL_LINE_SMOOTH_HINT"/>
+        <enum value="0x0C53" name="GL_POLYGON_SMOOTH_HINT"/>
+        <enum value="0x0C54" name="GL_FOG_HINT"/>
+
+        <enum value="0x0C60" name="GL_TEXTURE_GEN_S"/>
+        <enum value="0x0C61" name="GL_TEXTURE_GEN_T"/>
+        <enum value="0x0C62" name="GL_TEXTURE_GEN_R"/>
+        <enum value="0x0C63" name="GL_TEXTURE_GEN_Q"/>
+
+        <enum value="0x0C70" name="GL_PIXEL_MAP_I_TO_I"/>
+        <enum value="0x0C71" name="GL_PIXEL_MAP_S_TO_S"/>
+        <enum value="0x0C72" name="GL_PIXEL_MAP_I_TO_R"/>
+        <enum value="0x0C73" name="GL_PIXEL_MAP_I_TO_G"/>
+        <enum value="0x0C74" name="GL_PIXEL_MAP_I_TO_B"/>
+        <enum value="0x0C75" name="GL_PIXEL_MAP_I_TO_A"/>
+        <enum value="0x0C76" name="GL_PIXEL_MAP_R_TO_R"/>
+        <enum value="0x0C77" name="GL_PIXEL_MAP_G_TO_G"/>
+        <enum value="0x0C78" name="GL_PIXEL_MAP_B_TO_B"/>
+        <enum value="0x0C79" name="GL_PIXEL_MAP_A_TO_A"/>
+
+        <enum value="0x0CB0" name="GL_PIXEL_MAP_I_TO_I_SIZE"/>
+        <enum value="0x0CB1" name="GL_PIXEL_MAP_S_TO_S_SIZE"/>
+        <enum value="0x0CB2" name="GL_PIXEL_MAP_I_TO_R_SIZE"/>
+        <enum value="0x0CB3" name="GL_PIXEL_MAP_I_TO_G_SIZE"/>
+        <enum value="0x0CB4" name="GL_PIXEL_MAP_I_TO_B_SIZE"/>
+        <enum value="0x0CB5" name="GL_PIXEL_MAP_I_TO_A_SIZE"/>
+        <enum value="0x0CB6" name="GL_PIXEL_MAP_R_TO_R_SIZE"/>
+        <enum value="0x0CB7" name="GL_PIXEL_MAP_G_TO_G_SIZE"/>
+        <enum value="0x0CB8" name="GL_PIXEL_MAP_B_TO_B_SIZE"/>
+        <enum value="0x0CB9" name="GL_PIXEL_MAP_A_TO_A_SIZE"/>
+
+        <enum value="0x0CF0" name="GL_UNPACK_SWAP_BYTES"/>
+        <enum value="0x0CF1" name="GL_UNPACK_LSB_FIRST"/>
+        <enum value="0x0CF2" name="GL_UNPACK_ROW_LENGTH"/>
+        <enum value="0x0CF2" name="GL_UNPACK_ROW_LENGTH_EXT"/>
+        <enum value="0x0CF3" name="GL_UNPACK_SKIP_ROWS"/>
+        <enum value="0x0CF3" name="GL_UNPACK_SKIP_ROWS_EXT"/>
+        <enum value="0x0CF4" name="GL_UNPACK_SKIP_PIXELS"/>
+        <enum value="0x0CF4" name="GL_UNPACK_SKIP_PIXELS_EXT"/>
+        <enum value="0x0CF5" name="GL_UNPACK_ALIGNMENT"/>
+
+        <enum value="0x0D00" name="GL_PACK_SWAP_BYTES"/>
+        <enum value="0x0D01" name="GL_PACK_LSB_FIRST"/>
+        <enum value="0x0D02" name="GL_PACK_ROW_LENGTH"/>
+        <enum value="0x0D03" name="GL_PACK_SKIP_ROWS"/>
+        <enum value="0x0D04" name="GL_PACK_SKIP_PIXELS"/>
+        <enum value="0x0D05" name="GL_PACK_ALIGNMENT"/>
+
+        <enum value="0x0D10" name="GL_MAP_COLOR"/>
+        <enum value="0x0D11" name="GL_MAP_STENCIL"/>
+        <enum value="0x0D12" name="GL_INDEX_SHIFT"/>
+        <enum value="0x0D13" name="GL_INDEX_OFFSET"/>
+        <enum value="0x0D14" name="GL_RED_SCALE"/>
+        <enum value="0x0D15" name="GL_RED_BIAS"/>
+        <enum value="0x0D16" name="GL_ZOOM_X"/>
+        <enum value="0x0D17" name="GL_ZOOM_Y"/>
+        <enum value="0x0D18" name="GL_GREEN_SCALE"/>
+        <enum value="0x0D19" name="GL_GREEN_BIAS"/>
+        <enum value="0x0D1A" name="GL_BLUE_SCALE"/>
+        <enum value="0x0D1B" name="GL_BLUE_BIAS"/>
+        <enum value="0x0D1C" name="GL_ALPHA_SCALE"/>
+        <enum value="0x0D1D" name="GL_ALPHA_BIAS"/>
+        <enum value="0x0D1E" name="GL_DEPTH_SCALE"/>
+        <enum value="0x0D1F" name="GL_DEPTH_BIAS"/>
+
+        <enum value="0x0D30" name="GL_MAX_EVAL_ORDER"/>
+        <enum value="0x0D31" name="GL_MAX_LIGHTS"/>
+        <enum value="0x0D32" name="GL_MAX_CLIP_PLANES"/>
+        <enum value="0x0D32" name="GL_MAX_CLIP_PLANES_IMG"/>
+        <enum value="0x0D32" name="GL_MAX_CLIP_DISTANCES" alias="GL_MAX_CLIP_PLANES"/>
+        <enum value="0x0D33" name="GL_MAX_TEXTURE_SIZE"/>
+        <enum value="0x0D34" name="GL_MAX_PIXEL_MAP_TABLE"/>
+        <enum value="0x0D35" name="GL_MAX_ATTRIB_STACK_DEPTH"/>
+        <enum value="0x0D36" name="GL_MAX_MODELVIEW_STACK_DEPTH"/>
+        <enum value="0x0D37" name="GL_MAX_NAME_STACK_DEPTH"/>
+        <enum value="0x0D38" name="GL_MAX_PROJECTION_STACK_DEPTH"/>
+        <enum value="0x0D39" name="GL_MAX_TEXTURE_STACK_DEPTH"/>
+        <enum value="0x0D3A" name="GL_MAX_VIEWPORT_DIMS"/>
+        <enum value="0x0D3B" name="GL_MAX_CLIENT_ATTRIB_STACK_DEPTH"/>
+
+        <enum value="0x0D50" name="GL_SUBPIXEL_BITS"/>
+        <enum value="0x0D51" name="GL_INDEX_BITS"/>
+        <enum value="0x0D52" name="GL_RED_BITS"/>
+        <enum value="0x0D53" name="GL_GREEN_BITS"/>
+        <enum value="0x0D54" name="GL_BLUE_BITS"/>
+        <enum value="0x0D55" name="GL_ALPHA_BITS"/>
+        <enum value="0x0D56" name="GL_DEPTH_BITS"/>
+        <enum value="0x0D57" name="GL_STENCIL_BITS"/>
+        <enum value="0x0D58" name="GL_ACCUM_RED_BITS"/>
+        <enum value="0x0D59" name="GL_ACCUM_GREEN_BITS"/>
+        <enum value="0x0D5A" name="GL_ACCUM_BLUE_BITS"/>
+        <enum value="0x0D5B" name="GL_ACCUM_ALPHA_BITS"/>
+
+        <enum value="0x0D70" name="GL_NAME_STACK_DEPTH"/>
+
+        <enum value="0x0D80" name="GL_AUTO_NORMAL"/>
+
+        <enum value="0x0D90" name="GL_MAP1_COLOR_4"/>
+        <enum value="0x0D91" name="GL_MAP1_INDEX"/>
+        <enum value="0x0D92" name="GL_MAP1_NORMAL"/>
+        <enum value="0x0D93" name="GL_MAP1_TEXTURE_COORD_1"/>
+        <enum value="0x0D94" name="GL_MAP1_TEXTURE_COORD_2"/>
+        <enum value="0x0D95" name="GL_MAP1_TEXTURE_COORD_3"/>
+        <enum value="0x0D96" name="GL_MAP1_TEXTURE_COORD_4"/>
+        <enum value="0x0D97" name="GL_MAP1_VERTEX_3"/>
+        <enum value="0x0D98" name="GL_MAP1_VERTEX_4"/>
+
+        <enum value="0x0DB0" name="GL_MAP2_COLOR_4"/>
+        <enum value="0x0DB1" name="GL_MAP2_INDEX"/>
+        <enum value="0x0DB2" name="GL_MAP2_NORMAL"/>
+        <enum value="0x0DB3" name="GL_MAP2_TEXTURE_COORD_1"/>
+        <enum value="0x0DB4" name="GL_MAP2_TEXTURE_COORD_2"/>
+        <enum value="0x0DB5" name="GL_MAP2_TEXTURE_COORD_3"/>
+        <enum value="0x0DB6" name="GL_MAP2_TEXTURE_COORD_4"/>
+        <enum value="0x0DB7" name="GL_MAP2_VERTEX_3"/>
+        <enum value="0x0DB8" name="GL_MAP2_VERTEX_4"/>
+
+        <enum value="0x0DD0" name="GL_MAP1_GRID_DOMAIN"/>
+        <enum value="0x0DD1" name="GL_MAP1_GRID_SEGMENTS"/>
+        <enum value="0x0DD2" name="GL_MAP2_GRID_DOMAIN"/>
+        <enum value="0x0DD3" name="GL_MAP2_GRID_SEGMENTS"/>
+
+        <enum value="0x0DE0" name="GL_TEXTURE_1D"/>
+        <enum value="0x0DE1" name="GL_TEXTURE_2D"/>
+
+        <enum value="0x0DF0" name="GL_FEEDBACK_BUFFER_POINTER"/>
+        <enum value="0x0DF1" name="GL_FEEDBACK_BUFFER_SIZE"/>
+        <enum value="0x0DF2" name="GL_FEEDBACK_BUFFER_TYPE"/>
+        <enum value="0x0DF3" name="GL_SELECTION_BUFFER_POINTER"/>
+        <enum value="0x0DF4" name="GL_SELECTION_BUFFER_SIZE"/>
+            <unused start="0x0DF5" end="0xFFFF" comment="Unused for GetPName"/>
+        <enum value="0x1000" name="GL_TEXTURE_WIDTH"/>
+        <enum value="0x1001" name="GL_TEXTURE_HEIGHT"/>
+        <enum value="0x1003" name="GL_TEXTURE_INTERNAL_FORMAT"/>
+        <enum value="0x1003" name="GL_TEXTURE_COMPONENTS"/>
+        <enum value="0x1004" name="GL_TEXTURE_BORDER_COLOR"/>
+        <enum value="0x1004" name="GL_TEXTURE_BORDER_COLOR_EXT"/>
+        <enum value="0x1004" name="GL_TEXTURE_BORDER_COLOR_NV"/>
+        <enum value="0x1005" name="GL_TEXTURE_BORDER"/>
+            <unused start="0x1006" end="0x10FF" comment="Unused for GetTextureParameter"/>
+        <enum value="0x1100" name="GL_DONT_CARE"/>
+        <enum value="0x1101" name="GL_FASTEST"/>
+        <enum value="0x1102" name="GL_NICEST"/>
+            <unused start="0x1103" end="0x11FF" comment="Unused for HintMode"/>
+        <enum value="0x1200" name="GL_AMBIENT"/>
+        <enum value="0x1201" name="GL_DIFFUSE"/>
+        <enum value="0x1202" name="GL_SPECULAR"/>
+        <enum value="0x1203" name="GL_POSITION"/>
+        <enum value="0x1204" name="GL_SPOT_DIRECTION"/>
+        <enum value="0x1205" name="GL_SPOT_EXPONENT"/>
+        <enum value="0x1206" name="GL_SPOT_CUTOFF"/>
+        <enum value="0x1207" name="GL_CONSTANT_ATTENUATION"/>
+        <enum value="0x1208" name="GL_LINEAR_ATTENUATION"/>
+        <enum value="0x1209" name="GL_QUADRATIC_ATTENUATION"/>
+            <unused start="0x1210" end="0x12FF" comment="Unused for LightParameter"/>
+        <enum value="0x1300" name="GL_COMPILE"/>
+        <enum value="0x1301" name="GL_COMPILE_AND_EXECUTE"/>
+            <unused start="0x1302" end="0x13FF" comment="Unused for ListMode"/>
+        <enum value="0x1400" name="GL_BYTE"/>
+        <enum value="0x1401" name="GL_UNSIGNED_BYTE"/>
+        <enum value="0x1402" name="GL_SHORT"/>
+        <enum value="0x1403" name="GL_UNSIGNED_SHORT"/>
+        <enum value="0x1404" name="GL_INT"/>
+        <enum value="0x1405" name="GL_UNSIGNED_INT"/>
+        <enum value="0x1406" name="GL_FLOAT"/>
+        <enum value="0x1407" name="GL_2_BYTES"/>
+        <enum value="0x1408" name="GL_3_BYTES"/>
+        <enum value="0x1409" name="GL_4_BYTES"/>
+        <enum value="0x140A" name="GL_DOUBLE"/>
+        <enum value="0x140A" name="GL_DOUBLE_EXT"/>
+        <enum value="0x140B" name="GL_HALF_FLOAT"/>
+        <enum value="0x140B" name="GL_HALF_FLOAT_ARB"/>
+        <enum value="0x140B" name="GL_HALF_FLOAT_NV"/>
+        <enum value="0x140B" name="GL_HALF_APPLE"/>
+        <enum value="0x140C" name="GL_FIXED"/>
+        <enum value="0x140C" name="GL_FIXED_OES"/>
+            <unused start="0x140D" comment="Leave gap to preserve even/odd int/uint token values"/>
+        <enum value="0x140E" name="GL_INT64_NV"/>
+        <enum value="0x140F" name="GL_UNSIGNED_INT64_ARB"/>
+        <enum value="0x140F" name="GL_UNSIGNED_INT64_NV"/>
+            <unused start="0x1410" end="0x14FF" comment="Unused for DataType"/>
+        <enum value="0x1500" name="GL_CLEAR"/>
+        <enum value="0x1501" name="GL_AND"/>
+        <enum value="0x1502" name="GL_AND_REVERSE"/>
+        <enum value="0x1503" name="GL_COPY"/>
+        <enum value="0x1504" name="GL_AND_INVERTED"/>
+        <enum value="0x1505" name="GL_NOOP"/>
+        <enum value="0x1506" name="GL_XOR"/>
+        <enum value="0x1506" name="GL_XOR_NV"/>
+        <enum value="0x1507" name="GL_OR"/>
+        <enum value="0x1508" name="GL_NOR"/>
+        <enum value="0x1509" name="GL_EQUIV"/>
+        <enum value="0x150A" name="GL_INVERT"/>
+        <enum value="0x150B" name="GL_OR_REVERSE"/>
+        <enum value="0x150C" name="GL_COPY_INVERTED"/>
+        <enum value="0x150D" name="GL_OR_INVERTED"/>
+        <enum value="0x150E" name="GL_NAND"/>
+        <enum value="0x150F" name="GL_SET"/>
+            <unused start="0x1510" end="0x15FF" comment="Unused for LogicOp"/>
+        <enum value="0x1600" name="GL_EMISSION"/>
+        <enum value="0x1601" name="GL_SHININESS"/>
+        <enum value="0x1602" name="GL_AMBIENT_AND_DIFFUSE"/>
+        <enum value="0x1603" name="GL_COLOR_INDEXES"/>
+            <unused start="0x1604" end="0x16FF" comment="Unused for MaterialParameter"/>
+        <enum value="0x1700" name="GL_MODELVIEW"/>
+        <enum value="0x1700" name="GL_MODELVIEW0_ARB"/>
+        <enum value="0x1700" name="GL_MODELVIEW0_EXT"/>
+        <enum value="0x1701" name="GL_PROJECTION"/>
+        <enum value="0x1702" name="GL_TEXTURE"/>
+            <unused start="0x1703" end="0x17FF" comment="Unused for MatrixMode"/>
+        <enum value="0x1800" name="GL_COLOR"/>
+        <enum value="0x1800" name="GL_COLOR_EXT"/>
+        <enum value="0x1801" name="GL_DEPTH"/>
+        <enum value="0x1801" name="GL_DEPTH_EXT"/>
+        <enum value="0x1802" name="GL_STENCIL"/>
+        <enum value="0x1802" name="GL_STENCIL_EXT"/>
+            <unused start="0x1803" end="0x18FF" comment="Unused for PixelCopyType"/>
+        <enum value="0x1900" name="GL_COLOR_INDEX"/>
+        <enum value="0x1901" name="GL_STENCIL_INDEX"/>
+        <enum value="0x1901" name="GL_STENCIL_INDEX_OES"/>
+        <enum value="0x1902" name="GL_DEPTH_COMPONENT"/>
+        <enum value="0x1903" name="GL_RED"/>
+        <enum value="0x1903" name="GL_RED_EXT"/>
+        <enum value="0x1903" name="GL_RED_NV"/>
+        <enum value="0x1904" name="GL_GREEN"/>
+        <enum value="0x1904" name="GL_GREEN_NV"/>
+        <enum value="0x1905" name="GL_BLUE"/>
+        <enum value="0x1905" name="GL_BLUE_NV"/>
+        <enum value="0x1906" name="GL_ALPHA"/>
+        <enum value="0x1907" name="GL_RGB"/>
+        <enum value="0x1908" name="GL_RGBA"/>
+        <enum value="0x1909" name="GL_LUMINANCE"/>
+        <enum value="0x190A" name="GL_LUMINANCE_ALPHA"/>
+            <unused start="0x1910" end="0x19FF" comment="Unused for PixelFormat"/>
+        <enum value="0x1A00" name="GL_BITMAP"/>
+            <unused start="0x1A01" end="0x1AFF" comment="Unused for PixelType"/>
+        <enum value="0x1B00" name="GL_POINT"/>
+        <enum value="0x1B01" name="GL_LINE"/>
+        <enum value="0x1B02" name="GL_FILL"/>
+            <unused start="0x1B03" end="0x1BFF" comment="Unused for PolygonMode"/>
+        <enum value="0x1C00" name="GL_RENDER"/>
+        <enum value="0x1C01" name="GL_FEEDBACK"/>
+        <enum value="0x1C02" name="GL_SELECT"/>
+            <unused start="0x1C03" end="0x1CFF" comment="Unused for RenderingMode"/>
+        <enum value="0x1D00" name="GL_FLAT"/>
+        <enum value="0x1D01" name="GL_SMOOTH"/>
+            <unused start="0x1D02" end="0x1DFF" comment="Unused for ShadingModel"/>
+        <enum value="0x1E00" name="GL_KEEP"/>
+        <enum value="0x1E01" name="GL_REPLACE"/>
+        <enum value="0x1E02" name="GL_INCR"/>
+        <enum value="0x1E03" name="GL_DECR"/>
+            <unused start="0x1E04" end="0x1EFF" comment="Unused for StencilOp"/>
+        <enum value="0x1F00" name="GL_VENDOR"/>
+        <enum value="0x1F01" name="GL_RENDERER"/>
+        <enum value="0x1F02" name="GL_VERSION"/>
+        <enum value="0x1F03" name="GL_EXTENSIONS"/>
+            <unused start="0x1F04" end="0x1FFF" comment="Unused for StringName"/>
+        <enum value="0x2000" name="GL_S"/>
+        <enum value="0x2001" name="GL_T"/>
+        <enum value="0x2002" name="GL_R"/>
+        <enum value="0x2003" name="GL_Q"/>
+            <unused start="0x2004" end="0x20FF" comment="Unused for TextureCoordName"/>
+        <enum value="0x2100" name="GL_MODULATE"/>
+        <enum value="0x2101" name="GL_DECAL"/>
+            <unused start="0x2102" end="0x21FF" comment="Unused for TextureEnvMode"/>
+        <enum value="0x2200" name="GL_TEXTURE_ENV_MODE"/>
+        <enum value="0x2201" name="GL_TEXTURE_ENV_COLOR"/>
+            <unused start="0x2202" end="0x22FF" comment="Unused for TextureEnvParameter"/>
+        <enum value="0x2300" name="GL_TEXTURE_ENV"/>
+            <unused start="0x2301" end="0x23FF" comment="Unused for TextureEnvTarget"/>
+        <enum value="0x2400" name="GL_EYE_LINEAR"/>
+        <enum value="0x2401" name="GL_OBJECT_LINEAR"/>
+        <enum value="0x2402" name="GL_SPHERE_MAP"/>
+            <unused start="0x2403" end="0x24FF" comment="Unused for TextureGenMode"/>
+        <enum value="0x2500" name="GL_TEXTURE_GEN_MODE"/>
+        <enum value="0x2500" name="GL_TEXTURE_GEN_MODE_OES"/>
+        <enum value="0x2501" name="GL_OBJECT_PLANE"/>
+        <enum value="0x2502" name="GL_EYE_PLANE"/>
+            <unused start="0x2503" end="0x25FF" comment="Unused for TextureGenParameter"/>
+        <enum value="0x2600" name="GL_NEAREST"/>
+        <enum value="0x2601" name="GL_LINEAR"/>
+            <unused start="0x2602" end="0x26FF" comment="Unused for TextureMagFilter"/>
+        <enum value="0x2700" name="GL_NEAREST_MIPMAP_NEAREST"/>
+        <enum value="0x2701" name="GL_LINEAR_MIPMAP_NEAREST"/>
+        <enum value="0x2702" name="GL_NEAREST_MIPMAP_LINEAR"/>
+        <enum value="0x2703" name="GL_LINEAR_MIPMAP_LINEAR"/>
+            <unused start="0x2704" end="0x27FF" comment="Unused for TextureMinFilter"/>
+        <enum value="0x2800" name="GL_TEXTURE_MAG_FILTER"/>
+        <enum value="0x2801" name="GL_TEXTURE_MIN_FILTER"/>
+        <enum value="0x2802" name="GL_TEXTURE_WRAP_S"/>
+        <enum value="0x2803" name="GL_TEXTURE_WRAP_T"/>
+            <unused start="0x2804" end="0x28FF" comment="Unused for TextureParameterName"/>
+        <enum value="0x2900" name="GL_CLAMP"/>
+        <enum value="0x2901" name="GL_REPEAT"/>
+            <unused start="0x2902" end="0x29FF" comment="Unused for TextureWrapMode"/>
+        <enum value="0x2A00" name="GL_POLYGON_OFFSET_UNITS"/>
+        <enum value="0x2A01" name="GL_POLYGON_OFFSET_POINT"/>
+        <enum value="0x2A02" name="GL_POLYGON_OFFSET_LINE"/>
+            <unused start="0x2A03" end="0x2A09" comment="Unused for PolygonOffset"/>
+        <enum value="0x2A10" name="GL_R3_G3_B2"/>
+            <unused start="0x2A11" end="0x2A1F" comment="Unused for InternalFormat"/>
+        <enum value="0x2A20" name="GL_V2F"/>
+        <enum value="0x2A21" name="GL_V3F"/>
+        <enum value="0x2A22" name="GL_C4UB_V2F"/>
+        <enum value="0x2A23" name="GL_C4UB_V3F"/>
+        <enum value="0x2A24" name="GL_C3F_V3F"/>
+        <enum value="0x2A25" name="GL_N3F_V3F"/>
+        <enum value="0x2A26" name="GL_C4F_N3F_V3F"/>
+        <enum value="0x2A27" name="GL_T2F_V3F"/>
+        <enum value="0x2A28" name="GL_T4F_V4F"/>
+        <enum value="0x2A29" name="GL_T2F_C4UB_V3F"/>
+        <enum value="0x2A2A" name="GL_T2F_C3F_V3F"/>
+        <enum value="0x2A2B" name="GL_T2F_N3F_V3F"/>
+        <enum value="0x2A2C" name="GL_T2F_C4F_N3F_V3F"/>
+        <enum value="0x2A2D" name="GL_T4F_C4F_N3F_V4F"/>
+            <unused start="0x2A2E" end="0x2FFF" comment="Unused for InterleavedArrayFormat"/>
+        <enum value="0x3000" name="GL_CLIP_PLANE0"/>
+        <enum value="0x3000" name="GL_CLIP_PLANE0_IMG"/>
+        <enum value="0x3000" name="GL_CLIP_DISTANCE0" alias="GL_CLIP_PLANE0"/>
+        <enum value="0x3001" name="GL_CLIP_PLANE1"/>
+        <enum value="0x3001" name="GL_CLIP_PLANE1_IMG"/>
+        <enum value="0x3001" name="GL_CLIP_DISTANCE1" alias="GL_CLIP_PLANE1"/>
+        <enum value="0x3002" name="GL_CLIP_PLANE2"/>
+        <enum value="0x3002" name="GL_CLIP_PLANE2_IMG"/>
+        <enum value="0x3002" name="GL_CLIP_DISTANCE2" alias="GL_CLIP_PLANE2"/>
+        <enum value="0x3003" name="GL_CLIP_PLANE3"/>
+        <enum value="0x3003" name="GL_CLIP_PLANE3_IMG"/>
+        <enum value="0x3003" name="GL_CLIP_DISTANCE3" alias="GL_CLIP_PLANE3"/>
+        <enum value="0x3004" name="GL_CLIP_PLANE4"/>
+        <enum value="0x3004" name="GL_CLIP_PLANE4_IMG"/>
+        <enum value="0x3004" name="GL_CLIP_DISTANCE4" alias="GL_CLIP_PLANE4"/>
+        <enum value="0x3005" name="GL_CLIP_PLANE5"/>
+        <enum value="0x3005" name="GL_CLIP_PLANE5_IMG"/>
+        <enum value="0x3005" name="GL_CLIP_DISTANCE5" alias="GL_CLIP_PLANE5"/>
+        <enum value="0x3006" name="GL_CLIP_DISTANCE6"/>
+        <enum value="0x3007" name="GL_CLIP_DISTANCE7"/>
+            <unused start="0x3008" end="0x3FFF" comment="Unused for ClipPlaneName"/>
+        <enum value="0x4000" name="GL_LIGHT0"/>
+        <enum value="0x4001" name="GL_LIGHT1"/>
+        <enum value="0x4002" name="GL_LIGHT2"/>
+        <enum value="0x4003" name="GL_LIGHT3"/>
+        <enum value="0x4004" name="GL_LIGHT4"/>
+        <enum value="0x4005" name="GL_LIGHT5"/>
+        <enum value="0x4006" name="GL_LIGHT6"/>
+        <enum value="0x4007" name="GL_LIGHT7"/>
+            <unused start="0x4008" end="0x4FFF" comment="Unused for LightName"/>
+            <unused start="0x5000" end="0x5FFF" comment="Unused. Do not use."/>
+            <unused start="0x6000" end="0x6FFF" comment="Experimental (internal/test only) range. DO NOT SHIP VALUES IN THIS RANGE."/>
+            <unused start="0x7000" end="0x7FFF" comment="Unused. Do not use."/>
+    </enums>
+
+    <enums namespace="GL" start="0x8000" end="0x80BF" vendor="SGI" comment="The primary GL enumerant space begins here. All modern                     enum allocations are in this range. These enums are                     mostly assigned the default class since it's a great                     deal of not very useful work to be more specific"/>
+
+    <enums namespace="GL" vendor="ARB">
+        <enum value="0x8000" name="GL_ABGR_EXT"/>
+        <enum value="0x8001" name="GL_CONSTANT_COLOR"/>
+        <enum value="0x8001" name="GL_CONSTANT_COLOR_EXT"/>
+        <enum value="0x8002" name="GL_ONE_MINUS_CONSTANT_COLOR"/>
+        <enum value="0x8002" name="GL_ONE_MINUS_CONSTANT_COLOR_EXT"/>
+        <enum value="0x8003" name="GL_CONSTANT_ALPHA"/>
+        <enum value="0x8003" name="GL_CONSTANT_ALPHA_EXT"/>
+        <enum value="0x8004" name="GL_ONE_MINUS_CONSTANT_ALPHA"/>
+        <enum value="0x8004" name="GL_ONE_MINUS_CONSTANT_ALPHA_EXT"/>
+        <enum value="0x8005" name="GL_BLEND_COLOR"/>
+        <enum value="0x8005" name="GL_BLEND_COLOR_EXT"/>
+        <enum value="0x8006" name="GL_FUNC_ADD"/>
+        <enum value="0x8006" name="GL_FUNC_ADD_EXT"/>
+        <enum value="0x8006" name="GL_FUNC_ADD_OES"/>
+        <enum value="0x8007" name="GL_MIN"/>
+        <enum value="0x8007" name="GL_MIN_EXT"/>
+        <enum value="0x8008" name="GL_MAX"/>
+        <enum value="0x8008" name="GL_MAX_EXT"/>
+        <enum value="0x8009" name="GL_BLEND_EQUATION"/>
+        <enum value="0x8009" name="GL_BLEND_EQUATION_EXT"/>
+        <enum value="0x8009" name="GL_BLEND_EQUATION_OES"/>
+        <enum value="0x8009" name="GL_BLEND_EQUATION_RGB"/>
+        <enum value="0x8009" name="GL_BLEND_EQUATION_RGB_EXT"/>
+        <enum value="0x8009" name="GL_BLEND_EQUATION_RGB_OES"/>
+        <enum value="0x800A" name="GL_FUNC_SUBTRACT"/>
+        <enum value="0x800A" name="GL_FUNC_SUBTRACT_EXT"/>
+        <enum value="0x800A" name="GL_FUNC_SUBTRACT_OES"/>
+        <enum value="0x800B" name="GL_FUNC_REVERSE_SUBTRACT"/>
+        <enum value="0x800B" name="GL_FUNC_REVERSE_SUBTRACT_EXT"/>
+        <enum value="0x800B" name="GL_FUNC_REVERSE_SUBTRACT_OES"/>
+        <enum value="0x800C" name="GL_CMYK_EXT"/>
+        <enum value="0x800D" name="GL_CMYKA_EXT"/>
+        <enum value="0x800E" name="GL_PACK_CMYK_HINT_EXT"/>
+        <enum value="0x800F" name="GL_UNPACK_CMYK_HINT_EXT"/>
+        <enum value="0x8010" name="GL_CONVOLUTION_1D"/>
+        <enum value="0x8010" name="GL_CONVOLUTION_1D_EXT"/>
+        <enum value="0x8011" name="GL_CONVOLUTION_2D"/>
+        <enum value="0x8011" name="GL_CONVOLUTION_2D_EXT"/>
+        <enum value="0x8012" name="GL_SEPARABLE_2D"/>
+        <enum value="0x8012" name="GL_SEPARABLE_2D_EXT"/>
+        <enum value="0x8013" name="GL_CONVOLUTION_BORDER_MODE"/>
+        <enum value="0x8013" name="GL_CONVOLUTION_BORDER_MODE_EXT"/>
+        <enum value="0x8014" name="GL_CONVOLUTION_FILTER_SCALE"/>
+        <enum value="0x8014" name="GL_CONVOLUTION_FILTER_SCALE_EXT"/>
+        <enum value="0x8015" name="GL_CONVOLUTION_FILTER_BIAS"/>
+        <enum value="0x8015" name="GL_CONVOLUTION_FILTER_BIAS_EXT"/>
+        <enum value="0x8016" name="GL_REDUCE"/>
+        <enum value="0x8016" name="GL_REDUCE_EXT"/>
+        <enum value="0x8017" name="GL_CONVOLUTION_FORMAT"/>
+        <enum value="0x8017" name="GL_CONVOLUTION_FORMAT_EXT"/>
+        <enum value="0x8018" name="GL_CONVOLUTION_WIDTH"/>
+        <enum value="0x8018" name="GL_CONVOLUTION_WIDTH_EXT"/>
+        <enum value="0x8019" name="GL_CONVOLUTION_HEIGHT"/>
+        <enum value="0x8019" name="GL_CONVOLUTION_HEIGHT_EXT"/>
+        <enum value="0x801A" name="GL_MAX_CONVOLUTION_WIDTH"/>
+        <enum value="0x801A" name="GL_MAX_CONVOLUTION_WIDTH_EXT"/>
+        <enum value="0x801B" name="GL_MAX_CONVOLUTION_HEIGHT"/>
+        <enum value="0x801B" name="GL_MAX_CONVOLUTION_HEIGHT_EXT"/>
+        <enum value="0x801C" name="GL_POST_CONVOLUTION_RED_SCALE"/>
+        <enum value="0x801C" name="GL_POST_CONVOLUTION_RED_SCALE_EXT"/>
+        <enum value="0x801D" name="GL_POST_CONVOLUTION_GREEN_SCALE"/>
+        <enum value="0x801D" name="GL_POST_CONVOLUTION_GREEN_SCALE_EXT"/>
+        <enum value="0x801E" name="GL_POST_CONVOLUTION_BLUE_SCALE"/>
+        <enum value="0x801E" name="GL_POST_CONVOLUTION_BLUE_SCALE_EXT"/>
+        <enum value="0x801F" name="GL_POST_CONVOLUTION_ALPHA_SCALE"/>
+        <enum value="0x801F" name="GL_POST_CONVOLUTION_ALPHA_SCALE_EXT"/>
+        <enum value="0x8020" name="GL_POST_CONVOLUTION_RED_BIAS"/>
+        <enum value="0x8020" name="GL_POST_CONVOLUTION_RED_BIAS_EXT"/>
+        <enum value="0x8021" name="GL_POST_CONVOLUTION_GREEN_BIAS"/>
+        <enum value="0x8021" name="GL_POST_CONVOLUTION_GREEN_BIAS_EXT"/>
+        <enum value="0x8022" name="GL_POST_CONVOLUTION_BLUE_BIAS"/>
+        <enum value="0x8022" name="GL_POST_CONVOLUTION_BLUE_BIAS_EXT"/>
+        <enum value="0x8023" name="GL_POST_CONVOLUTION_ALPHA_BIAS"/>
+        <enum value="0x8023" name="GL_POST_CONVOLUTION_ALPHA_BIAS_EXT"/>
+        <enum value="0x8024" name="GL_HISTOGRAM"/>
+        <enum value="0x8024" name="GL_HISTOGRAM_EXT"/>
+        <enum value="0x8025" name="GL_PROXY_HISTOGRAM"/>
+        <enum value="0x8025" name="GL_PROXY_HISTOGRAM_EXT"/>
+        <enum value="0x8026" name="GL_HISTOGRAM_WIDTH"/>
+        <enum value="0x8026" name="GL_HISTOGRAM_WIDTH_EXT"/>
+        <enum value="0x8027" name="GL_HISTOGRAM_FORMAT"/>
+        <enum value="0x8027" name="GL_HISTOGRAM_FORMAT_EXT"/>
+        <enum value="0x8028" name="GL_HISTOGRAM_RED_SIZE"/>
+        <enum value="0x8028" name="GL_HISTOGRAM_RED_SIZE_EXT"/>
+        <enum value="0x8029" name="GL_HISTOGRAM_GREEN_SIZE"/>
+        <enum value="0x8029" name="GL_HISTOGRAM_GREEN_SIZE_EXT"/>
+        <enum value="0x802A" name="GL_HISTOGRAM_BLUE_SIZE"/>
+        <enum value="0x802A" name="GL_HISTOGRAM_BLUE_SIZE_EXT"/>
+        <enum value="0x802B" name="GL_HISTOGRAM_ALPHA_SIZE"/>
+        <enum value="0x802B" name="GL_HISTOGRAM_ALPHA_SIZE_EXT"/>
+        <enum value="0x802C" name="GL_HISTOGRAM_LUMINANCE_SIZE"/>
+        <enum value="0x802C" name="GL_HISTOGRAM_LUMINANCE_SIZE_EXT"/>
+        <enum value="0x802D" name="GL_HISTOGRAM_SINK"/>
+        <enum value="0x802D" name="GL_HISTOGRAM_SINK_EXT"/>
+        <enum value="0x802E" name="GL_MINMAX"/>
+        <enum value="0x802E" name="GL_MINMAX_EXT"/>
+        <enum value="0x802F" name="GL_MINMAX_FORMAT"/>
+        <enum value="0x802F" name="GL_MINMAX_FORMAT_EXT"/>
+        <enum value="0x8030" name="GL_MINMAX_SINK"/>
+        <enum value="0x8030" name="GL_MINMAX_SINK_EXT"/>
+        <enum value="0x8031" name="GL_TABLE_TOO_LARGE_EXT"/>
+        <enum value="0x8031" name="GL_TABLE_TOO_LARGE"/>
+        <enum value="0x8032" name="GL_UNSIGNED_BYTE_3_3_2"/>
+        <enum value="0x8032" name="GL_UNSIGNED_BYTE_3_3_2_EXT"/>
+        <enum value="0x8033" name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+        <enum value="0x8033" name="GL_UNSIGNED_SHORT_4_4_4_4_EXT"/>
+        <enum value="0x8034" name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+        <enum value="0x8034" name="GL_UNSIGNED_SHORT_5_5_5_1_EXT"/>
+        <enum value="0x8035" name="GL_UNSIGNED_INT_8_8_8_8"/>
+        <enum value="0x8035" name="GL_UNSIGNED_INT_8_8_8_8_EXT"/>
+        <enum value="0x8036" name="GL_UNSIGNED_INT_10_10_10_2"/>
+        <enum value="0x8036" name="GL_UNSIGNED_INT_10_10_10_2_EXT"/>
+        <enum value="0x8037" name="GL_POLYGON_OFFSET_EXT"/>
+        <enum value="0x8037" name="GL_POLYGON_OFFSET_FILL"/>
+        <enum value="0x8038" name="GL_POLYGON_OFFSET_FACTOR"/>
+        <enum value="0x8038" name="GL_POLYGON_OFFSET_FACTOR_EXT"/>
+        <enum value="0x8039" name="GL_POLYGON_OFFSET_BIAS_EXT"/>
+        <enum value="0x803A" name="GL_RESCALE_NORMAL"/>
+        <enum value="0x803A" name="GL_RESCALE_NORMAL_EXT"/>
+        <enum value="0x803B" name="GL_ALPHA4"/>
+        <enum value="0x803B" name="GL_ALPHA4_EXT"/>
+        <enum value="0x803C" name="GL_ALPHA8"/>
+        <enum value="0x803C" name="GL_ALPHA8_EXT"/>
+        <enum value="0x803C" name="GL_ALPHA8_OES"/>
+        <enum value="0x803D" name="GL_ALPHA12"/>
+        <enum value="0x803D" name="GL_ALPHA12_EXT"/>
+        <enum value="0x803E" name="GL_ALPHA16"/>
+        <enum value="0x803E" name="GL_ALPHA16_EXT"/>
+        <enum value="0x803F" name="GL_LUMINANCE4"/>
+        <enum value="0x803F" name="GL_LUMINANCE4_EXT"/>
+        <enum value="0x8040" name="GL_LUMINANCE8"/>
+        <enum value="0x8040" name="GL_LUMINANCE8_EXT"/>
+        <enum value="0x8040" name="GL_LUMINANCE8_OES"/>
+        <enum value="0x8041" name="GL_LUMINANCE12"/>
+        <enum value="0x8041" name="GL_LUMINANCE12_EXT"/>
+        <enum value="0x8042" name="GL_LUMINANCE16"/>
+        <enum value="0x8042" name="GL_LUMINANCE16_EXT"/>
+        <enum value="0x8043" name="GL_LUMINANCE4_ALPHA4"/>
+        <enum value="0x8043" name="GL_LUMINANCE4_ALPHA4_EXT"/>
+        <enum value="0x8043" name="GL_LUMINANCE4_ALPHA4_OES"/>
+        <enum value="0x8044" name="GL_LUMINANCE6_ALPHA2"/>
+        <enum value="0x8044" name="GL_LUMINANCE6_ALPHA2_EXT"/>
+        <enum value="0x8045" name="GL_LUMINANCE8_ALPHA8"/>
+        <enum value="0x8045" name="GL_LUMINANCE8_ALPHA8_EXT"/>
+        <enum value="0x8045" name="GL_LUMINANCE8_ALPHA8_OES"/>
+        <enum value="0x8046" name="GL_LUMINANCE12_ALPHA4"/>
+        <enum value="0x8046" name="GL_LUMINANCE12_ALPHA4_EXT"/>
+        <enum value="0x8047" name="GL_LUMINANCE12_ALPHA12"/>
+        <enum value="0x8047" name="GL_LUMINANCE12_ALPHA12_EXT"/>
+        <enum value="0x8048" name="GL_LUMINANCE16_ALPHA16"/>
+        <enum value="0x8048" name="GL_LUMINANCE16_ALPHA16_EXT"/>
+        <enum value="0x8049" name="GL_INTENSITY"/>
+        <enum value="0x8049" name="GL_INTENSITY_EXT"/>
+        <enum value="0x804A" name="GL_INTENSITY4"/>
+        <enum value="0x804A" name="GL_INTENSITY4_EXT"/>
+        <enum value="0x804B" name="GL_INTENSITY8"/>
+        <enum value="0x804B" name="GL_INTENSITY8_EXT"/>
+        <enum value="0x804C" name="GL_INTENSITY12"/>
+        <enum value="0x804C" name="GL_INTENSITY12_EXT"/>
+        <enum value="0x804D" name="GL_INTENSITY16"/>
+        <enum value="0x804D" name="GL_INTENSITY16_EXT"/>
+        <enum value="0x804E" name="GL_RGB2_EXT"/>
+        <enum value="0x804F" name="GL_RGB4"/>
+        <enum value="0x804F" name="GL_RGB4_EXT"/>
+        <enum value="0x8050" name="GL_RGB5"/>
+        <enum value="0x8050" name="GL_RGB5_EXT"/>
+        <enum value="0x8051" name="GL_RGB8"/>
+        <enum value="0x8051" name="GL_RGB8_EXT"/>
+        <enum value="0x8051" name="GL_RGB8_OES"/>
+        <enum value="0x8052" name="GL_RGB10"/>
+        <enum value="0x8052" name="GL_RGB10_EXT"/>
+        <enum value="0x8053" name="GL_RGB12"/>
+        <enum value="0x8053" name="GL_RGB12_EXT"/>
+        <enum value="0x8054" name="GL_RGB16"/>
+        <enum value="0x8054" name="GL_RGB16_EXT"/>
+        <enum value="0x8055" name="GL_RGBA2"/>
+        <enum value="0x8055" name="GL_RGBA2_EXT"/>
+        <enum value="0x8056" name="GL_RGBA4"/>
+        <enum value="0x8056" name="GL_RGBA4_EXT"/>
+        <enum value="0x8056" name="GL_RGBA4_OES"/>
+        <enum value="0x8057" name="GL_RGB5_A1"/>
+        <enum value="0x8057" name="GL_RGB5_A1_EXT"/>
+        <enum value="0x8057" name="GL_RGB5_A1_OES"/>
+        <enum value="0x8058" name="GL_RGBA8"/>
+        <enum value="0x8058" name="GL_RGBA8_EXT"/>
+        <enum value="0x8058" name="GL_RGBA8_OES"/>
+        <enum value="0x8059" name="GL_RGB10_A2"/>
+        <enum value="0x8059" name="GL_RGB10_A2_EXT"/>
+        <enum value="0x805A" name="GL_RGBA12"/>
+        <enum value="0x805A" name="GL_RGBA12_EXT"/>
+        <enum value="0x805B" name="GL_RGBA16"/>
+        <enum value="0x805B" name="GL_RGBA16_EXT"/>
+        <enum value="0x805C" name="GL_TEXTURE_RED_SIZE"/>
+        <enum value="0x805C" name="GL_TEXTURE_RED_SIZE_EXT"/>
+        <enum value="0x805D" name="GL_TEXTURE_GREEN_SIZE"/>
+        <enum value="0x805D" name="GL_TEXTURE_GREEN_SIZE_EXT"/>
+        <enum value="0x805E" name="GL_TEXTURE_BLUE_SIZE"/>
+        <enum value="0x805E" name="GL_TEXTURE_BLUE_SIZE_EXT"/>
+        <enum value="0x805F" name="GL_TEXTURE_ALPHA_SIZE"/>
+        <enum value="0x805F" name="GL_TEXTURE_ALPHA_SIZE_EXT"/>
+        <enum value="0x8060" name="GL_TEXTURE_LUMINANCE_SIZE"/>
+        <enum value="0x8060" name="GL_TEXTURE_LUMINANCE_SIZE_EXT"/>
+        <enum value="0x8061" name="GL_TEXTURE_INTENSITY_SIZE"/>
+        <enum value="0x8061" name="GL_TEXTURE_INTENSITY_SIZE_EXT"/>
+        <enum value="0x8062" name="GL_REPLACE_EXT"/>
+        <enum value="0x8063" name="GL_PROXY_TEXTURE_1D"/>
+        <enum value="0x8063" name="GL_PROXY_TEXTURE_1D_EXT"/>
+        <enum value="0x8064" name="GL_PROXY_TEXTURE_2D"/>
+        <enum value="0x8064" name="GL_PROXY_TEXTURE_2D_EXT"/>
+        <enum value="0x8065" name="GL_TEXTURE_TOO_LARGE_EXT"/>
+        <enum value="0x8066" name="GL_TEXTURE_PRIORITY"/>
+        <enum value="0x8066" name="GL_TEXTURE_PRIORITY_EXT"/>
+        <enum value="0x8067" name="GL_TEXTURE_RESIDENT"/>
+        <enum value="0x8067" name="GL_TEXTURE_RESIDENT_EXT"/>
+        <enum value="0x8068" name="GL_TEXTURE_1D_BINDING_EXT"/>
+        <enum value="0x8068" name="GL_TEXTURE_BINDING_1D"/>
+        <enum value="0x8069" name="GL_TEXTURE_2D_BINDING_EXT"/>
+        <enum value="0x8069" name="GL_TEXTURE_BINDING_2D"/>
+        <enum value="0x806A" name="GL_TEXTURE_3D_BINDING_EXT"/>
+        <enum value="0x806A" name="GL_TEXTURE_3D_BINDING_OES"/>
+        <enum value="0x806A" name="GL_TEXTURE_BINDING_3D"/>
+        <enum value="0x806A" name="GL_TEXTURE_BINDING_3D_OES"/>
+        <enum value="0x806B" name="GL_PACK_SKIP_IMAGES"/>
+        <enum value="0x806B" name="GL_PACK_SKIP_IMAGES_EXT"/>
+        <enum value="0x806C" name="GL_PACK_IMAGE_HEIGHT"/>
+        <enum value="0x806C" name="GL_PACK_IMAGE_HEIGHT_EXT"/>
+        <enum value="0x806D" name="GL_UNPACK_SKIP_IMAGES"/>
+        <enum value="0x806D" name="GL_UNPACK_SKIP_IMAGES_EXT"/>
+        <enum value="0x806E" name="GL_UNPACK_IMAGE_HEIGHT"/>
+        <enum value="0x806E" name="GL_UNPACK_IMAGE_HEIGHT_EXT"/>
+        <enum value="0x806F" name="GL_TEXTURE_3D"/>
+        <enum value="0x806F" name="GL_TEXTURE_3D_EXT"/>
+        <enum value="0x806F" name="GL_TEXTURE_3D_OES"/>
+        <enum value="0x8070" name="GL_PROXY_TEXTURE_3D"/>
+        <enum value="0x8070" name="GL_PROXY_TEXTURE_3D_EXT"/>
+        <enum value="0x8071" name="GL_TEXTURE_DEPTH"/>
+        <enum value="0x8071" name="GL_TEXTURE_DEPTH_EXT"/>
+        <enum value="0x8072" name="GL_TEXTURE_WRAP_R"/>
+        <enum value="0x8072" name="GL_TEXTURE_WRAP_R_EXT"/>
+        <enum value="0x8072" name="GL_TEXTURE_WRAP_R_OES"/>
+        <enum value="0x8073" name="GL_MAX_3D_TEXTURE_SIZE"/>
+        <enum value="0x8073" name="GL_MAX_3D_TEXTURE_SIZE_EXT"/>
+        <enum value="0x8073" name="GL_MAX_3D_TEXTURE_SIZE_OES"/>
+        <enum value="0x8074" name="GL_VERTEX_ARRAY"/>
+        <enum value="0x8074" name="GL_VERTEX_ARRAY_EXT"/>
+        <enum value="0x8074" name="GL_VERTEX_ARRAY_KHR"/>
+        <enum value="0x8075" name="GL_NORMAL_ARRAY"/>
+        <enum value="0x8075" name="GL_NORMAL_ARRAY_EXT"/>
+        <enum value="0x8076" name="GL_COLOR_ARRAY"/>
+        <enum value="0x8076" name="GL_COLOR_ARRAY_EXT"/>
+        <enum value="0x8077" name="GL_INDEX_ARRAY"/>
+        <enum value="0x8077" name="GL_INDEX_ARRAY_EXT"/>
+        <enum value="0x8078" name="GL_TEXTURE_COORD_ARRAY"/>
+        <enum value="0x8078" name="GL_TEXTURE_COORD_ARRAY_EXT"/>
+        <enum value="0x8079" name="GL_EDGE_FLAG_ARRAY"/>
+        <enum value="0x8079" name="GL_EDGE_FLAG_ARRAY_EXT"/>
+        <enum value="0x807A" name="GL_VERTEX_ARRAY_SIZE"/>
+        <enum value="0x807A" name="GL_VERTEX_ARRAY_SIZE_EXT"/>
+        <enum value="0x807B" name="GL_VERTEX_ARRAY_TYPE"/>
+        <enum value="0x807B" name="GL_VERTEX_ARRAY_TYPE_EXT"/>
+        <enum value="0x807C" name="GL_VERTEX_ARRAY_STRIDE"/>
+        <enum value="0x807C" name="GL_VERTEX_ARRAY_STRIDE_EXT"/>
+        <enum value="0x807D" name="GL_VERTEX_ARRAY_COUNT_EXT"/>
+        <enum value="0x807E" name="GL_NORMAL_ARRAY_TYPE"/>
+        <enum value="0x807E" name="GL_NORMAL_ARRAY_TYPE_EXT"/>
+        <enum value="0x807F" name="GL_NORMAL_ARRAY_STRIDE"/>
+        <enum value="0x807F" name="GL_NORMAL_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8080" name="GL_NORMAL_ARRAY_COUNT_EXT"/>
+        <enum value="0x8081" name="GL_COLOR_ARRAY_SIZE"/>
+        <enum value="0x8081" name="GL_COLOR_ARRAY_SIZE_EXT"/>
+        <enum value="0x8082" name="GL_COLOR_ARRAY_TYPE"/>
+        <enum value="0x8082" name="GL_COLOR_ARRAY_TYPE_EXT"/>
+        <enum value="0x8083" name="GL_COLOR_ARRAY_STRIDE"/>
+        <enum value="0x8083" name="GL_COLOR_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8084" name="GL_COLOR_ARRAY_COUNT_EXT"/>
+        <enum value="0x8085" name="GL_INDEX_ARRAY_TYPE"/>
+        <enum value="0x8085" name="GL_INDEX_ARRAY_TYPE_EXT"/>
+        <enum value="0x8086" name="GL_INDEX_ARRAY_STRIDE"/>
+        <enum value="0x8086" name="GL_INDEX_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8087" name="GL_INDEX_ARRAY_COUNT_EXT"/>
+        <enum value="0x8088" name="GL_TEXTURE_COORD_ARRAY_SIZE"/>
+        <enum value="0x8088" name="GL_TEXTURE_COORD_ARRAY_SIZE_EXT"/>
+        <enum value="0x8089" name="GL_TEXTURE_COORD_ARRAY_TYPE"/>
+        <enum value="0x8089" name="GL_TEXTURE_COORD_ARRAY_TYPE_EXT"/>
+        <enum value="0x808A" name="GL_TEXTURE_COORD_ARRAY_STRIDE"/>
+        <enum value="0x808A" name="GL_TEXTURE_COORD_ARRAY_STRIDE_EXT"/>
+        <enum value="0x808B" name="GL_TEXTURE_COORD_ARRAY_COUNT_EXT"/>
+        <enum value="0x808C" name="GL_EDGE_FLAG_ARRAY_STRIDE"/>
+        <enum value="0x808C" name="GL_EDGE_FLAG_ARRAY_STRIDE_EXT"/>
+        <enum value="0x808D" name="GL_EDGE_FLAG_ARRAY_COUNT_EXT"/>
+        <enum value="0x808E" name="GL_VERTEX_ARRAY_POINTER"/>
+        <enum value="0x808E" name="GL_VERTEX_ARRAY_POINTER_EXT"/>
+        <enum value="0x808F" name="GL_NORMAL_ARRAY_POINTER"/>
+        <enum value="0x808F" name="GL_NORMAL_ARRAY_POINTER_EXT"/>
+        <enum value="0x8090" name="GL_COLOR_ARRAY_POINTER"/>
+        <enum value="0x8090" name="GL_COLOR_ARRAY_POINTER_EXT"/>
+        <enum value="0x8091" name="GL_INDEX_ARRAY_POINTER"/>
+        <enum value="0x8091" name="GL_INDEX_ARRAY_POINTER_EXT"/>
+        <enum value="0x8092" name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+        <enum value="0x8092" name="GL_TEXTURE_COORD_ARRAY_POINTER_EXT"/>
+        <enum value="0x8093" name="GL_EDGE_FLAG_ARRAY_POINTER"/>
+        <enum value="0x8093" name="GL_EDGE_FLAG_ARRAY_POINTER_EXT"/>
+        <enum value="0x8094" name="GL_INTERLACE_SGIX"/>
+        <enum value="0x8095" name="GL_DETAIL_TEXTURE_2D_SGIS"/>
+        <enum value="0x8096" name="GL_DETAIL_TEXTURE_2D_BINDING_SGIS"/>
+        <enum value="0x8097" name="GL_LINEAR_DETAIL_SGIS"/>
+        <enum value="0x8098" name="GL_LINEAR_DETAIL_ALPHA_SGIS"/>
+        <enum value="0x8099" name="GL_LINEAR_DETAIL_COLOR_SGIS"/>
+        <enum value="0x809A" name="GL_DETAIL_TEXTURE_LEVEL_SGIS"/>
+        <enum value="0x809B" name="GL_DETAIL_TEXTURE_MODE_SGIS"/>
+        <enum value="0x809C" name="GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS"/>
+        <enum value="0x809D" name="GL_MULTISAMPLE"/>
+        <enum value="0x809D" name="GL_MULTISAMPLE_ARB"/>
+        <enum value="0x809D" name="GL_MULTISAMPLE_EXT"/>
+        <enum value="0x809D" name="GL_MULTISAMPLE_SGIS"/>
+        <enum value="0x809E" name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+        <enum value="0x809E" name="GL_SAMPLE_ALPHA_TO_COVERAGE_ARB"/>
+        <enum value="0x809E" name="GL_SAMPLE_ALPHA_TO_MASK_EXT"/>
+        <enum value="0x809E" name="GL_SAMPLE_ALPHA_TO_MASK_SGIS"/>
+        <enum value="0x809F" name="GL_SAMPLE_ALPHA_TO_ONE"/>
+        <enum value="0x809F" name="GL_SAMPLE_ALPHA_TO_ONE_ARB"/>
+        <enum value="0x809F" name="GL_SAMPLE_ALPHA_TO_ONE_EXT"/>
+        <enum value="0x809F" name="GL_SAMPLE_ALPHA_TO_ONE_SGIS"/>
+        <enum value="0x80A0" name="GL_SAMPLE_COVERAGE"/>
+        <enum value="0x80A0" name="GL_SAMPLE_COVERAGE_ARB"/>
+        <enum value="0x80A0" name="GL_SAMPLE_MASK_EXT"/>
+        <enum value="0x80A0" name="GL_SAMPLE_MASK_SGIS"/>
+        <enum value="0x80A1" name="GL_1PASS_EXT"/>
+        <enum value="0x80A1" name="GL_1PASS_SGIS"/>
+        <enum value="0x80A2" name="GL_2PASS_0_EXT"/>
+        <enum value="0x80A2" name="GL_2PASS_0_SGIS"/>
+        <enum value="0x80A3" name="GL_2PASS_1_EXT"/>
+        <enum value="0x80A3" name="GL_2PASS_1_SGIS"/>
+        <enum value="0x80A4" name="GL_4PASS_0_EXT"/>
+        <enum value="0x80A4" name="GL_4PASS_0_SGIS"/>
+        <enum value="0x80A5" name="GL_4PASS_1_EXT"/>
+        <enum value="0x80A5" name="GL_4PASS_1_SGIS"/>
+        <enum value="0x80A6" name="GL_4PASS_2_EXT"/>
+        <enum value="0x80A6" name="GL_4PASS_2_SGIS"/>
+        <enum value="0x80A7" name="GL_4PASS_3_EXT"/>
+        <enum value="0x80A7" name="GL_4PASS_3_SGIS"/>
+        <enum value="0x80A8" name="GL_SAMPLE_BUFFERS"/>
+        <enum value="0x80A8" name="GL_SAMPLE_BUFFERS_ARB"/>
+        <enum value="0x80A8" name="GL_SAMPLE_BUFFERS_EXT"/>
+        <enum value="0x80A8" name="GL_SAMPLE_BUFFERS_SGIS"/>
+        <enum value="0x80A9" name="GL_SAMPLES"/>
+        <enum value="0x80A9" name="GL_SAMPLES_ARB"/>
+        <enum value="0x80A9" name="GL_SAMPLES_EXT"/>
+        <enum value="0x80A9" name="GL_SAMPLES_SGIS"/>
+        <enum value="0x80AA" name="GL_SAMPLE_COVERAGE_VALUE"/>
+        <enum value="0x80AA" name="GL_SAMPLE_COVERAGE_VALUE_ARB"/>
+        <enum value="0x80AA" name="GL_SAMPLE_MASK_VALUE_EXT"/>
+        <enum value="0x80AA" name="GL_SAMPLE_MASK_VALUE_SGIS"/>
+        <enum value="0x80AB" name="GL_SAMPLE_COVERAGE_INVERT"/>
+        <enum value="0x80AB" name="GL_SAMPLE_COVERAGE_INVERT_ARB"/>
+        <enum value="0x80AB" name="GL_SAMPLE_MASK_INVERT_EXT"/>
+        <enum value="0x80AB" name="GL_SAMPLE_MASK_INVERT_SGIS"/>
+        <enum value="0x80AC" name="GL_SAMPLE_PATTERN_EXT"/>
+        <enum value="0x80AC" name="GL_SAMPLE_PATTERN_SGIS"/>
+        <enum value="0x80AD" name="GL_LINEAR_SHARPEN_SGIS"/>
+        <enum value="0x80AE" name="GL_LINEAR_SHARPEN_ALPHA_SGIS"/>
+        <enum value="0x80AF" name="GL_LINEAR_SHARPEN_COLOR_SGIS"/>
+        <enum value="0x80B0" name="GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS"/>
+        <enum value="0x80B1" name="GL_COLOR_MATRIX"/>
+        <enum value="0x80B1" name="GL_COLOR_MATRIX_SGI"/>
+        <enum value="0x80B2" name="GL_COLOR_MATRIX_STACK_DEPTH"/>
+        <enum value="0x80B2" name="GL_COLOR_MATRIX_STACK_DEPTH_SGI"/>
+        <enum value="0x80B3" name="GL_MAX_COLOR_MATRIX_STACK_DEPTH"/>
+        <enum value="0x80B3" name="GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI"/>
+        <enum value="0x80B4" name="GL_POST_COLOR_MATRIX_RED_SCALE"/>
+        <enum value="0x80B4" name="GL_POST_COLOR_MATRIX_RED_SCALE_SGI"/>
+        <enum value="0x80B5" name="GL_POST_COLOR_MATRIX_GREEN_SCALE"/>
+        <enum value="0x80B5" name="GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI"/>
+        <enum value="0x80B6" name="GL_POST_COLOR_MATRIX_BLUE_SCALE"/>
+        <enum value="0x80B6" name="GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI"/>
+        <enum value="0x80B7" name="GL_POST_COLOR_MATRIX_ALPHA_SCALE"/>
+        <enum value="0x80B7" name="GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI"/>
+        <enum value="0x80B8" name="GL_POST_COLOR_MATRIX_RED_BIAS"/>
+        <enum value="0x80B8" name="GL_POST_COLOR_MATRIX_RED_BIAS_SGI"/>
+        <enum value="0x80B9" name="GL_POST_COLOR_MATRIX_GREEN_BIAS"/>
+        <enum value="0x80B9" name="GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI"/>
+        <enum value="0x80BA" name="GL_POST_COLOR_MATRIX_BLUE_BIAS"/>
+        <enum value="0x80BA" name="GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI"/>
+        <enum value="0x80BB" name="GL_POST_COLOR_MATRIX_ALPHA_BIAS"/>
+        <enum value="0x80BB" name="GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI"/>
+        <enum value="0x80BC" name="GL_TEXTURE_COLOR_TABLE_SGI"/>
+        <enum value="0x80BD" name="GL_PROXY_TEXTURE_COLOR_TABLE_SGI"/>
+        <enum value="0x80BE" name="GL_TEXTURE_ENV_BIAS_SGIX"/>
+        <enum value="0x80BF" name="GL_SHADOW_AMBIENT_SGIX"/>
+        <enum value="0x80BF" name="GL_TEXTURE_COMPARE_FAIL_VALUE_ARB"/>
+    </enums>
+
+    <enums namespace="GL" start="0x80C0" end="0x80CF" vendor="ZiiLabs">
+            <unused start="0x80C0" end="0x80C7"/>
+        <enum value="0x80C8" name="GL_BLEND_DST_RGB"/>
+        <enum value="0x80C8" name="GL_BLEND_DST_RGB_EXT"/>
+        <enum value="0x80C8" name="GL_BLEND_DST_RGB_OES"/>
+        <enum value="0x80C9" name="GL_BLEND_SRC_RGB"/>
+        <enum value="0x80C9" name="GL_BLEND_SRC_RGB_EXT"/>
+        <enum value="0x80C9" name="GL_BLEND_SRC_RGB_OES"/>
+        <enum value="0x80CA" name="GL_BLEND_DST_ALPHA"/>
+        <enum value="0x80CA" name="GL_BLEND_DST_ALPHA_EXT"/>
+        <enum value="0x80CA" name="GL_BLEND_DST_ALPHA_OES"/>
+        <enum value="0x80CB" name="GL_BLEND_SRC_ALPHA"/>
+        <enum value="0x80CB" name="GL_BLEND_SRC_ALPHA_EXT"/>
+        <enum value="0x80CB" name="GL_BLEND_SRC_ALPHA_OES"/>
+        <enum value="0x80CC" name="GL_422_EXT"/>
+        <enum value="0x80CD" name="GL_422_REV_EXT"/>
+        <enum value="0x80CE" name="GL_422_AVERAGE_EXT"/>
+        <enum value="0x80CF" name="GL_422_REV_AVERAGE_EXT"/>
+    </enums>
+
+    <enums namespace="GL" start="0x80D0" end="0x80DF" vendor="SGI">
+        <enum value="0x80D0" name="GL_COLOR_TABLE"/>
+        <enum value="0x80D0" name="GL_COLOR_TABLE_SGI"/>
+        <enum value="0x80D1" name="GL_POST_CONVOLUTION_COLOR_TABLE"/>
+        <enum value="0x80D1" name="GL_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+        <enum value="0x80D2" name="GL_POST_COLOR_MATRIX_COLOR_TABLE"/>
+        <enum value="0x80D2" name="GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+        <enum value="0x80D3" name="GL_PROXY_COLOR_TABLE"/>
+        <enum value="0x80D3" name="GL_PROXY_COLOR_TABLE_SGI"/>
+        <enum value="0x80D4" name="GL_PROXY_POST_CONVOLUTION_COLOR_TABLE"/>
+        <enum value="0x80D4" name="GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+        <enum value="0x80D5" name="GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE"/>
+        <enum value="0x80D5" name="GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+        <enum value="0x80D6" name="GL_COLOR_TABLE_SCALE"/>
+        <enum value="0x80D6" name="GL_COLOR_TABLE_SCALE_SGI"/>
+        <enum value="0x80D7" name="GL_COLOR_TABLE_BIAS"/>
+        <enum value="0x80D7" name="GL_COLOR_TABLE_BIAS_SGI"/>
+        <enum value="0x80D8" name="GL_COLOR_TABLE_FORMAT"/>
+        <enum value="0x80D8" name="GL_COLOR_TABLE_FORMAT_SGI"/>
+        <enum value="0x80D9" name="GL_COLOR_TABLE_WIDTH"/>
+        <enum value="0x80D9" name="GL_COLOR_TABLE_WIDTH_SGI"/>
+        <enum value="0x80DA" name="GL_COLOR_TABLE_RED_SIZE"/>
+        <enum value="0x80DA" name="GL_COLOR_TABLE_RED_SIZE_SGI"/>
+        <enum value="0x80DB" name="GL_COLOR_TABLE_GREEN_SIZE"/>
+        <enum value="0x80DB" name="GL_COLOR_TABLE_GREEN_SIZE_SGI"/>
+        <enum value="0x80DC" name="GL_COLOR_TABLE_BLUE_SIZE"/>
+        <enum value="0x80DC" name="GL_COLOR_TABLE_BLUE_SIZE_SGI"/>
+        <enum value="0x80DD" name="GL_COLOR_TABLE_ALPHA_SIZE"/>
+        <enum value="0x80DD" name="GL_COLOR_TABLE_ALPHA_SIZE_SGI"/>
+        <enum value="0x80DE" name="GL_COLOR_TABLE_LUMINANCE_SIZE"/>
+        <enum value="0x80DE" name="GL_COLOR_TABLE_LUMINANCE_SIZE_SGI"/>
+        <enum value="0x80DF" name="GL_COLOR_TABLE_INTENSITY_SIZE"/>
+        <enum value="0x80DF" name="GL_COLOR_TABLE_INTENSITY_SIZE_SGI"/>
+    </enums>
+
+    <enums namespace="GL" start="0x80E0" end="0x810F" vendor="MS">
+        <enum value="0x80E0" name="GL_BGR"/>
+        <enum value="0x80E0" name="GL_BGR_EXT"/>
+        <enum value="0x80E1" name="GL_BGRA"/>
+        <enum value="0x80E1" name="GL_BGRA_EXT"/>
+        <enum value="0x80E1" name="GL_BGRA_IMG"/>
+        <enum value="0x80E2" name="GL_COLOR_INDEX1_EXT"/>
+        <enum value="0x80E3" name="GL_COLOR_INDEX2_EXT"/>
+        <enum value="0x80E4" name="GL_COLOR_INDEX4_EXT"/>
+        <enum value="0x80E5" name="GL_COLOR_INDEX8_EXT"/>
+        <enum value="0x80E6" name="GL_COLOR_INDEX12_EXT"/>
+        <enum value="0x80E7" name="GL_COLOR_INDEX16_EXT"/>
+        <enum value="0x80E8" name="GL_MAX_ELEMENTS_VERTICES"/>
+        <enum value="0x80E8" name="GL_MAX_ELEMENTS_VERTICES_EXT"/>
+        <enum value="0x80E9" name="GL_MAX_ELEMENTS_INDICES"/>
+        <enum value="0x80E9" name="GL_MAX_ELEMENTS_INDICES_EXT"/>
+        <enum value="0x80EA" name="GL_PHONG_WIN"/>
+        <enum value="0x80EB" name="GL_PHONG_HINT_WIN"/>
+        <enum value="0x80EC" name="GL_FOG_SPECULAR_TEXTURE_WIN"/>
+        <enum value="0x80ED" name="GL_TEXTURE_INDEX_SIZE_EXT"/>
+        <enum value="0x80EE" name="GL_PARAMETER_BUFFER_ARB"/>
+        <enum value="0x80EF" name="GL_PARAMETER_BUFFER_BINDING_ARB"/>
+        <enum value="0x80F0" name="GL_CLIP_VOLUME_CLIPPING_HINT_EXT"/>
+            <unused start="0x80F1" end="0x810F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8110" end="0x814F" vendor="SGI">
+        <enum value="0x8110" name="GL_DUAL_ALPHA4_SGIS"/>
+        <enum value="0x8111" name="GL_DUAL_ALPHA8_SGIS"/>
+        <enum value="0x8112" name="GL_DUAL_ALPHA12_SGIS"/>
+        <enum value="0x8113" name="GL_DUAL_ALPHA16_SGIS"/>
+        <enum value="0x8114" name="GL_DUAL_LUMINANCE4_SGIS"/>
+        <enum value="0x8115" name="GL_DUAL_LUMINANCE8_SGIS"/>
+        <enum value="0x8116" name="GL_DUAL_LUMINANCE12_SGIS"/>
+        <enum value="0x8117" name="GL_DUAL_LUMINANCE16_SGIS"/>
+        <enum value="0x8118" name="GL_DUAL_INTENSITY4_SGIS"/>
+        <enum value="0x8119" name="GL_DUAL_INTENSITY8_SGIS"/>
+        <enum value="0x811A" name="GL_DUAL_INTENSITY12_SGIS"/>
+        <enum value="0x811B" name="GL_DUAL_INTENSITY16_SGIS"/>
+        <enum value="0x811C" name="GL_DUAL_LUMINANCE_ALPHA4_SGIS"/>
+        <enum value="0x811D" name="GL_DUAL_LUMINANCE_ALPHA8_SGIS"/>
+        <enum value="0x811E" name="GL_QUAD_ALPHA4_SGIS"/>
+        <enum value="0x811F" name="GL_QUAD_ALPHA8_SGIS"/>
+        <enum value="0x8120" name="GL_QUAD_LUMINANCE4_SGIS"/>
+        <enum value="0x8121" name="GL_QUAD_LUMINANCE8_SGIS"/>
+        <enum value="0x8122" name="GL_QUAD_INTENSITY4_SGIS"/>
+        <enum value="0x8123" name="GL_QUAD_INTENSITY8_SGIS"/>
+        <enum value="0x8124" name="GL_DUAL_TEXTURE_SELECT_SGIS"/>
+        <enum value="0x8125" name="GL_QUAD_TEXTURE_SELECT_SGIS"/>
+        <enum value="0x8126" name="GL_POINT_SIZE_MIN"/>
+        <enum value="0x8126" name="GL_POINT_SIZE_MIN_ARB"/>
+        <enum value="0x8126" name="GL_POINT_SIZE_MIN_EXT"/>
+        <enum value="0x8126" name="GL_POINT_SIZE_MIN_SGIS"/>
+        <enum value="0x8127" name="GL_POINT_SIZE_MAX"/>
+        <enum value="0x8127" name="GL_POINT_SIZE_MAX_ARB"/>
+        <enum value="0x8127" name="GL_POINT_SIZE_MAX_EXT"/>
+        <enum value="0x8127" name="GL_POINT_SIZE_MAX_SGIS"/>
+        <enum value="0x8128" name="GL_POINT_FADE_THRESHOLD_SIZE"/>
+        <enum value="0x8128" name="GL_POINT_FADE_THRESHOLD_SIZE_ARB"/>
+        <enum value="0x8128" name="GL_POINT_FADE_THRESHOLD_SIZE_EXT"/>
+        <enum value="0x8128" name="GL_POINT_FADE_THRESHOLD_SIZE_SGIS"/>
+        <enum value="0x8129" name="GL_DISTANCE_ATTENUATION_EXT"/>
+        <enum value="0x8129" name="GL_DISTANCE_ATTENUATION_SGIS"/>
+        <enum value="0x8129" name="GL_POINT_DISTANCE_ATTENUATION"/>
+        <enum value="0x8129" name="GL_POINT_DISTANCE_ATTENUATION_ARB"/>
+        <enum value="0x812A" name="GL_FOG_FUNC_SGIS"/>
+        <enum value="0x812B" name="GL_FOG_FUNC_POINTS_SGIS"/>
+        <enum value="0x812C" name="GL_MAX_FOG_FUNC_POINTS_SGIS"/>
+        <enum value="0x812D" name="GL_CLAMP_TO_BORDER"/>
+        <enum value="0x812D" name="GL_CLAMP_TO_BORDER_ARB"/>
+        <enum value="0x812D" name="GL_CLAMP_TO_BORDER_EXT"/>
+        <enum value="0x812D" name="GL_CLAMP_TO_BORDER_NV"/>
+        <enum value="0x812D" name="GL_CLAMP_TO_BORDER_SGIS"/>
+        <enum value="0x812E" name="GL_TEXTURE_MULTI_BUFFER_HINT_SGIX"/>
+        <enum value="0x812F" name="GL_CLAMP_TO_EDGE"/>
+        <enum value="0x812F" name="GL_CLAMP_TO_EDGE_SGIS"/>
+        <enum value="0x8130" name="GL_PACK_SKIP_VOLUMES_SGIS"/>
+        <enum value="0x8131" name="GL_PACK_IMAGE_DEPTH_SGIS"/>
+        <enum value="0x8132" name="GL_UNPACK_SKIP_VOLUMES_SGIS"/>
+        <enum value="0x8133" name="GL_UNPACK_IMAGE_DEPTH_SGIS"/>
+        <enum value="0x8134" name="GL_TEXTURE_4D_SGIS"/>
+        <enum value="0x8135" name="GL_PROXY_TEXTURE_4D_SGIS"/>
+        <enum value="0x8136" name="GL_TEXTURE_4DSIZE_SGIS"/>
+        <enum value="0x8137" name="GL_TEXTURE_WRAP_Q_SGIS"/>
+        <enum value="0x8138" name="GL_MAX_4D_TEXTURE_SIZE_SGIS"/>
+        <enum value="0x8139" name="GL_PIXEL_TEX_GEN_SGIX"/>
+        <enum value="0x813A" name="GL_TEXTURE_MIN_LOD"/>
+        <enum value="0x813A" name="GL_TEXTURE_MIN_LOD_SGIS"/>
+        <enum value="0x813B" name="GL_TEXTURE_MAX_LOD"/>
+        <enum value="0x813B" name="GL_TEXTURE_MAX_LOD_SGIS"/>
+        <enum value="0x813C" name="GL_TEXTURE_BASE_LEVEL"/>
+        <enum value="0x813C" name="GL_TEXTURE_BASE_LEVEL_SGIS"/>
+        <enum value="0x813D" name="GL_TEXTURE_MAX_LEVEL"/>
+        <enum value="0x813D" name="GL_TEXTURE_MAX_LEVEL_APPLE"/>
+        <enum value="0x813D" name="GL_TEXTURE_MAX_LEVEL_SGIS"/>
+        <enum value="0x813E" name="GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX"/>
+        <enum value="0x813F" name="GL_PIXEL_TILE_CACHE_INCREMENT_SGIX"/>
+        <enum value="0x8140" name="GL_PIXEL_TILE_WIDTH_SGIX"/>
+        <enum value="0x8141" name="GL_PIXEL_TILE_HEIGHT_SGIX"/>
+        <enum value="0x8142" name="GL_PIXEL_TILE_GRID_WIDTH_SGIX"/>
+        <enum value="0x8143" name="GL_PIXEL_TILE_GRID_HEIGHT_SGIX"/>
+        <enum value="0x8144" name="GL_PIXEL_TILE_GRID_DEPTH_SGIX"/>
+        <enum value="0x8145" name="GL_PIXEL_TILE_CACHE_SIZE_SGIX"/>
+        <enum value="0x8146" name="GL_FILTER4_SGIS"/>
+        <enum value="0x8147" name="GL_TEXTURE_FILTER4_SIZE_SGIS"/>
+        <enum value="0x8148" name="GL_SPRITE_SGIX"/>
+        <enum value="0x8149" name="GL_SPRITE_MODE_SGIX"/>
+        <enum value="0x814A" name="GL_SPRITE_AXIS_SGIX"/>
+        <enum value="0x814B" name="GL_SPRITE_TRANSLATION_SGIX"/>
+        <enum value="0x814C" name="GL_SPRITE_AXIAL_SGIX"/>
+        <enum value="0x814D" name="GL_SPRITE_OBJECT_ALIGNED_SGIX"/>
+        <enum value="0x814E" name="GL_SPRITE_EYE_ALIGNED_SGIX"/>
+        <enum value="0x814F" name="GL_TEXTURE_4D_BINDING_SGIS"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8150" end="0x816F" vendor="HP">
+        <enum value="0x8150" name="GL_IGNORE_BORDER_HP"/>
+        <enum value="0x8151" name="GL_CONSTANT_BORDER"/>
+        <enum value="0x8151" name="GL_CONSTANT_BORDER_HP"/>
+            <unused start="0x8152" comment="GL_WRAP_BORDER = 0x8152 was proposed, but not actually promoted to core"/>
+        <enum value="0x8153" name="GL_REPLICATE_BORDER"/>
+        <enum value="0x8153" name="GL_REPLICATE_BORDER_HP"/>
+        <enum value="0x8154" name="GL_CONVOLUTION_BORDER_COLOR"/>
+        <enum value="0x8154" name="GL_CONVOLUTION_BORDER_COLOR_HP"/>
+        <enum value="0x8155" name="GL_IMAGE_SCALE_X_HP"/>
+        <enum value="0x8156" name="GL_IMAGE_SCALE_Y_HP"/>
+        <enum value="0x8157" name="GL_IMAGE_TRANSLATE_X_HP"/>
+        <enum value="0x8158" name="GL_IMAGE_TRANSLATE_Y_HP"/>
+        <enum value="0x8159" name="GL_IMAGE_ROTATE_ANGLE_HP"/>
+        <enum value="0x815A" name="GL_IMAGE_ROTATE_ORIGIN_X_HP"/>
+        <enum value="0x815B" name="GL_IMAGE_ROTATE_ORIGIN_Y_HP"/>
+        <enum value="0x815C" name="GL_IMAGE_MAG_FILTER_HP"/>
+        <enum value="0x815D" name="GL_IMAGE_MIN_FILTER_HP"/>
+        <enum value="0x815E" name="GL_IMAGE_CUBIC_WEIGHT_HP"/>
+        <enum value="0x815F" name="GL_CUBIC_HP"/>
+        <enum value="0x8160" name="GL_AVERAGE_HP"/>
+        <enum value="0x8161" name="GL_IMAGE_TRANSFORM_2D_HP"/>
+        <enum value="0x8162" name="GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP"/>
+        <enum value="0x8163" name="GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP"/>
+            <unused start="0x8164"/>
+        <enum value="0x8165" name="GL_OCCLUSION_TEST_HP"/>
+        <enum value="0x8166" name="GL_OCCLUSION_TEST_RESULT_HP"/>
+        <enum value="0x8167" name="GL_TEXTURE_LIGHTING_MODE_HP"/>
+        <enum value="0x8168" name="GL_TEXTURE_POST_SPECULAR_HP"/>
+        <enum value="0x8169" name="GL_TEXTURE_PRE_SPECULAR_HP"/>
+            <unused start="0x816A" end="0x816F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8170" end="0x81CF" vendor="SGI">
+        <enum value="0x8170" name="GL_LINEAR_CLIPMAP_LINEAR_SGIX"/>
+        <enum value="0x8171" name="GL_TEXTURE_CLIPMAP_CENTER_SGIX"/>
+        <enum value="0x8172" name="GL_TEXTURE_CLIPMAP_FRAME_SGIX"/>
+        <enum value="0x8173" name="GL_TEXTURE_CLIPMAP_OFFSET_SGIX"/>
+        <enum value="0x8174" name="GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+        <enum value="0x8175" name="GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX"/>
+        <enum value="0x8176" name="GL_TEXTURE_CLIPMAP_DEPTH_SGIX"/>
+        <enum value="0x8177" name="GL_MAX_CLIPMAP_DEPTH_SGIX"/>
+        <enum value="0x8178" name="GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+        <enum value="0x8179" name="GL_POST_TEXTURE_FILTER_BIAS_SGIX"/>
+        <enum value="0x817A" name="GL_POST_TEXTURE_FILTER_SCALE_SGIX"/>
+        <enum value="0x817B" name="GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX"/>
+        <enum value="0x817C" name="GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX"/>
+        <enum value="0x817D" name="GL_REFERENCE_PLANE_SGIX"/>
+        <enum value="0x817E" name="GL_REFERENCE_PLANE_EQUATION_SGIX"/>
+        <enum value="0x817F" name="GL_IR_INSTRUMENT1_SGIX"/>
+        <enum value="0x8180" name="GL_INSTRUMENT_BUFFER_POINTER_SGIX"/>
+        <enum value="0x8181" name="GL_INSTRUMENT_MEASUREMENTS_SGIX"/>
+        <enum value="0x8182" name="GL_LIST_PRIORITY_SGIX"/>
+        <enum value="0x8183" name="GL_CALLIGRAPHIC_FRAGMENT_SGIX"/>
+        <enum value="0x8184" name="GL_PIXEL_TEX_GEN_Q_CEILING_SGIX"/>
+        <enum value="0x8185" name="GL_PIXEL_TEX_GEN_Q_ROUND_SGIX"/>
+        <enum value="0x8186" name="GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX"/>
+        <enum value="0x8187" name="GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX"/>
+        <enum value="0x8188" name="GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX"/>
+        <enum value="0x8189" name="GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX"/>
+        <enum value="0x818A" name="GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX"/>
+        <enum value="0x818B" name="GL_FRAMEZOOM_SGIX"/>
+        <enum value="0x818C" name="GL_FRAMEZOOM_FACTOR_SGIX"/>
+        <enum value="0x818D" name="GL_MAX_FRAMEZOOM_FACTOR_SGIX"/>
+        <enum value="0x818E" name="GL_TEXTURE_LOD_BIAS_S_SGIX"/>
+        <enum value="0x818F" name="GL_TEXTURE_LOD_BIAS_T_SGIX"/>
+        <enum value="0x8190" name="GL_TEXTURE_LOD_BIAS_R_SGIX"/>
+        <enum value="0x8191" name="GL_GENERATE_MIPMAP"/>
+        <enum value="0x8191" name="GL_GENERATE_MIPMAP_SGIS"/>
+        <enum value="0x8192" name="GL_GENERATE_MIPMAP_HINT"/>
+        <enum value="0x8192" name="GL_GENERATE_MIPMAP_HINT_SGIS"/>
+            <unused start="0x8193" end="0x8193" comment="Incomplete extension SGIX_spotlight_cutoff"/>
+            <!-- <enum value="0x8193" name="GL_SPOT_CUTOFF_DELTA_SGIX"/> -->
+        <enum value="0x8194" name="GL_GEOMETRY_DEFORMATION_SGIX"/>
+        <enum value="0x8195" name="GL_TEXTURE_DEFORMATION_SGIX"/>
+        <enum value="0x8196" name="GL_DEFORMATIONS_MASK_SGIX"/>
+        <enum value="0x8197" name="GL_MAX_DEFORMATION_ORDER_SGIX"/>
+        <enum value="0x8198" name="GL_FOG_OFFSET_SGIX"/>
+        <enum value="0x8199" name="GL_FOG_OFFSET_VALUE_SGIX"/>
+        <enum value="0x819A" name="GL_TEXTURE_COMPARE_SGIX"/>
+        <enum value="0x819B" name="GL_TEXTURE_COMPARE_OPERATOR_SGIX"/>
+        <enum value="0x819C" name="GL_TEXTURE_LEQUAL_R_SGIX"/>
+        <enum value="0x819D" name="GL_TEXTURE_GEQUAL_R_SGIX"/>
+            <unused start="0x819E" end="0x81A4" comment="Private (internal) extension SGIX_igloo_interface"/>
+            <!-- <enum value="0x819E" name="GL_IGLOO_FULLSCREEN_SGIX"/> -->
+            <!-- <enum value="0x819F" name="GL_IGLOO_VIEWPORT_OFFSET_SGIX"/> -->
+            <!-- <enum value="0x81A0" name="GL_IGLOO_SWAPTMESH_SGIX"/> -->
+            <!-- <enum value="0x81A1" name="GL_IGLOO_COLORNORMAL_SGIX"/> -->
+            <!-- <enum value="0x81A2" name="GL_IGLOO_IRISGL_MODE_SGIX"/> -->
+            <!-- <enum value="0x81A3" name="GL_IGLOO_LMC_COLOR_SGIX"/> -->
+            <!-- <enum value="0x81A4" name="GL_IGLOO_TMESHMODE_SGIX"/> -->
+        <enum value="0x81A5" name="GL_DEPTH_COMPONENT16"/>
+        <enum value="0x81A5" name="GL_DEPTH_COMPONENT16_ARB"/>
+        <enum value="0x81A5" name="GL_DEPTH_COMPONENT16_OES"/>
+        <enum value="0x81A5" name="GL_DEPTH_COMPONENT16_SGIX"/>
+        <enum value="0x81A6" name="GL_DEPTH_COMPONENT24"/>
+        <enum value="0x81A6" name="GL_DEPTH_COMPONENT24_ARB"/>
+        <enum value="0x81A6" name="GL_DEPTH_COMPONENT24_OES"/>
+        <enum value="0x81A6" name="GL_DEPTH_COMPONENT24_SGIX"/>
+        <enum value="0x81A7" name="GL_DEPTH_COMPONENT32"/>
+        <enum value="0x81A7" name="GL_DEPTH_COMPONENT32_ARB"/>
+        <enum value="0x81A7" name="GL_DEPTH_COMPONENT32_OES"/>
+        <enum value="0x81A7" name="GL_DEPTH_COMPONENT32_SGIX"/>
+        <enum value="0x81A8" name="GL_ARRAY_ELEMENT_LOCK_FIRST_EXT"/>
+        <enum value="0x81A9" name="GL_ARRAY_ELEMENT_LOCK_COUNT_EXT"/>
+        <enum value="0x81AA" name="GL_CULL_VERTEX_EXT"/>
+        <enum value="0x81AB" name="GL_CULL_VERTEX_EYE_POSITION_EXT"/>
+        <enum value="0x81AC" name="GL_CULL_VERTEX_OBJECT_POSITION_EXT"/>
+        <enum value="0x81AD" name="GL_IUI_V2F_EXT"/>
+        <enum value="0x81AE" name="GL_IUI_V3F_EXT"/>
+        <enum value="0x81AF" name="GL_IUI_N3F_V2F_EXT"/>
+        <enum value="0x81B0" name="GL_IUI_N3F_V3F_EXT"/>
+        <enum value="0x81B1" name="GL_T2F_IUI_V2F_EXT"/>
+        <enum value="0x81B2" name="GL_T2F_IUI_V3F_EXT"/>
+        <enum value="0x81B3" name="GL_T2F_IUI_N3F_V2F_EXT"/>
+        <enum value="0x81B4" name="GL_T2F_IUI_N3F_V3F_EXT"/>
+        <enum value="0x81B5" name="GL_INDEX_TEST_EXT"/>
+        <enum value="0x81B6" name="GL_INDEX_TEST_FUNC_EXT"/>
+        <enum value="0x81B7" name="GL_INDEX_TEST_REF_EXT"/>
+        <enum value="0x81B8" name="GL_INDEX_MATERIAL_EXT"/>
+        <enum value="0x81B9" name="GL_INDEX_MATERIAL_PARAMETER_EXT"/>
+        <enum value="0x81BA" name="GL_INDEX_MATERIAL_FACE_EXT"/>
+        <enum value="0x81BB" name="GL_YCRCB_422_SGIX"/>
+        <enum value="0x81BC" name="GL_YCRCB_444_SGIX"/>
+            <unused start="0x81BD" end="0x81C3" comment="Incomplete extension SGI_complex_type"/>
+            <!-- <enum value="0x81BD" name="GL_COMPLEX_UNSIGNED_BYTE_SGI"/> -->
+            <!-- <enum value="0x81BE" name="GL_COMPLEX_BYTE_SGI"/> -->
+            <!-- <enum value="0x81BF" name="GL_COMPLEX_UNSIGNED_SHORT_SGI"/> -->
+            <!-- <enum value="0x81C0" name="GL_COMPLEX_SHORT_SGI"/> -->
+            <!-- <enum value="0x81C1" name="GL_COMPLEX_UNSIGNED_INT_SGI"/> -->
+            <!-- <enum value="0x81C2" name="GL_COMPLEX_INT_SGI"/> -->
+            <!-- <enum value="0x81C3" name="GL_COMPLEX_FLOAT_SGI"/> -->
+            <unused start="0x81C4" end="0x81CA" comment="Incomplete extension SGI_fft"/>
+            <!-- <enum value="0x81C4" name="GL_PIXEL_TRANSFORM_OPERATOR_SGI"/> -->
+            <!-- <enum value="0x81C5" name="GL_CONVOLUTION_SGI"/> -->
+            <!-- <enum value="0x81C6" name="GL_FFT_1D_SGI"/> -->
+            <!-- <enum value="0x81C7" name="GL_PIXEL_TRANSFORM_SGI"/> -->
+            <!-- <enum value="0x81C8" name="GL_MAX_FFT_WIDTH_SGI"/> -->
+            <!-- <enum value="0x81C9" name="GL_SORT_SGI"/> -->
+            <!-- <enum value="0x81CA" name="GL_TRANSPOSE_SGI"/> -->
+            <unused start="0x81CB" end="0x81CF" comment="Incomplete extension SGIX_nurbs_eval"/>
+            <!-- <enum value="0x81CB" name="GL_MAP1_VERTEX_3_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81CC" name="GL_MAP1_VERTEX_4_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81CD" name="GL_MAP1_INDEX_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81CE" name="GL_MAP1_COLOR_4_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81CF" name="GL_MAP1_NORMAL_NURBS_SGIX"/> -->
+    </enums>
+
+    <enums namespace="GL" start="0x81D0" end="0x81DF" vendor="SUN">
+            <unused start="0x81D0" end="0x81D1"/>
+            <unused start="0x81D2" end="0x81D3" comment="No extension spec SUNX_surface_hint"/>
+            <!-- <enum value="0x81D2" name="GL_SURFACE_SIZE_HINT_SUNX"/> -->
+            <!-- <enum value="0x81D3" name="GL_LARGE_SUNX"/> -->
+        <enum value="0x81D4" name="GL_WRAP_BORDER_SUN"/>
+        <enum value="0x81D5" name="GL_UNPACK_CONSTANT_DATA_SUNX"/>
+        <enum value="0x81D6" name="GL_TEXTURE_CONSTANT_DATA_SUNX"/>
+        <enum value="0x81D7" name="GL_TRIANGLE_LIST_SUN"/>
+        <enum value="0x81D8" name="GL_REPLACEMENT_CODE_SUN"/>
+        <enum value="0x81D9" name="GL_GLOBAL_ALPHA_SUN"/>
+        <enum value="0x81DA" name="GL_GLOBAL_ALPHA_FACTOR_SUN"/>
+            <unused start="0x81DB" end="0x81DF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x81E0" end="0x81FF" vendor="SGI">
+            <unused start="0x81E0" end="0x81EE" comment="Incomplete extension SGIX_nurbs_eval"/>
+            <!-- <enum value="0x81E0" name="GL_MAP1_TEXTURE_COORD_1_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E1" name="GL_MAP1_TEXTURE_COORD_2_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E2" name="GL_MAP1_TEXTURE_COORD_3_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E3" name="GL_MAP1_TEXTURE_COORD_4_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E4" name="GL_MAP2_VERTEX_3_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E5" name="GL_MAP2_VERTEX_4_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E6" name="GL_MAP2_INDEX_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E7" name="GL_MAP2_COLOR_4_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E8" name="GL_MAP2_NORMAL_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81E9" name="GL_MAP2_TEXTURE_COORD_1_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81EA" name="GL_MAP2_TEXTURE_COORD_2_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81EB" name="GL_MAP2_TEXTURE_COORD_3_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81EC" name="GL_MAP2_TEXTURE_COORD_4_NURBS_SGIX"/> -->
+            <!-- <enum value="0x81ED" name="GL_NURBS_KNOT_COUNT_SGIX"/> -->
+            <!-- <enum value="0x81EE" name="GL_NURBS_KNOT_VECTOR_SGIX"/> -->
+        <enum value="0x81EF" name="GL_TEXTURE_COLOR_WRITEMASK_SGIS"/>
+        <enum value="0x81F0" name="GL_EYE_DISTANCE_TO_POINT_SGIS"/>
+        <enum value="0x81F1" name="GL_OBJECT_DISTANCE_TO_POINT_SGIS"/>
+        <enum value="0x81F2" name="GL_EYE_DISTANCE_TO_LINE_SGIS"/>
+        <enum value="0x81F3" name="GL_OBJECT_DISTANCE_TO_LINE_SGIS"/>
+        <enum value="0x81F4" name="GL_EYE_POINT_SGIS"/>
+        <enum value="0x81F5" name="GL_OBJECT_POINT_SGIS"/>
+        <enum value="0x81F6" name="GL_EYE_LINE_SGIS"/>
+        <enum value="0x81F7" name="GL_OBJECT_LINE_SGIS"/>
+        <enum value="0x81F8" name="GL_LIGHT_MODEL_COLOR_CONTROL"/>
+        <enum value="0x81F8" name="GL_LIGHT_MODEL_COLOR_CONTROL_EXT"/>
+        <enum value="0x81F9" name="GL_SINGLE_COLOR"/>
+        <enum value="0x81F9" name="GL_SINGLE_COLOR_EXT"/>
+        <enum value="0x81FA" name="GL_SEPARATE_SPECULAR_COLOR"/>
+        <enum value="0x81FA" name="GL_SEPARATE_SPECULAR_COLOR_EXT"/>
+        <enum value="0x81FB" name="GL_SHARED_TEXTURE_PALETTE_EXT"/>
+            <unused start="0x81FC" end="0x81FD" comment="Incomplete extension SGIX_fog_scale"/>
+            <!-- <enum value="0x81FC" name="GL_FOG_SCALE_SGIX"/> -->
+            <!-- <enum value="0x81FD" name="GL_FOG_SCALE_VALUE_SGIX"/> -->
+            <unused start="0x81FE" end="0x81FF" comment="Incomplete extension SGIX_fog_blend"/>
+            <!-- <enum value="0x81FE" name="GL_FOG_BLEND_ALPHA_SGIX"/> -->
+            <!-- <enum value="0x81FF" name="GL_FOG_BLEND_COLOR_SGIX"/> -->
+    </enums>
+
+    <enums namespace="GL" start="0x8200" end="0x820F" vendor="AMD" comment="Range released by MS 2002/9/16">
+        <enum value="0x8200" name="GL_TEXT_FRAGMENT_SHADER_ATI"/>
+            <unused start="0x8201" end="0x820F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8210" end="0x823F" vendor="ARB">
+        <enum value="0x8210" name="GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"/>
+        <enum value="0x8210" name="GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT"/>
+        <enum value="0x8211" name="GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"/>
+        <enum value="0x8211" name="GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT"/>
+        <enum value="0x8212" name="GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE"/>
+        <enum value="0x8213" name="GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE"/>
+        <enum value="0x8214" name="GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE"/>
+        <enum value="0x8215" name="GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE"/>
+        <enum value="0x8216" name="GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE"/>
+        <enum value="0x8217" name="GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE"/>
+        <enum value="0x8218" name="GL_FRAMEBUFFER_DEFAULT"/>
+        <enum value="0x8219" name="GL_FRAMEBUFFER_UNDEFINED"/>
+        <enum value="0x8219" name="GL_FRAMEBUFFER_UNDEFINED_OES"/>
+        <enum value="0x821A" name="GL_DEPTH_STENCIL_ATTACHMENT"/>
+        <enum value="0x821B" name="GL_MAJOR_VERSION"/>
+        <enum value="0x821C" name="GL_MINOR_VERSION"/>
+        <enum value="0x821D" name="GL_NUM_EXTENSIONS"/>
+        <enum value="0x821E" name="GL_CONTEXT_FLAGS"/>
+        <enum value="0x821F" name="GL_BUFFER_IMMUTABLE_STORAGE"/>
+        <enum value="0x8220" name="GL_BUFFER_STORAGE_FLAGS"/>
+        <enum value="0x8221" name="GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED" comment="Proposed for Bug 10364"/>
+        <enum value="0x8222" name="GL_INDEX"/>
+            <unused start="0x8223" comment="GL_DEPTH_BUFFER = 0x8223 not actually used in the API"/>
+            <unused start="0x8224" comment="GL_STENCIL_BUFFER = 0x8224 not actually used in the API"/>
+        <enum value="0x8225" name="GL_COMPRESSED_RED"/>
+        <enum value="0x8226" name="GL_COMPRESSED_RG"/>
+        <enum value="0x8227" name="GL_RG"/>
+        <enum value="0x8227" name="GL_RG_EXT"/>
+        <enum value="0x8228" name="GL_RG_INTEGER"/>
+        <enum value="0x8229" name="GL_R8"/>
+        <enum value="0x8229" name="GL_R8_EXT"/>
+        <enum value="0x822A" name="GL_R16"/>
+        <enum value="0x822B" name="GL_RG8"/>
+        <enum value="0x822B" name="GL_RG8_EXT"/>
+        <enum value="0x822C" name="GL_RG16"/>
+        <enum value="0x822D" name="GL_R16F"/>
+        <enum value="0x822D" name="GL_R16F_EXT"/>
+        <enum value="0x822E" name="GL_R32F"/>
+        <enum value="0x822E" name="GL_R32F_EXT"/>
+        <enum value="0x822F" name="GL_RG16F"/>
+        <enum value="0x822F" name="GL_RG16F_EXT"/>
+        <enum value="0x8230" name="GL_RG32F"/>
+        <enum value="0x8230" name="GL_RG32F_EXT"/>
+        <enum value="0x8231" name="GL_R8I"/>
+        <enum value="0x8232" name="GL_R8UI"/>
+        <enum value="0x8233" name="GL_R16I"/>
+        <enum value="0x8234" name="GL_R16UI"/>
+        <enum value="0x8235" name="GL_R32I"/>
+        <enum value="0x8236" name="GL_R32UI"/>
+        <enum value="0x8237" name="GL_RG8I"/>
+        <enum value="0x8238" name="GL_RG8UI"/>
+        <enum value="0x8239" name="GL_RG16I"/>
+        <enum value="0x823A" name="GL_RG16UI"/>
+        <enum value="0x823B" name="GL_RG32I"/>
+        <enum value="0x823C" name="GL_RG32UI"/>
+            <unused start="0x823D" end="0x823F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8240" end="0x82AF" vendor="ARB" comment="Range released by MS on 2002/9/16">
+        <enum value="0x8240" name="GL_SYNC_CL_EVENT_ARB"/>
+        <enum value="0x8241" name="GL_SYNC_CL_EVENT_COMPLETE_ARB"/>
+        <enum value="0x8242" name="GL_DEBUG_OUTPUT_SYNCHRONOUS"/>
+        <enum value="0x8242" name="GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB"/>
+        <enum value="0x8242" name="GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR"/>
+        <enum value="0x8243" name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH"/>
+        <enum value="0x8243" name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB"/>
+        <enum value="0x8243" name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR"/>
+        <enum value="0x8244" name="GL_DEBUG_CALLBACK_FUNCTION"/>
+        <enum value="0x8244" name="GL_DEBUG_CALLBACK_FUNCTION_ARB"/>
+        <enum value="0x8244" name="GL_DEBUG_CALLBACK_FUNCTION_KHR"/>
+        <enum value="0x8245" name="GL_DEBUG_CALLBACK_USER_PARAM"/>
+        <enum value="0x8245" name="GL_DEBUG_CALLBACK_USER_PARAM_ARB"/>
+        <enum value="0x8245" name="GL_DEBUG_CALLBACK_USER_PARAM_KHR"/>
+        <enum value="0x8246" name="GL_DEBUG_SOURCE_API"/>
+        <enum value="0x8246" name="GL_DEBUG_SOURCE_API_ARB"/>
+        <enum value="0x8246" name="GL_DEBUG_SOURCE_API_KHR"/>
+        <enum value="0x8247" name="GL_DEBUG_SOURCE_WINDOW_SYSTEM"/>
+        <enum value="0x8247" name="GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB"/>
+        <enum value="0x8247" name="GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR"/>
+        <enum value="0x8248" name="GL_DEBUG_SOURCE_SHADER_COMPILER"/>
+        <enum value="0x8248" name="GL_DEBUG_SOURCE_SHADER_COMPILER_ARB"/>
+        <enum value="0x8248" name="GL_DEBUG_SOURCE_SHADER_COMPILER_KHR"/>
+        <enum value="0x8249" name="GL_DEBUG_SOURCE_THIRD_PARTY"/>
+        <enum value="0x8249" name="GL_DEBUG_SOURCE_THIRD_PARTY_ARB"/>
+        <enum value="0x8249" name="GL_DEBUG_SOURCE_THIRD_PARTY_KHR"/>
+        <enum value="0x824A" name="GL_DEBUG_SOURCE_APPLICATION"/>
+        <enum value="0x824A" name="GL_DEBUG_SOURCE_APPLICATION_ARB"/>
+        <enum value="0x824A" name="GL_DEBUG_SOURCE_APPLICATION_KHR"/>
+        <enum value="0x824B" name="GL_DEBUG_SOURCE_OTHER"/>
+        <enum value="0x824B" name="GL_DEBUG_SOURCE_OTHER_ARB"/>
+        <enum value="0x824B" name="GL_DEBUG_SOURCE_OTHER_KHR"/>
+        <enum value="0x824C" name="GL_DEBUG_TYPE_ERROR"/>
+        <enum value="0x824C" name="GL_DEBUG_TYPE_ERROR_ARB"/>
+        <enum value="0x824C" name="GL_DEBUG_TYPE_ERROR_KHR"/>
+        <enum value="0x824D" name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR"/>
+        <enum value="0x824D" name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB"/>
+        <enum value="0x824D" name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR"/>
+        <enum value="0x824E" name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR"/>
+        <enum value="0x824E" name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB"/>
+        <enum value="0x824E" name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR"/>
+        <enum value="0x824F" name="GL_DEBUG_TYPE_PORTABILITY"/>
+        <enum value="0x824F" name="GL_DEBUG_TYPE_PORTABILITY_ARB"/>
+        <enum value="0x824F" name="GL_DEBUG_TYPE_PORTABILITY_KHR"/>
+        <enum value="0x8250" name="GL_DEBUG_TYPE_PERFORMANCE"/>
+        <enum value="0x8250" name="GL_DEBUG_TYPE_PERFORMANCE_ARB"/>
+        <enum value="0x8250" name="GL_DEBUG_TYPE_PERFORMANCE_KHR"/>
+        <enum value="0x8251" name="GL_DEBUG_TYPE_OTHER"/>
+        <enum value="0x8251" name="GL_DEBUG_TYPE_OTHER_ARB"/>
+        <enum value="0x8251" name="GL_DEBUG_TYPE_OTHER_KHR"/>
+        <enum value="0x8252" name="GL_LOSE_CONTEXT_ON_RESET_ARB"/>
+        <enum value="0x8252" name="GL_LOSE_CONTEXT_ON_RESET_EXT"/>
+        <enum value="0x8253" name="GL_GUILTY_CONTEXT_RESET_ARB"/>
+        <enum value="0x8253" name="GL_GUILTY_CONTEXT_RESET_EXT"/>
+        <enum value="0x8254" name="GL_INNOCENT_CONTEXT_RESET_ARB"/>
+        <enum value="0x8254" name="GL_INNOCENT_CONTEXT_RESET_EXT"/>
+        <enum value="0x8255" name="GL_UNKNOWN_CONTEXT_RESET_ARB"/>
+        <enum value="0x8255" name="GL_UNKNOWN_CONTEXT_RESET_EXT"/>
+        <enum value="0x8256" name="GL_RESET_NOTIFICATION_STRATEGY_ARB"/>
+        <enum value="0x8256" name="GL_RESET_NOTIFICATION_STRATEGY_EXT"/>
+        <enum value="0x8257" name="GL_PROGRAM_BINARY_RETRIEVABLE_HINT"/>
+        <enum value="0x8258" name="GL_PROGRAM_SEPARABLE"/>
+        <enum value="0x8258" name="GL_PROGRAM_SEPARABLE_EXT"/>
+        <enum value="0x8259" name="GL_ACTIVE_PROGRAM"/>
+        <enum value="0x8259" api="gles2" name="GL_ACTIVE_PROGRAM_EXT" comment="For the OpenGL ES version of EXT_separate_shader_objects"/>
+        <enum value="0x825A" name="GL_PROGRAM_PIPELINE_BINDING"/>
+        <enum value="0x825A" name="GL_PROGRAM_PIPELINE_BINDING_EXT"/>
+        <enum value="0x825B" name="GL_MAX_VIEWPORTS"/>
+        <enum value="0x825C" name="GL_VIEWPORT_SUBPIXEL_BITS"/>
+        <enum value="0x825D" name="GL_VIEWPORT_BOUNDS_RANGE"/>
+        <enum value="0x825E" name="GL_LAYER_PROVOKING_VERTEX"/>
+        <enum value="0x825E" name="GL_LAYER_PROVOKING_VERTEX_EXT"/>
+        <enum value="0x825F" name="GL_VIEWPORT_INDEX_PROVOKING_VERTEX"/>
+        <enum value="0x8260" name="GL_UNDEFINED_VERTEX"/>
+        <enum value="0x8260" name="GL_UNDEFINED_VERTEX_EXT"/>                                
+        <enum value="0x8261" name="GL_NO_RESET_NOTIFICATION_ARB"/>
+        <enum value="0x8261" name="GL_NO_RESET_NOTIFICATION_EXT"/>
+        <enum value="0x8262" name="GL_MAX_COMPUTE_SHARED_MEMORY_SIZE"/>
+        <enum value="0x8263" name="GL_MAX_COMPUTE_UNIFORM_COMPONENTS"/>
+        <enum value="0x8264" name="GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x8265" name="GL_MAX_COMPUTE_ATOMIC_COUNTERS"/>
+        <enum value="0x8266" name="GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS"/>
+        <enum value="0x8267" name="GL_COMPUTE_WORK_GROUP_SIZE"/>
+        <enum value="0x8268" name="GL_DEBUG_TYPE_MARKER"/>
+        <enum value="0x8268" name="GL_DEBUG_TYPE_MARKER_KHR"/>
+        <enum value="0x8269" name="GL_DEBUG_TYPE_PUSH_GROUP"/>
+        <enum value="0x8269" name="GL_DEBUG_TYPE_PUSH_GROUP_KHR"/>
+        <enum value="0x826A" name="GL_DEBUG_TYPE_POP_GROUP"/>
+        <enum value="0x826A" name="GL_DEBUG_TYPE_POP_GROUP_KHR"/>
+        <enum value="0x826B" name="GL_DEBUG_SEVERITY_NOTIFICATION"/>
+        <enum value="0x826B" name="GL_DEBUG_SEVERITY_NOTIFICATION_KHR"/>
+        <enum value="0x826C" name="GL_MAX_DEBUG_GROUP_STACK_DEPTH"/>
+        <enum value="0x826C" name="GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR"/>
+        <enum value="0x826D" name="GL_DEBUG_GROUP_STACK_DEPTH"/>
+        <enum value="0x826D" name="GL_DEBUG_GROUP_STACK_DEPTH_KHR"/>
+        <enum value="0x826E" name="GL_MAX_UNIFORM_LOCATIONS"/>
+        <enum value="0x826F" name="GL_INTERNALFORMAT_SUPPORTED"/>
+        <enum value="0x8270" name="GL_INTERNALFORMAT_PREFERRED"/>
+        <enum value="0x8271" name="GL_INTERNALFORMAT_RED_SIZE"/>
+        <enum value="0x8272" name="GL_INTERNALFORMAT_GREEN_SIZE"/>
+        <enum value="0x8273" name="GL_INTERNALFORMAT_BLUE_SIZE"/>
+        <enum value="0x8274" name="GL_INTERNALFORMAT_ALPHA_SIZE"/>
+        <enum value="0x8275" name="GL_INTERNALFORMAT_DEPTH_SIZE"/>
+        <enum value="0x8276" name="GL_INTERNALFORMAT_STENCIL_SIZE"/>
+        <enum value="0x8277" name="GL_INTERNALFORMAT_SHARED_SIZE"/>
+        <enum value="0x8278" name="GL_INTERNALFORMAT_RED_TYPE"/>
+        <enum value="0x8279" name="GL_INTERNALFORMAT_GREEN_TYPE"/>
+        <enum value="0x827A" name="GL_INTERNALFORMAT_BLUE_TYPE"/>
+        <enum value="0x827B" name="GL_INTERNALFORMAT_ALPHA_TYPE"/>
+        <enum value="0x827C" name="GL_INTERNALFORMAT_DEPTH_TYPE"/>
+        <enum value="0x827D" name="GL_INTERNALFORMAT_STENCIL_TYPE"/>
+        <enum value="0x827E" name="GL_MAX_WIDTH"/>
+        <enum value="0x827F" name="GL_MAX_HEIGHT"/>
+        <enum value="0x8280" name="GL_MAX_DEPTH"/>
+        <enum value="0x8281" name="GL_MAX_LAYERS"/>
+        <enum value="0x8282" name="GL_MAX_COMBINED_DIMENSIONS"/>
+        <enum value="0x8283" name="GL_COLOR_COMPONENTS"/>
+        <enum value="0x8284" name="GL_DEPTH_COMPONENTS"/>
+        <enum value="0x8285" name="GL_STENCIL_COMPONENTS"/>
+        <enum value="0x8286" name="GL_COLOR_RENDERABLE"/>
+        <enum value="0x8287" name="GL_DEPTH_RENDERABLE"/>
+        <enum value="0x8288" name="GL_STENCIL_RENDERABLE"/>
+        <enum value="0x8289" name="GL_FRAMEBUFFER_RENDERABLE"/>
+        <enum value="0x828A" name="GL_FRAMEBUFFER_RENDERABLE_LAYERED"/>
+        <enum value="0x828B" name="GL_FRAMEBUFFER_BLEND"/>
+        <enum value="0x828C" name="GL_READ_PIXELS"/>
+        <enum value="0x828D" name="GL_READ_PIXELS_FORMAT"/>
+        <enum value="0x828E" name="GL_READ_PIXELS_TYPE"/>
+        <enum value="0x828F" name="GL_TEXTURE_IMAGE_FORMAT"/>
+        <enum value="0x8290" name="GL_TEXTURE_IMAGE_TYPE"/>
+        <enum value="0x8291" name="GL_GET_TEXTURE_IMAGE_FORMAT"/>
+        <enum value="0x8292" name="GL_GET_TEXTURE_IMAGE_TYPE"/>
+        <enum value="0x8293" name="GL_MIPMAP"/>
+        <enum value="0x8294" name="GL_MANUAL_GENERATE_MIPMAP"/>
+        <enum value="0x8295" name="GL_AUTO_GENERATE_MIPMAP" comment="Should be deprecated"/>
+        <enum value="0x8296" name="GL_COLOR_ENCODING"/>
+        <enum value="0x8297" name="GL_SRGB_READ"/>
+        <enum value="0x8298" name="GL_SRGB_WRITE"/>
+        <enum value="0x8299" name="GL_SRGB_DECODE_ARB"/>
+        <enum value="0x829A" name="GL_FILTER"/>
+        <enum value="0x829B" name="GL_VERTEX_TEXTURE"/>
+        <enum value="0x829C" name="GL_TESS_CONTROL_TEXTURE"/>
+        <enum value="0x829D" name="GL_TESS_EVALUATION_TEXTURE"/>
+        <enum value="0x829E" name="GL_GEOMETRY_TEXTURE"/>
+        <enum value="0x829F" name="GL_FRAGMENT_TEXTURE"/>
+        <enum value="0x82A0" name="GL_COMPUTE_TEXTURE"/>
+        <enum value="0x82A1" name="GL_TEXTURE_SHADOW"/>
+        <enum value="0x82A2" name="GL_TEXTURE_GATHER"/>
+        <enum value="0x82A3" name="GL_TEXTURE_GATHER_SHADOW"/>
+        <enum value="0x82A4" name="GL_SHADER_IMAGE_LOAD"/>
+        <enum value="0x82A5" name="GL_SHADER_IMAGE_STORE"/>
+        <enum value="0x82A6" name="GL_SHADER_IMAGE_ATOMIC"/>
+        <enum value="0x82A7" name="GL_IMAGE_TEXEL_SIZE"/>
+        <enum value="0x82A8" name="GL_IMAGE_COMPATIBILITY_CLASS"/>
+        <enum value="0x82A9" name="GL_IMAGE_PIXEL_FORMAT"/>
+        <enum value="0x82AA" name="GL_IMAGE_PIXEL_TYPE"/>
+            <unused start="0x82AB"/>
+        <enum value="0x82AC" name="GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST"/>
+        <enum value="0x82AD" name="GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST"/>
+        <enum value="0x82AE" name="GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE"/>
+        <enum value="0x82AF" name="GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE"/>
+    </enums>
+
+    <enums namespace="GL" start="0x82B0" end="0x830F" vendor="ARB" comment="Range reclaimed from ADD on 2012/05/10">
+            <unused start="0x82B0"/>
+        <enum value="0x82B1" name="GL_TEXTURE_COMPRESSED_BLOCK_WIDTH"/>
+        <enum value="0x82B2" name="GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT"/>
+        <enum value="0x82B3" name="GL_TEXTURE_COMPRESSED_BLOCK_SIZE"/>
+        <enum value="0x82B4" name="GL_CLEAR_BUFFER"/>
+        <enum value="0x82B5" name="GL_TEXTURE_VIEW"/>
+        <enum value="0x82B6" name="GL_VIEW_COMPATIBILITY_CLASS"/>
+        <enum value="0x82B7" name="GL_FULL_SUPPORT"/>
+        <enum value="0x82B8" name="GL_CAVEAT_SUPPORT"/>
+        <enum value="0x82B9" name="GL_IMAGE_CLASS_4_X_32"/>
+        <enum value="0x82BA" name="GL_IMAGE_CLASS_2_X_32"/>
+        <enum value="0x82BB" name="GL_IMAGE_CLASS_1_X_32"/>
+        <enum value="0x82BC" name="GL_IMAGE_CLASS_4_X_16"/>
+        <enum value="0x82BD" name="GL_IMAGE_CLASS_2_X_16"/>
+        <enum value="0x82BE" name="GL_IMAGE_CLASS_1_X_16"/>
+        <enum value="0x82BF" name="GL_IMAGE_CLASS_4_X_8"/>
+        <enum value="0x82C0" name="GL_IMAGE_CLASS_2_X_8"/>
+        <enum value="0x82C1" name="GL_IMAGE_CLASS_1_X_8"/>
+        <enum value="0x82C2" name="GL_IMAGE_CLASS_11_11_10"/>
+        <enum value="0x82C3" name="GL_IMAGE_CLASS_10_10_10_2"/>
+        <enum value="0x82C4" name="GL_VIEW_CLASS_128_BITS"/>
+        <enum value="0x82C5" name="GL_VIEW_CLASS_96_BITS"/>
+        <enum value="0x82C6" name="GL_VIEW_CLASS_64_BITS"/>
+        <enum value="0x82C7" name="GL_VIEW_CLASS_48_BITS"/>
+        <enum value="0x82C8" name="GL_VIEW_CLASS_32_BITS"/>
+        <enum value="0x82C9" name="GL_VIEW_CLASS_24_BITS"/>
+        <enum value="0x82CA" name="GL_VIEW_CLASS_16_BITS"/>
+        <enum value="0x82CB" name="GL_VIEW_CLASS_8_BITS"/>
+        <enum value="0x82CC" name="GL_VIEW_CLASS_S3TC_DXT1_RGB"/>
+        <enum value="0x82CD" name="GL_VIEW_CLASS_S3TC_DXT1_RGBA"/>
+        <enum value="0x82CE" name="GL_VIEW_CLASS_S3TC_DXT3_RGBA"/>
+        <enum value="0x82CF" name="GL_VIEW_CLASS_S3TC_DXT5_RGBA"/>
+        <enum value="0x82D0" name="GL_VIEW_CLASS_RGTC1_RED"/>
+        <enum value="0x82D1" name="GL_VIEW_CLASS_RGTC2_RG"/>
+        <enum value="0x82D2" name="GL_VIEW_CLASS_BPTC_UNORM"/>
+        <enum value="0x82D3" name="GL_VIEW_CLASS_BPTC_FLOAT"/>
+        <enum value="0x82D4" name="GL_VERTEX_ATTRIB_BINDING"/>
+        <enum value="0x82D5" name="GL_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+        <enum value="0x82D6" name="GL_VERTEX_BINDING_DIVISOR"/>
+        <enum value="0x82D7" name="GL_VERTEX_BINDING_OFFSET"/>
+        <enum value="0x82D8" name="GL_VERTEX_BINDING_STRIDE"/>
+        <enum value="0x82D9" name="GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+        <enum value="0x82DA" name="GL_MAX_VERTEX_ATTRIB_BINDINGS"/>
+        <enum value="0x82DB" name="GL_TEXTURE_VIEW_MIN_LEVEL"/>
+        <enum value="0x82DB" name="GL_TEXTURE_VIEW_MIN_LEVEL_EXT"/>                          
+        <enum value="0x82DC" name="GL_TEXTURE_VIEW_NUM_LEVELS"/>
+        <enum value="0x82DC" name="GL_TEXTURE_VIEW_NUM_LEVELS_EXT"/>                         
+        <enum value="0x82DD" name="GL_TEXTURE_VIEW_MIN_LAYER"/>
+        <enum value="0x82DD" name="GL_TEXTURE_VIEW_MIN_LAYER_EXT"/>                          
+        <enum value="0x82DE" name="GL_TEXTURE_VIEW_NUM_LAYERS"/>
+        <enum value="0x82DE" name="GL_TEXTURE_VIEW_NUM_LAYERS_EXT"/>                         
+        <enum value="0x82DF" name="GL_TEXTURE_IMMUTABLE_LEVELS"/>
+        <enum value="0x82E0" name="GL_BUFFER"/>
+        <enum value="0x82E0" name="GL_BUFFER_KHR"/>
+        <enum value="0x82E1" name="GL_SHADER"/>
+        <enum value="0x82E1" name="GL_SHADER_KHR"/>
+        <enum value="0x82E2" name="GL_PROGRAM"/>
+        <enum value="0x82E2" name="GL_PROGRAM_KHR"/>
+        <enum value="0x82E3" name="GL_QUERY"/>
+        <enum value="0x82E3" name="GL_QUERY_KHR"/>
+        <enum value="0x82E4" name="GL_PROGRAM_PIPELINE"/>
+        <enum value="0x82E5" name="GL_MAX_VERTEX_ATTRIB_STRIDE"/>
+        <enum value="0x82E6" name="GL_SAMPLER"/>
+        <enum value="0x82E6" name="GL_SAMPLER_KHR"/>
+        <enum value="0x82E7" name="GL_DISPLAY_LIST"/>
+        <enum value="0x82E8" name="GL_MAX_LABEL_LENGTH"/>
+        <enum value="0x82E8" name="GL_MAX_LABEL_LENGTH_KHR"/>
+        <enum value="0x82E9" name="GL_NUM_SHADING_LANGUAGE_VERSIONS"/>
+            <unused start="0x82E9" end="0x830F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8310" end="0x832F" vendor="SGI">
+        <enum value="0x8310" name="GL_DEPTH_PASS_INSTRUMENT_SGIX"/>
+        <enum value="0x8311" name="GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX"/>
+        <enum value="0x8312" name="GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX"/>
+        <enum value="0x8313" name="GL_FRAGMENTS_INSTRUMENT_SGIX"/>
+        <enum value="0x8314" name="GL_FRAGMENTS_INSTRUMENT_COUNTERS_SGIX"/>
+        <enum value="0x8315" name="GL_FRAGMENTS_INSTRUMENT_MAX_SGIX"/>
+        <enum value="0x8316" name="GL_CONVOLUTION_HINT_SGIX"/>
+            <unused start="0x8317" comment="Incomplete extension SGIX_color_matrix_accuracy"/>
+            <!-- <enum value="0x8317" name="GL_COLOR_MATRIX_HINT"/> -->
+        <enum value="0x8318" name="GL_YCRCB_SGIX"/>
+        <enum value="0x8319" name="GL_YCRCBA_SGIX"/>
+        <enum value="0x831A" name="GL_UNPACK_COMPRESSED_SIZE_SGIX"/>
+        <enum value="0x831B" name="GL_PACK_MAX_COMPRESSED_SIZE_SGIX"/>
+        <enum value="0x831C" name="GL_PACK_COMPRESSED_SIZE_SGIX"/>
+        <enum value="0x831D" name="GL_SLIM8U_SGIX"/>
+        <enum value="0x831E" name="GL_SLIM10U_SGIX"/>
+        <enum value="0x831F" name="GL_SLIM12S_SGIX"/>
+        <enum value="0x8320" name="GL_ALPHA_MIN_SGIX"/>
+        <enum value="0x8321" name="GL_ALPHA_MAX_SGIX"/>
+        <enum value="0x8322" name="GL_SCALEBIAS_HINT_SGIX"/>
+            <unused start="0x8323" end="0x8328" comment="Incomplete extension SGIX_fog_layers"/>
+            <!-- <enum value="0x8323" name="GL_FOG_TYPE_SGIX"/> -->
+            <!-- <enum value="0x8324" name="GL_UNIFORM_SGIX"/> -->
+            <!-- <enum value="0x8325" name="GL_LAYERED_SGIX"/> -->
+            <!-- <enum value="0x8326" name="GL_FOG_GROUND_PLANE_SGIX"/> -->
+            <!-- <enum value="0x8327" name="GL_FOG_LAYERS_POINTS_SGIX"/> -->
+            <!-- <enum value="0x8328" name="GL_MAX_FOG_LAYERS_POINTS_SGIX"/> -->
+        <enum value="0x8329" name="GL_ASYNC_MARKER_SGIX"/>
+            <unused start="0x832A" comment="Incomplete extension SGIX_texture_phase"/>
+            <!-- <enum value="0x832A" name="GL_PHASE_SGIX"/> -->
+        <enum value="0x832B" name="GL_PIXEL_TEX_GEN_MODE_SGIX"/>
+        <enum value="0x832C" name="GL_ASYNC_HISTOGRAM_SGIX"/>
+        <enum value="0x832D" name="GL_MAX_ASYNC_HISTOGRAM_SGIX"/>
+            <unused start="0x832E" end="0x832F" comment="Incomplete extension SGIX_texture_mipmap_anisotropic"/>
+            <!-- <enum value="0x832E" name="GL_TEXTURE_MIPMAP_ANISOTROPY_SGIX"/> -->
+            <!-- <enum value="0x832F" name="GL_MAX_MIPMAP_ANISOTROPY_SGIX"/> -->
+    </enums>
+
+    <enums namespace="GL" start="0x8330" end="0x833F" vendor="SUN">
+        <enum value="0x8330" name="GL_PIXEL_TRANSFORM_2D_EXT"/>
+        <enum value="0x8331" name="GL_PIXEL_MAG_FILTER_EXT"/>
+        <enum value="0x8332" name="GL_PIXEL_MIN_FILTER_EXT"/>
+        <enum value="0x8333" name="GL_PIXEL_CUBIC_WEIGHT_EXT"/>
+        <enum value="0x8334" name="GL_CUBIC_EXT"/>
+        <enum value="0x8335" name="GL_AVERAGE_EXT"/>
+        <enum value="0x8336" name="GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT"/>
+        <enum value="0x8337" name="GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT"/>
+        <enum value="0x8338" name="GL_PIXEL_TRANSFORM_2D_MATRIX_EXT"/>
+            <unused start="0x8339" end="0x833F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8340" end="0x836F" vendor="SGI">
+            <unused start="0x8340" end="0x8348" comment="Incomplete extension SGIX_cube_map"/>
+            <!-- <enum value="0x8340" name="GL_ENV_MAP_SGIX"/> -->
+            <!-- <enum value="0x8341" name="GL_CUBE_MAP_SGIX"/> -->
+            <!-- <enum value="0x8342" name="GL_CUBE_MAP_ZP_SGIX"/> -->
+            <!-- <enum value="0x8343" name="GL_CUBE_MAP_ZN_SGIX"/> -->
+            <!-- <enum value="0x8344" name="GL_CUBE_MAP_XN_SGIX"/> -->
+            <!-- <enum value="0x8345" name="GL_CUBE_MAP_XP_SGIX"/> -->
+            <!-- <enum value="0x8346" name="GL_CUBE_MAP_YN_SGIX"/> -->
+            <!-- <enum value="0x8347" name="GL_CUBE_MAP_YP_SGIX"/> -->
+            <!-- <enum value="0x8348" name="GL_CUBE_MAP_BINDING_SGIX"/> -->
+        <enum value="0x8349" name="GL_FRAGMENT_MATERIAL_EXT"/>
+        <enum value="0x834A" name="GL_FRAGMENT_NORMAL_EXT"/>
+            <!-- Unfortunately, there was a collision promoting to EXT
+                 from SGIX. Use fog_coord's value of 0x8452 instead of
+                 the old assigned FRAGMENT_DEPTH_EXT (0x834B). -->
+        <enum value="0x834C" name="GL_FRAGMENT_COLOR_EXT"/>
+        <enum value="0x834D" name="GL_ATTENUATION_EXT"/>
+        <enum value="0x834E" name="GL_SHADOW_ATTENUATION_EXT"/>
+        <enum value="0x834F" name="GL_TEXTURE_APPLICATION_MODE_EXT"/>
+        <enum value="0x8350" name="GL_TEXTURE_LIGHT_EXT"/>
+        <enum value="0x8351" name="GL_TEXTURE_MATERIAL_FACE_EXT"/>
+        <enum value="0x8352" name="GL_TEXTURE_MATERIAL_PARAMETER_EXT"/>
+        <enum value="0x8353" name="GL_PIXEL_TEXTURE_SGIS"/>
+        <enum value="0x8354" name="GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS"/>
+        <enum value="0x8355" name="GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS"/>
+        <enum value="0x8356" name="GL_PIXEL_GROUP_COLOR_SGIS"/>
+            <unused start="0x8357" end="0x8359" comment="Incomplete extension SGIX_pixel_texture_bits"/>
+            <!-- <enum value="0x8357" name="GL_COLOR_TO_TEXTURE_COORD_SGIX"/> -->
+            <!-- <enum value="0x8358" name="GL_COLOR_BIT_PATTERN_SGIX"/> -->
+            <!-- <enum value="0x8359" name="GL_COLOR_VALUE_SGIX"/> -->
+            <unused start="0x835A" comment="Incomplete extension SGIX_pixel_texture_lod"/>
+            <!-- <enum value="0x835A" name="GL_PIXEL_TEX_GEN_LAMBDA_SOURCE_SGIX"/> -->
+        <enum value="0x835B" name="GL_LINE_QUALITY_HINT_SGIX"/>
+        <enum value="0x835C" name="GL_ASYNC_TEX_IMAGE_SGIX"/>
+        <enum value="0x835D" name="GL_ASYNC_DRAW_PIXELS_SGIX"/>
+        <enum value="0x835E" name="GL_ASYNC_READ_PIXELS_SGIX"/>
+        <enum value="0x835F" name="GL_MAX_ASYNC_TEX_IMAGE_SGIX"/>
+        <enum value="0x8360" name="GL_MAX_ASYNC_DRAW_PIXELS_SGIX"/>
+        <enum value="0x8361" name="GL_MAX_ASYNC_READ_PIXELS_SGIX"/>
+        <enum value="0x8362" name="GL_UNSIGNED_BYTE_2_3_3_REV"/>
+        <enum value="0x8362" name="GL_UNSIGNED_BYTE_2_3_3_REV_EXT"/>
+        <enum value="0x8363" name="GL_UNSIGNED_SHORT_5_6_5"/>
+        <enum value="0x8363" name="GL_UNSIGNED_SHORT_5_6_5_EXT"/>
+        <enum value="0x8364" name="GL_UNSIGNED_SHORT_5_6_5_REV"/>
+        <enum value="0x8364" name="GL_UNSIGNED_SHORT_5_6_5_REV_EXT"/>
+        <enum value="0x8365" name="GL_UNSIGNED_SHORT_4_4_4_4_REV"/>
+        <enum value="0x8365" name="GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT"/>
+        <enum value="0x8365" name="GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG"/>
+        <enum value="0x8366" name="GL_UNSIGNED_SHORT_1_5_5_5_REV"/>
+        <enum value="0x8366" name="GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT"/>
+        <enum value="0x8367" name="GL_UNSIGNED_INT_8_8_8_8_REV"/>
+        <enum value="0x8367" name="GL_UNSIGNED_INT_8_8_8_8_REV_EXT"/>
+        <enum value="0x8368" name="GL_UNSIGNED_INT_2_10_10_10_REV"/>
+        <enum value="0x8368" name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT"/>
+        <enum value="0x8369" name="GL_TEXTURE_MAX_CLAMP_S_SGIX"/>
+        <enum value="0x836A" name="GL_TEXTURE_MAX_CLAMP_T_SGIX"/>
+        <enum value="0x836B" name="GL_TEXTURE_MAX_CLAMP_R_SGIX"/>
+            <unused start="0x836C" end="0x836E" comment="Incomplete extension SGIX_fog_texture"/>
+            <!-- <enum value="0x836C" name="GL_FRAGMENT_FOG_SGIX"/> -->
+            <!-- <enum value="0x836D" name="GL_TEXTURE_FOG_SGIX"/> -->
+            <!-- <enum value="0x836E" name="GL_FOG_PATCHY_FACTOR_SGIX"/> -->
+            <unused start="0x836F" comment="Incomplete extension SGIX_fog_factor_to_alpha"/>
+            <!-- <enum value="0x836F" name="GL_FOG_FACTOR_TO_ALPHA_SGIX"/> -->
+    </enums>
+
+    <enums namespace="GL" start="0x8370" end="0x837F" vendor="HP">
+            <!-- NOTE: IBM is using values in this range, because of a
+                 bobble when an employee left DEC for IBM at the same
+                 time as they were assigned the range. their registry
+                 became inconsistent. It's unknown whether HP has any
+                 conflicts. They have never reported using any values in
+                 this range. Lesson: assigned ranges belong to vendors,
+                 not engineers! -->
+        <enum value="0x8370" name="GL_MIRRORED_REPEAT"/>
+        <enum value="0x8370" name="GL_MIRRORED_REPEAT_ARB"/>
+        <enum value="0x8370" name="GL_MIRRORED_REPEAT_IBM"/>
+        <enum value="0x8370" name="GL_MIRRORED_REPEAT_OES"/>
+            <unused start="0x8371" end="0x837F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8380" end="0x839F" vendor="IBM"/>
+
+    <enums namespace="GL" start="0x83A0" end="0x83BF" vendor="S3">
+        <enum value="0x83A0" name="GL_RGB_S3TC"/>
+        <enum value="0x83A1" name="GL_RGB4_S3TC"/>
+        <enum value="0x83A2" name="GL_RGBA_S3TC"/>
+        <enum value="0x83A3" name="GL_RGBA4_S3TC"/>
+        <enum value="0x83A4" name="GL_RGBA_DXT5_S3TC"/>
+        <enum value="0x83A5" name="GL_RGBA4_DXT5_S3TC"/>
+            <unused start="0x83A6" end="0x83BF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x83C0" end="0x83EF" vendor="SGI" comment="Most of this could be reclaimed">
+            <unused start="0x83C0" end="0x83CA" comment="Withdrawn extension SGIS_multitexture"/>
+            <!-- <enum value="0x83C0" name="GL_SELECTED_TEXTURE_SGIS"/> -->
+            <!-- <enum value="0x83C1" name="GL_SELECTED_TEXTURE_COORD_SET_SGIS"/> -->
+            <!-- <enum value="0x83C2" name="GL_SELECTED_TEXTURE_TRANSFORM_SGIS"/> -->
+            <!-- <enum value="0x83C3" name="GL_MAX_TEXTURES_SGIS"/> -->
+            <!-- <enum value="0x83C4" name="GL_MAX_TEXTURE_COORD_SETS_SGIS"/> -->
+            <!-- <enum value="0x83C5" name="GL_TEXTURE_COORD_SET_INTERLEAVE_FACTOR_SGIS"/> -->
+            <!-- <enum value="0x83C6" name="GL_TEXTURE_ENV_COORD_SET_SGIS"/> -->
+            <!-- <enum value="0x83C7" name="GL_TEXTURE0_SGIS"/> -->
+            <!-- <enum value="0x83C8" name="GL_TEXTURE1_SGIS"/> -->
+            <!-- <enum value="0x83C9" name="GL_TEXTURE2_SGIS"/> -->
+            <!-- <enum value="0x83CA" name="GL_TEXTURE3_SGIS"/> -->
+            <unused start="0x83CB" end="0x83E5"/>
+            <unused start="0x83E6" end="0x83E9" comment="Incomplete extension SGIX_bali_g_instruments"/>
+            <!-- <enum value="0x83E6" name="GL_BALI_NUM_TRIS_CULLED_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x83E7" name="GL_BALI_NUM_PRIMS_CLIPPED_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x83E8" name="GL_BALI_NUM_PRIMS_REJECT_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x83E9" name="GL_BALI_NUM_PRIMS_CLIP_RESULT_INSTRUMENT_SGIX"/> -->
+            <unused start="0x83EA" end="0x83EC" comment="Incomplete extension SGIX_bali_r_instruments"/>
+            <!-- <enum value="0x83EA" name="GL_BALI_FRAGMENTS_GENERATED_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x83EB" name="GL_BALI_DEPTH_PASS_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x83EC" name="GL_BALI_R_CHIP_COUNT_SGIX"/> -->
+            <unused start="0x83ED" comment="Incomplete extension SGIX_occlusion_instrument"/>
+            <!-- <enum value="0x83ED" name="GL_OCCLUSION_INSTRUMENT_SGIX"/> -->
+        <enum value="0x83EE" name="GL_VERTEX_PRECLIP_SGIX"/>
+        <enum value="0x83EF" name="GL_VERTEX_PRECLIP_HINT_SGIX"/>
+    </enums>
+
+    <enums namespace="GL" start="0x83F0" end="0x83FF" vendor="INTEL">
+            <!-- This block was reclaimed from NTP, who never shipped
+                 it, and reassigned to Intel. -->
+        <enum value="0x83F0" name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT"/>
+        <enum value="0x83F1" name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT"/>
+        <enum value="0x83F2" name="GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE"/>
+        <enum value="0x83F2" name="GL_COMPRESSED_RGBA_S3TC_DXT3_EXT"/>
+        <enum value="0x83F3" name="GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE"/>
+        <enum value="0x83F3" name="GL_COMPRESSED_RGBA_S3TC_DXT5_EXT"/>
+        <enum value="0x83F4" name="GL_PARALLEL_ARRAYS_INTEL"/>
+        <enum value="0x83F5" name="GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL"/>
+        <enum value="0x83F6" name="GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL"/>
+        <enum value="0x83F7" name="GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL"/>
+        <enum value="0x83F8" name="GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL"/>
+        <enum value="0x83F9" name="GL_PERFQUERY_DONOT_FLUSH_INTEL"/>
+        <enum value="0x83FA" name="GL_PERFQUERY_FLUSH_INTEL"/>
+        <enum value="0x83FB" name="GL_PERFQUERY_WAIT_INTEL"/>
+            <unused start="0x83FC" end="0x83FE"/>
+        <enum value="0x83FF" name="GL_TEXTURE_MEMORY_LAYOUT_INTEL"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8400" end="0x846F" vendor="SGI">
+        <enum value="0x8400" name="GL_FRAGMENT_LIGHTING_SGIX"/>
+        <enum value="0x8401" name="GL_FRAGMENT_COLOR_MATERIAL_SGIX"/>
+        <enum value="0x8402" name="GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX"/>
+        <enum value="0x8403" name="GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX"/>
+        <enum value="0x8404" name="GL_MAX_FRAGMENT_LIGHTS_SGIX"/>
+        <enum value="0x8405" name="GL_MAX_ACTIVE_LIGHTS_SGIX"/>
+        <enum value="0x8406" name="GL_CURRENT_RASTER_NORMAL_SGIX"/>
+        <enum value="0x8407" name="GL_LIGHT_ENV_MODE_SGIX"/>
+        <enum value="0x8408" name="GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX"/>
+        <enum value="0x8409" name="GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX"/>
+        <enum value="0x840A" name="GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX"/>
+        <enum value="0x840B" name="GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX"/>
+        <enum value="0x840C" name="GL_FRAGMENT_LIGHT0_SGIX"/>
+        <enum value="0x840D" name="GL_FRAGMENT_LIGHT1_SGIX"/>
+        <enum value="0x840E" name="GL_FRAGMENT_LIGHT2_SGIX"/>
+        <enum value="0x840F" name="GL_FRAGMENT_LIGHT3_SGIX"/>
+        <enum value="0x8410" name="GL_FRAGMENT_LIGHT4_SGIX"/>
+        <enum value="0x8411" name="GL_FRAGMENT_LIGHT5_SGIX"/>
+        <enum value="0x8412" name="GL_FRAGMENT_LIGHT6_SGIX"/>
+        <enum value="0x8413" name="GL_FRAGMENT_LIGHT7_SGIX"/>
+            <unused start="0x8414" end="0x842B"/>
+        <enum value="0x842C" name="GL_PACK_RESAMPLE_SGIX"/>
+        <enum value="0x842D" name="GL_UNPACK_RESAMPLE_SGIX"/>
+        <enum value="0x842E" name="GL_RESAMPLE_REPLICATE_SGIX"/>
+        <enum value="0x842F" name="GL_RESAMPLE_ZERO_FILL_SGIX"/>
+        <enum value="0x8430" name="GL_RESAMPLE_DECIMATE_SGIX"/>
+            <unused start="0x8431" end="0x8435"/>
+            <!-- Incomplete extension SGIX_fragment_lighting -->
+            <!-- <enum value="0x8436"      name="GL_EYE_SPACE_SGIX"/> -->
+            <!-- <enum value="0x8437"      name="GL_TANGENT_SPACE_SGIX"/> -->
+            <!-- <enum value="0x8438"      name="GL_OBJECT_SPACE_SGIX"/> -->
+            <!-- <enum value="0x8439"      name="GL_TANGENT_ARRAY_SGIX"/> -->
+            <!-- <enum value="0x843A"      name="GL_BINORMAL_ARRAY_SGIX"/> -->
+            <!-- <enum value="0x843B"      name="GL_CURRENT_TANGENT_SGIX"/> -->
+            <!-- <enum value="0x843C"      name="GL_CURRENT_BINORMAL_SGIX"/> -->
+            <!-- <enum value="0x843D"      name="GL_FRAGMENT_LIGHT_SPACE_SGIX"/> -->
+            <!-- <enum value="0x843E"      name="GL_TANGENT_ARRAY_TYPE_SGIX"/> -->
+            <!-- <enum value="0x843F"      name="GL_TANGENT_ARRAY_STRIDE_SGIX"/> -->
+            <!-- <enum value="0x8440"      name="GL_TANGENT_ARRAY_COUNT_SGIX"/> -->
+            <!-- <enum value="0x8441"      name="GL_BINORMAL_ARRAY_TYPE_SGIX"/> -->
+            <!-- <enum value="0x8442"      name="GL_BINORMAL_ARRAY_STRIDE_SGIX"/> -->
+            <!-- <enum value="0x8443"      name="GL_BINORMAL_ARRAY_COUNT_SGIX"/> -->
+            <!-- <enum value="0x8444"      name="GL_TANGENT_ARRAY_POINTER_SGIX"/> -->
+            <!-- <enum value="0x8445"      name="GL_BINORMAL_ARRAY_POINTER_SGIX"/> -->
+            <!-- <enum value="0x8446"      name="GL_MAP1_TANGENT_SGIX"/> -->
+            <!-- <enum value="0x8447"      name="GL_MAP2_TANGENT_SGIX"/> -->
+            <!-- <enum value="0x8448"      name="GL_MAP1_BINORMAL_SGIX"/> -->
+            <!-- <enum value="0x8449"      name="GL_MAP2_BINORMAL_SGIX"/> -->
+        <enum value="0x8439" name="GL_TANGENT_ARRAY_EXT"/>
+        <enum value="0x843A" name="GL_BINORMAL_ARRAY_EXT"/>
+        <enum value="0x843B" name="GL_CURRENT_TANGENT_EXT"/>
+        <enum value="0x843C" name="GL_CURRENT_BINORMAL_EXT"/>
+                     <unused start="0x844D"/>
+        <enum value="0x843E" name="GL_TANGENT_ARRAY_TYPE_EXT"/>
+        <enum value="0x843F" name="GL_TANGENT_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8440" name="GL_BINORMAL_ARRAY_TYPE_EXT"/>
+        <enum value="0x8441" name="GL_BINORMAL_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8442" name="GL_TANGENT_ARRAY_POINTER_EXT"/>
+        <enum value="0x8443" name="GL_BINORMAL_ARRAY_POINTER_EXT"/>
+        <enum value="0x8444" name="GL_MAP1_TANGENT_EXT"/>
+        <enum value="0x8445" name="GL_MAP2_TANGENT_EXT"/>
+        <enum value="0x8446" name="GL_MAP1_BINORMAL_EXT"/>
+        <enum value="0x8447" name="GL_MAP2_BINORMAL_EXT"/>
+            <unused start="0x8448" end="0x8449" comment="Incomplete extension SGIX_fragment_lighting"/>
+            <unused start="0x844A" end="0x844C" comment="Incomplete extension SGIX_bali_timer_instruments"/>
+            <!-- <enum value="0x844A" name="GL_BALI_GEOM_TIMER_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x844B" name="GL_BALI_RASTER_TIMER_INSTRUMENT_SGIX"/> -->
+            <!-- <enum value="0x844C" name="GL_BALI_INSTRUMENT_TIME_UNIT_SGIX"/> -->
+        <enum value="0x844D" name="GL_NEAREST_CLIPMAP_NEAREST_SGIX"/>
+        <enum value="0x844E" name="GL_NEAREST_CLIPMAP_LINEAR_SGIX"/>
+        <enum value="0x844F" name="GL_LINEAR_CLIPMAP_NEAREST_SGIX"/>
+            <!-- 0x8450-0x845F range brokered for Id Software -->
+        <enum value="0x8450" name="GL_FOG_COORDINATE_SOURCE"/>
+        <enum value="0x8450" name="GL_FOG_COORDINATE_SOURCE_EXT"/>
+        <enum value="0x8450" name="GL_FOG_COORD_SRC" alias="GL_FOG_COORDINATE_SOURCE"/>
+        <enum value="0x8451" name="GL_FOG_COORDINATE"/>
+        <enum value="0x8451" name="GL_FOG_COORD" alias="GL_FOG_COORDINATE"/>
+        <enum value="0x8451" name="GL_FOG_COORDINATE_EXT"/>
+        <enum value="0x8452" name="GL_FRAGMENT_DEPTH"/>
+        <enum value="0x8452" name="GL_FRAGMENT_DEPTH_EXT"/>
+        <enum value="0x8453" name="GL_CURRENT_FOG_COORDINATE"/>
+        <enum value="0x8453" name="GL_CURRENT_FOG_COORD" alias="GL_CURRENT_FOG_COORDINATE"/>
+        <enum value="0x8453" name="GL_CURRENT_FOG_COORDINATE_EXT"/>
+        <enum value="0x8454" name="GL_FOG_COORDINATE_ARRAY_TYPE"/>
+        <enum value="0x8454" name="GL_FOG_COORDINATE_ARRAY_TYPE_EXT"/>
+        <enum value="0x8454" name="GL_FOG_COORD_ARRAY_TYPE" alias="GL_FOG_COORDINATE_ARRAY_TYPE"/>
+        <enum value="0x8455" name="GL_FOG_COORDINATE_ARRAY_STRIDE"/>
+        <enum value="0x8455" name="GL_FOG_COORDINATE_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8455" name="GL_FOG_COORD_ARRAY_STRIDE" alias="GL_FOG_COORDINATE_ARRAY_STRIDE"/>
+        <enum value="0x8456" name="GL_FOG_COORDINATE_ARRAY_POINTER"/>
+        <enum value="0x8456" name="GL_FOG_COORDINATE_ARRAY_POINTER_EXT"/>
+        <enum value="0x8456" name="GL_FOG_COORD_ARRAY_POINTER" alias="GL_FOG_COORDINATE_ARRAY_POINTER"/>
+        <enum value="0x8457" name="GL_FOG_COORDINATE_ARRAY"/>
+        <enum value="0x8457" name="GL_FOG_COORDINATE_ARRAY_EXT"/>
+        <enum value="0x8457" name="GL_FOG_COORD_ARRAY" alias="GL_FOG_COORDINATE_ARRAY"/>
+        <enum value="0x8458" name="GL_COLOR_SUM"/>
+        <enum value="0x8458" name="GL_COLOR_SUM_ARB"/>
+        <enum value="0x8458" name="GL_COLOR_SUM_EXT"/>
+        <enum value="0x8459" name="GL_CURRENT_SECONDARY_COLOR"/>
+        <enum value="0x8459" name="GL_CURRENT_SECONDARY_COLOR_EXT"/>
+        <enum value="0x845A" name="GL_SECONDARY_COLOR_ARRAY_SIZE"/>
+        <enum value="0x845A" name="GL_SECONDARY_COLOR_ARRAY_SIZE_EXT"/>
+        <enum value="0x845B" name="GL_SECONDARY_COLOR_ARRAY_TYPE"/>
+        <enum value="0x845B" name="GL_SECONDARY_COLOR_ARRAY_TYPE_EXT"/>
+        <enum value="0x845C" name="GL_SECONDARY_COLOR_ARRAY_STRIDE"/>
+        <enum value="0x845C" name="GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT"/>
+        <enum value="0x845D" name="GL_SECONDARY_COLOR_ARRAY_POINTER"/>
+        <enum value="0x845D" name="GL_SECONDARY_COLOR_ARRAY_POINTER_EXT"/>
+        <enum value="0x845E" name="GL_SECONDARY_COLOR_ARRAY"/>
+        <enum value="0x845E" name="GL_SECONDARY_COLOR_ARRAY_EXT"/>
+        <enum value="0x845F" name="GL_CURRENT_RASTER_SECONDARY_COLOR"/>
+            <unused start="0x8460" end="0x846B" comment="Incomplete extension SGIX_icc_texture"/>
+            <!-- <enum value="0x8460" name="GL_RGB_ICC_SGIX"/> -->
+            <!-- <enum value="0x8461" name="GL_RGBA_ICC_SGIX"/> -->
+            <!-- <enum value="0x8462" name="GL_ALPHA_ICC_SGIX"/> -->
+            <!-- <enum value="0x8463" name="GL_LUMINANCE_ICC_SGIX"/> -->
+            <!-- <enum value="0x8464" name="GL_INTENSITY_ICC_SGIX"/> -->
+            <!-- <enum value="0x8465" name="GL_LUMINANCE_ALPHA_ICC_SGIX"/> -->
+            <!-- <enum value="0x8466" name="GL_R5_G6_B5_ICC_SGIX"/> -->
+            <!-- <enum value="0x8467" name="GL_R5_G6_B5_A8_ICC_SGIX"/> -->
+            <!-- <enum value="0x8468" name="GL_ALPHA16_ICC_SGIX"/> -->
+            <!-- <enum value="0x8469" name="GL_LUMINANCE16_ICC_SGIX"/> -->
+            <!-- <enum value="0x846A" name="GL_INTENSITY16_ICC_SGIX"/> -->
+            <!-- <enum value="0x846B" name="GL_LUMINANCE16_ALPHA8_ICC_SGIX"/> -->
+            <unused start="0x846C"/>
+        <enum value="0x846D" name="GL_ALIASED_POINT_SIZE_RANGE"/>
+        <enum value="0x846E" name="GL_ALIASED_LINE_WIDTH_RANGE"/>
+            <unused start="0x846F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8470" end="0x848F" vendor="AMD"/>
+
+    <enums namespace="GL" start="0x8490" end="0x849F" vendor="REND">
+        <enum value="0x8490" name="GL_SCREEN_COORDINATES_REND"/>
+        <enum value="0x8491" name="GL_INVERTED_SCREEN_W_REND"/>
+            <unused start="0x8492" end="0x849F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x84A0" end="0x84BF" vendor="AMD"/>
+
+    <enums namespace="GL" start="0x84C0" end="0x84EF" vendor="ARB">
+        <enum value="0x84C0" name="GL_TEXTURE0"/>
+        <enum value="0x84C0" name="GL_TEXTURE0_ARB"/>
+        <enum value="0x84C1" name="GL_TEXTURE1"/>
+        <enum value="0x84C1" name="GL_TEXTURE1_ARB"/>
+        <enum value="0x84C2" name="GL_TEXTURE2"/>
+        <enum value="0x84C2" name="GL_TEXTURE2_ARB"/>
+        <enum value="0x84C3" name="GL_TEXTURE3"/>
+        <enum value="0x84C3" name="GL_TEXTURE3_ARB"/>
+        <enum value="0x84C4" name="GL_TEXTURE4"/>
+        <enum value="0x84C4" name="GL_TEXTURE4_ARB"/>
+        <enum value="0x84C5" name="GL_TEXTURE5"/>
+        <enum value="0x84C5" name="GL_TEXTURE5_ARB"/>
+        <enum value="0x84C6" name="GL_TEXTURE6"/>
+        <enum value="0x84C6" name="GL_TEXTURE6_ARB"/>
+        <enum value="0x84C7" name="GL_TEXTURE7"/>
+        <enum value="0x84C7" name="GL_TEXTURE7_ARB"/>
+        <enum value="0x84C8" name="GL_TEXTURE8"/>
+        <enum value="0x84C8" name="GL_TEXTURE8_ARB"/>
+        <enum value="0x84C9" name="GL_TEXTURE9"/>
+        <enum value="0x84C9" name="GL_TEXTURE9_ARB"/>
+        <enum value="0x84CA" name="GL_TEXTURE10"/>
+        <enum value="0x84CA" name="GL_TEXTURE10_ARB"/>
+        <enum value="0x84CB" name="GL_TEXTURE11"/>
+        <enum value="0x84CB" name="GL_TEXTURE11_ARB"/>
+        <enum value="0x84CC" name="GL_TEXTURE12"/>
+        <enum value="0x84CC" name="GL_TEXTURE12_ARB"/>
+        <enum value="0x84CD" name="GL_TEXTURE13"/>
+        <enum value="0x84CD" name="GL_TEXTURE13_ARB"/>
+        <enum value="0x84CE" name="GL_TEXTURE14"/>
+        <enum value="0x84CE" name="GL_TEXTURE14_ARB"/>
+        <enum value="0x84CF" name="GL_TEXTURE15"/>
+        <enum value="0x84CF" name="GL_TEXTURE15_ARB"/>
+        <enum value="0x84D0" name="GL_TEXTURE16"/>
+        <enum value="0x84D0" name="GL_TEXTURE16_ARB"/>
+        <enum value="0x84D1" name="GL_TEXTURE17"/>
+        <enum value="0x84D1" name="GL_TEXTURE17_ARB"/>
+        <enum value="0x84D2" name="GL_TEXTURE18"/>
+        <enum value="0x84D2" name="GL_TEXTURE18_ARB"/>
+        <enum value="0x84D3" name="GL_TEXTURE19"/>
+        <enum value="0x84D3" name="GL_TEXTURE19_ARB"/>
+        <enum value="0x84D4" name="GL_TEXTURE20"/>
+        <enum value="0x84D4" name="GL_TEXTURE20_ARB"/>
+        <enum value="0x84D5" name="GL_TEXTURE21"/>
+        <enum value="0x84D5" name="GL_TEXTURE21_ARB"/>
+        <enum value="0x84D6" name="GL_TEXTURE22"/>
+        <enum value="0x84D6" name="GL_TEXTURE22_ARB"/>
+        <enum value="0x84D7" name="GL_TEXTURE23"/>
+        <enum value="0x84D7" name="GL_TEXTURE23_ARB"/>
+        <enum value="0x84D8" name="GL_TEXTURE24"/>
+        <enum value="0x84D8" name="GL_TEXTURE24_ARB"/>
+        <enum value="0x84D9" name="GL_TEXTURE25"/>
+        <enum value="0x84D9" name="GL_TEXTURE25_ARB"/>
+        <enum value="0x84DA" name="GL_TEXTURE26"/>
+        <enum value="0x84DA" name="GL_TEXTURE26_ARB"/>
+        <enum value="0x84DB" name="GL_TEXTURE27"/>
+        <enum value="0x84DB" name="GL_TEXTURE27_ARB"/>
+        <enum value="0x84DC" name="GL_TEXTURE28"/>
+        <enum value="0x84DC" name="GL_TEXTURE28_ARB"/>
+        <enum value="0x84DD" name="GL_TEXTURE29"/>
+        <enum value="0x84DD" name="GL_TEXTURE29_ARB"/>
+        <enum value="0x84DE" name="GL_TEXTURE30"/>
+        <enum value="0x84DE" name="GL_TEXTURE30_ARB"/>
+        <enum value="0x84DF" name="GL_TEXTURE31"/>
+        <enum value="0x84DF" name="GL_TEXTURE31_ARB"/>
+        <enum value="0x84E0" name="GL_ACTIVE_TEXTURE"/>
+        <enum value="0x84E0" name="GL_ACTIVE_TEXTURE_ARB"/>
+        <enum value="0x84E1" name="GL_CLIENT_ACTIVE_TEXTURE"/>
+        <enum value="0x84E1" name="GL_CLIENT_ACTIVE_TEXTURE_ARB"/>
+        <enum value="0x84E2" name="GL_MAX_TEXTURE_UNITS"/>
+        <enum value="0x84E2" name="GL_MAX_TEXTURE_UNITS_ARB"/>
+        <enum value="0x84E3" name="GL_TRANSPOSE_MODELVIEW_MATRIX"/>
+        <enum value="0x84E3" name="GL_TRANSPOSE_MODELVIEW_MATRIX_ARB"/>
+        <enum value="0x84E4" name="GL_TRANSPOSE_PROJECTION_MATRIX"/>
+        <enum value="0x84E4" name="GL_TRANSPOSE_PROJECTION_MATRIX_ARB"/>
+        <enum value="0x84E5" name="GL_TRANSPOSE_TEXTURE_MATRIX"/>
+        <enum value="0x84E5" name="GL_TRANSPOSE_TEXTURE_MATRIX_ARB"/>
+        <enum value="0x84E6" name="GL_TRANSPOSE_COLOR_MATRIX"/>
+        <enum value="0x84E6" name="GL_TRANSPOSE_COLOR_MATRIX_ARB"/>
+        <enum value="0x84E7" name="GL_SUBTRACT"/>
+        <enum value="0x84E7" name="GL_SUBTRACT_ARB"/>
+        <enum value="0x84E8" name="GL_MAX_RENDERBUFFER_SIZE"/>
+        <enum value="0x84E8" name="GL_MAX_RENDERBUFFER_SIZE_EXT"/>
+        <enum value="0x84E8" name="GL_MAX_RENDERBUFFER_SIZE_OES"/>
+        <enum value="0x84E9" name="GL_COMPRESSED_ALPHA"/>
+        <enum value="0x84E9" name="GL_COMPRESSED_ALPHA_ARB"/>
+        <enum value="0x84EA" name="GL_COMPRESSED_LUMINANCE"/>
+        <enum value="0x84EA" name="GL_COMPRESSED_LUMINANCE_ARB"/>
+        <enum value="0x84EB" name="GL_COMPRESSED_LUMINANCE_ALPHA"/>
+        <enum value="0x84EB" name="GL_COMPRESSED_LUMINANCE_ALPHA_ARB"/>
+        <enum value="0x84EC" name="GL_COMPRESSED_INTENSITY"/>
+        <enum value="0x84EC" name="GL_COMPRESSED_INTENSITY_ARB"/>
+        <enum value="0x84ED" name="GL_COMPRESSED_RGB"/>
+        <enum value="0x84ED" name="GL_COMPRESSED_RGB_ARB"/>
+        <enum value="0x84EE" name="GL_COMPRESSED_RGBA"/>
+        <enum value="0x84EE" name="GL_COMPRESSED_RGBA_ARB"/>
+        <enum value="0x84EF" name="GL_TEXTURE_COMPRESSION_HINT"/>
+        <enum value="0x84EF" name="GL_TEXTURE_COMPRESSION_HINT_ARB"/>
+    </enums>
+
+    <enums namespace="GL" start="0x84F0" end="0x855F" vendor="NV">
+        <enum value="0x84F0" name="GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+        <enum value="0x84F1" name="GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+        <enum value="0x84F2" name="GL_ALL_COMPLETED_NV"/>
+        <enum value="0x84F3" name="GL_FENCE_STATUS_NV"/>
+        <enum value="0x84F4" name="GL_FENCE_CONDITION_NV"/>
+        <enum value="0x84F5" name="GL_TEXTURE_RECTANGLE"/>
+        <enum value="0x84F5" name="GL_TEXTURE_RECTANGLE_ARB"/>
+        <enum value="0x84F5" name="GL_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x84F6" name="GL_TEXTURE_BINDING_RECTANGLE"/>
+        <enum value="0x84F6" name="GL_TEXTURE_BINDING_RECTANGLE_ARB"/>
+        <enum value="0x84F6" name="GL_TEXTURE_BINDING_RECTANGLE_NV"/>
+        <enum value="0x84F7" name="GL_PROXY_TEXTURE_RECTANGLE"/>
+        <enum value="0x84F7" name="GL_PROXY_TEXTURE_RECTANGLE_ARB"/>
+        <enum value="0x84F7" name="GL_PROXY_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x84F8" name="GL_MAX_RECTANGLE_TEXTURE_SIZE"/>
+        <enum value="0x84F8" name="GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB"/>
+        <enum value="0x84F8" name="GL_MAX_RECTANGLE_TEXTURE_SIZE_NV"/>
+        <enum value="0x84F9" name="GL_DEPTH_STENCIL"/>
+        <enum value="0x84F9" name="GL_DEPTH_STENCIL_EXT"/>
+        <enum value="0x84F9" name="GL_DEPTH_STENCIL_NV"/>
+        <enum value="0x84F9" name="GL_DEPTH_STENCIL_OES"/>
+        <enum value="0x84FA" name="GL_UNSIGNED_INT_24_8"/>
+        <enum value="0x84FA" name="GL_UNSIGNED_INT_24_8_EXT"/>
+        <enum value="0x84FA" name="GL_UNSIGNED_INT_24_8_NV"/>
+        <enum value="0x84FA" name="GL_UNSIGNED_INT_24_8_OES"/>
+            <unused start="0x84FB" end="0x84FC"/>
+        <enum value="0x84FD" name="GL_MAX_TEXTURE_LOD_BIAS"/>
+        <enum value="0x84FD" name="GL_MAX_TEXTURE_LOD_BIAS_EXT"/>
+        <enum value="0x84FE" name="GL_TEXTURE_MAX_ANISOTROPY_EXT"/>
+        <enum value="0x84FF" name="GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT"/>
+        <enum value="0x8500" name="GL_TEXTURE_FILTER_CONTROL"/>
+        <enum value="0x8500" name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+        <enum value="0x8501" name="GL_TEXTURE_LOD_BIAS"/>
+        <enum value="0x8501" name="GL_TEXTURE_LOD_BIAS_EXT"/>
+        <enum value="0x8502" name="GL_MODELVIEW1_STACK_DEPTH_EXT"/>
+        <enum value="0x8503" name="GL_COMBINE4_NV"/>
+        <enum value="0x8504" name="GL_MAX_SHININESS_NV"/>
+        <enum value="0x8505" name="GL_MAX_SPOT_EXPONENT_NV"/>
+        <enum value="0x8506" name="GL_MODELVIEW1_MATRIX_EXT"/>
+        <enum value="0x8507" name="GL_INCR_WRAP"/>
+        <enum value="0x8507" name="GL_INCR_WRAP_EXT"/>
+        <enum value="0x8507" name="GL_INCR_WRAP_OES"/>
+        <enum value="0x8508" name="GL_DECR_WRAP"/>
+        <enum value="0x8508" name="GL_DECR_WRAP_EXT"/>
+        <enum value="0x8508" name="GL_DECR_WRAP_OES"/>
+        <enum value="0x8509" name="GL_VERTEX_WEIGHTING_EXT"/>
+        <enum value="0x850A" name="GL_MODELVIEW1_ARB"/>
+        <enum value="0x850A" name="GL_MODELVIEW1_EXT"/>
+        <enum value="0x850B" name="GL_CURRENT_VERTEX_WEIGHT_EXT"/>
+        <enum value="0x850C" name="GL_VERTEX_WEIGHT_ARRAY_EXT"/>
+        <enum value="0x850D" name="GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT"/>
+        <enum value="0x850E" name="GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT"/>
+        <enum value="0x850F" name="GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT"/>
+        <enum value="0x8510" name="GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT"/>
+        <enum value="0x8511" name="GL_NORMAL_MAP"/>
+        <enum value="0x8511" name="GL_NORMAL_MAP_ARB"/>
+        <enum value="0x8511" name="GL_NORMAL_MAP_EXT"/>
+        <enum value="0x8511" name="GL_NORMAL_MAP_NV"/>
+        <enum value="0x8511" name="GL_NORMAL_MAP_OES"/>
+        <enum value="0x8512" name="GL_REFLECTION_MAP"/>
+        <enum value="0x8512" name="GL_REFLECTION_MAP_ARB"/>
+        <enum value="0x8512" name="GL_REFLECTION_MAP_EXT"/>
+        <enum value="0x8512" name="GL_REFLECTION_MAP_NV"/>
+        <enum value="0x8512" name="GL_REFLECTION_MAP_OES"/>
+        <enum value="0x8513" name="GL_TEXTURE_CUBE_MAP"/>
+        <enum value="0x8513" name="GL_TEXTURE_CUBE_MAP_ARB"/>
+        <enum value="0x8513" name="GL_TEXTURE_CUBE_MAP_EXT"/>
+        <enum value="0x8513" name="GL_TEXTURE_CUBE_MAP_OES"/>
+        <enum value="0x8514" name="GL_TEXTURE_BINDING_CUBE_MAP"/>
+        <enum value="0x8514" name="GL_TEXTURE_BINDING_CUBE_MAP_ARB"/>
+        <enum value="0x8514" name="GL_TEXTURE_BINDING_CUBE_MAP_EXT"/>
+        <enum value="0x8514" name="GL_TEXTURE_BINDING_CUBE_MAP_OES"/>
+        <enum value="0x8515" name="GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
+        <enum value="0x8515" name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB"/>
+        <enum value="0x8515" name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT"/>
+        <enum value="0x8515" name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES"/>
+        <enum value="0x8516" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
+        <enum value="0x8516" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB"/>
+        <enum value="0x8516" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT"/>
+        <enum value="0x8516" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES"/>
+        <enum value="0x8517" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
+        <enum value="0x8517" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB"/>
+        <enum value="0x8517" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT"/>
+        <enum value="0x8517" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES"/>
+        <enum value="0x8518" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
+        <enum value="0x8518" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB"/>
+        <enum value="0x8518" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT"/>
+        <enum value="0x8518" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES"/>
+        <enum value="0x8519" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
+        <enum value="0x8519" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB"/>
+        <enum value="0x8519" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT"/>
+        <enum value="0x8519" name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES"/>
+        <enum value="0x851A" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
+        <enum value="0x851A" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB"/>
+        <enum value="0x851A" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT"/>
+        <enum value="0x851A" name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES"/>
+        <enum value="0x851B" name="GL_PROXY_TEXTURE_CUBE_MAP"/>
+        <enum value="0x851B" name="GL_PROXY_TEXTURE_CUBE_MAP_ARB"/>
+        <enum value="0x851B" name="GL_PROXY_TEXTURE_CUBE_MAP_EXT"/>
+        <enum value="0x851C" name="GL_MAX_CUBE_MAP_TEXTURE_SIZE"/>
+        <enum value="0x851C" name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB"/>
+        <enum value="0x851C" name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT"/>
+        <enum value="0x851C" name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES"/>
+        <enum value="0x851D" name="GL_VERTEX_ARRAY_RANGE_APPLE"/>
+        <enum value="0x851D" name="GL_VERTEX_ARRAY_RANGE_NV"/>
+        <enum value="0x851E" name="GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE"/>
+        <enum value="0x851E" name="GL_VERTEX_ARRAY_RANGE_LENGTH_NV"/>
+        <enum value="0x851F" name="GL_VERTEX_ARRAY_RANGE_VALID_NV"/>
+        <enum value="0x851F" name="GL_VERTEX_ARRAY_STORAGE_HINT_APPLE"/>
+        <enum value="0x8520" name="GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV"/>
+        <enum value="0x8521" name="GL_VERTEX_ARRAY_RANGE_POINTER_APPLE"/>
+        <enum value="0x8521" name="GL_VERTEX_ARRAY_RANGE_POINTER_NV"/>
+        <enum value="0x8522" name="GL_REGISTER_COMBINERS_NV"/>
+        <enum value="0x8523" name="GL_VARIABLE_A_NV"/>
+        <enum value="0x8524" name="GL_VARIABLE_B_NV"/>
+        <enum value="0x8525" name="GL_VARIABLE_C_NV"/>
+        <enum value="0x8526" name="GL_VARIABLE_D_NV"/>
+        <enum value="0x8527" name="GL_VARIABLE_E_NV"/>
+        <enum value="0x8528" name="GL_VARIABLE_F_NV"/>
+        <enum value="0x8529" name="GL_VARIABLE_G_NV"/>
+        <enum value="0x852A" name="GL_CONSTANT_COLOR0_NV"/>
+        <enum value="0x852B" name="GL_CONSTANT_COLOR1_NV"/>
+        <enum value="0x852C" name="GL_PRIMARY_COLOR_NV"/>
+        <enum value="0x852D" name="GL_SECONDARY_COLOR_NV"/>
+        <enum value="0x852E" name="GL_SPARE0_NV"/>
+        <enum value="0x852F" name="GL_SPARE1_NV"/>
+        <enum value="0x8530" name="GL_DISCARD_NV"/>
+        <enum value="0x8531" name="GL_E_TIMES_F_NV"/>
+        <enum value="0x8532" name="GL_SPARE0_PLUS_SECONDARY_COLOR_NV"/>
+        <enum value="0x8533" name="GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV"/>
+        <enum value="0x8534" name="GL_MULTISAMPLE_FILTER_HINT_NV"/>
+        <enum value="0x8535" name="GL_PER_STAGE_CONSTANTS_NV"/>
+        <enum value="0x8536" name="GL_UNSIGNED_IDENTITY_NV"/>
+        <enum value="0x8537" name="GL_UNSIGNED_INVERT_NV"/>
+        <enum value="0x8538" name="GL_EXPAND_NORMAL_NV"/>
+        <enum value="0x8539" name="GL_EXPAND_NEGATE_NV"/>
+        <enum value="0x853A" name="GL_HALF_BIAS_NORMAL_NV"/>
+        <enum value="0x853B" name="GL_HALF_BIAS_NEGATE_NV"/>
+        <enum value="0x853C" name="GL_SIGNED_IDENTITY_NV"/>
+        <enum value="0x853D" name="GL_SIGNED_NEGATE_NV"/>
+        <enum value="0x853E" name="GL_SCALE_BY_TWO_NV"/>
+        <enum value="0x853F" name="GL_SCALE_BY_FOUR_NV"/>
+        <enum value="0x8540" name="GL_SCALE_BY_ONE_HALF_NV"/>
+        <enum value="0x8541" name="GL_BIAS_BY_NEGATIVE_ONE_HALF_NV"/>
+        <enum value="0x8542" name="GL_COMBINER_INPUT_NV"/>
+        <enum value="0x8543" name="GL_COMBINER_MAPPING_NV"/>
+        <enum value="0x8544" name="GL_COMBINER_COMPONENT_USAGE_NV"/>
+        <enum value="0x8545" name="GL_COMBINER_AB_DOT_PRODUCT_NV"/>
+        <enum value="0x8546" name="GL_COMBINER_CD_DOT_PRODUCT_NV"/>
+        <enum value="0x8547" name="GL_COMBINER_MUX_SUM_NV"/>
+        <enum value="0x8548" name="GL_COMBINER_SCALE_NV"/>
+        <enum value="0x8549" name="GL_COMBINER_BIAS_NV"/>
+        <enum value="0x854A" name="GL_COMBINER_AB_OUTPUT_NV"/>
+        <enum value="0x854B" name="GL_COMBINER_CD_OUTPUT_NV"/>
+        <enum value="0x854C" name="GL_COMBINER_SUM_OUTPUT_NV"/>
+        <enum value="0x854D" name="GL_MAX_GENERAL_COMBINERS_NV"/>
+        <enum value="0x854E" name="GL_NUM_GENERAL_COMBINERS_NV"/>
+        <enum value="0x854F" name="GL_COLOR_SUM_CLAMP_NV"/>
+        <enum value="0x8550" name="GL_COMBINER0_NV"/>
+        <enum value="0x8551" name="GL_COMBINER1_NV"/>
+        <enum value="0x8552" name="GL_COMBINER2_NV"/>
+        <enum value="0x8553" name="GL_COMBINER3_NV"/>
+        <enum value="0x8554" name="GL_COMBINER4_NV"/>
+        <enum value="0x8555" name="GL_COMBINER5_NV"/>
+        <enum value="0x8556" name="GL_COMBINER6_NV"/>
+        <enum value="0x8557" name="GL_COMBINER7_NV"/>
+        <enum value="0x8558" name="GL_PRIMITIVE_RESTART_NV"/>
+        <enum value="0x8559" name="GL_PRIMITIVE_RESTART_INDEX_NV"/>
+        <enum value="0x855A" name="GL_FOG_DISTANCE_MODE_NV"/>
+        <enum value="0x855B" name="GL_EYE_RADIAL_NV"/>
+        <enum value="0x855C" name="GL_EYE_PLANE_ABSOLUTE_NV"/>
+        <enum value="0x855D" name="GL_EMBOSS_LIGHT_NV"/>
+        <enum value="0x855E" name="GL_EMBOSS_CONSTANT_NV"/>
+        <enum value="0x855F" name="GL_EMBOSS_MAP_NV"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8560" end="0x856F" vendor="ZiiLabs">
+        <enum value="0x8560" name="GL_RED_MIN_CLAMP_INGR"/>
+        <enum value="0x8561" name="GL_GREEN_MIN_CLAMP_INGR"/>
+        <enum value="0x8562" name="GL_BLUE_MIN_CLAMP_INGR"/>
+        <enum value="0x8563" name="GL_ALPHA_MIN_CLAMP_INGR"/>
+        <enum value="0x8564" name="GL_RED_MAX_CLAMP_INGR"/>
+        <enum value="0x8565" name="GL_GREEN_MAX_CLAMP_INGR"/>
+        <enum value="0x8566" name="GL_BLUE_MAX_CLAMP_INGR"/>
+        <enum value="0x8567" name="GL_ALPHA_MAX_CLAMP_INGR"/>
+        <enum value="0x8568" name="GL_INTERLACE_READ_INGR"/>
+            <unused start="0x8569" end="0x856F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8570" end="0x859F" group="RegisterCombinerPname" vendor="AMD/NV">
+        <enum value="0x8570" name="GL_COMBINE"/>
+        <enum value="0x8570" name="GL_COMBINE_ARB"/>
+        <enum value="0x8570" name="GL_COMBINE_EXT"/>
+        <enum value="0x8571" name="GL_COMBINE_RGB"/>
+        <enum value="0x8571" name="GL_COMBINE_RGB_ARB"/>
+        <enum value="0x8571" name="GL_COMBINE_RGB_EXT"/>
+        <enum value="0x8572" name="GL_COMBINE_ALPHA"/>
+        <enum value="0x8572" name="GL_COMBINE_ALPHA_ARB"/>
+        <enum value="0x8572" name="GL_COMBINE_ALPHA_EXT"/>
+        <enum value="0x8573" name="GL_RGB_SCALE"/>
+        <enum value="0x8573" name="GL_RGB_SCALE_ARB"/>
+        <enum value="0x8573" name="GL_RGB_SCALE_EXT"/>
+        <enum value="0x8574" name="GL_ADD_SIGNED"/>
+        <enum value="0x8574" name="GL_ADD_SIGNED_ARB"/>
+        <enum value="0x8574" name="GL_ADD_SIGNED_EXT"/>
+        <enum value="0x8575" name="GL_INTERPOLATE"/>
+        <enum value="0x8575" name="GL_INTERPOLATE_ARB"/>
+        <enum value="0x8575" name="GL_INTERPOLATE_EXT"/>
+        <enum value="0x8576" name="GL_CONSTANT"/>
+        <enum value="0x8576" name="GL_CONSTANT_ARB"/>
+        <enum value="0x8576" name="GL_CONSTANT_EXT"/>
+        <enum value="0x8577" name="GL_PRIMARY_COLOR"/>
+        <enum value="0x8577" name="GL_PRIMARY_COLOR_ARB"/>
+        <enum value="0x8577" name="GL_PRIMARY_COLOR_EXT"/>
+        <enum value="0x8578" name="GL_PREVIOUS"/>
+        <enum value="0x8578" name="GL_PREVIOUS_ARB"/>
+        <enum value="0x8578" name="GL_PREVIOUS_EXT"/>
+            <unused start="0x8579" end="0x857F" comment="Additional combiner enums only"/>
+        <enum value="0x8580" name="GL_SOURCE0_RGB"/>
+        <enum value="0x8580" name="GL_SOURCE0_RGB_ARB"/>
+        <enum value="0x8580" name="GL_SOURCE0_RGB_EXT"/>
+        <enum value="0x8580" name="GL_SRC0_RGB" alias="GL_SOURCE0_RGB"/>
+        <enum value="0x8581" name="GL_SOURCE1_RGB"/>
+        <enum value="0x8581" name="GL_SOURCE1_RGB_ARB"/>
+        <enum value="0x8581" name="GL_SOURCE1_RGB_EXT"/>
+        <enum value="0x8581" name="GL_SRC1_RGB" alias="GL_SOURCE1_RGB"/>
+        <enum value="0x8582" name="GL_SOURCE2_RGB"/>
+        <enum value="0x8582" name="GL_SOURCE2_RGB_ARB"/>
+        <enum value="0x8582" name="GL_SOURCE2_RGB_EXT"/>
+        <enum value="0x8582" name="GL_SRC2_RGB" alias="GL_SOURCE2_RGB"/>
+        <enum value="0x8583" name="GL_SOURCE3_RGB_NV"/>
+            <unused start="0x8584" end="0x8587" comment="Additional combiner enums only"/>
+        <enum value="0x8588" name="GL_SOURCE0_ALPHA"/>
+        <enum value="0x8588" name="GL_SOURCE0_ALPHA_ARB"/>
+        <enum value="0x8588" name="GL_SOURCE0_ALPHA_EXT"/>
+        <enum value="0x8588" name="GL_SRC0_ALPHA" alias="GL_SOURCE0_ALPHA"/>
+        <enum value="0x8589" name="GL_SOURCE1_ALPHA"/>
+        <enum value="0x8589" name="GL_SOURCE1_ALPHA_ARB"/>
+        <enum value="0x8589" name="GL_SOURCE1_ALPHA_EXT"/>
+        <enum value="0x8589" name="GL_SRC1_ALPHA" alias="GL_SOURCE1_ALPHA"/>
+        <enum value="0x858A" name="GL_SOURCE2_ALPHA"/>
+        <enum value="0x858A" name="GL_SOURCE2_ALPHA_ARB"/>
+        <enum value="0x858A" name="GL_SOURCE2_ALPHA_EXT"/>
+        <enum value="0x858A" name="GL_SRC2_ALPHA" alias="GL_SOURCE2_ALPHA"/>
+        <enum value="0x858B" name="GL_SOURCE3_ALPHA_NV"/>
+            <unused start="0x858C" end="0x858F" comment="Additional combiner enums only"/>
+        <enum value="0x8590" name="GL_OPERAND0_RGB"/>
+        <enum value="0x8590" name="GL_OPERAND0_RGB_ARB"/>
+        <enum value="0x8590" name="GL_OPERAND0_RGB_EXT"/>
+        <enum value="0x8591" name="GL_OPERAND1_RGB"/>
+        <enum value="0x8591" name="GL_OPERAND1_RGB_ARB"/>
+        <enum value="0x8591" name="GL_OPERAND1_RGB_EXT"/>
+        <enum value="0x8592" name="GL_OPERAND2_RGB"/>
+        <enum value="0x8592" name="GL_OPERAND2_RGB_ARB"/>
+        <enum value="0x8592" name="GL_OPERAND2_RGB_EXT"/>
+        <enum value="0x8593" name="GL_OPERAND3_RGB_NV"/>
+            <unused start="0x8594" end="0x8597" comment="Additional combiner enums only"/>
+        <enum value="0x8598" name="GL_OPERAND0_ALPHA"/>
+        <enum value="0x8598" name="GL_OPERAND0_ALPHA_ARB"/>
+        <enum value="0x8598" name="GL_OPERAND0_ALPHA_EXT"/>
+        <enum value="0x8599" name="GL_OPERAND1_ALPHA"/>
+        <enum value="0x8599" name="GL_OPERAND1_ALPHA_ARB"/>
+        <enum value="0x8599" name="GL_OPERAND1_ALPHA_EXT"/>
+        <enum value="0x859A" name="GL_OPERAND2_ALPHA"/>
+        <enum value="0x859A" name="GL_OPERAND2_ALPHA_ARB"/>
+        <enum value="0x859A" name="GL_OPERAND2_ALPHA_EXT"/>
+        <enum value="0x859B" name="GL_OPERAND3_ALPHA_NV"/>
+            <unused start="0x859C" end="0x859F" comment="Additional combiner enums only"/>
+    </enums>
+
+    <enums namespace="GL" start="0x85A0" end="0x85AF" vendor="SGI">
+        <enum value="0x85A0" name="GL_PACK_SUBSAMPLE_RATE_SGIX"/>
+        <enum value="0x85A1" name="GL_UNPACK_SUBSAMPLE_RATE_SGIX"/>
+        <enum value="0x85A2" name="GL_PIXEL_SUBSAMPLE_4444_SGIX"/>
+        <enum value="0x85A3" name="GL_PIXEL_SUBSAMPLE_2424_SGIX"/>
+        <enum value="0x85A4" name="GL_PIXEL_SUBSAMPLE_4242_SGIX"/>
+            <unused start="0x85A5" end="0x85AD" comment="Incomplete extension SGIS_color_range"/>
+            <!-- <enum value="0x85A5" name="GL_EXTENDED_RANGE_SGIS"/> -->
+            <!-- <enum value="0x85A6" name="GL_MIN_RED_SGIS"/> -->
+            <!-- <enum value="0x85A7" name="GL_MAX_RED_SGIS"/> -->
+            <!-- <enum value="0x85A8" name="GL_MIN_GREEN_SGIS"/> -->
+            <!-- <enum value="0x85A9" name="GL_MAX_GREEN_SGIS"/> -->
+            <!-- <enum value="0x85AA" name="GL_MIN_BLUE_SGIS"/> -->
+            <!-- <enum value="0x85AB" name="GL_MAX_BLUE_SGIS"/> -->
+            <!-- <enum value="0x85AC" name="GL_MIN_ALPHA_SGIS"/> -->
+            <!-- <enum value="0x85AD" name="GL_MAX_ALPHA_SGIS"/> -->
+        <enum value="0x85AE" name="GL_PERTURB_EXT"/>
+        <enum value="0x85AF" name="GL_TEXTURE_NORMAL_EXT"/>
+    </enums>
+
+    <enums namespace="GL" start="0x85B0" end="0x85BF" vendor="APPLE">
+        <enum value="0x85B0" name="GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE"/>
+        <enum value="0x85B1" name="GL_TRANSFORM_HINT_APPLE"/>
+        <enum value="0x85B2" name="GL_UNPACK_CLIENT_STORAGE_APPLE"/>
+        <enum value="0x85B3" name="GL_BUFFER_OBJECT_APPLE"/>
+        <enum value="0x85B4" name="GL_STORAGE_CLIENT_APPLE"/>
+        <enum value="0x85B5" name="GL_VERTEX_ARRAY_BINDING"/>
+        <enum value="0x85B5" name="GL_VERTEX_ARRAY_BINDING_APPLE"/>
+        <enum value="0x85B5" name="GL_VERTEX_ARRAY_BINDING_OES"/>
+            <unused start="0x85B6" comment="Unknown extension (Khronos bug 632)"/>
+            <!-- <enum value="0x85B6" name="GL_TEXTURE_MINIMIZE_STORAGE_APPLE"/> -->
+        <enum value="0x85B7" name="GL_TEXTURE_RANGE_LENGTH_APPLE"/>
+        <enum value="0x85B8" name="GL_TEXTURE_RANGE_POINTER_APPLE"/>
+        <enum value="0x85B9" name="GL_YCBCR_422_APPLE"/>
+        <enum value="0x85BA" name="GL_UNSIGNED_SHORT_8_8_APPLE"/>
+        <enum value="0x85BA" name="GL_UNSIGNED_SHORT_8_8_MESA"/>
+        <enum value="0x85BB" name="GL_UNSIGNED_SHORT_8_8_REV_APPLE"/>
+        <enum value="0x85BB" name="GL_UNSIGNED_SHORT_8_8_REV_MESA"/>
+        <enum value="0x85BC" name="GL_TEXTURE_STORAGE_HINT_APPLE"/>
+        <enum value="0x85BD" name="GL_STORAGE_PRIVATE_APPLE"/>
+        <enum value="0x85BE" name="GL_STORAGE_CACHED_APPLE"/>
+        <enum value="0x85BF" name="GL_STORAGE_SHARED_APPLE"/>
+    </enums>
+
+    <enums namespace="GL" start="0x85C0" end="0x85CF" vendor="SUN">
+        <enum value="0x85C0" name="GL_REPLACEMENT_CODE_ARRAY_SUN"/>
+        <enum value="0x85C1" name="GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN"/>
+        <enum value="0x85C2" name="GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN"/>
+        <enum value="0x85C3" name="GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN"/>
+        <enum value="0x85C4" name="GL_R1UI_V3F_SUN"/>
+        <enum value="0x85C5" name="GL_R1UI_C4UB_V3F_SUN"/>
+        <enum value="0x85C6" name="GL_R1UI_C3F_V3F_SUN"/>
+        <enum value="0x85C7" name="GL_R1UI_N3F_V3F_SUN"/>
+        <enum value="0x85C8" name="GL_R1UI_C4F_N3F_V3F_SUN"/>
+        <enum value="0x85C9" name="GL_R1UI_T2F_V3F_SUN"/>
+        <enum value="0x85CA" name="GL_R1UI_T2F_N3F_V3F_SUN"/>
+        <enum value="0x85CB" name="GL_R1UI_T2F_C4F_N3F_V3F_SUN"/>
+        <enum value="0x85CC" name="GL_SLICE_ACCUM_SUN"/>
+            <unused start="0x85CD" end="0x85CF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x85D0" end="0x85DF" vendor="ZiiLabs" comment="3Dlabs private extension for Autodesk">
+            <unused start="0x85D0" end="0x85D1" comment="Unknown 3Dlabs private extension for Autodesk (but we know the enum values)"/>
+            <!-- <enum value="0x85D0" name="GL_FACET_NORMAL_AUTODESK"/> -->
+            <!-- <enum value="0x85D1" name="GL_FACET_NORMAL_ARRAY_AUTODESK"/> -->
+            <unused start="0x85D2" end="0x85DF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x85E0" end="0x85FF" vendor="SGI">
+            <unused start="0x85E0" end="0x85FB" comment="Incomplete extension SGIX_texture_range"/>
+            <!-- <enum value="0x85E0" name="GL_RGB_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E1" name="GL_RGBA_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E2" name="GL_ALPHA_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E3" name="GL_LUMINANCE_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E4" name="GL_INTENSITY_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E5" name="GL_LUMINANCE_ALPHA_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E6" name="GL_RGB16_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E7" name="GL_RGBA16_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E8" name="GL_ALPHA16_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85E9" name="GL_LUMINANCE16_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85EA" name="GL_INTENSITY16_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85EB" name="GL_LUMINANCE16_ALPHA16_SIGNED_SGIX"/> -->
+            <!-- <enum value="0x85EC" name="GL_RGB_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85ED" name="GL_RGBA_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85EE" name="GL_ALPHA_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85EF" name="GL_LUMINANCE_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F0" name="GL_INTENSITY_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F1" name="GL_LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F2" name="GL_RGB16_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F3" name="GL_RGBA16_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F4" name="GL_ALPHA16_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F5" name="GL_LUMINANCE16_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F6" name="GL_INTENSITY16_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F7" name="GL_LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX"/> -->
+            <!-- <enum value="0x85F8" name="GL_MIN_LUMINANCE_SGIS"/> -->
+            <!-- <enum value="0x85F9" name="GL_MAX_LUMINANCE_SGIS"/> -->
+            <!-- <enum value="0x85FA" name="GL_MIN_INTENSITY_SGIS"/> -->
+            <!-- <enum value="0x85FB" name="GL_MAX_INTENSITY_SGIS"/> -->
+            <unused start="0x85FC" end="0x85FF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8600" end="0x861F" vendor="SUN">
+            <unused start="0x8600" end="0x8613"/>
+        <enum value="0x8614" name="GL_QUAD_MESH_SUN"/>
+        <enum value="0x8615" name="GL_TRIANGLE_MESH_SUN"/>
+            <unused start="0x8614" end="0x861F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8620" end="0x867F" vendor="NV">
+        <enum value="0x8620" name="GL_VERTEX_PROGRAM_ARB"/>
+        <enum value="0x8620" name="GL_VERTEX_PROGRAM_NV"/>
+        <enum value="0x8621" name="GL_VERTEX_STATE_PROGRAM_NV"/>
+        <enum value="0x8622" name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"/>
+        <enum value="0x8622" name="GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB"/>
+        <enum value="0x8623" name="GL_ATTRIB_ARRAY_SIZE_NV"/>
+        <enum value="0x8623" name="GL_VERTEX_ATTRIB_ARRAY_SIZE"/>
+        <enum value="0x8623" name="GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB"/>
+        <enum value="0x8624" name="GL_ATTRIB_ARRAY_STRIDE_NV"/>
+        <enum value="0x8624" name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"/>
+        <enum value="0x8624" name="GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB"/>
+        <enum value="0x8625" name="GL_ATTRIB_ARRAY_TYPE_NV"/>
+        <enum value="0x8625" name="GL_VERTEX_ATTRIB_ARRAY_TYPE"/>
+        <enum value="0x8625" name="GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB"/>
+        <enum value="0x8626" name="GL_CURRENT_ATTRIB_NV"/>
+        <enum value="0x8626" name="GL_CURRENT_VERTEX_ATTRIB"/>
+        <enum value="0x8626" name="GL_CURRENT_VERTEX_ATTRIB_ARB"/>
+        <enum value="0x8627" name="GL_PROGRAM_LENGTH_ARB"/>
+        <enum value="0x8627" name="GL_PROGRAM_LENGTH_NV"/>
+        <enum value="0x8628" name="GL_PROGRAM_STRING_ARB"/>
+        <enum value="0x8628" name="GL_PROGRAM_STRING_NV"/>
+        <enum value="0x8629" name="GL_MODELVIEW_PROJECTION_NV"/>
+        <enum value="0x862A" name="GL_IDENTITY_NV"/>
+        <enum value="0x862B" name="GL_INVERSE_NV"/>
+        <enum value="0x862C" name="GL_TRANSPOSE_NV"/>
+        <enum value="0x862D" name="GL_INVERSE_TRANSPOSE_NV"/>
+        <enum value="0x862E" name="GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB"/>
+        <enum value="0x862E" name="GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV"/>
+        <enum value="0x862F" name="GL_MAX_PROGRAM_MATRICES_ARB"/>
+        <enum value="0x862F" name="GL_MAX_TRACK_MATRICES_NV"/>
+        <enum value="0x8630" name="GL_MATRIX0_NV"/>
+        <enum value="0x8631" name="GL_MATRIX1_NV"/>
+        <enum value="0x8632" name="GL_MATRIX2_NV"/>
+        <enum value="0x8633" name="GL_MATRIX3_NV"/>
+        <enum value="0x8634" name="GL_MATRIX4_NV"/>
+        <enum value="0x8635" name="GL_MATRIX5_NV"/>
+        <enum value="0x8636" name="GL_MATRIX6_NV"/>
+        <enum value="0x8637" name="GL_MATRIX7_NV"/>
+            <unused start="0x8638" end="0x863F" comment="Reserved for MATRIX{8-15}_NV"/>
+            <!-- <enum value="0x8638" name="GL_MATRIX8_NV"/> -->
+            <!-- <enum value="0x8639" name="GL_MATRIX9_NV"/> -->
+            <!-- <enum value="0x863A" name="GL_MATRIX10_NV"/> -->
+            <!-- <enum value="0x863B" name="GL_MATRIX11_NV"/> -->
+            <!-- <enum value="0x863C" name="GL_MATRIX12_NV"/> -->
+            <!-- <enum value="0x863D" name="GL_MATRIX13_NV"/> -->
+            <!-- <enum value="0x863E" name="GL_MATRIX14_NV"/> -->
+            <!-- <enum value="0x863F" name="GL_MATRIX15_NV"/> -->
+        <enum value="0x8640" name="GL_CURRENT_MATRIX_STACK_DEPTH_ARB"/>
+        <enum value="0x8640" name="GL_CURRENT_MATRIX_STACK_DEPTH_NV"/>
+        <enum value="0x8641" name="GL_CURRENT_MATRIX_ARB"/>
+        <enum value="0x8641" name="GL_CURRENT_MATRIX_NV"/>
+        <enum value="0x8642" name="GL_VERTEX_PROGRAM_POINT_SIZE"/>
+        <enum value="0x8642" name="GL_VERTEX_PROGRAM_POINT_SIZE_ARB"/>
+        <enum value="0x8642" name="GL_VERTEX_PROGRAM_POINT_SIZE_NV"/>
+        <enum value="0x8642" name="GL_PROGRAM_POINT_SIZE" alias="GL_VERTEX_PROGRAM_POINT_SIZE"/>
+        <enum value="0x8642" name="GL_PROGRAM_POINT_SIZE_ARB"/>
+        <enum value="0x8642" name="GL_PROGRAM_POINT_SIZE_EXT"/>
+        <enum value="0x8643" name="GL_VERTEX_PROGRAM_TWO_SIDE"/>
+        <enum value="0x8643" name="GL_VERTEX_PROGRAM_TWO_SIDE_ARB"/>
+        <enum value="0x8643" name="GL_VERTEX_PROGRAM_TWO_SIDE_NV"/>
+        <enum value="0x8644" name="GL_PROGRAM_PARAMETER_NV"/>
+        <enum value="0x8645" name="GL_ATTRIB_ARRAY_POINTER_NV"/>
+        <enum value="0x8645" name="GL_VERTEX_ATTRIB_ARRAY_POINTER"/>
+        <enum value="0x8645" name="GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB"/>
+        <enum value="0x8646" name="GL_PROGRAM_TARGET_NV"/>
+        <enum value="0x8647" name="GL_PROGRAM_RESIDENT_NV"/>
+        <enum value="0x8648" name="GL_TRACK_MATRIX_NV"/>
+        <enum value="0x8649" name="GL_TRACK_MATRIX_TRANSFORM_NV"/>
+        <enum value="0x864A" name="GL_VERTEX_PROGRAM_BINDING_NV"/>
+        <enum value="0x864B" name="GL_PROGRAM_ERROR_POSITION_ARB"/>
+        <enum value="0x864B" name="GL_PROGRAM_ERROR_POSITION_NV"/>
+        <enum value="0x864C" name="GL_OFFSET_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x864D" name="GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV"/>
+        <enum value="0x864E" name="GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x864F" name="GL_DEPTH_CLAMP"/>
+        <enum value="0x864F" name="GL_DEPTH_CLAMP_NV"/>
+        <enum value="0x8650" name="GL_VERTEX_ATTRIB_ARRAY0_NV"/>
+        <enum value="0x8651" name="GL_VERTEX_ATTRIB_ARRAY1_NV"/>
+        <enum value="0x8652" name="GL_VERTEX_ATTRIB_ARRAY2_NV"/>
+        <enum value="0x8653" name="GL_VERTEX_ATTRIB_ARRAY3_NV"/>
+        <enum value="0x8654" name="GL_VERTEX_ATTRIB_ARRAY4_NV"/>
+        <enum value="0x8655" name="GL_VERTEX_ATTRIB_ARRAY5_NV"/>
+        <enum value="0x8656" name="GL_VERTEX_ATTRIB_ARRAY6_NV"/>
+        <enum value="0x8657" name="GL_VERTEX_ATTRIB_ARRAY7_NV"/>
+        <enum value="0x8658" name="GL_VERTEX_ATTRIB_ARRAY8_NV"/>
+        <enum value="0x8659" name="GL_VERTEX_ATTRIB_ARRAY9_NV"/>
+        <enum value="0x865A" name="GL_VERTEX_ATTRIB_ARRAY10_NV"/>
+        <enum value="0x865B" name="GL_VERTEX_ATTRIB_ARRAY11_NV"/>
+        <enum value="0x865C" name="GL_VERTEX_ATTRIB_ARRAY12_NV"/>
+        <enum value="0x865D" name="GL_VERTEX_ATTRIB_ARRAY13_NV"/>
+        <enum value="0x865E" name="GL_VERTEX_ATTRIB_ARRAY14_NV"/>
+        <enum value="0x865F" name="GL_VERTEX_ATTRIB_ARRAY15_NV"/>
+        <enum value="0x8660" name="GL_MAP1_VERTEX_ATTRIB0_4_NV"/>
+        <enum value="0x8661" name="GL_MAP1_VERTEX_ATTRIB1_4_NV"/>
+        <enum value="0x8662" name="GL_MAP1_VERTEX_ATTRIB2_4_NV"/>
+        <enum value="0x8663" name="GL_MAP1_VERTEX_ATTRIB3_4_NV"/>
+        <enum value="0x8664" name="GL_MAP1_VERTEX_ATTRIB4_4_NV"/>
+        <enum value="0x8665" name="GL_MAP1_VERTEX_ATTRIB5_4_NV"/>
+        <enum value="0x8666" name="GL_MAP1_VERTEX_ATTRIB6_4_NV"/>
+        <enum value="0x8667" name="GL_MAP1_VERTEX_ATTRIB7_4_NV"/>
+        <enum value="0x8668" name="GL_MAP1_VERTEX_ATTRIB8_4_NV"/>
+        <enum value="0x8669" name="GL_MAP1_VERTEX_ATTRIB9_4_NV"/>
+        <enum value="0x866A" name="GL_MAP1_VERTEX_ATTRIB10_4_NV"/>
+        <enum value="0x866B" name="GL_MAP1_VERTEX_ATTRIB11_4_NV"/>
+        <enum value="0x866C" name="GL_MAP1_VERTEX_ATTRIB12_4_NV"/>
+        <enum value="0x866D" name="GL_MAP1_VERTEX_ATTRIB13_4_NV"/>
+        <enum value="0x866E" name="GL_MAP1_VERTEX_ATTRIB14_4_NV"/>
+        <enum value="0x866F" name="GL_MAP1_VERTEX_ATTRIB15_4_NV"/>
+        <enum value="0x8670" name="GL_MAP2_VERTEX_ATTRIB0_4_NV"/>
+        <enum value="0x8671" name="GL_MAP2_VERTEX_ATTRIB1_4_NV"/>
+        <enum value="0x8672" name="GL_MAP2_VERTEX_ATTRIB2_4_NV"/>
+        <enum value="0x8673" name="GL_MAP2_VERTEX_ATTRIB3_4_NV"/>
+        <enum value="0x8674" name="GL_MAP2_VERTEX_ATTRIB4_4_NV"/>
+        <enum value="0x8675" name="GL_MAP2_VERTEX_ATTRIB5_4_NV"/>
+        <enum value="0x8676" name="GL_MAP2_VERTEX_ATTRIB6_4_NV"/>
+        <enum value="0x8677" name="GL_MAP2_VERTEX_ATTRIB7_4_NV"/>
+        <enum value="0x8677" name="GL_PROGRAM_BINDING_ARB" comment="NOT an alias. Accidental reuse of GL_MAP2_VERTEX_ATTRIB7_4_NV"/>
+        <enum value="0x8678" name="GL_MAP2_VERTEX_ATTRIB8_4_NV"/>
+        <enum value="0x8679" name="GL_MAP2_VERTEX_ATTRIB9_4_NV"/>
+        <enum value="0x867A" name="GL_MAP2_VERTEX_ATTRIB10_4_NV"/>
+        <enum value="0x867B" name="GL_MAP2_VERTEX_ATTRIB11_4_NV"/>
+        <enum value="0x867C" name="GL_MAP2_VERTEX_ATTRIB12_4_NV"/>
+        <enum value="0x867D" name="GL_MAP2_VERTEX_ATTRIB13_4_NV"/>
+        <enum value="0x867E" name="GL_MAP2_VERTEX_ATTRIB14_4_NV"/>
+        <enum value="0x867F" name="GL_MAP2_VERTEX_ATTRIB15_4_NV"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8680" end="0x869F" vendor="Pixelfusion"/>
+
+    <enums namespace="GL" start="0x86A0" end="0x86AF" vendor="ARB">
+        <enum value="0x86A0" name="GL_TEXTURE_COMPRESSED_IMAGE_SIZE"/>
+        <enum value="0x86A0" name="GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB"/>
+        <enum value="0x86A1" name="GL_TEXTURE_COMPRESSED"/>
+        <enum value="0x86A1" name="GL_TEXTURE_COMPRESSED_ARB"/>
+        <enum value="0x86A2" name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"/>
+        <enum value="0x86A2" name="GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB"/>
+        <enum value="0x86A3" name="GL_COMPRESSED_TEXTURE_FORMATS"/>
+        <enum value="0x86A3" name="GL_COMPRESSED_TEXTURE_FORMATS_ARB"/>
+        <enum value="0x86A4" name="GL_MAX_VERTEX_UNITS_ARB"/>
+        <enum value="0x86A4" name="GL_MAX_VERTEX_UNITS_OES"/>
+        <enum value="0x86A5" name="GL_ACTIVE_VERTEX_UNITS_ARB"/>
+        <enum value="0x86A6" name="GL_WEIGHT_SUM_UNITY_ARB"/>
+        <enum value="0x86A7" name="GL_VERTEX_BLEND_ARB"/>
+        <enum value="0x86A8" name="GL_CURRENT_WEIGHT_ARB"/>
+        <enum value="0x86A9" name="GL_WEIGHT_ARRAY_TYPE_ARB"/>
+        <enum value="0x86A9" name="GL_WEIGHT_ARRAY_TYPE_OES"/>
+        <enum value="0x86AA" name="GL_WEIGHT_ARRAY_STRIDE_ARB"/>
+        <enum value="0x86AA" name="GL_WEIGHT_ARRAY_STRIDE_OES"/>
+        <enum value="0x86AB" name="GL_WEIGHT_ARRAY_SIZE_ARB"/>
+        <enum value="0x86AB" name="GL_WEIGHT_ARRAY_SIZE_OES"/>
+        <enum value="0x86AC" name="GL_WEIGHT_ARRAY_POINTER_ARB"/>
+        <enum value="0x86AC" name="GL_WEIGHT_ARRAY_POINTER_OES"/>
+        <enum value="0x86AD" name="GL_WEIGHT_ARRAY_ARB"/>
+        <enum value="0x86AD" name="GL_WEIGHT_ARRAY_OES"/>
+        <enum value="0x86AE" name="GL_DOT3_RGB"/>
+        <enum value="0x86AE" name="GL_DOT3_RGB_ARB"/>
+        <enum value="0x86AF" name="GL_DOT3_RGBA"/>
+        <enum value="0x86AF" name="GL_DOT3_RGBA_ARB"/>
+        <enum value="0x86AF" name="GL_DOT3_RGBA_IMG"/>
+    </enums>
+
+    <enums namespace="GL" start="0x86B0" end="0x86BF" vendor="3DFX">
+        <enum value="0x86B0" name="GL_COMPRESSED_RGB_FXT1_3DFX"/>
+        <enum value="0x86B1" name="GL_COMPRESSED_RGBA_FXT1_3DFX"/>
+        <enum value="0x86B2" name="GL_MULTISAMPLE_3DFX"/>
+        <enum value="0x86B3" name="GL_SAMPLE_BUFFERS_3DFX"/>
+        <enum value="0x86B4" name="GL_SAMPLES_3DFX"/>
+            <unused start="0x86B5" end="0x86BF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x86C0" end="0x871F" vendor="NV">
+        <enum value="0x86C0" name="GL_EVAL_2D_NV"/>
+        <enum value="0x86C1" name="GL_EVAL_TRIANGULAR_2D_NV"/>
+        <enum value="0x86C2" name="GL_MAP_TESSELLATION_NV"/>
+        <enum value="0x86C3" name="GL_MAP_ATTRIB_U_ORDER_NV"/>
+        <enum value="0x86C4" name="GL_MAP_ATTRIB_V_ORDER_NV"/>
+        <enum value="0x86C5" name="GL_EVAL_FRACTIONAL_TESSELLATION_NV"/>
+        <enum value="0x86C6" name="GL_EVAL_VERTEX_ATTRIB0_NV"/>
+        <enum value="0x86C7" name="GL_EVAL_VERTEX_ATTRIB1_NV"/>
+        <enum value="0x86C8" name="GL_EVAL_VERTEX_ATTRIB2_NV"/>
+        <enum value="0x86C9" name="GL_EVAL_VERTEX_ATTRIB3_NV"/>
+        <enum value="0x86CA" name="GL_EVAL_VERTEX_ATTRIB4_NV"/>
+        <enum value="0x86CB" name="GL_EVAL_VERTEX_ATTRIB5_NV"/>
+        <enum value="0x86CC" name="GL_EVAL_VERTEX_ATTRIB6_NV"/>
+        <enum value="0x86CD" name="GL_EVAL_VERTEX_ATTRIB7_NV"/>
+        <enum value="0x86CE" name="GL_EVAL_VERTEX_ATTRIB8_NV"/>
+        <enum value="0x86CF" name="GL_EVAL_VERTEX_ATTRIB9_NV"/>
+        <enum value="0x86D0" name="GL_EVAL_VERTEX_ATTRIB10_NV"/>
+        <enum value="0x86D1" name="GL_EVAL_VERTEX_ATTRIB11_NV"/>
+        <enum value="0x86D2" name="GL_EVAL_VERTEX_ATTRIB12_NV"/>
+        <enum value="0x86D3" name="GL_EVAL_VERTEX_ATTRIB13_NV"/>
+        <enum value="0x86D4" name="GL_EVAL_VERTEX_ATTRIB14_NV"/>
+        <enum value="0x86D5" name="GL_EVAL_VERTEX_ATTRIB15_NV"/>
+        <enum value="0x86D6" name="GL_MAX_MAP_TESSELLATION_NV"/>
+        <enum value="0x86D7" name="GL_MAX_RATIONAL_EVAL_ORDER_NV"/>
+        <enum value="0x86D8" name="GL_MAX_PROGRAM_PATCH_ATTRIBS_NV"/>
+        <enum value="0x86D9" name="GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV"/>
+        <enum value="0x86DA" name="GL_UNSIGNED_INT_S8_S8_8_8_NV"/>
+        <enum value="0x86DB" name="GL_UNSIGNED_INT_8_8_S8_S8_REV_NV"/>
+        <enum value="0x86DC" name="GL_DSDT_MAG_INTENSITY_NV"/>
+        <enum value="0x86DD" name="GL_SHADER_CONSISTENT_NV"/>
+        <enum value="0x86DE" name="GL_TEXTURE_SHADER_NV"/>
+        <enum value="0x86DF" name="GL_SHADER_OPERATION_NV"/>
+        <enum value="0x86E0" name="GL_CULL_MODES_NV"/>
+        <enum value="0x86E1" name="GL_OFFSET_TEXTURE_MATRIX_NV"/>
+        <enum value="0x86E1" name="GL_OFFSET_TEXTURE_2D_MATRIX_NV" alias="GL_OFFSET_TEXTURE_MATRIX_NV"/>
+        <enum value="0x86E2" name="GL_OFFSET_TEXTURE_SCALE_NV"/>
+        <enum value="0x86E2" name="GL_OFFSET_TEXTURE_2D_SCALE_NV" alias="GL_OFFSET_TEXTURE_SCALE_NV"/>
+        <enum value="0x86E3" name="GL_OFFSET_TEXTURE_BIAS_NV"/>
+        <enum value="0x86E3" name="GL_OFFSET_TEXTURE_2D_BIAS_NV" alias="GL_OFFSET_TEXTURE_BIAS_NV"/>
+        <enum value="0x86E4" name="GL_PREVIOUS_TEXTURE_INPUT_NV"/>
+        <enum value="0x86E5" name="GL_CONST_EYE_NV"/>
+        <enum value="0x86E6" name="GL_PASS_THROUGH_NV"/>
+        <enum value="0x86E7" name="GL_CULL_FRAGMENT_NV"/>
+        <enum value="0x86E8" name="GL_OFFSET_TEXTURE_2D_NV"/>
+        <enum value="0x86E9" name="GL_DEPENDENT_AR_TEXTURE_2D_NV"/>
+        <enum value="0x86EA" name="GL_DEPENDENT_GB_TEXTURE_2D_NV"/>
+        <enum value="0x86EB" name="GL_SURFACE_STATE_NV"/>
+        <enum value="0x86EC" name="GL_DOT_PRODUCT_NV"/>
+        <enum value="0x86ED" name="GL_DOT_PRODUCT_DEPTH_REPLACE_NV"/>
+        <enum value="0x86EE" name="GL_DOT_PRODUCT_TEXTURE_2D_NV"/>
+        <enum value="0x86EF" name="GL_DOT_PRODUCT_TEXTURE_3D_NV"/>
+        <enum value="0x86F0" name="GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV"/>
+        <enum value="0x86F1" name="GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV"/>
+        <enum value="0x86F2" name="GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV"/>
+        <enum value="0x86F3" name="GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV"/>
+        <enum value="0x86F4" name="GL_HILO_NV"/>
+        <enum value="0x86F5" name="GL_DSDT_NV"/>
+        <enum value="0x86F6" name="GL_DSDT_MAG_NV"/>
+        <enum value="0x86F7" name="GL_DSDT_MAG_VIB_NV"/>
+        <enum value="0x86F8" name="GL_HILO16_NV"/>
+        <enum value="0x86F9" name="GL_SIGNED_HILO_NV"/>
+        <enum value="0x86FA" name="GL_SIGNED_HILO16_NV"/>
+        <enum value="0x86FB" name="GL_SIGNED_RGBA_NV"/>
+        <enum value="0x86FC" name="GL_SIGNED_RGBA8_NV"/>
+        <enum value="0x86FD" name="GL_SURFACE_REGISTERED_NV"/>
+        <enum value="0x86FE" name="GL_SIGNED_RGB_NV"/>
+        <enum value="0x86FF" name="GL_SIGNED_RGB8_NV"/>
+        <enum value="0x8700" name="GL_SURFACE_MAPPED_NV"/>
+        <enum value="0x8701" name="GL_SIGNED_LUMINANCE_NV"/>
+        <enum value="0x8702" name="GL_SIGNED_LUMINANCE8_NV"/>
+        <enum value="0x8703" name="GL_SIGNED_LUMINANCE_ALPHA_NV"/>
+        <enum value="0x8704" name="GL_SIGNED_LUMINANCE8_ALPHA8_NV"/>
+        <enum value="0x8705" name="GL_SIGNED_ALPHA_NV"/>
+        <enum value="0x8706" name="GL_SIGNED_ALPHA8_NV"/>
+        <enum value="0x8707" name="GL_SIGNED_INTENSITY_NV"/>
+        <enum value="0x8708" name="GL_SIGNED_INTENSITY8_NV"/>
+        <enum value="0x8709" name="GL_DSDT8_NV"/>
+        <enum value="0x870A" name="GL_DSDT8_MAG8_NV"/>
+        <enum value="0x870B" name="GL_DSDT8_MAG8_INTENSITY8_NV"/>
+        <enum value="0x870C" name="GL_SIGNED_RGB_UNSIGNED_ALPHA_NV"/>
+        <enum value="0x870D" name="GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV"/>
+        <enum value="0x870E" name="GL_HI_SCALE_NV"/>
+        <enum value="0x870F" name="GL_LO_SCALE_NV"/>
+        <enum value="0x8710" name="GL_DS_SCALE_NV"/>
+        <enum value="0x8711" name="GL_DT_SCALE_NV"/>
+        <enum value="0x8712" name="GL_MAGNITUDE_SCALE_NV"/>
+        <enum value="0x8713" name="GL_VIBRANCE_SCALE_NV"/>
+        <enum value="0x8714" name="GL_HI_BIAS_NV"/>
+        <enum value="0x8715" name="GL_LO_BIAS_NV"/>
+        <enum value="0x8716" name="GL_DS_BIAS_NV"/>
+        <enum value="0x8717" name="GL_DT_BIAS_NV"/>
+        <enum value="0x8718" name="GL_MAGNITUDE_BIAS_NV"/>
+        <enum value="0x8719" name="GL_VIBRANCE_BIAS_NV"/>
+        <enum value="0x871A" name="GL_TEXTURE_BORDER_VALUES_NV"/>
+        <enum value="0x871B" name="GL_TEXTURE_HI_SIZE_NV"/>
+        <enum value="0x871C" name="GL_TEXTURE_LO_SIZE_NV"/>
+        <enum value="0x871D" name="GL_TEXTURE_DS_SIZE_NV"/>
+        <enum value="0x871E" name="GL_TEXTURE_DT_SIZE_NV"/>
+        <enum value="0x871F" name="GL_TEXTURE_MAG_SIZE_NV"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8720" end="0x873F" vendor="ARB">
+            <unused start="0x8720" end="0x8721" comment="MODELVIEW0/1 already exist"/>
+        <enum value="0x8722" name="GL_MODELVIEW2_ARB"/>
+        <enum value="0x8723" name="GL_MODELVIEW3_ARB"/>
+        <enum value="0x8724" name="GL_MODELVIEW4_ARB"/>
+        <enum value="0x8725" name="GL_MODELVIEW5_ARB"/>
+        <enum value="0x8726" name="GL_MODELVIEW6_ARB"/>
+        <enum value="0x8727" name="GL_MODELVIEW7_ARB"/>
+        <enum value="0x8728" name="GL_MODELVIEW8_ARB"/>
+        <enum value="0x8729" name="GL_MODELVIEW9_ARB"/>
+        <enum value="0x872A" name="GL_MODELVIEW10_ARB"/>
+        <enum value="0x872B" name="GL_MODELVIEW11_ARB"/>
+        <enum value="0x872C" name="GL_MODELVIEW12_ARB"/>
+        <enum value="0x872D" name="GL_MODELVIEW13_ARB"/>
+        <enum value="0x872E" name="GL_MODELVIEW14_ARB"/>
+        <enum value="0x872F" name="GL_MODELVIEW15_ARB"/>
+        <enum value="0x8730" name="GL_MODELVIEW16_ARB"/>
+        <enum value="0x8731" name="GL_MODELVIEW17_ARB"/>
+        <enum value="0x8732" name="GL_MODELVIEW18_ARB"/>
+        <enum value="0x8733" name="GL_MODELVIEW19_ARB"/>
+        <enum value="0x8734" name="GL_MODELVIEW20_ARB"/>
+        <enum value="0x8735" name="GL_MODELVIEW21_ARB"/>
+        <enum value="0x8736" name="GL_MODELVIEW22_ARB"/>
+        <enum value="0x8737" name="GL_MODELVIEW23_ARB"/>
+        <enum value="0x8738" name="GL_MODELVIEW24_ARB"/>
+        <enum value="0x8739" name="GL_MODELVIEW25_ARB"/>
+        <enum value="0x873A" name="GL_MODELVIEW26_ARB"/>
+        <enum value="0x873B" name="GL_MODELVIEW27_ARB"/>
+        <enum value="0x873C" name="GL_MODELVIEW28_ARB"/>
+        <enum value="0x873D" name="GL_MODELVIEW29_ARB"/>
+        <enum value="0x873E" name="GL_MODELVIEW30_ARB"/>
+        <enum value="0x873F" name="GL_MODELVIEW31_ARB"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8740" end="0x874F" vendor="AMD">
+        <enum value="0x8740" name="GL_DOT3_RGB_EXT"/>
+        <enum value="0x8740" name="GL_Z400_BINARY_AMD" comment="NOT an alias. Accidental reuse of GL_DOT3_RGB_EXT"/>
+        <enum value="0x8741" name="GL_DOT3_RGBA_EXT"/>
+        <enum value="0x8741" name="GL_PROGRAM_BINARY_LENGTH_OES" comment="NOT an alias. Accidental reuse of GL_DOT3_RGBA_EXT"/>
+        <enum value="0x8741" name="GL_PROGRAM_BINARY_LENGTH"/>
+        <enum value="0x8742" name="GL_MIRROR_CLAMP_ATI"/>
+        <enum value="0x8742" name="GL_MIRROR_CLAMP_EXT"/>
+        <enum value="0x8743" name="GL_MIRROR_CLAMP_TO_EDGE"/>
+        <enum value="0x8743" name="GL_MIRROR_CLAMP_TO_EDGE_ATI"/>
+        <enum value="0x8743" name="GL_MIRROR_CLAMP_TO_EDGE_EXT"/>
+        <enum value="0x8744" name="GL_MODULATE_ADD_ATI"/>
+        <enum value="0x8745" name="GL_MODULATE_SIGNED_ADD_ATI"/>
+        <enum value="0x8746" name="GL_MODULATE_SUBTRACT_ATI"/>
+            <unused start="0x8747" end="0x8749"/>
+        <enum value="0x874A" name="GL_SET_AMD"/>
+        <enum value="0x874B" name="GL_REPLACE_VALUE_AMD"/>
+        <enum value="0x874C" name="GL_STENCIL_OP_VALUE_AMD"/>
+        <enum value="0x874D" name="GL_STENCIL_BACK_OP_VALUE_AMD"/>
+        <enum value="0x874E" name="GL_VERTEX_ATTRIB_ARRAY_LONG"/>
+        <enum value="0x874F" name="GL_OCCLUSION_QUERY_EVENT_MASK_AMD"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8750" end="0x875F" vendor="MESA">
+        <enum value="0x8750" name="GL_DEPTH_STENCIL_MESA"/>
+        <enum value="0x8751" name="GL_UNSIGNED_INT_24_8_MESA"/>
+        <enum value="0x8752" name="GL_UNSIGNED_INT_8_24_REV_MESA"/>
+        <enum value="0x8753" name="GL_UNSIGNED_SHORT_15_1_MESA"/>
+        <enum value="0x8754" name="GL_UNSIGNED_SHORT_1_15_REV_MESA"/>
+        <enum value="0x8755" name="GL_TRACE_MASK_MESA"/>
+        <enum value="0x8756" name="GL_TRACE_NAME_MESA"/>
+        <enum value="0x8757" name="GL_YCBCR_MESA"/>
+        <enum value="0x8758" name="GL_PACK_INVERT_MESA"/>
+        <enum value="0x8759" name="GL_DEBUG_OBJECT_MESA" comment="NOT an alias. Accidental reuse of GL_TEXTURE_1D_STACK_MESAX"/>
+        <enum value="0x8759" name="GL_TEXTURE_1D_STACK_MESAX"/>
+        <enum value="0x875A" name="GL_DEBUG_PRINT_MESA" comment="NOT an alias. Accidental reuse of GL_TEXTURE_2D_STACK_MESAX"/>
+        <enum value="0x875A" name="GL_TEXTURE_2D_STACK_MESAX"/>
+        <enum value="0x875B" name="GL_DEBUG_ASSERT_MESA" comment="NOT an alias. Accidental reuse of GL_PROXY_TEXTURE_1D_STACK_MESAX"/>
+        <enum value="0x875B" name="GL_PROXY_TEXTURE_1D_STACK_MESAX"/>
+        <enum value="0x875C" name="GL_PROXY_TEXTURE_2D_STACK_MESAX"/>
+        <enum value="0x875D" name="GL_TEXTURE_1D_STACK_BINDING_MESAX"/>
+        <enum value="0x875E" name="GL_TEXTURE_2D_STACK_BINDING_MESAX"/>
+            <unused start="0x875F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8760" end="0x883F" vendor="AMD">
+        <enum value="0x8760" name="GL_STATIC_ATI"/>
+        <enum value="0x8761" name="GL_DYNAMIC_ATI"/>
+        <enum value="0x8762" name="GL_PRESERVE_ATI"/>
+        <enum value="0x8763" name="GL_DISCARD_ATI"/>
+        <enum value="0x8764" name="GL_BUFFER_SIZE"/>
+        <enum value="0x8764" name="GL_BUFFER_SIZE_ARB"/>
+        <enum value="0x8764" name="GL_OBJECT_BUFFER_SIZE_ATI"/>
+        <enum value="0x8765" name="GL_BUFFER_USAGE"/>
+        <enum value="0x8765" name="GL_BUFFER_USAGE_ARB"/>
+        <enum value="0x8765" name="GL_OBJECT_BUFFER_USAGE_ATI"/>
+        <enum value="0x8766" name="GL_ARRAY_OBJECT_BUFFER_ATI"/>
+        <enum value="0x8767" name="GL_ARRAY_OBJECT_OFFSET_ATI"/>
+        <enum value="0x8768" name="GL_ELEMENT_ARRAY_ATI"/>
+        <enum value="0x8769" name="GL_ELEMENT_ARRAY_TYPE_ATI"/>
+        <enum value="0x876A" name="GL_ELEMENT_ARRAY_POINTER_ATI"/>
+        <enum value="0x876B" name="GL_MAX_VERTEX_STREAMS_ATI"/>
+        <enum value="0x876C" name="GL_VERTEX_STREAM0_ATI"/>
+        <enum value="0x876D" name="GL_VERTEX_STREAM1_ATI"/>
+        <enum value="0x876E" name="GL_VERTEX_STREAM2_ATI"/>
+        <enum value="0x876F" name="GL_VERTEX_STREAM3_ATI"/>
+        <enum value="0x8770" name="GL_VERTEX_STREAM4_ATI"/>
+        <enum value="0x8771" name="GL_VERTEX_STREAM5_ATI"/>
+        <enum value="0x8772" name="GL_VERTEX_STREAM6_ATI"/>
+        <enum value="0x8773" name="GL_VERTEX_STREAM7_ATI"/>
+        <enum value="0x8774" name="GL_VERTEX_SOURCE_ATI"/>
+        <enum value="0x8775" name="GL_BUMP_ROT_MATRIX_ATI"/>
+        <enum value="0x8776" name="GL_BUMP_ROT_MATRIX_SIZE_ATI"/>
+        <enum value="0x8777" name="GL_BUMP_NUM_TEX_UNITS_ATI"/>
+        <enum value="0x8778" name="GL_BUMP_TEX_UNITS_ATI"/>
+        <enum value="0x8779" name="GL_DUDV_ATI"/>
+        <enum value="0x877A" name="GL_DU8DV8_ATI"/>
+        <enum value="0x877B" name="GL_BUMP_ENVMAP_ATI"/>
+        <enum value="0x877C" name="GL_BUMP_TARGET_ATI"/>
+            <unused start="0x877D" end="0x877F"/>
+        <enum value="0x8780" name="GL_VERTEX_SHADER_EXT"/>
+        <enum value="0x8781" name="GL_VERTEX_SHADER_BINDING_EXT"/>
+        <enum value="0x8782" name="GL_OP_INDEX_EXT"/>
+        <enum value="0x8783" name="GL_OP_NEGATE_EXT"/>
+        <enum value="0x8784" name="GL_OP_DOT3_EXT"/>
+        <enum value="0x8785" name="GL_OP_DOT4_EXT"/>
+        <enum value="0x8786" name="GL_OP_MUL_EXT"/>
+        <enum value="0x8787" name="GL_OP_ADD_EXT"/>
+        <enum value="0x8788" name="GL_OP_MADD_EXT"/>
+        <enum value="0x8789" name="GL_OP_FRAC_EXT"/>
+        <enum value="0x878A" name="GL_OP_MAX_EXT"/>
+        <enum value="0x878B" name="GL_OP_MIN_EXT"/>
+        <enum value="0x878C" name="GL_OP_SET_GE_EXT"/>
+        <enum value="0x878D" name="GL_OP_SET_LT_EXT"/>
+        <enum value="0x878E" name="GL_OP_CLAMP_EXT"/>
+        <enum value="0x878F" name="GL_OP_FLOOR_EXT"/>
+        <enum value="0x8790" name="GL_OP_ROUND_EXT"/>
+        <enum value="0x8791" name="GL_OP_EXP_BASE_2_EXT"/>
+        <enum value="0x8792" name="GL_OP_LOG_BASE_2_EXT"/>
+        <enum value="0x8793" name="GL_OP_POWER_EXT"/>
+        <enum value="0x8794" name="GL_OP_RECIP_EXT"/>
+        <enum value="0x8795" name="GL_OP_RECIP_SQRT_EXT"/>
+        <enum value="0x8796" name="GL_OP_SUB_EXT"/>
+        <enum value="0x8797" name="GL_OP_CROSS_PRODUCT_EXT"/>
+        <enum value="0x8798" name="GL_OP_MULTIPLY_MATRIX_EXT"/>
+        <enum value="0x8799" name="GL_OP_MOV_EXT"/>
+        <enum value="0x879A" name="GL_OUTPUT_VERTEX_EXT"/>
+        <enum value="0x879B" name="GL_OUTPUT_COLOR0_EXT"/>
+        <enum value="0x879C" name="GL_OUTPUT_COLOR1_EXT"/>
+        <enum value="0x879D" name="GL_OUTPUT_TEXTURE_COORD0_EXT"/>
+        <enum value="0x879E" name="GL_OUTPUT_TEXTURE_COORD1_EXT"/>
+        <enum value="0x879F" name="GL_OUTPUT_TEXTURE_COORD2_EXT"/>
+        <enum value="0x87A0" name="GL_OUTPUT_TEXTURE_COORD3_EXT"/>
+        <enum value="0x87A1" name="GL_OUTPUT_TEXTURE_COORD4_EXT"/>
+        <enum value="0x87A2" name="GL_OUTPUT_TEXTURE_COORD5_EXT"/>
+        <enum value="0x87A3" name="GL_OUTPUT_TEXTURE_COORD6_EXT"/>
+        <enum value="0x87A4" name="GL_OUTPUT_TEXTURE_COORD7_EXT"/>
+        <enum value="0x87A5" name="GL_OUTPUT_TEXTURE_COORD8_EXT"/>
+        <enum value="0x87A6" name="GL_OUTPUT_TEXTURE_COORD9_EXT"/>
+        <enum value="0x87A7" name="GL_OUTPUT_TEXTURE_COORD10_EXT"/>
+        <enum value="0x87A8" name="GL_OUTPUT_TEXTURE_COORD11_EXT"/>
+        <enum value="0x87A9" name="GL_OUTPUT_TEXTURE_COORD12_EXT"/>
+        <enum value="0x87AA" name="GL_OUTPUT_TEXTURE_COORD13_EXT"/>
+        <enum value="0x87AB" name="GL_OUTPUT_TEXTURE_COORD14_EXT"/>
+        <enum value="0x87AC" name="GL_OUTPUT_TEXTURE_COORD15_EXT"/>
+        <enum value="0x87AD" name="GL_OUTPUT_TEXTURE_COORD16_EXT"/>
+        <enum value="0x87AE" name="GL_OUTPUT_TEXTURE_COORD17_EXT"/>
+        <enum value="0x87AF" name="GL_OUTPUT_TEXTURE_COORD18_EXT"/>
+        <enum value="0x87B0" name="GL_OUTPUT_TEXTURE_COORD19_EXT"/>
+        <enum value="0x87B1" name="GL_OUTPUT_TEXTURE_COORD20_EXT"/>
+        <enum value="0x87B2" name="GL_OUTPUT_TEXTURE_COORD21_EXT"/>
+        <enum value="0x87B3" name="GL_OUTPUT_TEXTURE_COORD22_EXT"/>
+        <enum value="0x87B4" name="GL_OUTPUT_TEXTURE_COORD23_EXT"/>
+        <enum value="0x87B5" name="GL_OUTPUT_TEXTURE_COORD24_EXT"/>
+        <enum value="0x87B6" name="GL_OUTPUT_TEXTURE_COORD25_EXT"/>
+        <enum value="0x87B7" name="GL_OUTPUT_TEXTURE_COORD26_EXT"/>
+        <enum value="0x87B8" name="GL_OUTPUT_TEXTURE_COORD27_EXT"/>
+        <enum value="0x87B9" name="GL_OUTPUT_TEXTURE_COORD28_EXT"/>
+        <enum value="0x87BA" name="GL_OUTPUT_TEXTURE_COORD29_EXT"/>
+        <enum value="0x87BB" name="GL_OUTPUT_TEXTURE_COORD30_EXT"/>
+        <enum value="0x87BC" name="GL_OUTPUT_TEXTURE_COORD31_EXT"/>
+        <enum value="0x87BD" name="GL_OUTPUT_FOG_EXT"/>
+        <enum value="0x87BE" name="GL_SCALAR_EXT"/>
+        <enum value="0x87BF" name="GL_VECTOR_EXT"/>
+        <enum value="0x87C0" name="GL_MATRIX_EXT"/>
+        <enum value="0x87C1" name="GL_VARIANT_EXT"/>
+        <enum value="0x87C2" name="GL_INVARIANT_EXT"/>
+        <enum value="0x87C3" name="GL_LOCAL_CONSTANT_EXT"/>
+        <enum value="0x87C4" name="GL_LOCAL_EXT"/>
+        <enum value="0x87C5" name="GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT"/>
+        <enum value="0x87C6" name="GL_MAX_VERTEX_SHADER_VARIANTS_EXT"/>
+        <enum value="0x87C7" name="GL_MAX_VERTEX_SHADER_INVARIANTS_EXT"/>
+        <enum value="0x87C8" name="GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT"/>
+        <enum value="0x87C9" name="GL_MAX_VERTEX_SHADER_LOCALS_EXT"/>
+        <enum value="0x87CA" name="GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT"/>
+        <enum value="0x87CB" name="GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT"/>
+        <enum value="0x87CC" name="GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT"/>
+        <enum value="0x87CD" name="GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT"/>
+        <enum value="0x87CE" name="GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT"/>
+        <enum value="0x87CF" name="GL_VERTEX_SHADER_INSTRUCTIONS_EXT"/>
+        <enum value="0x87D0" name="GL_VERTEX_SHADER_VARIANTS_EXT"/>
+        <enum value="0x87D1" name="GL_VERTEX_SHADER_INVARIANTS_EXT"/>
+        <enum value="0x87D2" name="GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT"/>
+        <enum value="0x87D3" name="GL_VERTEX_SHADER_LOCALS_EXT"/>
+        <enum value="0x87D4" name="GL_VERTEX_SHADER_OPTIMIZED_EXT"/>
+        <enum value="0x87D5" name="GL_X_EXT"/>
+        <enum value="0x87D6" name="GL_Y_EXT"/>
+        <enum value="0x87D7" name="GL_Z_EXT"/>
+        <enum value="0x87D8" name="GL_W_EXT"/>
+        <enum value="0x87D9" name="GL_NEGATIVE_X_EXT"/>
+        <enum value="0x87DA" name="GL_NEGATIVE_Y_EXT"/>
+        <enum value="0x87DB" name="GL_NEGATIVE_Z_EXT"/>
+        <enum value="0x87DC" name="GL_NEGATIVE_W_EXT"/>
+        <enum value="0x87DD" name="GL_ZERO_EXT"/>
+        <enum value="0x87DE" name="GL_ONE_EXT"/>
+        <enum value="0x87DF" name="GL_NEGATIVE_ONE_EXT"/>
+        <enum value="0x87E0" name="GL_NORMALIZED_RANGE_EXT"/>
+        <enum value="0x87E1" name="GL_FULL_RANGE_EXT"/>
+        <enum value="0x87E2" name="GL_CURRENT_VERTEX_EXT"/>
+        <enum value="0x87E3" name="GL_MVP_MATRIX_EXT"/>
+        <enum value="0x87E4" name="GL_VARIANT_VALUE_EXT"/>
+        <enum value="0x87E5" name="GL_VARIANT_DATATYPE_EXT"/>
+        <enum value="0x87E6" name="GL_VARIANT_ARRAY_STRIDE_EXT"/>
+        <enum value="0x87E7" name="GL_VARIANT_ARRAY_TYPE_EXT"/>
+        <enum value="0x87E8" name="GL_VARIANT_ARRAY_EXT"/>
+        <enum value="0x87E9" name="GL_VARIANT_ARRAY_POINTER_EXT"/>
+        <enum value="0x87EA" name="GL_INVARIANT_VALUE_EXT"/>
+        <enum value="0x87EB" name="GL_INVARIANT_DATATYPE_EXT"/>
+        <enum value="0x87EC" name="GL_LOCAL_CONSTANT_VALUE_EXT"/>
+        <enum value="0x87ED" name="GL_LOCAL_CONSTANT_DATATYPE_EXT"/>
+        <enum value="0x87EE" name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD"/>
+        <enum value="0x87F0" name="GL_PN_TRIANGLES_ATI"/>
+        <enum value="0x87F1" name="GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI"/>
+        <enum value="0x87F2" name="GL_PN_TRIANGLES_POINT_MODE_ATI"/>
+        <enum value="0x87F3" name="GL_PN_TRIANGLES_NORMAL_MODE_ATI"/>
+        <enum value="0x87F4" name="GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI"/>
+        <enum value="0x87F5" name="GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI"/>
+        <enum value="0x87F6" name="GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI"/>
+        <enum value="0x87F7" name="GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI"/>
+        <enum value="0x87F8" name="GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI"/>
+        <enum value="0x87F9" name="GL_3DC_X_AMD"/>
+        <enum value="0x87FA" name="GL_3DC_XY_AMD"/>
+        <enum value="0x87FB" name="GL_VBO_FREE_MEMORY_ATI"/>
+        <enum value="0x87FC" name="GL_TEXTURE_FREE_MEMORY_ATI"/>
+        <enum value="0x87FD" name="GL_RENDERBUFFER_FREE_MEMORY_ATI"/>
+        <enum value="0x87FE" name="GL_NUM_PROGRAM_BINARY_FORMATS"/>
+        <enum value="0x87FE" name="GL_NUM_PROGRAM_BINARY_FORMATS_OES"/>
+        <enum value="0x87FF" name="GL_PROGRAM_BINARY_FORMATS"/>
+        <enum value="0x87FF" name="GL_PROGRAM_BINARY_FORMATS_OES"/>
+        <enum value="0x8800" name="GL_STENCIL_BACK_FUNC"/>
+        <enum value="0x8800" name="GL_STENCIL_BACK_FUNC_ATI"/>
+        <enum value="0x8801" name="GL_STENCIL_BACK_FAIL"/>
+        <enum value="0x8801" name="GL_STENCIL_BACK_FAIL_ATI"/>
+        <enum value="0x8802" name="GL_STENCIL_BACK_PASS_DEPTH_FAIL"/>
+        <enum value="0x8802" name="GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI"/>
+        <enum value="0x8803" name="GL_STENCIL_BACK_PASS_DEPTH_PASS"/>
+        <enum value="0x8803" name="GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI"/>
+        <enum value="0x8804" name="GL_FRAGMENT_PROGRAM_ARB"/>
+        <enum value="0x8805" name="GL_PROGRAM_ALU_INSTRUCTIONS_ARB"/>
+        <enum value="0x8806" name="GL_PROGRAM_TEX_INSTRUCTIONS_ARB"/>
+        <enum value="0x8807" name="GL_PROGRAM_TEX_INDIRECTIONS_ARB"/>
+        <enum value="0x8808" name="GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB"/>
+        <enum value="0x8809" name="GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB"/>
+        <enum value="0x880A" name="GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB"/>
+        <enum value="0x880B" name="GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB"/>
+        <enum value="0x880C" name="GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB"/>
+        <enum value="0x880D" name="GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB"/>
+        <enum value="0x880E" name="GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB"/>
+        <enum value="0x880F" name="GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB"/>
+        <enum value="0x8810" name="GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB"/>
+            <unused start="0x8811" end="0x8813"/>
+        <enum value="0x8814" name="GL_RGBA32F"/>
+        <enum value="0x8814" name="GL_RGBA32F_ARB"/>
+        <enum value="0x8814" name="GL_RGBA32F_EXT"/>
+        <enum value="0x8814" name="GL_RGBA_FLOAT32_APPLE"/>
+        <enum value="0x8814" name="GL_RGBA_FLOAT32_ATI"/>
+        <enum value="0x8815" name="GL_RGB32F"/>
+        <enum value="0x8815" name="GL_RGB32F_ARB"/>
+        <enum value="0x8815" name="GL_RGB32F_EXT"/>
+        <enum value="0x8815" name="GL_RGB_FLOAT32_APPLE"/>
+        <enum value="0x8815" name="GL_RGB_FLOAT32_ATI"/>
+        <enum value="0x8816" name="GL_ALPHA32F_ARB"/>
+        <enum value="0x8816" name="GL_ALPHA32F_EXT"/>
+        <enum value="0x8816" name="GL_ALPHA_FLOAT32_APPLE"/>
+        <enum value="0x8816" name="GL_ALPHA_FLOAT32_ATI"/>
+        <enum value="0x8817" name="GL_INTENSITY32F_ARB"/>
+        <enum value="0x8817" name="GL_INTENSITY_FLOAT32_APPLE"/>
+        <enum value="0x8817" name="GL_INTENSITY_FLOAT32_ATI"/>
+        <enum value="0x8818" name="GL_LUMINANCE32F_ARB"/>
+        <enum value="0x8818" name="GL_LUMINANCE32F_EXT"/>
+        <enum value="0x8818" name="GL_LUMINANCE_FLOAT32_APPLE"/>
+        <enum value="0x8818" name="GL_LUMINANCE_FLOAT32_ATI"/>
+        <enum value="0x8819" name="GL_LUMINANCE_ALPHA32F_ARB"/>
+        <enum value="0x8819" name="GL_LUMINANCE_ALPHA32F_EXT"/>
+        <enum value="0x8819" name="GL_LUMINANCE_ALPHA_FLOAT32_APPLE"/>
+        <enum value="0x8819" name="GL_LUMINANCE_ALPHA_FLOAT32_ATI"/>
+        <enum value="0x881A" name="GL_RGBA16F"/>
+        <enum value="0x881A" name="GL_RGBA16F_ARB"/>
+        <enum value="0x881A" name="GL_RGBA16F_EXT"/>
+        <enum value="0x881A" name="GL_RGBA_FLOAT16_APPLE"/>
+        <enum value="0x881A" name="GL_RGBA_FLOAT16_ATI"/>
+        <enum value="0x881B" name="GL_RGB16F"/>
+        <enum value="0x881B" name="GL_RGB16F_ARB"/>
+        <enum value="0x881B" name="GL_RGB16F_EXT"/>
+        <enum value="0x881B" name="GL_RGB_FLOAT16_APPLE"/>
+        <enum value="0x881B" name="GL_RGB_FLOAT16_ATI"/>
+        <enum value="0x881C" name="GL_ALPHA16F_ARB"/>
+        <enum value="0x881C" name="GL_ALPHA16F_EXT"/>
+        <enum value="0x881C" name="GL_ALPHA_FLOAT16_APPLE"/>
+        <enum value="0x881C" name="GL_ALPHA_FLOAT16_ATI"/>
+        <enum value="0x881D" name="GL_INTENSITY16F_ARB"/>
+        <enum value="0x881D" name="GL_INTENSITY_FLOAT16_APPLE"/>
+        <enum value="0x881D" name="GL_INTENSITY_FLOAT16_ATI"/>
+        <enum value="0x881E" name="GL_LUMINANCE16F_ARB"/>
+        <enum value="0x881E" name="GL_LUMINANCE16F_EXT"/>
+        <enum value="0x881E" name="GL_LUMINANCE_FLOAT16_APPLE"/>
+        <enum value="0x881E" name="GL_LUMINANCE_FLOAT16_ATI"/>
+        <enum value="0x881F" name="GL_LUMINANCE_ALPHA16F_ARB"/>
+        <enum value="0x881F" name="GL_LUMINANCE_ALPHA16F_EXT"/>
+        <enum value="0x881F" name="GL_LUMINANCE_ALPHA_FLOAT16_APPLE"/>
+        <enum value="0x881F" name="GL_LUMINANCE_ALPHA_FLOAT16_ATI"/>
+            <!-- RGBA_FLOAT_MODE_ARB equivalent to TYPE_RGBA_FLOAT_ATI -->
+        <enum value="0x8820" name="GL_RGBA_FLOAT_MODE_ARB"/>
+        <enum value="0x8820" name="GL_RGBA_FLOAT_MODE_ATI"/>
+            <unused start="0x8821" end="0x8822"/>
+        <enum value="0x8823" name="GL_WRITEONLY_RENDERING_QCOM"/>
+        <enum value="0x8824" name="GL_MAX_DRAW_BUFFERS"/>
+        <enum value="0x8824" name="GL_MAX_DRAW_BUFFERS_ARB"/>
+        <enum value="0x8824" name="GL_MAX_DRAW_BUFFERS_ATI"/>
+        <enum value="0x8824" name="GL_MAX_DRAW_BUFFERS_EXT"/>
+        <enum value="0x8824" name="GL_MAX_DRAW_BUFFERS_NV"/>
+        <enum value="0x8825" name="GL_DRAW_BUFFER0"/>
+        <enum value="0x8825" name="GL_DRAW_BUFFER0_ARB"/>
+        <enum value="0x8825" name="GL_DRAW_BUFFER0_ATI"/>
+        <enum value="0x8825" name="GL_DRAW_BUFFER0_EXT"/>
+        <enum value="0x8825" name="GL_DRAW_BUFFER0_NV"/>
+        <enum value="0x8826" name="GL_DRAW_BUFFER1"/>
+        <enum value="0x8826" name="GL_DRAW_BUFFER1_ARB"/>
+        <enum value="0x8826" name="GL_DRAW_BUFFER1_ATI"/>
+        <enum value="0x8826" name="GL_DRAW_BUFFER1_EXT"/>
+        <enum value="0x8826" name="GL_DRAW_BUFFER1_NV"/>
+        <enum value="0x8827" name="GL_DRAW_BUFFER2"/>
+        <enum value="0x8827" name="GL_DRAW_BUFFER2_ARB"/>
+        <enum value="0x8827" name="GL_DRAW_BUFFER2_ATI"/>
+        <enum value="0x8827" name="GL_DRAW_BUFFER2_EXT"/>
+        <enum value="0x8827" name="GL_DRAW_BUFFER2_NV"/>
+        <enum value="0x8828" name="GL_DRAW_BUFFER3"/>
+        <enum value="0x8828" name="GL_DRAW_BUFFER3_ARB"/>
+        <enum value="0x8828" name="GL_DRAW_BUFFER3_ATI"/>
+        <enum value="0x8828" name="GL_DRAW_BUFFER3_EXT"/>
+        <enum value="0x8828" name="GL_DRAW_BUFFER3_NV"/>
+        <enum value="0x8829" name="GL_DRAW_BUFFER4"/>
+        <enum value="0x8829" name="GL_DRAW_BUFFER4_ARB"/>
+        <enum value="0x8829" name="GL_DRAW_BUFFER4_ATI"/>
+        <enum value="0x8829" name="GL_DRAW_BUFFER4_EXT"/>
+        <enum value="0x8829" name="GL_DRAW_BUFFER4_NV"/>
+        <enum value="0x882A" name="GL_DRAW_BUFFER5"/>
+        <enum value="0x882A" name="GL_DRAW_BUFFER5_ARB"/>
+        <enum value="0x882A" name="GL_DRAW_BUFFER5_ATI"/>
+        <enum value="0x882A" name="GL_DRAW_BUFFER5_EXT"/>
+        <enum value="0x882A" name="GL_DRAW_BUFFER5_NV"/>
+        <enum value="0x882B" name="GL_DRAW_BUFFER6"/>
+        <enum value="0x882B" name="GL_DRAW_BUFFER6_ARB"/>
+        <enum value="0x882B" name="GL_DRAW_BUFFER6_ATI"/>
+        <enum value="0x882B" name="GL_DRAW_BUFFER6_EXT"/>
+        <enum value="0x882B" name="GL_DRAW_BUFFER6_NV"/>
+        <enum value="0x882C" name="GL_DRAW_BUFFER7"/>
+        <enum value="0x882C" name="GL_DRAW_BUFFER7_ARB"/>
+        <enum value="0x882C" name="GL_DRAW_BUFFER7_ATI"/>
+        <enum value="0x882C" name="GL_DRAW_BUFFER7_EXT"/>
+        <enum value="0x882C" name="GL_DRAW_BUFFER7_NV"/>
+        <enum value="0x882D" name="GL_DRAW_BUFFER8"/>
+        <enum value="0x882D" name="GL_DRAW_BUFFER8_ARB"/>
+        <enum value="0x882D" name="GL_DRAW_BUFFER8_ATI"/>
+        <enum value="0x882D" name="GL_DRAW_BUFFER8_EXT"/>
+        <enum value="0x882D" name="GL_DRAW_BUFFER8_NV"/>
+        <enum value="0x882E" name="GL_DRAW_BUFFER9"/>
+        <enum value="0x882E" name="GL_DRAW_BUFFER9_ARB"/>
+        <enum value="0x882E" name="GL_DRAW_BUFFER9_ATI"/>
+        <enum value="0x882E" name="GL_DRAW_BUFFER9_EXT"/>
+        <enum value="0x882E" name="GL_DRAW_BUFFER9_NV"/>
+        <enum value="0x882F" name="GL_DRAW_BUFFER10"/>
+        <enum value="0x882F" name="GL_DRAW_BUFFER10_ARB"/>
+        <enum value="0x882F" name="GL_DRAW_BUFFER10_ATI"/>
+        <enum value="0x882F" name="GL_DRAW_BUFFER10_EXT"/>
+        <enum value="0x882F" name="GL_DRAW_BUFFER10_NV"/>
+        <enum value="0x8830" name="GL_DRAW_BUFFER11"/>
+        <enum value="0x8830" name="GL_DRAW_BUFFER11_ARB"/>
+        <enum value="0x8830" name="GL_DRAW_BUFFER11_ATI"/>
+        <enum value="0x8830" name="GL_DRAW_BUFFER11_EXT"/>
+        <enum value="0x8830" name="GL_DRAW_BUFFER11_NV"/>
+        <enum value="0x8831" name="GL_DRAW_BUFFER12"/>
+        <enum value="0x8831" name="GL_DRAW_BUFFER12_ARB"/>
+        <enum value="0x8831" name="GL_DRAW_BUFFER12_ATI"/>
+        <enum value="0x8831" name="GL_DRAW_BUFFER12_EXT"/>
+        <enum value="0x8831" name="GL_DRAW_BUFFER12_NV"/>
+        <enum value="0x8832" name="GL_DRAW_BUFFER13"/>
+        <enum value="0x8832" name="GL_DRAW_BUFFER13_ARB"/>
+        <enum value="0x8832" name="GL_DRAW_BUFFER13_ATI"/>
+        <enum value="0x8832" name="GL_DRAW_BUFFER13_EXT"/>
+        <enum value="0x8832" name="GL_DRAW_BUFFER13_NV"/>
+        <enum value="0x8833" name="GL_DRAW_BUFFER14"/>
+        <enum value="0x8833" name="GL_DRAW_BUFFER14_ARB"/>
+        <enum value="0x8833" name="GL_DRAW_BUFFER14_ATI"/>
+        <enum value="0x8833" name="GL_DRAW_BUFFER14_EXT"/>
+        <enum value="0x8833" name="GL_DRAW_BUFFER14_NV"/>
+        <enum value="0x8834" name="GL_DRAW_BUFFER15"/>
+        <enum value="0x8834" name="GL_DRAW_BUFFER15_ARB"/>
+        <enum value="0x8834" name="GL_DRAW_BUFFER15_ATI"/>
+        <enum value="0x8834" name="GL_DRAW_BUFFER15_EXT"/>
+        <enum value="0x8834" name="GL_DRAW_BUFFER15_NV"/>
+        <enum value="0x8835" name="GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI"/>
+            <unused start="0x8836"/>
+        <enum value="0x8837" name="GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI" comment="Defined by Mesa but not ATI"/>
+            <unused start="0x8838" end="0x883C"/>
+        <enum value="0x883D" name="GL_BLEND_EQUATION_ALPHA"/>
+        <enum value="0x883D" name="GL_BLEND_EQUATION_ALPHA_EXT"/>
+        <enum value="0x883D" name="GL_BLEND_EQUATION_ALPHA_OES"/>
+            <unused start="0x883E"/>
+        <enum value="0x883F" name="GL_SUBSAMPLE_DISTANCE_AMD"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8840" end="0x884F" vendor="ARB">
+        <enum value="0x8840" name="GL_MATRIX_PALETTE_ARB"/>
+        <enum value="0x8840" name="GL_MATRIX_PALETTE_OES"/>
+        <enum value="0x8841" name="GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB"/>
+        <enum value="0x8842" name="GL_MAX_PALETTE_MATRICES_ARB"/>
+        <enum value="0x8842" name="GL_MAX_PALETTE_MATRICES_OES"/>
+        <enum value="0x8843" name="GL_CURRENT_PALETTE_MATRIX_ARB"/>
+        <enum value="0x8843" name="GL_CURRENT_PALETTE_MATRIX_OES"/>
+        <enum value="0x8844" name="GL_MATRIX_INDEX_ARRAY_ARB"/>
+        <enum value="0x8844" name="GL_MATRIX_INDEX_ARRAY_OES"/>
+        <enum value="0x8845" name="GL_CURRENT_MATRIX_INDEX_ARB"/>
+        <enum value="0x8846" name="GL_MATRIX_INDEX_ARRAY_SIZE_ARB"/>
+        <enum value="0x8846" name="GL_MATRIX_INDEX_ARRAY_SIZE_OES"/>
+        <enum value="0x8847" name="GL_MATRIX_INDEX_ARRAY_TYPE_ARB"/>
+        <enum value="0x8847" name="GL_MATRIX_INDEX_ARRAY_TYPE_OES"/>
+        <enum value="0x8848" name="GL_MATRIX_INDEX_ARRAY_STRIDE_ARB"/>
+        <enum value="0x8848" name="GL_MATRIX_INDEX_ARRAY_STRIDE_OES"/>
+        <enum value="0x8849" name="GL_MATRIX_INDEX_ARRAY_POINTER_ARB"/>
+        <enum value="0x8849" name="GL_MATRIX_INDEX_ARRAY_POINTER_OES"/>
+        <enum value="0x884A" name="GL_TEXTURE_DEPTH_SIZE"/>
+        <enum value="0x884A" name="GL_TEXTURE_DEPTH_SIZE_ARB"/>
+        <enum value="0x884B" name="GL_DEPTH_TEXTURE_MODE"/>
+        <enum value="0x884B" name="GL_DEPTH_TEXTURE_MODE_ARB"/>
+        <enum value="0x884C" name="GL_TEXTURE_COMPARE_MODE"/>
+        <enum value="0x884C" name="GL_TEXTURE_COMPARE_MODE_ARB"/>
+        <enum value="0x884C" name="GL_TEXTURE_COMPARE_MODE_EXT"/>
+        <enum value="0x884D" name="GL_TEXTURE_COMPARE_FUNC"/>
+        <enum value="0x884D" name="GL_TEXTURE_COMPARE_FUNC_ARB"/>
+        <enum value="0x884D" name="GL_TEXTURE_COMPARE_FUNC_EXT"/>
+        <enum value="0x884E" name="GL_COMPARE_R_TO_TEXTURE"/>
+        <enum value="0x884E" name="GL_COMPARE_R_TO_TEXTURE_ARB"/>
+        <enum value="0x884E" name="GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT"/>
+        <enum value="0x884E" name="GL_COMPARE_REF_TO_TEXTURE" alias="GL_COMPARE_R_TO_TEXTURE"/>
+        <enum value="0x884E" name="GL_COMPARE_REF_TO_TEXTURE_EXT"/>
+        <enum value="0x884F" name="GL_TEXTURE_CUBE_MAP_SEAMLESS"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8850" end="0x891F" vendor="NV">
+        <enum value="0x8850" name="GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV"/>
+        <enum value="0x8851" name="GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV"/>
+        <enum value="0x8852" name="GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x8853" name="GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV"/>
+        <enum value="0x8854" name="GL_OFFSET_HILO_TEXTURE_2D_NV"/>
+        <enum value="0x8855" name="GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x8856" name="GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV"/>
+        <enum value="0x8857" name="GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV"/>
+        <enum value="0x8858" name="GL_DEPENDENT_HILO_TEXTURE_2D_NV"/>
+        <enum value="0x8859" name="GL_DEPENDENT_RGB_TEXTURE_3D_NV"/>
+        <enum value="0x885A" name="GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV"/>
+        <enum value="0x885B" name="GL_DOT_PRODUCT_PASS_THROUGH_NV"/>
+        <enum value="0x885C" name="GL_DOT_PRODUCT_TEXTURE_1D_NV"/>
+        <enum value="0x885D" name="GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV"/>
+        <enum value="0x885E" name="GL_HILO8_NV"/>
+        <enum value="0x885F" name="GL_SIGNED_HILO8_NV"/>
+        <enum value="0x8860" name="GL_FORCE_BLUE_TO_ONE_NV"/>
+        <enum value="0x8861" name="GL_POINT_SPRITE"/>
+        <enum value="0x8861" name="GL_POINT_SPRITE_ARB"/>
+        <enum value="0x8861" name="GL_POINT_SPRITE_NV"/>
+        <enum value="0x8861" name="GL_POINT_SPRITE_OES"/>
+        <enum value="0x8862" name="GL_COORD_REPLACE"/>
+        <enum value="0x8862" name="GL_COORD_REPLACE_ARB"/>
+        <enum value="0x8862" name="GL_COORD_REPLACE_NV"/>
+        <enum value="0x8862" name="GL_COORD_REPLACE_OES"/>
+        <enum value="0x8863" name="GL_POINT_SPRITE_R_MODE_NV"/>
+        <enum value="0x8864" name="GL_PIXEL_COUNTER_BITS_NV"/>
+        <enum value="0x8864" name="GL_QUERY_COUNTER_BITS"/>
+        <enum value="0x8864" name="GL_QUERY_COUNTER_BITS_ARB"/>
+        <enum value="0x8864" name="GL_QUERY_COUNTER_BITS_EXT"/>
+        <enum value="0x8865" name="GL_CURRENT_OCCLUSION_QUERY_ID_NV"/>
+        <enum value="0x8865" name="GL_CURRENT_QUERY"/>
+        <enum value="0x8865" name="GL_CURRENT_QUERY_ARB"/>
+        <enum value="0x8865" name="GL_CURRENT_QUERY_EXT"/>
+        <enum value="0x8866" name="GL_PIXEL_COUNT_NV"/>
+        <enum value="0x8866" name="GL_QUERY_RESULT"/>
+        <enum value="0x8866" name="GL_QUERY_RESULT_ARB"/>
+        <enum value="0x8866" name="GL_QUERY_RESULT_EXT"/>
+        <enum value="0x8867" name="GL_PIXEL_COUNT_AVAILABLE_NV"/>
+        <enum value="0x8867" name="GL_QUERY_RESULT_AVAILABLE"/>
+        <enum value="0x8867" name="GL_QUERY_RESULT_AVAILABLE_ARB"/>
+        <enum value="0x8867" name="GL_QUERY_RESULT_AVAILABLE_EXT"/>
+        <enum value="0x8868" name="GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV"/>
+        <enum value="0x8869" name="GL_MAX_VERTEX_ATTRIBS"/>
+        <enum value="0x8869" name="GL_MAX_VERTEX_ATTRIBS_ARB"/>
+        <enum value="0x886A" name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"/>
+        <enum value="0x886A" name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB"/>
+            <unused start="0x886B"/>
+        <enum value="0x886C" name="GL_MAX_TESS_CONTROL_INPUT_COMPONENTS"/>
+        <enum value="0x886C" name="GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT"/>               
+        <enum value="0x886D" name="GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS"/>
+        <enum value="0x886D" name="GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT"/>            
+        <enum value="0x886E" name="GL_DEPTH_STENCIL_TO_RGBA_NV"/>
+        <enum value="0x886F" name="GL_DEPTH_STENCIL_TO_BGRA_NV"/>
+        <enum value="0x8870" name="GL_FRAGMENT_PROGRAM_NV"/>
+        <enum value="0x8871" name="GL_MAX_TEXTURE_COORDS"/>
+        <enum value="0x8871" name="GL_MAX_TEXTURE_COORDS_ARB"/>
+        <enum value="0x8871" name="GL_MAX_TEXTURE_COORDS_NV"/>
+        <enum value="0x8872" name="GL_MAX_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x8872" name="GL_MAX_TEXTURE_IMAGE_UNITS_ARB"/>
+        <enum value="0x8872" name="GL_MAX_TEXTURE_IMAGE_UNITS_NV"/>
+        <enum value="0x8873" name="GL_FRAGMENT_PROGRAM_BINDING_NV"/>
+        <enum value="0x8874" name="GL_PROGRAM_ERROR_STRING_ARB"/>
+        <enum value="0x8874" name="GL_PROGRAM_ERROR_STRING_NV"/>
+        <enum value="0x8875" name="GL_PROGRAM_FORMAT_ASCII_ARB"/>
+        <enum value="0x8876" name="GL_PROGRAM_FORMAT_ARB"/>
+            <unused start="0x8877" comment="Should have been assigned to PROGRAM_BINDING_ARB"/>
+        <enum value="0x8878" name="GL_WRITE_PIXEL_DATA_RANGE_NV"/>
+        <enum value="0x8879" name="GL_READ_PIXEL_DATA_RANGE_NV"/>
+        <enum value="0x887A" name="GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV"/>
+        <enum value="0x887B" name="GL_READ_PIXEL_DATA_RANGE_LENGTH_NV"/>
+        <enum value="0x887C" name="GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV"/>
+        <enum value="0x887D" name="GL_READ_PIXEL_DATA_RANGE_POINTER_NV"/>
+            <unused start="0x887E"/>
+        <enum value="0x887F" name="GL_GEOMETRY_SHADER_INVOCATIONS"/>
+        <enum value="0x887F" name="GL_GEOMETRY_SHADER_INVOCATIONS_EXT"/>                     
+        <enum value="0x8880" name="GL_FLOAT_R_NV"/>
+        <enum value="0x8881" name="GL_FLOAT_RG_NV"/>
+        <enum value="0x8882" name="GL_FLOAT_RGB_NV"/>
+        <enum value="0x8883" name="GL_FLOAT_RGBA_NV"/>
+        <enum value="0x8884" name="GL_FLOAT_R16_NV"/>
+        <enum value="0x8885" name="GL_FLOAT_R32_NV"/>
+        <enum value="0x8886" name="GL_FLOAT_RG16_NV"/>
+        <enum value="0x8887" name="GL_FLOAT_RG32_NV"/>
+        <enum value="0x8888" name="GL_FLOAT_RGB16_NV"/>
+        <enum value="0x8889" name="GL_FLOAT_RGB32_NV"/>
+        <enum value="0x888A" name="GL_FLOAT_RGBA16_NV"/>
+        <enum value="0x888B" name="GL_FLOAT_RGBA32_NV"/>
+        <enum value="0x888C" name="GL_TEXTURE_FLOAT_COMPONENTS_NV"/>
+        <enum value="0x888D" name="GL_FLOAT_CLEAR_COLOR_VALUE_NV"/>
+        <enum value="0x888E" name="GL_FLOAT_RGBA_MODE_NV"/>
+        <enum value="0x888F" name="GL_TEXTURE_UNSIGNED_REMAP_MODE_NV"/>
+        <enum value="0x8890" name="GL_DEPTH_BOUNDS_TEST_EXT"/>
+        <enum value="0x8891" name="GL_DEPTH_BOUNDS_EXT"/>
+        <enum value="0x8892" name="GL_ARRAY_BUFFER"/>
+        <enum value="0x8892" name="GL_ARRAY_BUFFER_ARB"/>
+        <enum value="0x8893" name="GL_ELEMENT_ARRAY_BUFFER"/>
+        <enum value="0x8893" name="GL_ELEMENT_ARRAY_BUFFER_ARB"/>
+        <enum value="0x8894" name="GL_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x8894" name="GL_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x8895" name="GL_ELEMENT_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x8895" name="GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x8896" name="GL_VERTEX_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x8896" name="GL_VERTEX_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x8897" name="GL_NORMAL_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x8897" name="GL_NORMAL_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x8898" name="GL_COLOR_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x8898" name="GL_COLOR_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x8899" name="GL_INDEX_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x8899" name="GL_INDEX_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x889A" name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889A" name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x889B" name="GL_EDGE_FLAG_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889B" name="GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x889C" name="GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889C" name="GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x889D" name="GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x889D" name="GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889D" name="GL_FOG_COORD_ARRAY_BUFFER_BINDING" alias="GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889E" name="GL_WEIGHT_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889E" name="GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x889E" name="GL_WEIGHT_ARRAY_BUFFER_BINDING_OES"/>
+        <enum value="0x889F" name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"/>
+        <enum value="0x889F" name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB"/>
+        <enum value="0x88A0" name="GL_PROGRAM_INSTRUCTIONS_ARB"/>
+        <enum value="0x88A1" name="GL_MAX_PROGRAM_INSTRUCTIONS_ARB"/>
+        <enum value="0x88A2" name="GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB"/>
+        <enum value="0x88A3" name="GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB"/>
+        <enum value="0x88A4" name="GL_PROGRAM_TEMPORARIES_ARB"/>
+        <enum value="0x88A5" name="GL_MAX_PROGRAM_TEMPORARIES_ARB"/>
+        <enum value="0x88A6" name="GL_PROGRAM_NATIVE_TEMPORARIES_ARB"/>
+        <enum value="0x88A7" name="GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB"/>
+        <enum value="0x88A8" name="GL_PROGRAM_PARAMETERS_ARB"/>
+        <enum value="0x88A9" name="GL_MAX_PROGRAM_PARAMETERS_ARB"/>
+        <enum value="0x88AA" name="GL_PROGRAM_NATIVE_PARAMETERS_ARB"/>
+        <enum value="0x88AB" name="GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB"/>
+        <enum value="0x88AC" name="GL_PROGRAM_ATTRIBS_ARB"/>
+        <enum value="0x88AD" name="GL_MAX_PROGRAM_ATTRIBS_ARB"/>
+        <enum value="0x88AE" name="GL_PROGRAM_NATIVE_ATTRIBS_ARB"/>
+        <enum value="0x88AF" name="GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB"/>
+        <enum value="0x88B0" name="GL_PROGRAM_ADDRESS_REGISTERS_ARB"/>
+        <enum value="0x88B1" name="GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB"/>
+        <enum value="0x88B2" name="GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB"/>
+        <enum value="0x88B3" name="GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB"/>
+        <enum value="0x88B4" name="GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB"/>
+        <enum value="0x88B5" name="GL_MAX_PROGRAM_ENV_PARAMETERS_ARB"/>
+        <enum value="0x88B6" name="GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB"/>
+        <enum value="0x88B7" name="GL_TRANSPOSE_CURRENT_MATRIX_ARB"/>
+        <enum value="0x88B8" name="GL_READ_ONLY"/>
+        <enum value="0x88B8" name="GL_READ_ONLY_ARB"/>
+        <enum value="0x88B9" name="GL_WRITE_ONLY"/>
+        <enum value="0x88B9" name="GL_WRITE_ONLY_ARB"/>
+        <enum value="0x88B9" name="GL_WRITE_ONLY_OES"/>
+        <enum value="0x88BA" name="GL_READ_WRITE"/>
+        <enum value="0x88BA" name="GL_READ_WRITE_ARB"/>
+        <enum value="0x88BB" name="GL_BUFFER_ACCESS"/>
+        <enum value="0x88BB" name="GL_BUFFER_ACCESS_ARB"/>
+        <enum value="0x88BB" name="GL_BUFFER_ACCESS_OES"/>
+        <enum value="0x88BC" name="GL_BUFFER_MAPPED"/>
+        <enum value="0x88BC" name="GL_BUFFER_MAPPED_ARB"/>
+        <enum value="0x88BC" name="GL_BUFFER_MAPPED_OES"/>
+        <enum value="0x88BD" name="GL_BUFFER_MAP_POINTER"/>
+        <enum value="0x88BD" name="GL_BUFFER_MAP_POINTER_ARB"/>
+        <enum value="0x88BD" name="GL_BUFFER_MAP_POINTER_OES"/>
+        <enum value="0x88BE" name="GL_WRITE_DISCARD_NV"/>
+        <enum value="0x88BF" name="GL_TIME_ELAPSED"/>
+        <enum value="0x88BF" name="GL_TIME_ELAPSED_EXT"/>
+        <enum value="0x88C0" name="GL_MATRIX0_ARB"/>
+        <enum value="0x88C1" name="GL_MATRIX1_ARB"/>
+        <enum value="0x88C2" name="GL_MATRIX2_ARB"/>
+        <enum value="0x88C3" name="GL_MATRIX3_ARB"/>
+        <enum value="0x88C4" name="GL_MATRIX4_ARB"/>
+        <enum value="0x88C5" name="GL_MATRIX5_ARB"/>
+        <enum value="0x88C6" name="GL_MATRIX6_ARB"/>
+        <enum value="0x88C7" name="GL_MATRIX7_ARB"/>
+        <enum value="0x88C8" name="GL_MATRIX8_ARB"/>
+        <enum value="0x88C9" name="GL_MATRIX9_ARB"/>
+        <enum value="0x88CA" name="GL_MATRIX10_ARB"/>
+        <enum value="0x88CB" name="GL_MATRIX11_ARB"/>
+        <enum value="0x88CC" name="GL_MATRIX12_ARB"/>
+        <enum value="0x88CD" name="GL_MATRIX13_ARB"/>
+        <enum value="0x88CE" name="GL_MATRIX14_ARB"/>
+        <enum value="0x88CF" name="GL_MATRIX15_ARB"/>
+        <enum value="0x88D0" name="GL_MATRIX16_ARB"/>
+        <enum value="0x88D1" name="GL_MATRIX17_ARB"/>
+        <enum value="0x88D2" name="GL_MATRIX18_ARB"/>
+        <enum value="0x88D3" name="GL_MATRIX19_ARB"/>
+        <enum value="0x88D4" name="GL_MATRIX20_ARB"/>
+        <enum value="0x88D5" name="GL_MATRIX21_ARB"/>
+        <enum value="0x88D6" name="GL_MATRIX22_ARB"/>
+        <enum value="0x88D7" name="GL_MATRIX23_ARB"/>
+        <enum value="0x88D8" name="GL_MATRIX24_ARB"/>
+        <enum value="0x88D9" name="GL_MATRIX25_ARB"/>
+        <enum value="0x88DA" name="GL_MATRIX26_ARB"/>
+        <enum value="0x88DB" name="GL_MATRIX27_ARB"/>
+        <enum value="0x88DC" name="GL_MATRIX28_ARB"/>
+        <enum value="0x88DD" name="GL_MATRIX29_ARB"/>
+        <enum value="0x88DE" name="GL_MATRIX30_ARB"/>
+        <enum value="0x88DF" name="GL_MATRIX31_ARB"/>
+        <enum value="0x88E0" name="GL_STREAM_DRAW"/>
+        <enum value="0x88E0" name="GL_STREAM_DRAW_ARB"/>
+        <enum value="0x88E1" name="GL_STREAM_READ"/>
+        <enum value="0x88E1" name="GL_STREAM_READ_ARB"/>
+        <enum value="0x88E2" name="GL_STREAM_COPY"/>
+        <enum value="0x88E2" name="GL_STREAM_COPY_ARB"/>
+            <unused start="0x88E3" comment="To extend ARB_vbo"/>
+        <enum value="0x88E4" name="GL_STATIC_DRAW"/>
+        <enum value="0x88E4" name="GL_STATIC_DRAW_ARB"/>
+        <enum value="0x88E5" name="GL_STATIC_READ"/>
+        <enum value="0x88E5" name="GL_STATIC_READ_ARB"/>
+        <enum value="0x88E6" name="GL_STATIC_COPY"/>
+        <enum value="0x88E6" name="GL_STATIC_COPY_ARB"/>
+            <unused start="0x88E7" comment="To extend ARB_vbo"/>
+        <enum value="0x88E8" name="GL_DYNAMIC_DRAW"/>
+        <enum value="0x88E8" name="GL_DYNAMIC_DRAW_ARB"/>
+        <enum value="0x88E9" name="GL_DYNAMIC_READ"/>
+        <enum value="0x88E9" name="GL_DYNAMIC_READ_ARB"/>
+        <enum value="0x88EA" name="GL_DYNAMIC_COPY"/>
+        <enum value="0x88EA" name="GL_DYNAMIC_COPY_ARB"/>
+        <enum value="0x88EB" name="GL_PIXEL_PACK_BUFFER"/>
+        <enum value="0x88EB" name="GL_PIXEL_PACK_BUFFER_ARB"/>
+        <enum value="0x88EB" name="GL_PIXEL_PACK_BUFFER_EXT"/>
+        <enum value="0x88EC" name="GL_PIXEL_UNPACK_BUFFER"/>
+        <enum value="0x88EC" name="GL_PIXEL_UNPACK_BUFFER_ARB"/>
+        <enum value="0x88EC" name="GL_PIXEL_UNPACK_BUFFER_EXT"/>
+        <enum value="0x88ED" name="GL_PIXEL_PACK_BUFFER_BINDING"/>
+        <enum value="0x88ED" name="GL_PIXEL_PACK_BUFFER_BINDING_ARB"/>
+        <enum value="0x88ED" name="GL_PIXEL_PACK_BUFFER_BINDING_EXT"/>
+        <enum value="0x88EE" name="GL_ETC1_SRGB8_NV"/>
+        <enum value="0x88EF" name="GL_PIXEL_UNPACK_BUFFER_BINDING"/>
+        <enum value="0x88EF" name="GL_PIXEL_UNPACK_BUFFER_BINDING_ARB"/>
+        <enum value="0x88EF" name="GL_PIXEL_UNPACK_BUFFER_BINDING_EXT"/>
+        <enum value="0x88F0" name="GL_DEPTH24_STENCIL8"/>
+        <enum value="0x88F0" name="GL_DEPTH24_STENCIL8_EXT"/>
+        <enum value="0x88F0" name="GL_DEPTH24_STENCIL8_OES"/>
+        <enum value="0x88F1" name="GL_TEXTURE_STENCIL_SIZE"/>
+        <enum value="0x88F1" name="GL_TEXTURE_STENCIL_SIZE_EXT"/>
+        <enum value="0x88F2" name="GL_STENCIL_TAG_BITS_EXT"/>
+        <enum value="0x88F3" name="GL_STENCIL_CLEAR_TAG_VALUE_EXT"/>
+        <enum value="0x88F4" name="GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV"/>
+        <enum value="0x88F5" name="GL_MAX_PROGRAM_CALL_DEPTH_NV"/>
+        <enum value="0x88F6" name="GL_MAX_PROGRAM_IF_DEPTH_NV"/>
+        <enum value="0x88F7" name="GL_MAX_PROGRAM_LOOP_DEPTH_NV"/>
+        <enum value="0x88F8" name="GL_MAX_PROGRAM_LOOP_COUNT_NV"/>
+        <enum value="0x88F9" name="GL_SRC1_COLOR"/>
+        <enum value="0x88FA" name="GL_ONE_MINUS_SRC1_COLOR"/>
+        <enum value="0x88FB" name="GL_ONE_MINUS_SRC1_ALPHA"/>
+        <enum value="0x88FC" name="GL_MAX_DUAL_SOURCE_DRAW_BUFFERS"/>
+        <enum value="0x88FD" name="GL_VERTEX_ATTRIB_ARRAY_INTEGER"/>
+        <enum value="0x88FD" name="GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT"/>
+        <enum value="0x88FD" name="GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV"/>
+        <enum value="0x88FE" name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR"/>
+        <enum value="0x88FE" name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE"/>
+        <enum value="0x88FE" name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB"/>
+        <enum value="0x88FE" name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT"/>
+        <enum value="0x88FE" name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV"/>
+        <enum value="0x88FF" name="GL_MAX_ARRAY_TEXTURE_LAYERS"/>
+        <enum value="0x88FF" name="GL_MAX_ARRAY_TEXTURE_LAYERS_EXT"/>
+        <enum value="0x8904" name="GL_MIN_PROGRAM_TEXEL_OFFSET"/>
+        <enum value="0x8904" name="GL_MIN_PROGRAM_TEXEL_OFFSET_EXT"/>
+        <enum value="0x8904" name="GL_MIN_PROGRAM_TEXEL_OFFSET_NV"/>
+        <enum value="0x8905" name="GL_MAX_PROGRAM_TEXEL_OFFSET"/>
+        <enum value="0x8905" name="GL_MAX_PROGRAM_TEXEL_OFFSET_EXT"/>
+        <enum value="0x8905" name="GL_MAX_PROGRAM_TEXEL_OFFSET_NV"/>
+        <enum value="0x8906" name="GL_PROGRAM_ATTRIB_COMPONENTS_NV"/>
+        <enum value="0x8907" name="GL_PROGRAM_RESULT_COMPONENTS_NV"/>
+        <enum value="0x8908" name="GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV"/>
+        <enum value="0x8909" name="GL_MAX_PROGRAM_RESULT_COMPONENTS_NV"/>
+        <enum value="0x8910" name="GL_STENCIL_TEST_TWO_SIDE_EXT"/>
+        <enum value="0x8911" name="GL_ACTIVE_STENCIL_FACE_EXT"/>
+        <enum value="0x8912" name="GL_MIRROR_CLAMP_TO_BORDER_EXT"/>
+            <unused start="0x8913"/>
+        <enum value="0x8914" name="GL_SAMPLES_PASSED"/>
+        <enum value="0x8914" name="GL_SAMPLES_PASSED_ARB"/>
+            <unused start="0x8915"/>
+        <enum value="0x8916" name="GL_GEOMETRY_VERTICES_OUT"/>
+        <enum value="0x8916" name="GL_GEOMETRY_LINKED_VERTICES_OUT_EXT"/>                           
+        <enum value="0x8917" name="GL_GEOMETRY_INPUT_TYPE"/>
+        <enum value="0x8917" name="GL_GEOMETRY_LINKED_INPUT_TYPE_EXT"/>                             
+        <enum value="0x8918" name="GL_GEOMETRY_OUTPUT_TYPE"/>
+        <enum value="0x8918" name="GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT"/>                            
+        <enum value="0x8919" name="GL_SAMPLER_BINDING"/>
+        <enum value="0x891A" name="GL_CLAMP_VERTEX_COLOR"/>
+        <enum value="0x891A" name="GL_CLAMP_VERTEX_COLOR_ARB"/>
+        <enum value="0x891B" name="GL_CLAMP_FRAGMENT_COLOR"/>
+        <enum value="0x891B" name="GL_CLAMP_FRAGMENT_COLOR_ARB"/>
+        <enum value="0x891C" name="GL_CLAMP_READ_COLOR"/>
+        <enum value="0x891C" name="GL_CLAMP_READ_COLOR_ARB"/>
+        <enum value="0x891D" name="GL_FIXED_ONLY"/>
+        <enum value="0x891D" name="GL_FIXED_ONLY_ARB"/>
+        <enum value="0x891E" name="GL_TESS_CONTROL_PROGRAM_NV"/>
+        <enum value="0x891F" name="GL_TESS_EVALUATION_PROGRAM_NV"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8920" end="0x897F" vendor="AMD">
+        <enum value="0x8920" name="GL_FRAGMENT_SHADER_ATI"/>
+        <enum value="0x8921" name="GL_REG_0_ATI"/>
+        <enum value="0x8922" name="GL_REG_1_ATI"/>
+        <enum value="0x8923" name="GL_REG_2_ATI"/>
+        <enum value="0x8924" name="GL_REG_3_ATI"/>
+        <enum value="0x8925" name="GL_REG_4_ATI"/>
+        <enum value="0x8926" name="GL_REG_5_ATI"/>
+        <enum value="0x8927" name="GL_REG_6_ATI"/>
+        <enum value="0x8928" name="GL_REG_7_ATI"/>
+        <enum value="0x8929" name="GL_REG_8_ATI"/>
+        <enum value="0x892A" name="GL_REG_9_ATI"/>
+        <enum value="0x892B" name="GL_REG_10_ATI"/>
+        <enum value="0x892C" name="GL_REG_11_ATI"/>
+        <enum value="0x892D" name="GL_REG_12_ATI"/>
+        <enum value="0x892E" name="GL_REG_13_ATI"/>
+        <enum value="0x892F" name="GL_REG_14_ATI"/>
+        <enum value="0x8930" name="GL_REG_15_ATI"/>
+        <enum value="0x8931" name="GL_REG_16_ATI"/>
+        <enum value="0x8932" name="GL_REG_17_ATI"/>
+        <enum value="0x8933" name="GL_REG_18_ATI"/>
+        <enum value="0x8934" name="GL_REG_19_ATI"/>
+        <enum value="0x8935" name="GL_REG_20_ATI"/>
+        <enum value="0x8936" name="GL_REG_21_ATI"/>
+        <enum value="0x8937" name="GL_REG_22_ATI"/>
+        <enum value="0x8938" name="GL_REG_23_ATI"/>
+        <enum value="0x8939" name="GL_REG_24_ATI"/>
+        <enum value="0x893A" name="GL_REG_25_ATI"/>
+        <enum value="0x893B" name="GL_REG_26_ATI"/>
+        <enum value="0x893C" name="GL_REG_27_ATI"/>
+        <enum value="0x893D" name="GL_REG_28_ATI"/>
+        <enum value="0x893E" name="GL_REG_29_ATI"/>
+        <enum value="0x893F" name="GL_REG_30_ATI"/>
+        <enum value="0x8940" name="GL_REG_31_ATI"/>
+        <enum value="0x8941" name="GL_CON_0_ATI"/>
+        <enum value="0x8942" name="GL_CON_1_ATI"/>
+        <enum value="0x8943" name="GL_CON_2_ATI"/>
+        <enum value="0x8944" name="GL_CON_3_ATI"/>
+        <enum value="0x8945" name="GL_CON_4_ATI"/>
+        <enum value="0x8946" name="GL_CON_5_ATI"/>
+        <enum value="0x8947" name="GL_CON_6_ATI"/>
+        <enum value="0x8948" name="GL_CON_7_ATI"/>
+        <enum value="0x8949" name="GL_CON_8_ATI"/>
+        <enum value="0x894A" name="GL_CON_9_ATI"/>
+        <enum value="0x894B" name="GL_CON_10_ATI"/>
+        <enum value="0x894C" name="GL_CON_11_ATI"/>
+        <enum value="0x894D" name="GL_CON_12_ATI"/>
+        <enum value="0x894E" name="GL_CON_13_ATI"/>
+        <enum value="0x894F" name="GL_CON_14_ATI"/>
+        <enum value="0x8950" name="GL_CON_15_ATI"/>
+        <enum value="0x8951" name="GL_CON_16_ATI"/>
+        <enum value="0x8952" name="GL_CON_17_ATI"/>
+        <enum value="0x8953" name="GL_CON_18_ATI"/>
+        <enum value="0x8954" name="GL_CON_19_ATI"/>
+        <enum value="0x8955" name="GL_CON_20_ATI"/>
+        <enum value="0x8956" name="GL_CON_21_ATI"/>
+        <enum value="0x8957" name="GL_CON_22_ATI"/>
+        <enum value="0x8958" name="GL_CON_23_ATI"/>
+        <enum value="0x8959" name="GL_CON_24_ATI"/>
+        <enum value="0x895A" name="GL_CON_25_ATI"/>
+        <enum value="0x895B" name="GL_CON_26_ATI"/>
+        <enum value="0x895C" name="GL_CON_27_ATI"/>
+        <enum value="0x895D" name="GL_CON_28_ATI"/>
+        <enum value="0x895E" name="GL_CON_29_ATI"/>
+        <enum value="0x895F" name="GL_CON_30_ATI"/>
+        <enum value="0x8960" name="GL_CON_31_ATI"/>
+        <enum value="0x8961" name="GL_MOV_ATI"/>
+        <enum value="0x8963" name="GL_ADD_ATI"/>
+        <enum value="0x8964" name="GL_MUL_ATI"/>
+        <enum value="0x8965" name="GL_SUB_ATI"/>
+        <enum value="0x8966" name="GL_DOT3_ATI"/>
+        <enum value="0x8967" name="GL_DOT4_ATI"/>
+        <enum value="0x8968" name="GL_MAD_ATI"/>
+        <enum value="0x8969" name="GL_LERP_ATI"/>
+        <enum value="0x896A" name="GL_CND_ATI"/>
+        <enum value="0x896B" name="GL_CND0_ATI"/>
+        <enum value="0x896C" name="GL_DOT2_ADD_ATI"/>
+        <enum value="0x896D" name="GL_SECONDARY_INTERPOLATOR_ATI"/>
+        <enum value="0x896E" name="GL_NUM_FRAGMENT_REGISTERS_ATI"/>
+        <enum value="0x896F" name="GL_NUM_FRAGMENT_CONSTANTS_ATI"/>
+        <enum value="0x8970" name="GL_NUM_PASSES_ATI"/>
+        <enum value="0x8971" name="GL_NUM_INSTRUCTIONS_PER_PASS_ATI"/>
+        <enum value="0x8972" name="GL_NUM_INSTRUCTIONS_TOTAL_ATI"/>
+        <enum value="0x8973" name="GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI"/>
+        <enum value="0x8974" name="GL_NUM_LOOPBACK_COMPONENTS_ATI"/>
+        <enum value="0x8975" name="GL_COLOR_ALPHA_PAIRING_ATI"/>
+        <enum value="0x8976" name="GL_SWIZZLE_STR_ATI"/>
+        <enum value="0x8977" name="GL_SWIZZLE_STQ_ATI"/>
+        <enum value="0x8978" name="GL_SWIZZLE_STR_DR_ATI"/>
+        <enum value="0x8979" name="GL_SWIZZLE_STQ_DQ_ATI"/>
+        <enum value="0x897A" name="GL_SWIZZLE_STRQ_ATI"/>
+        <enum value="0x897B" name="GL_SWIZZLE_STRQ_DQ_ATI"/>
+            <unused start="0x897C" end="0x897F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8980" end="0x898F" vendor="OML">
+        <enum value="0x8980" name="GL_INTERLACE_OML"/>
+        <enum value="0x8981" name="GL_INTERLACE_READ_OML"/>
+        <enum value="0x8982" name="GL_FORMAT_SUBSAMPLE_24_24_OML"/>
+        <enum value="0x8983" name="GL_FORMAT_SUBSAMPLE_244_244_OML"/>
+        <enum value="0x8984" name="GL_PACK_RESAMPLE_OML"/>
+        <enum value="0x8985" name="GL_UNPACK_RESAMPLE_OML"/>
+        <enum value="0x8986" name="GL_RESAMPLE_REPLICATE_OML"/>
+        <enum value="0x8987" name="GL_RESAMPLE_ZERO_FILL_OML"/>
+        <enum value="0x8988" name="GL_RESAMPLE_AVERAGE_OML"/>
+        <enum value="0x8989" name="GL_RESAMPLE_DECIMATE_OML"/>
+        <enum value="0x898A" name="GL_POINT_SIZE_ARRAY_TYPE_OES"/>
+        <enum value="0x898B" name="GL_POINT_SIZE_ARRAY_STRIDE_OES"/>
+        <enum value="0x898C" name="GL_POINT_SIZE_ARRAY_POINTER_OES"/>
+        <enum value="0x898D" name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES"/>
+        <enum value="0x898E" name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES"/>
+        <enum value="0x898F" name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8990" end="0x899F" vendor="ZiiLabs"/>
+
+    <enums namespace="GL" start="0x89A0" end="0x89FF" vendor="Matrox"/>
+
+    <enums namespace="GL" start="0x8A00" end="0x8A7F" vendor="APPLE">
+        <enum value="0x8A00" name="GL_VERTEX_ATTRIB_MAP1_APPLE"/>
+        <enum value="0x8A01" name="GL_VERTEX_ATTRIB_MAP2_APPLE"/>
+        <enum value="0x8A02" name="GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE"/>
+        <enum value="0x8A03" name="GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE"/>
+        <enum value="0x8A04" name="GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE"/>
+        <enum value="0x8A05" name="GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE"/>
+        <enum value="0x8A06" name="GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE"/>
+        <enum value="0x8A07" name="GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE"/>
+        <enum value="0x8A08" name="GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE"/>
+        <enum value="0x8A09" name="GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE"/>
+        <enum value="0x8A0A" name="GL_DRAW_PIXELS_APPLE"/>
+        <enum value="0x8A0B" name="GL_FENCE_APPLE"/>
+        <enum value="0x8A0C" name="GL_ELEMENT_ARRAY_APPLE"/>
+        <enum value="0x8A0D" name="GL_ELEMENT_ARRAY_TYPE_APPLE"/>
+        <enum value="0x8A0E" name="GL_ELEMENT_ARRAY_POINTER_APPLE"/>
+        <enum value="0x8A0F" name="GL_COLOR_FLOAT_APPLE"/>
+            <unused start="0x8A10" comment="Unknown extension (Khronos bug 632)"/>
+            <!-- <enum value="0x8A10" name="GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE"/> -->
+        <enum value="0x8A11" name="GL_UNIFORM_BUFFER"/>
+        <enum value="0x8A12" name="GL_BUFFER_SERIALIZED_MODIFY_APPLE"/>
+        <enum value="0x8A13" name="GL_BUFFER_FLUSHING_UNMAP_APPLE"/>
+        <enum value="0x8A14" name="GL_AUX_DEPTH_STENCIL_APPLE"/>
+        <enum value="0x8A15" name="GL_PACK_ROW_BYTES_APPLE"/>
+        <enum value="0x8A16" name="GL_UNPACK_ROW_BYTES_APPLE"/>
+            <unused start="0x8A17" end="0x8A18"/>
+        <enum value="0x8A19" name="GL_RELEASED_APPLE"/>
+        <enum value="0x8A1A" name="GL_VOLATILE_APPLE"/>
+        <enum value="0x8A1B" name="GL_RETAINED_APPLE"/>
+        <enum value="0x8A1C" name="GL_UNDEFINED_APPLE"/>
+        <enum value="0x8A1D" name="GL_PURGEABLE_APPLE"/>
+            <unused start="0x8A1E"/>
+        <enum value="0x8A1F" name="GL_RGB_422_APPLE"/>
+            <unused start="0x8A20" end="0x8A27"/>
+        <enum value="0x8A28" name="GL_UNIFORM_BUFFER_BINDING"/>
+        <enum value="0x8A29" name="GL_UNIFORM_BUFFER_START"/>
+        <enum value="0x8A2A" name="GL_UNIFORM_BUFFER_SIZE"/>
+        <enum value="0x8A2B" name="GL_MAX_VERTEX_UNIFORM_BLOCKS"/>
+        <enum value="0x8A2C" name="GL_MAX_GEOMETRY_UNIFORM_BLOCKS"/>
+        <enum value="0x8A2C" name="GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT"/>                     
+        <enum value="0x8A2D" name="GL_MAX_FRAGMENT_UNIFORM_BLOCKS"/>
+        <enum value="0x8A2E" name="GL_MAX_COMBINED_UNIFORM_BLOCKS"/>
+        <enum value="0x8A2F" name="GL_MAX_UNIFORM_BUFFER_BINDINGS"/>
+        <enum value="0x8A30" name="GL_MAX_UNIFORM_BLOCK_SIZE"/>
+        <enum value="0x8A31" name="GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS"/>
+        <enum value="0x8A32" name="GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS"/>
+        <enum value="0x8A32" name="GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT"/>
+        <enum value="0x8A33" name="GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS"/>
+        <enum value="0x8A34" name="GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT"/>
+        <enum value="0x8A35" name="GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH"/>
+        <enum value="0x8A36" name="GL_ACTIVE_UNIFORM_BLOCKS"/>
+        <enum value="0x8A37" name="GL_UNIFORM_TYPE"/>
+        <enum value="0x8A38" name="GL_UNIFORM_SIZE"/>
+        <enum value="0x8A39" name="GL_UNIFORM_NAME_LENGTH"/>
+        <enum value="0x8A3A" name="GL_UNIFORM_BLOCK_INDEX"/>
+        <enum value="0x8A3B" name="GL_UNIFORM_OFFSET"/>
+        <enum value="0x8A3C" name="GL_UNIFORM_ARRAY_STRIDE"/>
+        <enum value="0x8A3D" name="GL_UNIFORM_MATRIX_STRIDE"/>
+        <enum value="0x8A3E" name="GL_UNIFORM_IS_ROW_MAJOR"/>
+        <enum value="0x8A3F" name="GL_UNIFORM_BLOCK_BINDING"/>
+        <enum value="0x8A40" name="GL_UNIFORM_BLOCK_DATA_SIZE"/>
+        <enum value="0x8A41" name="GL_UNIFORM_BLOCK_NAME_LENGTH"/>
+        <enum value="0x8A42" name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS"/>
+        <enum value="0x8A43" name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES"/>
+        <enum value="0x8A44" name="GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER"/>
+        <enum value="0x8A45" name="GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER"/>
+        <enum value="0x8A46" name="GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER"/>
+            <unused start="0x8A47"/>
+        <enum value="0x8A48" name="GL_TEXTURE_SRGB_DECODE_EXT"/>
+        <enum value="0x8A49" name="GL_DECODE_EXT"/>
+        <enum value="0x8A4A" name="GL_SKIP_DECODE_EXT"/>
+            <unused start="0x8A4B" end="0x8A4E"/>
+        <enum value="0x8A4F" name="GL_PROGRAM_PIPELINE_OBJECT_EXT"/>
+            <unused start="0x8A50"/>
+        <enum value="0x8A51" name="GL_RGB_RAW_422_APPLE"/>
+        <enum value="0x8A52" name="GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT"/>
+        <enum value="0x8A53" name="GL_SYNC_OBJECT_APPLE"/>
+        <enum value="0x8A54" name="GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT"/>
+        <enum value="0x8A55" name="GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT"/>
+        <enum value="0x8A56" name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT"/>
+        <enum value="0x8A57" name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT"/>
+            <unused start="0x8A58" end="0x8A7F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8A80" end="0x8AEF" vendor="Matrox"/>
+
+    <enums namespace="GL" start="0x8AF0" end="0x8B2F" vendor="Chromium" comment="For Brian Paul"/>
+
+    <enums namespace="GL" start="0x8B30" end="0x8B3F" group="ShaderType" vendor="ARB">
+        <enum value="0x8B30" name="GL_FRAGMENT_SHADER"/>
+        <enum value="0x8B30" name="GL_FRAGMENT_SHADER_ARB"/>
+        <enum value="0x8B31" name="GL_VERTEX_SHADER"/>
+        <enum value="0x8B31" name="GL_VERTEX_SHADER_ARB"/>
+            <unused start="0x8B32" end="0x8B3F" comment="For shader types"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8B40" end="0x8B47" group="ContainerType" vendor="ARB">
+        <enum value="0x8B40" name="GL_PROGRAM_OBJECT_ARB"/>
+        <enum value="0x8B40" name="GL_PROGRAM_OBJECT_EXT"/>
+            <unused start="0x8B41" end="0x8B47" comment="For container types"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8B48" end="0x8B4F" vendor="ARB">
+        <enum value="0x8B48" name="GL_SHADER_OBJECT_ARB"/>
+        <enum value="0x8B48" name="GL_SHADER_OBJECT_EXT"/>
+        <enum value="0x8B49" name="GL_MAX_FRAGMENT_UNIFORM_COMPONENTS"/>
+        <enum value="0x8B49" name="GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB"/>
+        <enum value="0x8B4A" name="GL_MAX_VERTEX_UNIFORM_COMPONENTS"/>
+        <enum value="0x8B4A" name="GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB"/>
+        <enum value="0x8B4B" name="GL_MAX_VARYING_FLOATS"/>
+        <enum value="0x8B4B" name="GL_MAX_VARYING_COMPONENTS" alias="MAX_VARYING_FLOATS"/>
+        <enum value="0x8B4B" name="GL_MAX_VARYING_COMPONENTS_EXT"/>
+        <enum value="0x8B4B" name="GL_MAX_VARYING_FLOATS_ARB"/>
+        <enum value="0x8B4C" name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x8B4C" name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB"/>
+        <enum value="0x8B4D" name="GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x8B4D" name="GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB"/>
+        <enum value="0x8B4E" name="GL_OBJECT_TYPE_ARB"/>
+        <enum value="0x8B4F" name="GL_SHADER_TYPE"/>
+        <enum value="0x8B4F" name="GL_OBJECT_SUBTYPE_ARB"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8B50" end="0x8B7F" group="AttributeType" vendor="ARB">
+        <enum value="0x8B50" name="GL_FLOAT_VEC2"/>
+        <enum value="0x8B50" name="GL_FLOAT_VEC2_ARB"/>
+        <enum value="0x8B51" name="GL_FLOAT_VEC3"/>
+        <enum value="0x8B51" name="GL_FLOAT_VEC3_ARB"/>
+        <enum value="0x8B52" name="GL_FLOAT_VEC4"/>
+        <enum value="0x8B52" name="GL_FLOAT_VEC4_ARB"/>
+        <enum value="0x8B53" name="GL_INT_VEC2"/>
+        <enum value="0x8B53" name="GL_INT_VEC2_ARB"/>
+        <enum value="0x8B54" name="GL_INT_VEC3"/>
+        <enum value="0x8B54" name="GL_INT_VEC3_ARB"/>
+        <enum value="0x8B55" name="GL_INT_VEC4"/>
+        <enum value="0x8B55" name="GL_INT_VEC4_ARB"/>
+        <enum value="0x8B56" name="GL_BOOL"/>
+        <enum value="0x8B56" name="GL_BOOL_ARB"/>
+        <enum value="0x8B57" name="GL_BOOL_VEC2"/>
+        <enum value="0x8B57" name="GL_BOOL_VEC2_ARB"/>
+        <enum value="0x8B58" name="GL_BOOL_VEC3"/>
+        <enum value="0x8B58" name="GL_BOOL_VEC3_ARB"/>
+        <enum value="0x8B59" name="GL_BOOL_VEC4"/>
+        <enum value="0x8B59" name="GL_BOOL_VEC4_ARB"/>
+        <enum value="0x8B5A" name="GL_FLOAT_MAT2"/>
+        <enum value="0x8B5A" name="GL_FLOAT_MAT2_ARB"/>
+        <enum value="0x8B5B" name="GL_FLOAT_MAT3"/>
+        <enum value="0x8B5B" name="GL_FLOAT_MAT3_ARB"/>
+        <enum value="0x8B5C" name="GL_FLOAT_MAT4"/>
+        <enum value="0x8B5C" name="GL_FLOAT_MAT4_ARB"/>
+        <enum value="0x8B5D" name="GL_SAMPLER_1D"/>
+        <enum value="0x8B5D" name="GL_SAMPLER_1D_ARB"/>
+        <enum value="0x8B5E" name="GL_SAMPLER_2D"/>
+        <enum value="0x8B5E" name="GL_SAMPLER_2D_ARB"/>
+        <enum value="0x8B5F" name="GL_SAMPLER_3D"/>
+        <enum value="0x8B5F" name="GL_SAMPLER_3D_ARB"/>
+        <enum value="0x8B5F" name="GL_SAMPLER_3D_OES"/>
+        <enum value="0x8B60" name="GL_SAMPLER_CUBE"/>
+        <enum value="0x8B60" name="GL_SAMPLER_CUBE_ARB"/>
+        <enum value="0x8B61" name="GL_SAMPLER_1D_SHADOW"/>
+        <enum value="0x8B61" name="GL_SAMPLER_1D_SHADOW_ARB"/>
+        <enum value="0x8B62" name="GL_SAMPLER_2D_SHADOW"/>
+        <enum value="0x8B62" name="GL_SAMPLER_2D_SHADOW_ARB"/>
+        <enum value="0x8B62" name="GL_SAMPLER_2D_SHADOW_EXT"/>
+        <enum value="0x8B63" name="GL_SAMPLER_2D_RECT"/>
+        <enum value="0x8B63" name="GL_SAMPLER_2D_RECT_ARB"/>
+        <enum value="0x8B64" name="GL_SAMPLER_2D_RECT_SHADOW"/>
+        <enum value="0x8B64" name="GL_SAMPLER_2D_RECT_SHADOW_ARB"/>
+        <enum value="0x8B65" name="GL_FLOAT_MAT2x3"/>
+        <enum value="0x8B65" name="GL_FLOAT_MAT2x3_NV"/>
+        <enum value="0x8B66" name="GL_FLOAT_MAT2x4"/>
+        <enum value="0x8B66" name="GL_FLOAT_MAT2x4_NV"/>
+        <enum value="0x8B67" name="GL_FLOAT_MAT3x2"/>
+        <enum value="0x8B67" name="GL_FLOAT_MAT3x2_NV"/>
+        <enum value="0x8B68" name="GL_FLOAT_MAT3x4"/>
+        <enum value="0x8B68" name="GL_FLOAT_MAT3x4_NV"/>
+        <enum value="0x8B69" name="GL_FLOAT_MAT4x2"/>
+        <enum value="0x8B69" name="GL_FLOAT_MAT4x2_NV"/>
+        <enum value="0x8B6A" name="GL_FLOAT_MAT4x3"/>
+        <enum value="0x8B6A" name="GL_FLOAT_MAT4x3_NV"/>
+            <unused start="0x8B6B" end="0x8B7F" comment="For attribute types"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8B80" end="0x8B8F" vendor="ARB">
+        <enum value="0x8B80" name="GL_DELETE_STATUS"/>
+        <enum value="0x8B80" name="GL_OBJECT_DELETE_STATUS_ARB"/>
+        <enum value="0x8B81" name="GL_COMPILE_STATUS"/>
+        <enum value="0x8B81" name="GL_OBJECT_COMPILE_STATUS_ARB"/>
+        <enum value="0x8B82" name="GL_LINK_STATUS"/>
+        <enum value="0x8B82" name="GL_OBJECT_LINK_STATUS_ARB"/>
+        <enum value="0x8B83" name="GL_VALIDATE_STATUS"/>
+        <enum value="0x8B83" name="GL_OBJECT_VALIDATE_STATUS_ARB"/>
+        <enum value="0x8B84" name="GL_INFO_LOG_LENGTH"/>
+        <enum value="0x8B84" name="GL_OBJECT_INFO_LOG_LENGTH_ARB"/>
+        <enum value="0x8B85" name="GL_ATTACHED_SHADERS"/>
+        <enum value="0x8B85" name="GL_OBJECT_ATTACHED_OBJECTS_ARB"/>
+        <enum value="0x8B86" name="GL_ACTIVE_UNIFORMS"/>
+        <enum value="0x8B86" name="GL_OBJECT_ACTIVE_UNIFORMS_ARB"/>
+        <enum value="0x8B87" name="GL_ACTIVE_UNIFORM_MAX_LENGTH"/>
+        <enum value="0x8B87" name="GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB"/>
+        <enum value="0x8B88" name="GL_SHADER_SOURCE_LENGTH"/>
+        <enum value="0x8B88" name="GL_OBJECT_SHADER_SOURCE_LENGTH_ARB"/>
+        <enum value="0x8B89" name="GL_ACTIVE_ATTRIBUTES"/>
+        <enum value="0x8B89" name="GL_OBJECT_ACTIVE_ATTRIBUTES_ARB"/>
+        <enum value="0x8B8A" name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"/>
+        <enum value="0x8B8A" name="GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB"/>
+        <enum value="0x8B8B" name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT"/>
+        <enum value="0x8B8B" name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB"/>
+        <enum value="0x8B8B" name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES"/>
+        <enum value="0x8B8C" name="GL_SHADING_LANGUAGE_VERSION"/>
+        <enum value="0x8B8C" name="GL_SHADING_LANGUAGE_VERSION_ARB"/>
+        <enum value="0x8B8D" name="GL_CURRENT_PROGRAM"/>
+        <enum value="0x8B8D" api="gl" name="GL_ACTIVE_PROGRAM_EXT" alias="GL_CURRENT_PROGRAM" comment="For the OpenGL version of EXT_separate_shader_objects"/>
+            <unused start="0x8B8E" end="0x8B8F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8B90" end="0x8B9F" vendor="OES">
+        <enum value="0x8B90" name="GL_PALETTE4_RGB8_OES"/>
+        <enum value="0x8B91" name="GL_PALETTE4_RGBA8_OES"/>
+        <enum value="0x8B92" name="GL_PALETTE4_R5_G6_B5_OES"/>
+        <enum value="0x8B93" name="GL_PALETTE4_RGBA4_OES"/>
+        <enum value="0x8B94" name="GL_PALETTE4_RGB5_A1_OES"/>
+        <enum value="0x8B95" name="GL_PALETTE8_RGB8_OES"/>
+        <enum value="0x8B96" name="GL_PALETTE8_RGBA8_OES"/>
+        <enum value="0x8B97" name="GL_PALETTE8_R5_G6_B5_OES"/>
+        <enum value="0x8B98" name="GL_PALETTE8_RGBA4_OES"/>
+        <enum value="0x8B99" name="GL_PALETTE8_RGB5_A1_OES"/>
+        <enum value="0x8B9A" name="GL_IMPLEMENTATION_COLOR_READ_TYPE"/>
+        <enum value="0x8B9A" name="GL_IMPLEMENTATION_COLOR_READ_TYPE_OES"/>
+        <enum value="0x8B9B" name="GL_IMPLEMENTATION_COLOR_READ_FORMAT"/>
+        <enum value="0x8B9B" name="GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES"/>
+        <enum value="0x8B9C" name="GL_POINT_SIZE_ARRAY_OES"/>
+        <enum value="0x8B9D" name="GL_TEXTURE_CROP_RECT_OES"/>
+        <enum value="0x8B9E" name="GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES"/>
+        <enum value="0x8B9F" name="GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8BA0" end="0x8BAF" vendor="Seaweed"/>
+
+    <enums namespace="GL" start="0x8BB0" end="0x8BBF" vendor="MESA">
+        <enum value="0x8BB0" name="GL_FRAGMENT_PROGRAM_POSITION_MESA"/>
+        <enum value="0x8BB1" name="GL_FRAGMENT_PROGRAM_CALLBACK_MESA"/>
+        <enum value="0x8BB2" name="GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA"/>
+        <enum value="0x8BB3" name="GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA"/>
+        <enum value="0x8BB4" name="GL_VERTEX_PROGRAM_POSITION_MESA"/>
+        <enum value="0x8BB5" name="GL_VERTEX_PROGRAM_CALLBACK_MESA"/>
+        <enum value="0x8BB6" name="GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA"/>
+        <enum value="0x8BB7" name="GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8BC0" end="0x8BFF" vendor="AMD">
+        <enum value="0x8BC0" name="GL_COUNTER_TYPE_AMD"/>
+        <enum value="0x8BC1" name="GL_COUNTER_RANGE_AMD"/>
+        <enum value="0x8BC2" name="GL_UNSIGNED_INT64_AMD"/>
+        <enum value="0x8BC3" name="GL_PERCENTAGE_AMD"/>
+        <enum value="0x8BC4" name="GL_PERFMON_RESULT_AVAILABLE_AMD"/>
+        <enum value="0x8BC5" name="GL_PERFMON_RESULT_SIZE_AMD"/>
+        <enum value="0x8BC6" name="GL_PERFMON_RESULT_AMD"/>
+            <unused start="0x8BC7" end="0x8BD1"/>
+        <enum value="0x8BD2" name="GL_TEXTURE_WIDTH_QCOM"/>
+        <enum value="0x8BD3" name="GL_TEXTURE_HEIGHT_QCOM"/>
+        <enum value="0x8BD4" name="GL_TEXTURE_DEPTH_QCOM"/>
+        <enum value="0x8BD5" name="GL_TEXTURE_INTERNAL_FORMAT_QCOM"/>
+        <enum value="0x8BD6" name="GL_TEXTURE_FORMAT_QCOM"/>
+        <enum value="0x8BD7" name="GL_TEXTURE_TYPE_QCOM"/>
+        <enum value="0x8BD8" name="GL_TEXTURE_IMAGE_VALID_QCOM"/>
+        <enum value="0x8BD9" name="GL_TEXTURE_NUM_LEVELS_QCOM"/>
+        <enum value="0x8BDA" name="GL_TEXTURE_TARGET_QCOM"/>
+        <enum value="0x8BDB" name="GL_TEXTURE_OBJECT_VALID_QCOM"/>
+        <enum value="0x8BDC" name="GL_STATE_RESTORE"/>
+            <unused start="0x8BDD" end="0x8BFF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8C00" end="0x8C0F" vendor="IMG">
+        <enum value="0x8C00" name="GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG"/>
+        <enum value="0x8C01" name="GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG"/>
+        <enum value="0x8C02" name="GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG"/>
+        <enum value="0x8C03" name="GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG"/>
+        <enum value="0x8C04" name="GL_MODULATE_COLOR_IMG"/>
+        <enum value="0x8C05" name="GL_RECIP_ADD_SIGNED_ALPHA_IMG"/>
+        <enum value="0x8C06" name="GL_TEXTURE_ALPHA_MODULATE_IMG"/>
+        <enum value="0x8C07" name="GL_FACTOR_ALPHA_MODULATE_IMG"/>
+        <enum value="0x8C08" name="GL_FRAGMENT_ALPHA_MODULATE_IMG"/>
+        <enum value="0x8C09" name="GL_ADD_BLEND_IMG"/>
+        <enum value="0x8C0A" name="GL_SGX_BINARY_IMG"/>
+            <unused start="0x8C0B" end="0x8C0F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8C10" end="0x8C8F" vendor="NV" comment="For Pat Brown">
+        <enum value="0x8C10" name="GL_TEXTURE_RED_TYPE"/>
+        <enum value="0x8C10" name="GL_TEXTURE_RED_TYPE_ARB"/>
+        <enum value="0x8C11" name="GL_TEXTURE_GREEN_TYPE"/>
+        <enum value="0x8C11" name="GL_TEXTURE_GREEN_TYPE_ARB"/>
+        <enum value="0x8C12" name="GL_TEXTURE_BLUE_TYPE"/>
+        <enum value="0x8C12" name="GL_TEXTURE_BLUE_TYPE_ARB"/>
+        <enum value="0x8C13" name="GL_TEXTURE_ALPHA_TYPE"/>
+        <enum value="0x8C13" name="GL_TEXTURE_ALPHA_TYPE_ARB"/>
+        <enum value="0x8C14" name="GL_TEXTURE_LUMINANCE_TYPE"/>
+        <enum value="0x8C14" name="GL_TEXTURE_LUMINANCE_TYPE_ARB"/>
+        <enum value="0x8C15" name="GL_TEXTURE_INTENSITY_TYPE"/>
+        <enum value="0x8C15" name="GL_TEXTURE_INTENSITY_TYPE_ARB"/>
+        <enum value="0x8C16" name="GL_TEXTURE_DEPTH_TYPE"/>
+        <enum value="0x8C16" name="GL_TEXTURE_DEPTH_TYPE_ARB"/>
+        <enum value="0x8C17" name="GL_UNSIGNED_NORMALIZED"/>
+        <enum value="0x8C17" name="GL_UNSIGNED_NORMALIZED_ARB"/>
+        <enum value="0x8C17" name="GL_UNSIGNED_NORMALIZED_EXT"/>
+        <enum value="0x8C18" name="GL_TEXTURE_1D_ARRAY"/>
+        <enum value="0x8C18" name="GL_TEXTURE_1D_ARRAY_EXT"/>
+        <enum value="0x8C19" name="GL_PROXY_TEXTURE_1D_ARRAY"/>
+        <enum value="0x8C19" name="GL_PROXY_TEXTURE_1D_ARRAY_EXT"/>
+        <enum value="0x8C1A" name="GL_TEXTURE_2D_ARRAY"/>
+        <enum value="0x8C1A" name="GL_TEXTURE_2D_ARRAY_EXT"/>
+        <enum value="0x8C1B" name="GL_PROXY_TEXTURE_2D_ARRAY"/>
+        <enum value="0x8C1B" name="GL_PROXY_TEXTURE_2D_ARRAY_EXT"/>
+        <enum value="0x8C1C" name="GL_TEXTURE_BINDING_1D_ARRAY"/>
+        <enum value="0x8C1C" name="GL_TEXTURE_BINDING_1D_ARRAY_EXT"/>
+        <enum value="0x8C1D" name="GL_TEXTURE_BINDING_2D_ARRAY"/>
+        <enum value="0x8C1D" name="GL_TEXTURE_BINDING_2D_ARRAY_EXT"/>
+            <unused start="0x8C1E" end="0x8C25"/>
+        <enum value="0x8C26" name="GL_GEOMETRY_PROGRAM_NV"/>
+        <enum value="0x8C27" name="GL_MAX_PROGRAM_OUTPUT_VERTICES_NV"/>
+        <enum value="0x8C28" name="GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV"/>
+        <enum value="0x8C29" name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x8C29" name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB"/>
+        <enum value="0x8C29" name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT"/>
+        <enum value="0x8C2A" name="GL_TEXTURE_BUFFER"/>
+        <enum value="0x8C2A" name="GL_TEXTURE_BUFFER_ARB"/>
+        <enum value="0x8C2A" name="GL_TEXTURE_BUFFER_EXT"/>
+        <enum value="0x8C2A" name="GL_TEXTURE_BUFFER_BINDING" comment="Equivalent to GL_TEXTURE_BUFFER_ARB query, but named more consistently"/>
+        <enum value="0x8C2A" name="GL_TEXTURE_BUFFER_BINDING_EXT"/>                          
+        <enum value="0x8C2B" name="GL_MAX_TEXTURE_BUFFER_SIZE"/>
+        <enum value="0x8C2B" name="GL_MAX_TEXTURE_BUFFER_SIZE_ARB"/>
+        <enum value="0x8C2B" name="GL_MAX_TEXTURE_BUFFER_SIZE_EXT"/>
+        <enum value="0x8C2C" name="GL_TEXTURE_BINDING_BUFFER"/>
+        <enum value="0x8C2C" name="GL_TEXTURE_BINDING_BUFFER_ARB"/>
+        <enum value="0x8C2C" name="GL_TEXTURE_BINDING_BUFFER_EXT"/>
+        <enum value="0x8C2D" name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING"/>
+        <enum value="0x8C2D" name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB"/>
+        <enum value="0x8C2D" name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT"/>
+        <enum value="0x8C2E" name="GL_TEXTURE_BUFFER_FORMAT_ARB"/>
+        <enum value="0x8C2E" name="GL_TEXTURE_BUFFER_FORMAT_EXT"/>
+        <enum value="0x8C2F" name="GL_ANY_SAMPLES_PASSED"/>
+        <enum value="0x8C2F" name="GL_ANY_SAMPLES_PASSED_EXT"/>
+            <unused start="0x8C30" end="0x8C35"/>
+        <enum value="0x8C36" name="GL_SAMPLE_SHADING"/>
+        <enum value="0x8C36" name="GL_SAMPLE_SHADING_ARB"/>
+        <enum value="0x8C36" name="GL_SAMPLE_SHADING_OES"/>
+        <enum value="0x8C37" name="GL_MIN_SAMPLE_SHADING_VALUE"/>
+        <enum value="0x8C37" name="GL_MIN_SAMPLE_SHADING_VALUE_ARB"/>
+        <enum value="0x8C37" name="GL_MIN_SAMPLE_SHADING_VALUE_OES"/>
+            <unused start="0x8C38" end="0x8C39"/>
+        <enum value="0x8C3A" name="GL_R11F_G11F_B10F"/>
+        <enum value="0x8C3A" name="GL_R11F_G11F_B10F_EXT"/>
+        <enum value="0x8C3B" name="GL_UNSIGNED_INT_10F_11F_11F_REV"/>
+        <enum value="0x8C3B" name="GL_UNSIGNED_INT_10F_11F_11F_REV_EXT"/>
+        <enum value="0x8C3C" name="GL_RGBA_SIGNED_COMPONENTS_EXT"/>
+        <enum value="0x8C3D" name="GL_RGB9_E5"/>
+        <enum value="0x8C3D" name="GL_RGB9_E5_EXT"/>
+        <enum value="0x8C3E" name="GL_UNSIGNED_INT_5_9_9_9_REV"/>
+        <enum value="0x8C3E" name="GL_UNSIGNED_INT_5_9_9_9_REV_EXT"/>
+        <enum value="0x8C3F" name="GL_TEXTURE_SHARED_SIZE"/>
+        <enum value="0x8C3F" name="GL_TEXTURE_SHARED_SIZE_EXT"/>
+        <enum value="0x8C40" name="GL_SRGB"/>
+        <enum value="0x8C40" name="GL_SRGB_EXT"/>
+        <enum value="0x8C41" name="GL_SRGB8"/>
+        <enum value="0x8C41" name="GL_SRGB8_EXT"/>
+        <enum value="0x8C41" name="GL_SRGB8_NV"/>
+        <enum value="0x8C42" name="GL_SRGB_ALPHA"/>
+        <enum value="0x8C42" name="GL_SRGB_ALPHA_EXT"/>
+        <enum value="0x8C43" name="GL_SRGB8_ALPHA8"/>
+        <enum value="0x8C43" name="GL_SRGB8_ALPHA8_EXT"/>
+        <enum value="0x8C44" name="GL_SLUMINANCE_ALPHA"/>
+        <enum value="0x8C44" name="GL_SLUMINANCE_ALPHA_EXT"/>
+        <enum value="0x8C44" name="GL_SLUMINANCE_ALPHA_NV"/>
+        <enum value="0x8C45" name="GL_SLUMINANCE8_ALPHA8"/>
+        <enum value="0x8C45" name="GL_SLUMINANCE8_ALPHA8_EXT"/>
+        <enum value="0x8C45" name="GL_SLUMINANCE8_ALPHA8_NV"/>
+        <enum value="0x8C46" name="GL_SLUMINANCE"/>
+        <enum value="0x8C46" name="GL_SLUMINANCE_EXT"/>
+        <enum value="0x8C46" name="GL_SLUMINANCE_NV"/>
+        <enum value="0x8C47" name="GL_SLUMINANCE8"/>
+        <enum value="0x8C47" name="GL_SLUMINANCE8_EXT"/>
+        <enum value="0x8C47" name="GL_SLUMINANCE8_NV"/>
+        <enum value="0x8C48" name="GL_COMPRESSED_SRGB"/>
+        <enum value="0x8C48" name="GL_COMPRESSED_SRGB_EXT"/>
+        <enum value="0x8C49" name="GL_COMPRESSED_SRGB_ALPHA"/>
+        <enum value="0x8C49" name="GL_COMPRESSED_SRGB_ALPHA_EXT"/>
+        <enum value="0x8C4A" name="GL_COMPRESSED_SLUMINANCE"/>
+        <enum value="0x8C4A" name="GL_COMPRESSED_SLUMINANCE_EXT"/>
+        <enum value="0x8C4B" name="GL_COMPRESSED_SLUMINANCE_ALPHA"/>
+        <enum value="0x8C4B" name="GL_COMPRESSED_SLUMINANCE_ALPHA_EXT"/>
+        <enum value="0x8C4C" name="GL_COMPRESSED_SRGB_S3TC_DXT1_EXT"/>
+        <enum value="0x8C4C" name="GL_COMPRESSED_SRGB_S3TC_DXT1_NV"/>
+        <enum value="0x8C4D" name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT"/>
+        <enum value="0x8C4D" name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV"/>
+        <enum value="0x8C4E" name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT"/>
+        <enum value="0x8C4E" name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV"/>
+        <enum value="0x8C4F" name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT"/>
+        <enum value="0x8C4F" name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV"/>
+            <unused start="0x8C50" end="0x8C6F"/>
+        <enum value="0x8C70" name="GL_COMPRESSED_LUMINANCE_LATC1_EXT"/>
+        <enum value="0x8C71" name="GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT"/>
+        <enum value="0x8C72" name="GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT"/>
+        <enum value="0x8C73" name="GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT"/>
+        <enum value="0x8C74" name="GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV"/>
+        <enum value="0x8C75" name="GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV"/>
+        <enum value="0x8C76" name="GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH"/>
+        <enum value="0x8C76" name="GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT"/>
+        <enum value="0x8C77" name="GL_BACK_PRIMARY_COLOR_NV"/>
+        <enum value="0x8C78" name="GL_BACK_SECONDARY_COLOR_NV"/>
+        <enum value="0x8C79" name="GL_TEXTURE_COORD_NV"/>
+        <enum value="0x8C7A" name="GL_CLIP_DISTANCE_NV"/>
+        <enum value="0x8C7B" name="GL_VERTEX_ID_NV"/>
+        <enum value="0x8C7C" name="GL_PRIMITIVE_ID_NV"/>
+        <enum value="0x8C7D" name="GL_GENERIC_ATTRIB_NV"/>
+        <enum value="0x8C7E" name="GL_TRANSFORM_FEEDBACK_ATTRIBS_NV"/>
+        <enum value="0x8C7F" name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE"/>
+        <enum value="0x8C7F" name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT"/>
+        <enum value="0x8C7F" name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV"/>
+        <enum value="0x8C80" name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS"/>
+        <enum value="0x8C80" name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT"/>
+        <enum value="0x8C80" name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV"/>
+        <enum value="0x8C81" name="GL_ACTIVE_VARYINGS_NV"/>
+        <enum value="0x8C82" name="GL_ACTIVE_VARYING_MAX_LENGTH_NV"/>
+        <enum value="0x8C83" name="GL_TRANSFORM_FEEDBACK_VARYINGS"/>
+        <enum value="0x8C83" name="GL_TRANSFORM_FEEDBACK_VARYINGS_EXT"/>
+        <enum value="0x8C83" name="GL_TRANSFORM_FEEDBACK_VARYINGS_NV"/>
+        <enum value="0x8C84" name="GL_TRANSFORM_FEEDBACK_BUFFER_START"/>
+        <enum value="0x8C84" name="GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT"/>
+        <enum value="0x8C84" name="GL_TRANSFORM_FEEDBACK_BUFFER_START_NV"/>
+        <enum value="0x8C85" name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE"/>
+        <enum value="0x8C85" name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT"/>
+        <enum value="0x8C85" name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV"/>
+        <enum value="0x8C86" name="GL_TRANSFORM_FEEDBACK_RECORD_NV"/>
+        <enum value="0x8C87" name="GL_PRIMITIVES_GENERATED"/>
+        <enum value="0x8C87" name="GL_PRIMITIVES_GENERATED_EXT"/>
+        <enum value="0x8C87" name="GL_PRIMITIVES_GENERATED_NV"/>
+        <enum value="0x8C88" name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN"/>
+        <enum value="0x8C88" name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT"/>
+        <enum value="0x8C88" name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV"/>
+        <enum value="0x8C89" name="GL_RASTERIZER_DISCARD"/>
+        <enum value="0x8C89" name="GL_RASTERIZER_DISCARD_EXT"/>
+        <enum value="0x8C89" name="GL_RASTERIZER_DISCARD_NV"/>
+        <enum value="0x8C8A" name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS"/>
+        <enum value="0x8C8A" name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT"/>
+        <enum value="0x8C8A" name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV"/>
+        <enum value="0x8C8B" name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS"/>
+        <enum value="0x8C8B" name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT"/>
+        <enum value="0x8C8B" name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV"/>
+        <enum value="0x8C8C" name="GL_INTERLEAVED_ATTRIBS"/>
+        <enum value="0x8C8C" name="GL_INTERLEAVED_ATTRIBS_EXT"/>
+        <enum value="0x8C8C" name="GL_INTERLEAVED_ATTRIBS_NV"/>
+        <enum value="0x8C8D" name="GL_SEPARATE_ATTRIBS"/>
+        <enum value="0x8C8D" name="GL_SEPARATE_ATTRIBS_EXT"/>
+        <enum value="0x8C8D" name="GL_SEPARATE_ATTRIBS_NV"/>
+        <enum value="0x8C8E" name="GL_TRANSFORM_FEEDBACK_BUFFER"/>
+        <enum value="0x8C8E" name="GL_TRANSFORM_FEEDBACK_BUFFER_EXT"/>
+        <enum value="0x8C8E" name="GL_TRANSFORM_FEEDBACK_BUFFER_NV"/>
+        <enum value="0x8C8F" name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING"/>
+        <enum value="0x8C8F" name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT"/>
+        <enum value="0x8C8F" name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8C90" end="0x8C9F" vendor="QCOM" comment="For Affie Munshi, OpenGL ES extensions">
+            <!-- Reassigned from ATI to QCOM at time of
+                 mobile/desktop split (bug 5874) -->
+            <unused start="0x8C90" end="0x8C91"/>
+        <enum value="0x8C92" name="GL_ATC_RGB_AMD"/>
+        <enum value="0x8C93" name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD"/>
+            <unused start="0x8C94" end="0x8C9F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8CA0" end="0x8CAF" vendor="ARB">
+        <enum value="0x8CA0" name="GL_POINT_SPRITE_COORD_ORIGIN"/>
+        <enum value="0x8CA1" name="GL_LOWER_LEFT"/>
+        <enum value="0x8CA2" name="GL_UPPER_LEFT"/>
+        <enum value="0x8CA3" name="GL_STENCIL_BACK_REF"/>
+        <enum value="0x8CA4" name="GL_STENCIL_BACK_VALUE_MASK"/>
+        <enum value="0x8CA5" name="GL_STENCIL_BACK_WRITEMASK"/>
+        <enum value="0x8CA6" name="GL_DRAW_FRAMEBUFFER_BINDING"/>
+        <enum value="0x8CA6" name="GL_DRAW_FRAMEBUFFER_BINDING_ANGLE"/>
+        <enum value="0x8CA6" name="GL_DRAW_FRAMEBUFFER_BINDING_APPLE"/>
+        <enum value="0x8CA6" name="GL_DRAW_FRAMEBUFFER_BINDING_EXT"/>
+        <enum value="0x8CA6" name="GL_DRAW_FRAMEBUFFER_BINDING_NV"/>
+        <enum value="0x8CA6" name="GL_FRAMEBUFFER_BINDING"/>
+        <enum value="0x8CA6" name="GL_FRAMEBUFFER_BINDING_ANGLE"/>
+        <enum value="0x8CA6" name="GL_FRAMEBUFFER_BINDING_EXT"/>
+        <enum value="0x8CA6" name="GL_FRAMEBUFFER_BINDING_OES"/>
+        <enum value="0x8CA7" name="GL_RENDERBUFFER_BINDING"/>
+        <enum value="0x8CA7" name="GL_RENDERBUFFER_BINDING_ANGLE"/>
+        <enum value="0x8CA7" name="GL_RENDERBUFFER_BINDING_EXT"/>
+        <enum value="0x8CA7" name="GL_RENDERBUFFER_BINDING_OES"/>
+        <enum value="0x8CA8" name="GL_READ_FRAMEBUFFER"/>
+        <enum value="0x8CA8" name="GL_READ_FRAMEBUFFER_ANGLE"/>
+        <enum value="0x8CA8" name="GL_READ_FRAMEBUFFER_APPLE"/>
+        <enum value="0x8CA8" name="GL_READ_FRAMEBUFFER_EXT"/>
+        <enum value="0x8CA8" name="GL_READ_FRAMEBUFFER_NV"/>
+        <enum value="0x8CA9" name="GL_DRAW_FRAMEBUFFER"/>
+        <enum value="0x8CA9" name="GL_DRAW_FRAMEBUFFER_ANGLE"/>
+        <enum value="0x8CA9" name="GL_DRAW_FRAMEBUFFER_APPLE"/>
+        <enum value="0x8CA9" name="GL_DRAW_FRAMEBUFFER_EXT"/>
+        <enum value="0x8CA9" name="GL_DRAW_FRAMEBUFFER_NV"/>
+        <enum value="0x8CAA" name="GL_READ_FRAMEBUFFER_BINDING"/>
+        <enum value="0x8CAA" name="GL_READ_FRAMEBUFFER_BINDING_ANGLE"/>
+        <enum value="0x8CAA" name="GL_READ_FRAMEBUFFER_BINDING_APPLE"/>
+        <enum value="0x8CAA" name="GL_READ_FRAMEBUFFER_BINDING_EXT"/>
+        <enum value="0x8CAA" name="GL_READ_FRAMEBUFFER_BINDING_NV"/>
+        <enum value="0x8CAB" name="GL_RENDERBUFFER_COVERAGE_SAMPLES_NV"/>
+        <enum value="0x8CAB" name="GL_RENDERBUFFER_SAMPLES"/>
+        <enum value="0x8CAB" name="GL_RENDERBUFFER_SAMPLES_ANGLE"/>
+        <enum value="0x8CAB" name="GL_RENDERBUFFER_SAMPLES_APPLE"/>
+        <enum value="0x8CAB" name="GL_RENDERBUFFER_SAMPLES_EXT"/>
+        <enum value="0x8CAB" name="GL_RENDERBUFFER_SAMPLES_NV"/>
+        <enum value="0x8CAC" name="GL_DEPTH_COMPONENT32F"/>
+        <enum value="0x8CAD" name="GL_DEPTH32F_STENCIL8"/>
+            <unused start="0x8CAE" end="0x8CAF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8CB0" end="0x8CCF" vendor="ZiiLabs" comment="For Barthold Lichtenbelt 2004/12/1"/>
+
+    <enums namespace="GL" start="0x8CD0" end="0x8D5F" vendor="ARB" comment="Framebuffer object specification + headroom">
+        <enum value="0x8CD0" name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"/>
+        <enum value="0x8CD0" name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT"/>
+        <enum value="0x8CD0" name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES"/>
+        <enum value="0x8CD1" name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"/>
+        <enum value="0x8CD1" name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT"/>
+        <enum value="0x8CD1" name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES"/>
+        <enum value="0x8CD2" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"/>
+        <enum value="0x8CD2" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT"/>
+        <enum value="0x8CD2" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES"/>
+        <enum value="0x8CD3" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"/>
+        <enum value="0x8CD3" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT"/>
+        <enum value="0x8CD3" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES"/>
+        <enum value="0x8CD4" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT"/>
+        <enum value="0x8CD4" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES"/>
+        <enum value="0x8CD4" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"/>
+        <enum value="0x8CD4" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT"/>
+        <enum value="0x8CD5" name="GL_FRAMEBUFFER_COMPLETE"/>
+        <enum value="0x8CD5" name="GL_FRAMEBUFFER_COMPLETE_EXT"/>
+        <enum value="0x8CD5" name="GL_FRAMEBUFFER_COMPLETE_OES"/>
+        <enum value="0x8CD6" name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"/>
+        <enum value="0x8CD6" name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT"/>
+        <enum value="0x8CD6" name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES"/>
+        <enum value="0x8CD7" name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"/>
+        <enum value="0x8CD7" name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT"/>
+        <enum value="0x8CD7" name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES"/>
+            <unused start="0x8CD8" comment="Removed 2005/09/26 in revision #117 of the FBO extension spec"/>
+            <!-- <enum value="0x8CD8" name="GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT"/> -->
+        <enum value="0x8CD9" name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS"/>
+        <enum value="0x8CD9" name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT"/>
+        <enum value="0x8CD9" name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES"/>
+        <enum value="0x8CDA" name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT"/>
+        <enum value="0x8CDA" name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES"/>
+        <enum value="0x8CDB" name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER"/>
+        <enum value="0x8CDB" name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT"/>
+        <enum value="0x8CDB" name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES"/>
+        <enum value="0x8CDC" name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER"/>
+        <enum value="0x8CDC" name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT"/>
+        <enum value="0x8CDC" name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES"/>
+        <enum value="0x8CDD" name="GL_FRAMEBUFFER_UNSUPPORTED"/>
+        <enum value="0x8CDD" name="GL_FRAMEBUFFER_UNSUPPORTED_EXT"/>
+        <enum value="0x8CDD" name="GL_FRAMEBUFFER_UNSUPPORTED_OES"/>
+            <unused start="0x8CDE" comment="Removed 2005/05/31 in revision #113 of the FBO extension spec"/>
+            <!-- <enum value="0x8CDE" name="GL_FRAMEBUFFER_STATUS_ERROR_EXT"/> -->
+        <enum value="0x8CDF" name="GL_MAX_COLOR_ATTACHMENTS"/>
+        <enum value="0x8CDF" name="GL_MAX_COLOR_ATTACHMENTS_EXT"/>
+        <enum value="0x8CDF" name="GL_MAX_COLOR_ATTACHMENTS_NV"/>
+        <enum value="0x8CE0" name="GL_COLOR_ATTACHMENT0"/>
+        <enum value="0x8CE0" name="GL_COLOR_ATTACHMENT0_EXT"/>
+        <enum value="0x8CE0" name="GL_COLOR_ATTACHMENT0_NV"/>
+        <enum value="0x8CE0" name="GL_COLOR_ATTACHMENT0_OES"/>
+        <enum value="0x8CE1" name="GL_COLOR_ATTACHMENT1"/>
+        <enum value="0x8CE1" name="GL_COLOR_ATTACHMENT1_EXT"/>
+        <enum value="0x8CE1" name="GL_COLOR_ATTACHMENT1_NV"/>
+        <enum value="0x8CE2" name="GL_COLOR_ATTACHMENT2"/>
+        <enum value="0x8CE2" name="GL_COLOR_ATTACHMENT2_EXT"/>
+        <enum value="0x8CE2" name="GL_COLOR_ATTACHMENT2_NV"/>
+        <enum value="0x8CE3" name="GL_COLOR_ATTACHMENT3"/>
+        <enum value="0x8CE3" name="GL_COLOR_ATTACHMENT3_EXT"/>
+        <enum value="0x8CE3" name="GL_COLOR_ATTACHMENT3_NV"/>
+        <enum value="0x8CE4" name="GL_COLOR_ATTACHMENT4"/>
+        <enum value="0x8CE4" name="GL_COLOR_ATTACHMENT4_EXT"/>
+        <enum value="0x8CE4" name="GL_COLOR_ATTACHMENT4_NV"/>
+        <enum value="0x8CE5" name="GL_COLOR_ATTACHMENT5"/>
+        <enum value="0x8CE5" name="GL_COLOR_ATTACHMENT5_EXT"/>
+        <enum value="0x8CE5" name="GL_COLOR_ATTACHMENT5_NV"/>
+        <enum value="0x8CE6" name="GL_COLOR_ATTACHMENT6"/>
+        <enum value="0x8CE6" name="GL_COLOR_ATTACHMENT6_EXT"/>
+        <enum value="0x8CE6" name="GL_COLOR_ATTACHMENT6_NV"/>
+        <enum value="0x8CE7" name="GL_COLOR_ATTACHMENT7"/>
+        <enum value="0x8CE7" name="GL_COLOR_ATTACHMENT7_EXT"/>
+        <enum value="0x8CE7" name="GL_COLOR_ATTACHMENT7_NV"/>
+        <enum value="0x8CE8" name="GL_COLOR_ATTACHMENT8"/>
+        <enum value="0x8CE8" name="GL_COLOR_ATTACHMENT8_EXT"/>
+        <enum value="0x8CE8" name="GL_COLOR_ATTACHMENT8_NV"/>
+        <enum value="0x8CE9" name="GL_COLOR_ATTACHMENT9"/>
+        <enum value="0x8CE9" name="GL_COLOR_ATTACHMENT9_EXT"/>
+        <enum value="0x8CE9" name="GL_COLOR_ATTACHMENT9_NV"/>
+        <enum value="0x8CEA" name="GL_COLOR_ATTACHMENT10"/>
+        <enum value="0x8CEA" name="GL_COLOR_ATTACHMENT10_EXT"/>
+        <enum value="0x8CEA" name="GL_COLOR_ATTACHMENT10_NV"/>
+        <enum value="0x8CEB" name="GL_COLOR_ATTACHMENT11"/>
+        <enum value="0x8CEB" name="GL_COLOR_ATTACHMENT11_EXT"/>
+        <enum value="0x8CEB" name="GL_COLOR_ATTACHMENT11_NV"/>
+        <enum value="0x8CEC" name="GL_COLOR_ATTACHMENT12"/>
+        <enum value="0x8CEC" name="GL_COLOR_ATTACHMENT12_EXT"/>
+        <enum value="0x8CEC" name="GL_COLOR_ATTACHMENT12_NV"/>
+        <enum value="0x8CED" name="GL_COLOR_ATTACHMENT13"/>
+        <enum value="0x8CED" name="GL_COLOR_ATTACHMENT13_EXT"/>
+        <enum value="0x8CED" name="GL_COLOR_ATTACHMENT13_NV"/>
+        <enum value="0x8CEE" name="GL_COLOR_ATTACHMENT14"/>
+        <enum value="0x8CEE" name="GL_COLOR_ATTACHMENT14_EXT"/>
+        <enum value="0x8CEE" name="GL_COLOR_ATTACHMENT14_NV"/>
+        <enum value="0x8CEF" name="GL_COLOR_ATTACHMENT15"/>
+        <enum value="0x8CEF" name="GL_COLOR_ATTACHMENT15_EXT"/>
+        <enum value="0x8CEF" name="GL_COLOR_ATTACHMENT15_NV"/>
+            <unused start="0x8CF0" end="0x8CFF" comment="For color attachments 16-31"/>
+        <enum value="0x8D00" name="GL_DEPTH_ATTACHMENT"/>
+        <enum value="0x8D00" name="GL_DEPTH_ATTACHMENT_EXT"/>
+        <enum value="0x8D00" name="GL_DEPTH_ATTACHMENT_OES"/>
+            <unused start="0x8D01" end="0x8D1F" comment="For depth attachments 16-31"/>
+        <enum value="0x8D20" name="GL_STENCIL_ATTACHMENT"/>
+        <enum value="0x8D20" name="GL_STENCIL_ATTACHMENT_EXT"/>
+        <enum value="0x8D20" name="GL_STENCIL_ATTACHMENT_OES"/>
+            <unused start="0x8D21" end="0x8D3F" comment="For stencil attachments 16-31"/>
+        <enum value="0x8D40" name="GL_FRAMEBUFFER"/>
+        <enum value="0x8D40" name="GL_FRAMEBUFFER_EXT"/>
+        <enum value="0x8D40" name="GL_FRAMEBUFFER_OES"/>
+        <enum value="0x8D41" name="GL_RENDERBUFFER"/>
+        <enum value="0x8D41" name="GL_RENDERBUFFER_EXT"/>
+        <enum value="0x8D41" name="GL_RENDERBUFFER_OES"/>
+        <enum value="0x8D42" name="GL_RENDERBUFFER_WIDTH"/>
+        <enum value="0x8D42" name="GL_RENDERBUFFER_WIDTH_EXT"/>
+        <enum value="0x8D42" name="GL_RENDERBUFFER_WIDTH_OES"/>
+        <enum value="0x8D43" name="GL_RENDERBUFFER_HEIGHT"/>
+        <enum value="0x8D43" name="GL_RENDERBUFFER_HEIGHT_EXT"/>
+        <enum value="0x8D43" name="GL_RENDERBUFFER_HEIGHT_OES"/>
+        <enum value="0x8D44" name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
+        <enum value="0x8D44" name="GL_RENDERBUFFER_INTERNAL_FORMAT_EXT"/>
+        <enum value="0x8D44" name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"/>
+            <unused start="0x8D45" comment="Was for GL_STENCIL_INDEX_EXT, but now use core STENCIL_INDEX instead"/>
+        <enum value="0x8D46" name="GL_STENCIL_INDEX1"/>
+        <enum value="0x8D46" name="GL_STENCIL_INDEX1_EXT"/>
+        <enum value="0x8D46" name="GL_STENCIL_INDEX1_OES"/>
+        <enum value="0x8D47" name="GL_STENCIL_INDEX4"/>
+        <enum value="0x8D47" name="GL_STENCIL_INDEX4_EXT"/>
+        <enum value="0x8D47" name="GL_STENCIL_INDEX4_OES"/>
+        <enum value="0x8D48" name="GL_STENCIL_INDEX8"/>
+        <enum value="0x8D48" name="GL_STENCIL_INDEX8_EXT"/>
+        <enum value="0x8D48" name="GL_STENCIL_INDEX8_OES"/>
+        <enum value="0x8D49" name="GL_STENCIL_INDEX16"/>
+        <enum value="0x8D49" name="GL_STENCIL_INDEX16_EXT"/>
+            <unused start="0x8D4A" end="0x8D4F" comment="For additional stencil formats"/>
+        <enum value="0x8D50" name="GL_RENDERBUFFER_RED_SIZE"/>
+        <enum value="0x8D50" name="GL_RENDERBUFFER_RED_SIZE_EXT"/>
+        <enum value="0x8D50" name="GL_RENDERBUFFER_RED_SIZE_OES"/>
+        <enum value="0x8D51" name="GL_RENDERBUFFER_GREEN_SIZE"/>
+        <enum value="0x8D51" name="GL_RENDERBUFFER_GREEN_SIZE_EXT"/>
+        <enum value="0x8D51" name="GL_RENDERBUFFER_GREEN_SIZE_OES"/>
+        <enum value="0x8D52" name="GL_RENDERBUFFER_BLUE_SIZE"/>
+        <enum value="0x8D52" name="GL_RENDERBUFFER_BLUE_SIZE_EXT"/>
+        <enum value="0x8D52" name="GL_RENDERBUFFER_BLUE_SIZE_OES"/>
+        <enum value="0x8D53" name="GL_RENDERBUFFER_ALPHA_SIZE"/>
+        <enum value="0x8D53" name="GL_RENDERBUFFER_ALPHA_SIZE_EXT"/>
+        <enum value="0x8D53" name="GL_RENDERBUFFER_ALPHA_SIZE_OES"/>
+        <enum value="0x8D54" name="GL_RENDERBUFFER_DEPTH_SIZE"/>
+        <enum value="0x8D54" name="GL_RENDERBUFFER_DEPTH_SIZE_EXT"/>
+        <enum value="0x8D54" name="GL_RENDERBUFFER_DEPTH_SIZE_OES"/>
+        <enum value="0x8D55" name="GL_RENDERBUFFER_STENCIL_SIZE"/>
+        <enum value="0x8D55" name="GL_RENDERBUFFER_STENCIL_SIZE_EXT"/>
+        <enum value="0x8D55" name="GL_RENDERBUFFER_STENCIL_SIZE_OES"/>
+        <enum value="0x8D56" name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"/>
+        <enum value="0x8D56" name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE"/>
+        <enum value="0x8D56" name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE"/>
+        <enum value="0x8D56" name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT"/>
+        <enum value="0x8D56" name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV"/>
+        <enum value="0x8D57" name="GL_MAX_SAMPLES"/>
+        <enum value="0x8D57" name="GL_MAX_SAMPLES_ANGLE"/>
+        <enum value="0x8D57" name="GL_MAX_SAMPLES_APPLE"/>
+        <enum value="0x8D57" name="GL_MAX_SAMPLES_EXT"/>
+        <enum value="0x8D57" name="GL_MAX_SAMPLES_NV"/>
+            <unused start="0x8D58" end="0x8D5F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8D60" end="0x8D6F" vendor="OES">
+        <enum value="0x8D60" name="GL_TEXTURE_GEN_STR_OES"/>
+        <enum value="0x8D61" name="GL_HALF_FLOAT_OES"/>
+        <enum value="0x8D62" name="GL_RGB565_OES"/>
+        <enum value="0x8D62" name="GL_RGB565"/>
+            <unused start="0x8D63" comment="Was GL_TEXTURE_IMMUTABLE_LEVELS in draft ES 3.0 spec"/>
+        <enum value="0x8D64" name="GL_ETC1_RGB8_OES"/>
+        <enum value="0x8D65" name="GL_TEXTURE_EXTERNAL_OES"/>
+        <enum value="0x8D66" name="GL_SAMPLER_EXTERNAL_OES"/>
+        <enum value="0x8D67" name="GL_TEXTURE_BINDING_EXTERNAL_OES"/>
+        <enum value="0x8D68" name="GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES"/>
+        <enum value="0x8D69" name="GL_PRIMITIVE_RESTART_FIXED_INDEX"/>
+        <enum value="0x8D6A" name="GL_ANY_SAMPLES_PASSED_CONSERVATIVE"/>
+        <enum value="0x8D6A" name="GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT"/>
+        <enum value="0x8D6B" name="GL_MAX_ELEMENT_INDEX"/>
+        <enum value="0x8D6C" name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT"/>
+            <unused start="0x8D6D" end="0x8D6F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8D70" end="0x8DEF" vendor="NV" comment="For Pat Brown 2005/10/13">
+        <enum value="0x8D70" name="GL_RGBA32UI"/>
+        <enum value="0x8D70" name="GL_RGBA32UI_EXT"/>
+        <enum value="0x8D71" name="GL_RGB32UI"/>
+        <enum value="0x8D71" name="GL_RGB32UI_EXT"/>
+        <enum value="0x8D72" name="GL_ALPHA32UI_EXT"/>
+        <enum value="0x8D73" name="GL_INTENSITY32UI_EXT"/>
+        <enum value="0x8D74" name="GL_LUMINANCE32UI_EXT"/>
+        <enum value="0x8D75" name="GL_LUMINANCE_ALPHA32UI_EXT"/>
+        <enum value="0x8D76" name="GL_RGBA16UI"/>
+        <enum value="0x8D76" name="GL_RGBA16UI_EXT"/>
+        <enum value="0x8D77" name="GL_RGB16UI"/>
+        <enum value="0x8D77" name="GL_RGB16UI_EXT"/>
+        <enum value="0x8D78" name="GL_ALPHA16UI_EXT"/>
+        <enum value="0x8D79" name="GL_INTENSITY16UI_EXT"/>
+        <enum value="0x8D7A" name="GL_LUMINANCE16UI_EXT"/>
+        <enum value="0x8D7B" name="GL_LUMINANCE_ALPHA16UI_EXT"/>
+        <enum value="0x8D7C" name="GL_RGBA8UI"/>
+        <enum value="0x8D7C" name="GL_RGBA8UI_EXT"/>
+        <enum value="0x8D7D" name="GL_RGB8UI"/>
+        <enum value="0x8D7D" name="GL_RGB8UI_EXT"/>
+        <enum value="0x8D7E" name="GL_ALPHA8UI_EXT"/>
+        <enum value="0x8D7F" name="GL_INTENSITY8UI_EXT"/>
+        <enum value="0x8D80" name="GL_LUMINANCE8UI_EXT"/>
+        <enum value="0x8D81" name="GL_LUMINANCE_ALPHA8UI_EXT"/>
+        <enum value="0x8D82" name="GL_RGBA32I"/>
+        <enum value="0x8D82" name="GL_RGBA32I_EXT"/>
+        <enum value="0x8D83" name="GL_RGB32I"/>
+        <enum value="0x8D83" name="GL_RGB32I_EXT"/>
+        <enum value="0x8D84" name="GL_ALPHA32I_EXT"/>
+        <enum value="0x8D85" name="GL_INTENSITY32I_EXT"/>
+        <enum value="0x8D86" name="GL_LUMINANCE32I_EXT"/>
+        <enum value="0x8D87" name="GL_LUMINANCE_ALPHA32I_EXT"/>
+        <enum value="0x8D88" name="GL_RGBA16I"/>
+        <enum value="0x8D88" name="GL_RGBA16I_EXT"/>
+        <enum value="0x8D89" name="GL_RGB16I"/>
+        <enum value="0x8D89" name="GL_RGB16I_EXT"/>
+        <enum value="0x8D8A" name="GL_ALPHA16I_EXT"/>
+        <enum value="0x8D8B" name="GL_INTENSITY16I_EXT"/>
+        <enum value="0x8D8C" name="GL_LUMINANCE16I_EXT"/>
+        <enum value="0x8D8D" name="GL_LUMINANCE_ALPHA16I_EXT"/>
+        <enum value="0x8D8E" name="GL_RGBA8I"/>
+        <enum value="0x8D8E" name="GL_RGBA8I_EXT"/>
+        <enum value="0x8D8F" name="GL_RGB8I"/>
+        <enum value="0x8D8F" name="GL_RGB8I_EXT"/>
+        <enum value="0x8D90" name="GL_ALPHA8I_EXT"/>
+        <enum value="0x8D91" name="GL_INTENSITY8I_EXT"/>
+        <enum value="0x8D92" name="GL_LUMINANCE8I_EXT"/>
+        <enum value="0x8D93" name="GL_LUMINANCE_ALPHA8I_EXT"/>
+        <enum value="0x8D94" name="GL_RED_INTEGER"/>
+        <enum value="0x8D94" name="GL_RED_INTEGER_EXT"/>
+        <enum value="0x8D95" name="GL_GREEN_INTEGER"/>
+        <enum value="0x8D95" name="GL_GREEN_INTEGER_EXT"/>
+        <enum value="0x8D96" name="GL_BLUE_INTEGER"/>
+        <enum value="0x8D96" name="GL_BLUE_INTEGER_EXT"/>
+        <enum value="0x8D97" name="GL_ALPHA_INTEGER"/>
+        <enum value="0x8D97" name="GL_ALPHA_INTEGER_EXT"/>
+        <enum value="0x8D98" name="GL_RGB_INTEGER"/>
+        <enum value="0x8D98" name="GL_RGB_INTEGER_EXT"/>
+        <enum value="0x8D99" name="GL_RGBA_INTEGER"/>
+        <enum value="0x8D99" name="GL_RGBA_INTEGER_EXT"/>
+        <enum value="0x8D9A" name="GL_BGR_INTEGER"/>
+        <enum value="0x8D9A" name="GL_BGR_INTEGER_EXT"/>
+        <enum value="0x8D9B" name="GL_BGRA_INTEGER"/>
+        <enum value="0x8D9B" name="GL_BGRA_INTEGER_EXT"/>
+        <enum value="0x8D9C" name="GL_LUMINANCE_INTEGER_EXT"/>
+        <enum value="0x8D9D" name="GL_LUMINANCE_ALPHA_INTEGER_EXT"/>
+        <enum value="0x8D9E" name="GL_RGBA_INTEGER_MODE_EXT"/>
+        <enum value="0x8D9F" name="GL_INT_2_10_10_10_REV"/>
+        <enum value="0x8DA0" name="GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV"/>
+        <enum value="0x8DA1" name="GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV"/>
+        <enum value="0x8DA2" name="GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV"/>
+        <enum value="0x8DA3" name="GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV"/>
+        <enum value="0x8DA4" name="GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV"/>
+        <enum value="0x8DA5" name="GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV"/>
+        <enum value="0x8DA6" name="GL_MAX_PROGRAM_GENERIC_RESULTS_NV"/>
+        <enum value="0x8DA7" name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED"/>
+        <enum value="0x8DA7" name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB"/>
+        <enum value="0x8DA7" name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT"/>
+        <enum value="0x8DA8" name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS"/>
+        <enum value="0x8DA8" name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB"/>
+        <enum value="0x8DA8" name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT"/>
+        <enum value="0x8DA9" name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB"/>
+        <enum value="0x8DA9" name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT"/>
+            <!-- Also see the odd namespace "NVTransformFeedbackToken" above -->
+        <enum value="0x8DAA" name="GL_LAYER_NV"/>
+        <enum value="0x8DAB" name="GL_DEPTH_COMPONENT32F_NV"/>
+        <enum value="0x8DAC" name="GL_DEPTH32F_STENCIL8_NV"/>
+        <enum value="0x8DAD" name="GL_FLOAT_32_UNSIGNED_INT_24_8_REV"/>
+        <enum value="0x8DAD" name="GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV"/>
+        <enum value="0x8DAE" name="GL_SHADER_INCLUDE_ARB"/>
+        <enum value="0x8DAF" name="GL_DEPTH_BUFFER_FLOAT_MODE_NV"/>
+            <unused start="0x8DB0" end="0x8DB8"/>
+        <enum value="0x8DB9" name="GL_FRAMEBUFFER_SRGB"/>
+        <enum value="0x8DB9" name="GL_FRAMEBUFFER_SRGB_EXT"/>
+        <enum value="0x8DBA" name="GL_FRAMEBUFFER_SRGB_CAPABLE_EXT"/>
+        <enum value="0x8DBB" name="GL_COMPRESSED_RED_RGTC1"/>
+        <enum value="0x8DBB" name="GL_COMPRESSED_RED_RGTC1_EXT"/>
+        <enum value="0x8DBC" name="GL_COMPRESSED_SIGNED_RED_RGTC1"/>
+        <enum value="0x8DBC" name="GL_COMPRESSED_SIGNED_RED_RGTC1_EXT"/>
+        <enum value="0x8DBD" name="GL_COMPRESSED_RED_GREEN_RGTC2_EXT"/>
+        <enum value="0x8DBD" name="GL_COMPRESSED_RG_RGTC2"/>
+        <enum value="0x8DBE" name="GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT"/>
+        <enum value="0x8DBE" name="GL_COMPRESSED_SIGNED_RG_RGTC2"/>
+        <enum value="0x8DC0" name="GL_SAMPLER_1D_ARRAY"/>
+        <enum value="0x8DC0" name="GL_SAMPLER_1D_ARRAY_EXT"/>
+        <enum value="0x8DC1" name="GL_SAMPLER_2D_ARRAY"/>
+        <enum value="0x8DC1" name="GL_SAMPLER_2D_ARRAY_EXT"/>
+        <enum value="0x8DC2" name="GL_SAMPLER_BUFFER"/>
+        <enum value="0x8DC2" name="GL_SAMPLER_BUFFER_EXT"/>
+        <enum value="0x8DC3" name="GL_SAMPLER_1D_ARRAY_SHADOW"/>
+        <enum value="0x8DC3" name="GL_SAMPLER_1D_ARRAY_SHADOW_EXT"/>
+        <enum value="0x8DC4" name="GL_SAMPLER_2D_ARRAY_SHADOW"/>
+        <enum value="0x8DC4" name="GL_SAMPLER_2D_ARRAY_SHADOW_EXT"/>
+        <enum value="0x8DC4" name="GL_SAMPLER_2D_ARRAY_SHADOW_NV"/>
+        <enum value="0x8DC5" name="GL_SAMPLER_CUBE_SHADOW"/>
+        <enum value="0x8DC5" name="GL_SAMPLER_CUBE_SHADOW_EXT"/>
+        <enum value="0x8DC5" name="GL_SAMPLER_CUBE_SHADOW_NV"/>
+        <enum value="0x8DC6" name="GL_UNSIGNED_INT_VEC2"/>
+        <enum value="0x8DC6" name="GL_UNSIGNED_INT_VEC2_EXT"/>
+        <enum value="0x8DC7" name="GL_UNSIGNED_INT_VEC3"/>
+        <enum value="0x8DC7" name="GL_UNSIGNED_INT_VEC3_EXT"/>
+        <enum value="0x8DC8" name="GL_UNSIGNED_INT_VEC4"/>
+        <enum value="0x8DC8" name="GL_UNSIGNED_INT_VEC4_EXT"/>
+        <enum value="0x8DC9" name="GL_INT_SAMPLER_1D"/>
+        <enum value="0x8DC9" name="GL_INT_SAMPLER_1D_EXT"/>
+        <enum value="0x8DCA" name="GL_INT_SAMPLER_2D"/>
+        <enum value="0x8DCA" name="GL_INT_SAMPLER_2D_EXT"/>
+        <enum value="0x8DCB" name="GL_INT_SAMPLER_3D"/>
+        <enum value="0x8DCB" name="GL_INT_SAMPLER_3D_EXT"/>
+        <enum value="0x8DCC" name="GL_INT_SAMPLER_CUBE"/>
+        <enum value="0x8DCC" name="GL_INT_SAMPLER_CUBE_EXT"/>
+        <enum value="0x8DCD" name="GL_INT_SAMPLER_2D_RECT"/>
+        <enum value="0x8DCD" name="GL_INT_SAMPLER_2D_RECT_EXT"/>
+        <enum value="0x8DCE" name="GL_INT_SAMPLER_1D_ARRAY"/>
+        <enum value="0x8DCE" name="GL_INT_SAMPLER_1D_ARRAY_EXT"/>
+        <enum value="0x8DCF" name="GL_INT_SAMPLER_2D_ARRAY"/>
+        <enum value="0x8DCF" name="GL_INT_SAMPLER_2D_ARRAY_EXT"/>
+        <enum value="0x8DD0" name="GL_INT_SAMPLER_BUFFER"/>
+        <enum value="0x8DD0" name="GL_INT_SAMPLER_BUFFER_EXT"/>
+        <enum value="0x8DD1" name="GL_UNSIGNED_INT_SAMPLER_1D"/>
+        <enum value="0x8DD1" name="GL_UNSIGNED_INT_SAMPLER_1D_EXT"/>
+        <enum value="0x8DD2" name="GL_UNSIGNED_INT_SAMPLER_2D"/>
+        <enum value="0x8DD2" name="GL_UNSIGNED_INT_SAMPLER_2D_EXT"/>
+        <enum value="0x8DD3" name="GL_UNSIGNED_INT_SAMPLER_3D"/>
+        <enum value="0x8DD3" name="GL_UNSIGNED_INT_SAMPLER_3D_EXT"/>
+        <enum value="0x8DD4" name="GL_UNSIGNED_INT_SAMPLER_CUBE"/>
+        <enum value="0x8DD4" name="GL_UNSIGNED_INT_SAMPLER_CUBE_EXT"/>
+        <enum value="0x8DD5" name="GL_UNSIGNED_INT_SAMPLER_2D_RECT"/>
+        <enum value="0x8DD5" name="GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT"/>
+        <enum value="0x8DD6" name="GL_UNSIGNED_INT_SAMPLER_1D_ARRAY"/>
+        <enum value="0x8DD6" name="GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT"/>
+        <enum value="0x8DD7" name="GL_UNSIGNED_INT_SAMPLER_2D_ARRAY"/>
+        <enum value="0x8DD7" name="GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT"/>
+        <enum value="0x8DD8" name="GL_UNSIGNED_INT_SAMPLER_BUFFER"/>
+        <enum value="0x8DD8" name="GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT"/>
+        <enum value="0x8DD9" name="GL_GEOMETRY_SHADER"/>
+        <enum value="0x8DD9" name="GL_GEOMETRY_SHADER_ARB"/>
+        <enum value="0x8DD9" name="GL_GEOMETRY_SHADER_EXT"/>
+        <enum value="0x8DDA" name="GL_GEOMETRY_VERTICES_OUT_ARB"/>
+        <enum value="0x8DDA" name="GL_GEOMETRY_VERTICES_OUT_EXT"/>
+        <enum value="0x8DDB" name="GL_GEOMETRY_INPUT_TYPE_ARB"/>
+        <enum value="0x8DDB" name="GL_GEOMETRY_INPUT_TYPE_EXT"/>
+        <enum value="0x8DDC" name="GL_GEOMETRY_OUTPUT_TYPE_ARB"/>
+        <enum value="0x8DDC" name="GL_GEOMETRY_OUTPUT_TYPE_EXT"/>
+        <enum value="0x8DDD" name="GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB"/>
+        <enum value="0x8DDD" name="GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT"/>
+        <enum value="0x8DDE" name="GL_MAX_VERTEX_VARYING_COMPONENTS_ARB"/>
+        <enum value="0x8DDE" name="GL_MAX_VERTEX_VARYING_COMPONENTS_EXT"/>
+        <enum value="0x8DDF" name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS"/>
+        <enum value="0x8DDF" name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB"/>
+        <enum value="0x8DDF" name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT"/>
+        <enum value="0x8DE0" name="GL_MAX_GEOMETRY_OUTPUT_VERTICES"/>
+        <enum value="0x8DE0" name="GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB"/>
+        <enum value="0x8DE0" name="GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT"/>
+        <enum value="0x8DE1" name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS"/>
+        <enum value="0x8DE1" name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB"/>
+        <enum value="0x8DE1" name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT"/>
+        <enum value="0x8DE2" name="GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT"/>
+        <enum value="0x8DE3" name="GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT"/>
+        <enum value="0x8DE4" name="GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT"/>
+        <enum value="0x8DE5" name="GL_ACTIVE_SUBROUTINES"/>
+        <enum value="0x8DE6" name="GL_ACTIVE_SUBROUTINE_UNIFORMS"/>
+        <enum value="0x8DE7" name="GL_MAX_SUBROUTINES"/>
+        <enum value="0x8DE8" name="GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS"/>
+        <enum value="0x8DE9" name="GL_NAMED_STRING_LENGTH_ARB"/>
+        <enum value="0x8DEA" name="GL_NAMED_STRING_TYPE_ARB"/>
+            <unused start="0x8DEB" end="0x8DEC"/>
+        <enum value="0x8DED" name="GL_MAX_BINDABLE_UNIFORM_SIZE_EXT"/>
+        <enum value="0x8DEE" name="GL_UNIFORM_BUFFER_EXT"/>
+        <enum value="0x8DEF" name="GL_UNIFORM_BUFFER_BINDING_EXT"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8DF0" end="0x8E0F" vendor="OES">
+        <enum value="0x8DF0" name="GL_LOW_FLOAT"/>
+        <enum value="0x8DF1" name="GL_MEDIUM_FLOAT"/>
+        <enum value="0x8DF2" name="GL_HIGH_FLOAT"/>
+        <enum value="0x8DF3" name="GL_LOW_INT"/>
+        <enum value="0x8DF4" name="GL_MEDIUM_INT"/>
+        <enum value="0x8DF5" name="GL_HIGH_INT"/>
+        <enum value="0x8DF6" name="GL_UNSIGNED_INT_10_10_10_2_OES"/>
+        <enum value="0x8DF7" name="GL_INT_10_10_10_2_OES"/>
+        <enum value="0x8DF8" name="GL_SHADER_BINARY_FORMATS"/>
+        <enum value="0x8DF9" name="GL_NUM_SHADER_BINARY_FORMATS"/>
+        <enum value="0x8DFA" name="GL_SHADER_COMPILER"/>
+        <enum value="0x8DFB" name="GL_MAX_VERTEX_UNIFORM_VECTORS"/>
+        <enum value="0x8DFC" name="GL_MAX_VARYING_VECTORS"/>
+        <enum value="0x8DFD" name="GL_MAX_FRAGMENT_UNIFORM_VECTORS"/>
+            <unused start="0x8DFE" end="0x8E0F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8E10" end="0x8E8F" vendor="NV" comment="For Michael Gold 2006/08/07">
+        <enum value="0x8E10" name="GL_RENDERBUFFER_COLOR_SAMPLES_NV"/>
+        <enum value="0x8E11" name="GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV"/>
+        <enum value="0x8E12" name="GL_MULTISAMPLE_COVERAGE_MODES_NV"/>
+        <enum value="0x8E13" name="GL_QUERY_WAIT"/>
+        <enum value="0x8E13" name="GL_QUERY_WAIT_NV"/>
+        <enum value="0x8E14" name="GL_QUERY_NO_WAIT"/>
+        <enum value="0x8E14" name="GL_QUERY_NO_WAIT_NV"/>
+        <enum value="0x8E15" name="GL_QUERY_BY_REGION_WAIT"/>
+        <enum value="0x8E15" name="GL_QUERY_BY_REGION_WAIT_NV"/>
+        <enum value="0x8E16" name="GL_QUERY_BY_REGION_NO_WAIT"/>
+        <enum value="0x8E16" name="GL_QUERY_BY_REGION_NO_WAIT_NV"/>
+            <unused start="0x8E17" end="0x8E1D"/>
+        <enum value="0x8E1E" name="GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+        <enum value="0x8E1E" name="GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT"/>    
+        <enum value="0x8E1F" name="GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+        <enum value="0x8E1F" name="GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT"/> 
+        <enum value="0x8E20" name="GL_COLOR_SAMPLES_NV"/>
+            <unused start="0x8E21"/>
+        <enum value="0x8E22" name="GL_TRANSFORM_FEEDBACK"/>
+        <enum value="0x8E22" name="GL_TRANSFORM_FEEDBACK_NV"/>
+        <enum value="0x8E23" name="GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED"/>
+        <enum value="0x8E23" name="GL_TRANSFORM_FEEDBACK_PAUSED" alias="GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED"/>
+        <enum value="0x8E23" name="GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV"/>
+        <enum value="0x8E24" name="GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE"/>
+        <enum value="0x8E24" name="GL_TRANSFORM_FEEDBACK_ACTIVE" alias="GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE"/>
+        <enum value="0x8E24" name="GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV"/>
+        <enum value="0x8E25" name="GL_TRANSFORM_FEEDBACK_BINDING"/>
+        <enum value="0x8E25" name="GL_TRANSFORM_FEEDBACK_BINDING_NV"/>
+        <enum value="0x8E26" name="GL_FRAME_NV"/>
+        <enum value="0x8E27" name="GL_FIELDS_NV"/>
+        <enum value="0x8E28" name="GL_CURRENT_TIME_NV"/>
+        <enum value="0x8E28" name="GL_TIMESTAMP"/>
+        <enum value="0x8E28" name="GL_TIMESTAMP_EXT"/>
+        <enum value="0x8E29" name="GL_NUM_FILL_STREAMS_NV"/>
+        <enum value="0x8E2A" name="GL_PRESENT_TIME_NV"/>
+        <enum value="0x8E2B" name="GL_PRESENT_DURATION_NV"/>
+        <enum value="0x8E2C" name="GL_DEPTH_COMPONENT16_NONLINEAR_NV"/>
+        <enum value="0x8E2D" name="GL_PROGRAM_MATRIX_EXT"/>
+        <enum value="0x8E2E" name="GL_TRANSPOSE_PROGRAM_MATRIX_EXT"/>
+        <enum value="0x8E2F" name="GL_PROGRAM_MATRIX_STACK_DEPTH_EXT"/>
+            <unused start="0x8E30" end="0x8E41"/>
+        <enum value="0x8E42" name="GL_TEXTURE_SWIZZLE_R"/>
+        <enum value="0x8E42" name="GL_TEXTURE_SWIZZLE_R_EXT"/>
+        <enum value="0x8E43" name="GL_TEXTURE_SWIZZLE_G"/>
+        <enum value="0x8E43" name="GL_TEXTURE_SWIZZLE_G_EXT"/>
+        <enum value="0x8E44" name="GL_TEXTURE_SWIZZLE_B"/>
+        <enum value="0x8E44" name="GL_TEXTURE_SWIZZLE_B_EXT"/>
+        <enum value="0x8E45" name="GL_TEXTURE_SWIZZLE_A"/>
+        <enum value="0x8E45" name="GL_TEXTURE_SWIZZLE_A_EXT"/>
+        <enum value="0x8E46" name="GL_TEXTURE_SWIZZLE_RGBA"/>
+        <enum value="0x8E46" name="GL_TEXTURE_SWIZZLE_RGBA_EXT"/>
+        <enum value="0x8E47" name="GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS"/>
+        <enum value="0x8E48" name="GL_ACTIVE_SUBROUTINE_MAX_LENGTH"/>
+        <enum value="0x8E49" name="GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH"/>
+        <enum value="0x8E4A" name="GL_NUM_COMPATIBLE_SUBROUTINES"/>
+        <enum value="0x8E4B" name="GL_COMPATIBLE_SUBROUTINES"/>
+        <enum value="0x8E4C" name="GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION"/>
+        <enum value="0x8E4C" name="GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT"/>
+        <enum value="0x8E4D" name="GL_FIRST_VERTEX_CONVENTION"/>
+        <enum value="0x8E4D" name="GL_FIRST_VERTEX_CONVENTION_EXT"/>
+        <enum value="0x8E4E" name="GL_LAST_VERTEX_CONVENTION"/>
+        <enum value="0x8E4E" name="GL_LAST_VERTEX_CONVENTION_EXT"/>
+        <enum value="0x8E4F" name="GL_PROVOKING_VERTEX"/>
+        <enum value="0x8E4F" name="GL_PROVOKING_VERTEX_EXT"/>
+        <enum value="0x8E50" name="GL_SAMPLE_POSITION"/>
+        <enum value="0x8E50" name="GL_SAMPLE_POSITION_NV"/>
+        <enum value="0x8E51" name="GL_SAMPLE_MASK"/>
+        <enum value="0x8E51" name="GL_SAMPLE_MASK_NV"/>
+        <enum value="0x8E52" name="GL_SAMPLE_MASK_VALUE"/>
+        <enum value="0x8E52" name="GL_SAMPLE_MASK_VALUE_NV"/>
+        <enum value="0x8E53" name="GL_TEXTURE_BINDING_RENDERBUFFER_NV"/>
+        <enum value="0x8E54" name="GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV"/>
+        <enum value="0x8E55" name="GL_TEXTURE_RENDERBUFFER_NV"/>
+        <enum value="0x8E56" name="GL_SAMPLER_RENDERBUFFER_NV"/>
+        <enum value="0x8E57" name="GL_INT_SAMPLER_RENDERBUFFER_NV"/>
+        <enum value="0x8E58" name="GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV"/>
+        <enum value="0x8E59" name="GL_MAX_SAMPLE_MASK_WORDS"/>
+        <enum value="0x8E59" name="GL_MAX_SAMPLE_MASK_WORDS_NV"/>
+        <enum value="0x8E5A" name="GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV"/>
+        <enum value="0x8E5A" name="GL_MAX_GEOMETRY_SHADER_INVOCATIONS"/>
+        <enum value="0x8E5A" name="GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT"/>                 
+        <enum value="0x8E5B" name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET"/>
+        <enum value="0x8E5B" name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES"/>
+        <enum value="0x8E5B" name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV"/>
+        <enum value="0x8E5C" name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET"/>
+        <enum value="0x8E5C" name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES"/>
+        <enum value="0x8E5C" name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV"/>
+        <enum value="0x8E5D" name="GL_FRAGMENT_INTERPOLATION_OFFSET_BITS"/>
+        <enum value="0x8E5D" name="GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES"/>
+        <enum value="0x8E5D" name="GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV"/>
+        <enum value="0x8E5E" name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET"/>
+        <enum value="0x8E5E" name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB"/>
+        <enum value="0x8E5E" name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV"/>
+        <enum value="0x8E5F" name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET"/>
+        <enum value="0x8E5F" name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB"/>
+        <enum value="0x8E5F" name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV"/>
+            <unused start="0x8E60" end="0x8E6F"/>
+        <enum value="0x8E70" name="GL_MAX_TRANSFORM_FEEDBACK_BUFFERS"/>
+        <enum value="0x8E71" name="GL_MAX_VERTEX_STREAMS"/>
+        <enum value="0x8E72" name="GL_PATCH_VERTICES"/>
+        <enum value="0x8E72" name="GL_PATCH_VERTICES_EXT"/>
+        <enum value="0x8E73" name="GL_PATCH_DEFAULT_INNER_LEVEL"/>
+        <enum value="0x8E73" name="GL_PATCH_DEFAULT_INNER_LEVEL_EXT"/>
+        <enum value="0x8E74" name="GL_PATCH_DEFAULT_OUTER_LEVEL"/>
+        <enum value="0x8E74" name="GL_PATCH_DEFAULT_OUTER_LEVEL_EXT"/>
+        <enum value="0x8E75" name="GL_TESS_CONTROL_OUTPUT_VERTICES"/>
+        <enum value="0x8E75" name="GL_TESS_CONTROL_OUTPUT_VERTICES_EXT"/>
+        <enum value="0x8E76" name="GL_TESS_GEN_MODE"/>
+        <enum value="0x8E76" name="GL_TESS_GEN_MODE_EXT"/>
+        <enum value="0x8E77" name="GL_TESS_GEN_SPACING"/>
+        <enum value="0x8E77" name="GL_TESS_GEN_SPACING_EXT"/>
+        <enum value="0x8E78" name="GL_TESS_GEN_VERTEX_ORDER"/>
+        <enum value="0x8E78" name="GL_TESS_GEN_VERTEX_ORDER_EXT"/>
+        <enum value="0x8E79" name="GL_TESS_GEN_POINT_MODE"/>
+        <enum value="0x8E79" name="GL_TESS_GEN_POINT_MODE_EXT"/>
+        <enum value="0x8E7A" name="GL_ISOLINES"/>
+        <enum value="0x8E7A" name="GL_ISOLINES_EXT"/>
+        <enum value="0x8E7B" name="GL_FRACTIONAL_ODD"/>
+        <enum value="0x8E7B" name="GL_FRACTIONAL_ODD_EXT"/>
+        <enum value="0x8E7C" name="GL_FRACTIONAL_EVEN"/>
+        <enum value="0x8E7C" name="GL_FRACTIONAL_EVEN_EXT"/>
+        <enum value="0x8E7D" name="GL_MAX_PATCH_VERTICES"/>
+        <enum value="0x8E7D" name="GL_MAX_PATCH_VERTICES_EXT"/>
+        <enum value="0x8E7E" name="GL_MAX_TESS_GEN_LEVEL"/>
+        <enum value="0x8E7E" name="GL_MAX_TESS_GEN_LEVEL_EXT"/>
+        <enum value="0x8E7F" name="GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+        <enum value="0x8E7F" name="GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT"/>
+        <enum value="0x8E80" name="GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+        <enum value="0x8E80" name="GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT"/>
+        <enum value="0x8E81" name="GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x8E81" name="GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT"/>
+        <enum value="0x8E82" name="GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x8E82" name="GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT"/>
+        <enum value="0x8E83" name="GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS"/>
+        <enum value="0x8E83" name="GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT"/>
+        <enum value="0x8E84" name="GL_MAX_TESS_PATCH_COMPONENTS"/>
+        <enum value="0x8E84" name="GL_MAX_TESS_PATCH_COMPONENTS_EXT"/>
+        <enum value="0x8E85" name="GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS"/>
+        <enum value="0x8E85" name="GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT"/>
+        <enum value="0x8E86" name="GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS"/>
+        <enum value="0x8E86" name="GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT"/>
+        <enum value="0x8E87" name="GL_TESS_EVALUATION_SHADER"/>
+        <enum value="0x8E87" name="GL_TESS_EVALUATION_SHADER_EXT"/>
+        <enum value="0x8E88" name="GL_TESS_CONTROL_SHADER"/>
+        <enum value="0x8E88" name="GL_TESS_CONTROL_SHADER_EXT"/>
+        <enum value="0x8E89" name="GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS"/>
+        <enum value="0x8E89" name="GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT"/>
+        <enum value="0x8E8A" name="GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS"/>
+        <enum value="0x8E8A" name="GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT"/>
+            <unused start="0x8E8B"/>
+        <enum value="0x8E8C" name="GL_COMPRESSED_RGBA_BPTC_UNORM"/>
+        <enum value="0x8E8C" name="GL_COMPRESSED_RGBA_BPTC_UNORM_ARB"/>
+        <enum value="0x8E8D" name="GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM"/>
+        <enum value="0x8E8D" name="GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB"/>
+        <enum value="0x8E8E" name="GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT"/>
+        <enum value="0x8E8E" name="GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB"/>
+        <enum value="0x8E8F" name="GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT"/>
+        <enum value="0x8E8F" name="GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8E90" end="0x8E9F" vendor="QNX" comment="For QNX_texture_tiling, QNX_complex_polygon, QNX_stippled_lines (Khronos bug 696)">
+            <unused start="0x8E90" end="0x8E9F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8EA0" end="0x8EAF" vendor="IMG"/>
+
+    <enums namespace="GL" start="0x8EB0" end="0x8EBF" vendor="OES" comment="For Affie Munshi 2007/07/20"/>
+
+    <enums namespace="GL" start="0x8EC0" end="0x8ECF" vendor="Vincent"/>
+
+    <enums namespace="GL" start="0x8ED0" end="0x8F4F" vendor="NV" comment="For Pat Brown, Khronos bug 3191">
+        <enum value="0x8ED0" name="GL_COVERAGE_COMPONENT_NV"/>
+        <enum value="0x8ED1" name="GL_COVERAGE_COMPONENT4_NV"/>
+        <enum value="0x8ED2" name="GL_COVERAGE_ATTACHMENT_NV"/>
+        <enum value="0x8ED3" name="GL_COVERAGE_BUFFERS_NV"/>
+        <enum value="0x8ED4" name="GL_COVERAGE_SAMPLES_NV"/>
+        <enum value="0x8ED5" name="GL_COVERAGE_ALL_FRAGMENTS_NV"/>
+        <enum value="0x8ED6" name="GL_COVERAGE_EDGE_FRAGMENTS_NV"/>
+        <enum value="0x8ED7" name="GL_COVERAGE_AUTOMATIC_NV"/>
+            <unused start="0x8ED8" end="0x8F1C"/>
+        <enum value="0x8F1D" name="GL_BUFFER_GPU_ADDRESS_NV"/>
+        <enum value="0x8F1E" name="GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV"/>
+        <enum value="0x8F1F" name="GL_ELEMENT_ARRAY_UNIFIED_NV"/>
+        <enum value="0x8F20" name="GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F21" name="GL_VERTEX_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F22" name="GL_NORMAL_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F23" name="GL_COLOR_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F24" name="GL_INDEX_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F25" name="GL_TEXTURE_COORD_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F26" name="GL_EDGE_FLAG_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F27" name="GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F28" name="GL_FOG_COORD_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F29" name="GL_ELEMENT_ARRAY_ADDRESS_NV"/>
+        <enum value="0x8F2A" name="GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F2B" name="GL_VERTEX_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F2C" name="GL_NORMAL_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F2D" name="GL_COLOR_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F2E" name="GL_INDEX_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F2F" name="GL_TEXTURE_COORD_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F30" name="GL_EDGE_FLAG_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F31" name="GL_SECONDARY_COLOR_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F32" name="GL_FOG_COORD_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F33" name="GL_ELEMENT_ARRAY_LENGTH_NV"/>
+        <enum value="0x8F34" name="GL_GPU_ADDRESS_NV"/>
+        <enum value="0x8F35" name="GL_MAX_SHADER_BUFFER_ADDRESS_NV"/>
+        <enum value="0x8F36" name="GL_COPY_READ_BUFFER"/>
+        <enum value="0x8F36" name="GL_COPY_READ_BUFFER_NV"/>
+        <enum value="0x8F36" name="GL_COPY_READ_BUFFER_BINDING" alias="GL_COPY_READ_BUFFER"/>
+        <enum value="0x8F37" name="GL_COPY_WRITE_BUFFER"/>
+        <enum value="0x8F37" name="GL_COPY_WRITE_BUFFER_NV"/>
+        <enum value="0x8F37" name="GL_COPY_WRITE_BUFFER_BINDING" alias="GL_COPY_WRITE_BUFFER"/>
+        <enum value="0x8F38" name="GL_MAX_IMAGE_UNITS"/>
+        <enum value="0x8F38" name="GL_MAX_IMAGE_UNITS_EXT"/>
+        <enum value="0x8F39" name="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS"/>
+        <enum value="0x8F39" name="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT"/>
+        <enum value="0x8F39" name="GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES" alias="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS"/>
+        <enum value="0x8F3A" name="GL_IMAGE_BINDING_NAME"/>
+        <enum value="0x8F3A" name="GL_IMAGE_BINDING_NAME_EXT"/>
+        <enum value="0x8F3B" name="GL_IMAGE_BINDING_LEVEL"/>
+        <enum value="0x8F3B" name="GL_IMAGE_BINDING_LEVEL_EXT"/>
+        <enum value="0x8F3C" name="GL_IMAGE_BINDING_LAYERED"/>
+        <enum value="0x8F3C" name="GL_IMAGE_BINDING_LAYERED_EXT"/>
+        <enum value="0x8F3D" name="GL_IMAGE_BINDING_LAYER"/>
+        <enum value="0x8F3D" name="GL_IMAGE_BINDING_LAYER_EXT"/>
+        <enum value="0x8F3E" name="GL_IMAGE_BINDING_ACCESS"/>
+        <enum value="0x8F3E" name="GL_IMAGE_BINDING_ACCESS_EXT"/>
+        <enum value="0x8F3F" name="GL_DRAW_INDIRECT_BUFFER"/>
+        <enum value="0x8F40" name="GL_DRAW_INDIRECT_UNIFIED_NV"/>
+        <enum value="0x8F41" name="GL_DRAW_INDIRECT_ADDRESS_NV"/>
+        <enum value="0x8F42" name="GL_DRAW_INDIRECT_LENGTH_NV"/>
+        <enum value="0x8F43" name="GL_DRAW_INDIRECT_BUFFER_BINDING"/>
+        <enum value="0x8F44" name="GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV"/>
+        <enum value="0x8F45" name="GL_MAX_PROGRAM_SUBROUTINE_NUM_NV"/>
+        <enum value="0x8F46" name="GL_DOUBLE_MAT2"/>
+        <enum value="0x8F46" name="GL_DOUBLE_MAT2_EXT"/>
+        <enum value="0x8F47" name="GL_DOUBLE_MAT3"/>
+        <enum value="0x8F47" name="GL_DOUBLE_MAT3_EXT"/>
+        <enum value="0x8F48" name="GL_DOUBLE_MAT4"/>
+        <enum value="0x8F48" name="GL_DOUBLE_MAT4_EXT"/>
+        <enum value="0x8F49" name="GL_DOUBLE_MAT2x3"/>
+        <enum value="0x8F49" name="GL_DOUBLE_MAT2x3_EXT"/>
+        <enum value="0x8F4A" name="GL_DOUBLE_MAT2x4"/>
+        <enum value="0x8F4A" name="GL_DOUBLE_MAT2x4_EXT"/>
+        <enum value="0x8F4B" name="GL_DOUBLE_MAT3x2"/>
+        <enum value="0x8F4B" name="GL_DOUBLE_MAT3x2_EXT"/>
+        <enum value="0x8F4C" name="GL_DOUBLE_MAT3x4"/>
+        <enum value="0x8F4C" name="GL_DOUBLE_MAT3x4_EXT"/>
+        <enum value="0x8F4D" name="GL_DOUBLE_MAT4x2"/>
+        <enum value="0x8F4D" name="GL_DOUBLE_MAT4x2_EXT"/>
+        <enum value="0x8F4E" name="GL_DOUBLE_MAT4x3"/>
+        <enum value="0x8F4E" name="GL_DOUBLE_MAT4x3_EXT"/>
+        <enum value="0x8F4F" name="GL_VERTEX_BINDING_BUFFER"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8F50" end="0x8F5F" vendor="ZiiLabs" comment="For Jon Kennedy, Khronos public bug 75"/>
+
+    <enums namespace="GL" start="0x8F60" end="0x8F6F" vendor="ARM" comment="For Remi Pedersen, Khronos bug 3745">
+        <enum value="0x8F60" name="GL_MALI_SHADER_BINARY_ARM"/>
+        <enum value="0x8F61" name="GL_MALI_PROGRAM_BINARY_ARM"/>
+            <unused start="0x8F62"/>
+        <enum value="0x8F63" name="GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT"/>
+        <enum value="0x8F64" name="GL_SHADER_PIXEL_LOCAL_STORAGE_EXT"/>
+        <enum value="0x8F65" name="GL_FETCH_PER_SAMPLE_ARM"/>
+        <enum value="0x8F66" name="GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM"/>
+        <enum value="0x8F67" name="GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT"/>
+            <unused start="0x8F68" end="0x8F6F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8F70" end="0x8F7F" vendor="HI" comment="For Mark Callow, Khronos bug 4055. Shared with EGL."/>
+
+    <enums namespace="GL" start="0x8F80" end="0x8F8F" vendor="Zebra" comment="For Mike Weiblen, public bug 910"/>
+
+    <enums namespace="GL" start="0x8F90" end="0x8F9F" vendor="ARB">
+        <enum value="0x8F90" name="GL_RED_SNORM"/>
+        <enum value="0x8F91" name="GL_RG_SNORM"/>
+        <enum value="0x8F92" name="GL_RGB_SNORM"/>
+        <enum value="0x8F93" name="GL_RGBA_SNORM"/>
+        <enum value="0x8F94" name="GL_R8_SNORM"/>
+        <enum value="0x8F95" name="GL_RG8_SNORM"/>
+        <enum value="0x8F96" name="GL_RGB8_SNORM"/>
+        <enum value="0x8F97" name="GL_RGBA8_SNORM"/>
+        <enum value="0x8F98" name="GL_R16_SNORM"/>
+        <enum value="0x8F99" name="GL_RG16_SNORM"/>
+        <enum value="0x8F9A" name="GL_RGB16_SNORM"/>
+        <enum value="0x8F9B" name="GL_RGBA16_SNORM"/>
+        <enum value="0x8F9C" name="GL_SIGNED_NORMALIZED"/>
+        <enum value="0x8F9D" name="GL_PRIMITIVE_RESTART"/>
+        <enum value="0x8F9E" name="GL_PRIMITIVE_RESTART_INDEX"/>
+        <enum value="0x8F9F" name="GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8FA0" end="0x8FBF" vendor="QCOM" comment="For Maurice Ribble, bug 4512">
+        <enum value="0x8FA0" name="GL_PERFMON_GLOBAL_MODE_QCOM"/>
+            <unused start="0x8FA1" end="0x8FAF"/>
+        <enum value="0x8FB0" name="GL_BINNING_CONTROL_HINT_QCOM"/>
+        <enum value="0x8FB1" name="GL_CPU_OPTIMIZED_QCOM"/>
+        <enum value="0x8FB2" name="GL_GPU_OPTIMIZED_QCOM"/>
+        <enum value="0x8FB3" name="GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM"/>
+            <unused start="0x8FB4" end="0x8FBA"/>
+        <enum value="0x8FBB" name="GL_GPU_DISJOINT_EXT"/>
+            <unused start="0x8FBC" end="0x8FBF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8FC0" end="0x8FDF" vendor="VIV" comment="For Frido Garritsen, bug 4526">
+        <enum value="0x8FC4" name="GL_SHADER_BINARY_VIV"/>
+    </enums>
+
+    <enums namespace="GL" start="0x8FE0" end="0x8FFF" vendor="NV" comment="For Pat Brown, bug 4935">
+        <enum value="0x8FE0" name="GL_INT8_NV"/>
+        <enum value="0x8FE1" name="GL_INT8_VEC2_NV"/>
+        <enum value="0x8FE2" name="GL_INT8_VEC3_NV"/>
+        <enum value="0x8FE3" name="GL_INT8_VEC4_NV"/>
+        <enum value="0x8FE4" name="GL_INT16_NV"/>
+        <enum value="0x8FE5" name="GL_INT16_VEC2_NV"/>
+        <enum value="0x8FE6" name="GL_INT16_VEC3_NV"/>
+        <enum value="0x8FE7" name="GL_INT16_VEC4_NV"/>
+        <enum value="0x8FE9" name="GL_INT64_VEC2_NV"/>
+        <enum value="0x8FEA" name="GL_INT64_VEC3_NV"/>
+        <enum value="0x8FEB" name="GL_INT64_VEC4_NV"/>
+        <enum value="0x8FEC" name="GL_UNSIGNED_INT8_NV"/>
+        <enum value="0x8FED" name="GL_UNSIGNED_INT8_VEC2_NV"/>
+        <enum value="0x8FEE" name="GL_UNSIGNED_INT8_VEC3_NV"/>
+        <enum value="0x8FEF" name="GL_UNSIGNED_INT8_VEC4_NV"/>
+        <enum value="0x8FF0" name="GL_UNSIGNED_INT16_NV"/>
+        <enum value="0x8FF1" name="GL_UNSIGNED_INT16_VEC2_NV"/>
+        <enum value="0x8FF2" name="GL_UNSIGNED_INT16_VEC3_NV"/>
+        <enum value="0x8FF3" name="GL_UNSIGNED_INT16_VEC4_NV"/>
+        <enum value="0x8FF5" name="GL_UNSIGNED_INT64_VEC2_NV"/>
+        <enum value="0x8FF6" name="GL_UNSIGNED_INT64_VEC3_NV"/>
+        <enum value="0x8FF7" name="GL_UNSIGNED_INT64_VEC4_NV"/>
+        <enum value="0x8FF8" name="GL_FLOAT16_NV"/>
+        <enum value="0x8FF9" name="GL_FLOAT16_VEC2_NV"/>
+        <enum value="0x8FFA" name="GL_FLOAT16_VEC3_NV"/>
+        <enum value="0x8FFB" name="GL_FLOAT16_VEC4_NV"/>
+        <enum value="0x8FFC" name="GL_DOUBLE_VEC2"/>
+        <enum value="0x8FFC" name="GL_DOUBLE_VEC2_EXT"/>
+        <enum value="0x8FFD" name="GL_DOUBLE_VEC3"/>
+        <enum value="0x8FFD" name="GL_DOUBLE_VEC3_EXT"/>
+        <enum value="0x8FFE" name="GL_DOUBLE_VEC4"/>
+        <enum value="0x8FFE" name="GL_DOUBLE_VEC4_EXT"/>
+            <unused start="0x8FFF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9000" end="0x901F" vendor="AMD" comment="For Bill Licea-Kane">
+        <enum value="0x9001" name="GL_SAMPLER_BUFFER_AMD"/>
+        <enum value="0x9002" name="GL_INT_SAMPLER_BUFFER_AMD"/>
+        <enum value="0x9003" name="GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD"/>
+        <enum value="0x9004" name="GL_TESSELLATION_MODE_AMD"/>
+        <enum value="0x9005" name="GL_TESSELLATION_FACTOR_AMD"/>
+        <enum value="0x9006" name="GL_DISCRETE_AMD"/>
+        <enum value="0x9007" name="GL_CONTINUOUS_AMD"/>
+            <unused start="0x9008"/>
+        <enum value="0x9009" name="GL_TEXTURE_CUBE_MAP_ARRAY"/>
+        <enum value="0x9009" name="GL_TEXTURE_CUBE_MAP_ARRAY_ARB"/>
+        <enum value="0x9009" name="GL_TEXTURE_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x900A" name="GL_TEXTURE_BINDING_CUBE_MAP_ARRAY"/>
+        <enum value="0x900A" name="GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB"/>
+        <enum value="0x900A" name="GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x900B" name="GL_PROXY_TEXTURE_CUBE_MAP_ARRAY"/>
+        <enum value="0x900B" name="GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB"/>
+        <enum value="0x900C" name="GL_SAMPLER_CUBE_MAP_ARRAY"/>
+        <enum value="0x900C" name="GL_SAMPLER_CUBE_MAP_ARRAY_ARB"/>
+        <enum value="0x900C" name="GL_SAMPLER_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x900D" name="GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW"/>
+        <enum value="0x900D" name="GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB"/>
+        <enum value="0x900D" name="GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT"/>
+        <enum value="0x900E" name="GL_INT_SAMPLER_CUBE_MAP_ARRAY"/>
+        <enum value="0x900E" name="GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB"/>
+        <enum value="0x900E" name="GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x900F" name="GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY"/>
+        <enum value="0x900F" name="GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB"/>
+        <enum value="0x900F" name="GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x9010" name="GL_ALPHA_SNORM"/>
+        <enum value="0x9011" name="GL_LUMINANCE_SNORM"/>
+        <enum value="0x9012" name="GL_LUMINANCE_ALPHA_SNORM"/>
+        <enum value="0x9013" name="GL_INTENSITY_SNORM"/>
+        <enum value="0x9014" name="GL_ALPHA8_SNORM"/>
+        <enum value="0x9015" name="GL_LUMINANCE8_SNORM"/>
+        <enum value="0x9016" name="GL_LUMINANCE8_ALPHA8_SNORM"/>
+        <enum value="0x9017" name="GL_INTENSITY8_SNORM"/>
+        <enum value="0x9018" name="GL_ALPHA16_SNORM"/>
+        <enum value="0x9019" name="GL_LUMINANCE16_SNORM"/>
+        <enum value="0x901A" name="GL_LUMINANCE16_ALPHA16_SNORM"/>
+        <enum value="0x901B" name="GL_INTENSITY16_SNORM"/>
+        <enum value="0x901C" name="GL_FACTOR_MIN_AMD"/>
+        <enum value="0x901D" name="GL_FACTOR_MAX_AMD"/>
+        <enum value="0x901E" name="GL_DEPTH_CLAMP_NEAR_AMD"/>
+        <enum value="0x901F" name="GL_DEPTH_CLAMP_FAR_AMD"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9020" end="0x90FF" vendor="NV" comment="For Pat Brown, bug 4935">
+        <enum value="0x9020" name="GL_VIDEO_BUFFER_NV"/>
+        <enum value="0x9021" name="GL_VIDEO_BUFFER_BINDING_NV"/>
+        <enum value="0x9022" name="GL_FIELD_UPPER_NV"/>
+        <enum value="0x9023" name="GL_FIELD_LOWER_NV"/>
+        <enum value="0x9024" name="GL_NUM_VIDEO_CAPTURE_STREAMS_NV"/>
+        <enum value="0x9025" name="GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV"/>
+        <enum value="0x9026" name="GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV"/>
+        <enum value="0x9027" name="GL_LAST_VIDEO_CAPTURE_STATUS_NV"/>
+        <enum value="0x9028" name="GL_VIDEO_BUFFER_PITCH_NV"/>
+        <enum value="0x9029" name="GL_VIDEO_COLOR_CONVERSION_MATRIX_NV"/>
+        <enum value="0x902A" name="GL_VIDEO_COLOR_CONVERSION_MAX_NV"/>
+        <enum value="0x902B" name="GL_VIDEO_COLOR_CONVERSION_MIN_NV"/>
+        <enum value="0x902C" name="GL_VIDEO_COLOR_CONVERSION_OFFSET_NV"/>
+        <enum value="0x902D" name="GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV"/>
+        <enum value="0x902E" name="GL_PARTIAL_SUCCESS_NV"/>
+        <enum value="0x902F" name="GL_SUCCESS_NV"/>
+        <enum value="0x9030" name="GL_FAILURE_NV"/>
+        <enum value="0x9031" name="GL_YCBYCR8_422_NV"/>
+        <enum value="0x9032" name="GL_YCBAYCR8A_4224_NV"/>
+        <enum value="0x9033" name="GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV"/>
+        <enum value="0x9034" name="GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV"/>
+        <enum value="0x9035" name="GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV"/>
+        <enum value="0x9036" name="GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV"/>
+        <enum value="0x9037" name="GL_Z4Y12Z4CB12Z4CR12_444_NV"/>
+        <enum value="0x9038" name="GL_VIDEO_CAPTURE_FRAME_WIDTH_NV"/>
+        <enum value="0x9039" name="GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV"/>
+        <enum value="0x903A" name="GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV"/>
+        <enum value="0x903B" name="GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV"/>
+        <enum value="0x903C" name="GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV"/>
+            <unused start="0x903D" end="0x9044"/>
+        <enum value="0x9045" name="GL_TEXTURE_COVERAGE_SAMPLES_NV"/>
+        <enum value="0x9046" name="GL_TEXTURE_COLOR_SAMPLES_NV"/>
+        <enum value="0x9047" name="GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX"/>
+        <enum value="0x9048" name="GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX"/>
+        <enum value="0x9049" name="GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX"/>
+        <enum value="0x904A" name="GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX"/>
+        <enum value="0x904B" name="GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX"/>
+        <enum value="0x904C" name="GL_IMAGE_1D"/>
+        <enum value="0x904C" name="GL_IMAGE_1D_EXT"/>
+        <enum value="0x904D" name="GL_IMAGE_2D"/>
+        <enum value="0x904D" name="GL_IMAGE_2D_EXT"/>
+        <enum value="0x904E" name="GL_IMAGE_3D"/>
+        <enum value="0x904E" name="GL_IMAGE_3D_EXT"/>
+        <enum value="0x904F" name="GL_IMAGE_2D_RECT"/>
+        <enum value="0x904F" name="GL_IMAGE_2D_RECT_EXT"/>
+        <enum value="0x9050" name="GL_IMAGE_CUBE"/>
+        <enum value="0x9050" name="GL_IMAGE_CUBE_EXT"/>
+        <enum value="0x9051" name="GL_IMAGE_BUFFER"/>
+        <enum value="0x9051" name="GL_IMAGE_BUFFER_EXT"/>
+        <enum value="0x9052" name="GL_IMAGE_1D_ARRAY"/>
+        <enum value="0x9052" name="GL_IMAGE_1D_ARRAY_EXT"/>
+        <enum value="0x9053" name="GL_IMAGE_2D_ARRAY"/>
+        <enum value="0x9053" name="GL_IMAGE_2D_ARRAY_EXT"/>
+        <enum value="0x9054" name="GL_IMAGE_CUBE_MAP_ARRAY"/>
+        <enum value="0x9054" name="GL_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x9055" name="GL_IMAGE_2D_MULTISAMPLE"/>
+        <enum value="0x9055" name="GL_IMAGE_2D_MULTISAMPLE_EXT"/>
+        <enum value="0x9056" name="GL_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x9056" name="GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT"/>
+        <enum value="0x9057" name="GL_INT_IMAGE_1D"/>
+        <enum value="0x9057" name="GL_INT_IMAGE_1D_EXT"/>
+        <enum value="0x9058" name="GL_INT_IMAGE_2D"/>
+        <enum value="0x9058" name="GL_INT_IMAGE_2D_EXT"/>
+        <enum value="0x9059" name="GL_INT_IMAGE_3D"/>
+        <enum value="0x9059" name="GL_INT_IMAGE_3D_EXT"/>
+        <enum value="0x905A" name="GL_INT_IMAGE_2D_RECT"/>
+        <enum value="0x905A" name="GL_INT_IMAGE_2D_RECT_EXT"/>
+        <enum value="0x905B" name="GL_INT_IMAGE_CUBE"/>
+        <enum value="0x905B" name="GL_INT_IMAGE_CUBE_EXT"/>
+        <enum value="0x905C" name="GL_INT_IMAGE_BUFFER"/>
+        <enum value="0x905C" name="GL_INT_IMAGE_BUFFER_EXT"/>
+        <enum value="0x905D" name="GL_INT_IMAGE_1D_ARRAY"/>
+        <enum value="0x905D" name="GL_INT_IMAGE_1D_ARRAY_EXT"/>
+        <enum value="0x905E" name="GL_INT_IMAGE_2D_ARRAY"/>
+        <enum value="0x905E" name="GL_INT_IMAGE_2D_ARRAY_EXT"/>
+        <enum value="0x905F" name="GL_INT_IMAGE_CUBE_MAP_ARRAY"/>
+        <enum value="0x905F" name="GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x9060" name="GL_INT_IMAGE_2D_MULTISAMPLE"/>
+        <enum value="0x9060" name="GL_INT_IMAGE_2D_MULTISAMPLE_EXT"/>
+        <enum value="0x9061" name="GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x9061" name="GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT"/>
+        <enum value="0x9062" name="GL_UNSIGNED_INT_IMAGE_1D"/>
+        <enum value="0x9062" name="GL_UNSIGNED_INT_IMAGE_1D_EXT"/>
+        <enum value="0x9063" name="GL_UNSIGNED_INT_IMAGE_2D"/>
+        <enum value="0x9063" name="GL_UNSIGNED_INT_IMAGE_2D_EXT"/>
+        <enum value="0x9064" name="GL_UNSIGNED_INT_IMAGE_3D"/>
+        <enum value="0x9064" name="GL_UNSIGNED_INT_IMAGE_3D_EXT"/>
+        <enum value="0x9065" name="GL_UNSIGNED_INT_IMAGE_2D_RECT"/>
+        <enum value="0x9065" name="GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT"/>
+        <enum value="0x9066" name="GL_UNSIGNED_INT_IMAGE_CUBE"/>
+        <enum value="0x9066" name="GL_UNSIGNED_INT_IMAGE_CUBE_EXT"/>
+        <enum value="0x9067" name="GL_UNSIGNED_INT_IMAGE_BUFFER"/>
+        <enum value="0x9067" name="GL_UNSIGNED_INT_IMAGE_BUFFER_EXT"/>
+        <enum value="0x9068" name="GL_UNSIGNED_INT_IMAGE_1D_ARRAY"/>
+        <enum value="0x9068" name="GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT"/>
+        <enum value="0x9069" name="GL_UNSIGNED_INT_IMAGE_2D_ARRAY"/>
+        <enum value="0x9069" name="GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT"/>
+        <enum value="0x906A" name="GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY"/>
+        <enum value="0x906A" name="GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+        <enum value="0x906B" name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE"/>
+        <enum value="0x906B" name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT"/>
+        <enum value="0x906C" name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x906C" name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT"/>
+        <enum value="0x906D" name="GL_MAX_IMAGE_SAMPLES"/>
+        <enum value="0x906D" name="GL_MAX_IMAGE_SAMPLES_EXT"/>
+        <enum value="0x906E" name="GL_IMAGE_BINDING_FORMAT"/>
+        <enum value="0x906E" name="GL_IMAGE_BINDING_FORMAT_EXT"/>
+        <enum value="0x906F" name="GL_RGB10_A2UI"/>
+        <enum value="0x9070" name="GL_PATH_FORMAT_SVG_NV"/>
+        <enum value="0x9071" name="GL_PATH_FORMAT_PS_NV"/>
+        <enum value="0x9072" name="GL_STANDARD_FONT_NAME_NV"/>
+        <enum value="0x9073" name="GL_SYSTEM_FONT_NAME_NV"/>
+        <enum value="0x9074" name="GL_FILE_NAME_NV"/>
+        <enum value="0x9075" name="GL_PATH_STROKE_WIDTH_NV"/>
+        <enum value="0x9076" name="GL_PATH_END_CAPS_NV"/>
+        <enum value="0x9077" name="GL_PATH_INITIAL_END_CAP_NV"/>
+        <enum value="0x9078" name="GL_PATH_TERMINAL_END_CAP_NV"/>
+        <enum value="0x9079" name="GL_PATH_JOIN_STYLE_NV"/>
+        <enum value="0x907A" name="GL_PATH_MITER_LIMIT_NV"/>
+        <enum value="0x907B" name="GL_PATH_DASH_CAPS_NV"/>
+        <enum value="0x907C" name="GL_PATH_INITIAL_DASH_CAP_NV"/>
+        <enum value="0x907D" name="GL_PATH_TERMINAL_DASH_CAP_NV"/>
+        <enum value="0x907E" name="GL_PATH_DASH_OFFSET_NV"/>
+        <enum value="0x907F" name="GL_PATH_CLIENT_LENGTH_NV"/>
+        <enum value="0x9080" name="GL_PATH_FILL_MODE_NV"/>
+        <enum value="0x9081" name="GL_PATH_FILL_MASK_NV"/>
+        <enum value="0x9082" name="GL_PATH_FILL_COVER_MODE_NV"/>
+        <enum value="0x9083" name="GL_PATH_STROKE_COVER_MODE_NV"/>
+        <enum value="0x9084" name="GL_PATH_STROKE_MASK_NV"/>
+            <!-- <enum value="0x9085" name="GL_PATH_SAMPLE_QUALITY_NV"          comment="Removed from extension"/> -->
+            <!-- <enum value="0x9086" name="GL_PATH_STROKE_BOUND_NV"            comment="Removed from extension"/> -->
+            <!-- <enum value="0x9087" name="GL_PATH_STROKE_OVERSAMPLE_COUNT_NV" comment="Removed from extension"/> -->
+        <enum value="0x9088" name="GL_COUNT_UP_NV"/>
+        <enum value="0x9089" name="GL_COUNT_DOWN_NV"/>
+        <enum value="0x908A" name="GL_PATH_OBJECT_BOUNDING_BOX_NV"/>
+        <enum value="0x908B" name="GL_CONVEX_HULL_NV"/>
+            <!-- <enum value="0x908C" name="GL_MULTI_HULLS_NV"                  comment="Removed from extension"/> -->
+        <enum value="0x908D" name="GL_BOUNDING_BOX_NV"/>
+        <enum value="0x908E" name="GL_TRANSLATE_X_NV"/>
+        <enum value="0x908F" name="GL_TRANSLATE_Y_NV"/>
+        <enum value="0x9090" name="GL_TRANSLATE_2D_NV"/>
+        <enum value="0x9091" name="GL_TRANSLATE_3D_NV"/>
+        <enum value="0x9092" name="GL_AFFINE_2D_NV"/>
+            <!-- <enum value="0x9093" name="GL_PROJECTIVE_2D_NV"                comment="Removed from extension"/> -->
+        <enum value="0x9094" name="GL_AFFINE_3D_NV"/>
+            <!-- <enum value="0x9095" name="GL_PROJECTIVE_3D_NV"                comment="Removed from extension"/> -->
+        <enum value="0x9096" name="GL_TRANSPOSE_AFFINE_2D_NV"/>
+            <!-- <enum value="0x9097" name="GL_TRANSPOSE_PROJECTIVE_2D_NV"      comment="Removed from extension"/> -->
+        <enum value="0x9098" name="GL_TRANSPOSE_AFFINE_3D_NV"/>
+            <!-- <enum value="0x9099" name="GL_TRANSPOSE_PROJECTIVE_3D_NV"      comment="Removed from extension"/> -->
+        <enum value="0x909A" name="GL_UTF8_NV"/>
+        <enum value="0x909B" name="GL_UTF16_NV"/>
+        <enum value="0x909C" name="GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV"/>
+        <enum value="0x909D" name="GL_PATH_COMMAND_COUNT_NV"/>
+        <enum value="0x909E" name="GL_PATH_COORD_COUNT_NV"/>
+        <enum value="0x909F" name="GL_PATH_DASH_ARRAY_COUNT_NV"/>
+        <enum value="0x90A0" name="GL_PATH_COMPUTED_LENGTH_NV"/>
+        <enum value="0x90A1" name="GL_PATH_FILL_BOUNDING_BOX_NV"/>
+        <enum value="0x90A2" name="GL_PATH_STROKE_BOUNDING_BOX_NV"/>
+        <enum value="0x90A3" name="GL_SQUARE_NV"/>
+        <enum value="0x90A4" name="GL_ROUND_NV"/>
+        <enum value="0x90A5" name="GL_TRIANGULAR_NV"/>
+        <enum value="0x90A6" name="GL_BEVEL_NV"/>
+        <enum value="0x90A7" name="GL_MITER_REVERT_NV"/>
+        <enum value="0x90A8" name="GL_MITER_TRUNCATE_NV"/>
+        <enum value="0x90A9" name="GL_SKIP_MISSING_GLYPH_NV"/>
+        <enum value="0x90AA" name="GL_USE_MISSING_GLYPH_NV"/>
+        <enum value="0x90AB" name="GL_PATH_ERROR_POSITION_NV"/>
+        <enum value="0x90AC" name="GL_PATH_FOG_GEN_MODE_NV"/>
+        <enum value="0x90AD" name="GL_ACCUM_ADJACENT_PAIRS_NV"/>
+        <enum value="0x90AE" name="GL_ADJACENT_PAIRS_NV"/>
+        <enum value="0x90AF" name="GL_FIRST_TO_REST_NV"/>
+        <enum value="0x90B0" name="GL_PATH_GEN_MODE_NV"/>
+        <enum value="0x90B1" name="GL_PATH_GEN_COEFF_NV"/>
+        <enum value="0x90B2" name="GL_PATH_GEN_COLOR_FORMAT_NV"/>
+        <enum value="0x90B3" name="GL_PATH_GEN_COMPONENTS_NV"/>
+        <enum value="0x90B4" name="GL_PATH_DASH_OFFSET_RESET_NV"/>
+        <enum value="0x90B5" name="GL_MOVE_TO_RESETS_NV"/>
+        <enum value="0x90B6" name="GL_MOVE_TO_CONTINUES_NV"/>
+        <enum value="0x90B7" name="GL_PATH_STENCIL_FUNC_NV"/>
+        <enum value="0x90B8" name="GL_PATH_STENCIL_REF_NV"/>
+        <enum value="0x90B9" name="GL_PATH_STENCIL_VALUE_MASK_NV"/>
+        <enum value="0x90BA" name="GL_SCALED_RESOLVE_FASTEST_EXT"/>
+        <enum value="0x90BB" name="GL_SCALED_RESOLVE_NICEST_EXT"/>
+        <enum value="0x90BC" name="GL_MIN_MAP_BUFFER_ALIGNMENT"/>
+        <enum value="0x90BD" name="GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV"/>
+        <enum value="0x90BE" name="GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV"/>
+        <enum value="0x90BF" name="GL_PATH_COVER_DEPTH_FUNC_NV"/>
+            <unused start="0x90C0" end="0x90C6"/>
+        <enum value="0x90C7" name="GL_IMAGE_FORMAT_COMPATIBILITY_TYPE"/>
+        <enum value="0x90C8" name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE"/>
+        <enum value="0x90C9" name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS"/>
+        <enum value="0x90CA" name="GL_MAX_VERTEX_IMAGE_UNIFORMS"/>
+        <enum value="0x90CB" name="GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS"/>
+        <enum value="0x90CB" name="GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT"/>
+        <enum value="0x90CC" name="GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS"/>
+        <enum value="0x90CC" name="GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT"/>
+        <enum value="0x90CD" name="GL_MAX_GEOMETRY_IMAGE_UNIFORMS"/>
+        <enum value="0x90CD" name="GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT"/>
+        <enum value="0x90CE" name="GL_MAX_FRAGMENT_IMAGE_UNIFORMS"/>
+        <enum value="0x90CF" name="GL_MAX_COMBINED_IMAGE_UNIFORMS"/>
+        <enum value="0x90D0" name="GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV"/>
+        <enum value="0x90D1" name="GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV"/>
+        <enum value="0x90D2" name="GL_SHADER_STORAGE_BUFFER"/>
+        <enum value="0x90D3" name="GL_SHADER_STORAGE_BUFFER_BINDING"/>
+        <enum value="0x90D4" name="GL_SHADER_STORAGE_BUFFER_START"/>
+        <enum value="0x90D5" name="GL_SHADER_STORAGE_BUFFER_SIZE"/>
+        <enum value="0x90D6" name="GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90D7" name="GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90D7" name="GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT"/>
+        <enum value="0x90D8" name="GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90D8" name="GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT"/>
+        <enum value="0x90D9" name="GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90D9" name="GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT"/>
+        <enum value="0x90DA" name="GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90DB" name="GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90DC" name="GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS"/>
+        <enum value="0x90DD" name="GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS"/>
+        <enum value="0x90DE" name="GL_MAX_SHADER_STORAGE_BLOCK_SIZE"/>
+        <enum value="0x90DF" name="GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT"/>
+            <unused start="0x90E0"/>
+        <enum value="0x90E1" name="GL_SYNC_X11_FENCE_EXT"/>
+            <unused start="0x90E2" end="0x90E9"/>
+        <enum value="0x90EA" name="GL_DEPTH_STENCIL_TEXTURE_MODE"/>
+        <enum value="0x90EB" name="GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"/>
+        <enum value="0x90EB" name="GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB" alias="GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"/>
+        <enum value="0x90EC" name="GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER"/>
+        <enum value="0x90ED" name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER"/>
+        <enum value="0x90EE" name="GL_DISPATCH_INDIRECT_BUFFER"/>
+        <enum value="0x90EF" name="GL_DISPATCH_INDIRECT_BUFFER_BINDING"/>
+        <enum value="0x90F0" name="GL_COLOR_ATTACHMENT_EXT"/>
+        <enum value="0x90F1" name="GL_MULTIVIEW_EXT"/>
+        <enum value="0x90F2" name="GL_MAX_MULTIVIEW_BUFFERS_EXT"/>
+        <enum value="0x90F3" name="GL_CONTEXT_ROBUST_ACCESS_EXT"/>
+            <unused start="0x90F4" end="0x90FA"/>
+        <enum value="0x90FB" name="GL_COMPUTE_PROGRAM_NV"/>
+        <enum value="0x90FC" name="GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV"/>
+            <unused start="0x90FD" end="0x90FF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9100" end="0x912F" vendor="ARB">
+        <enum value="0x9100" name="GL_TEXTURE_2D_MULTISAMPLE"/>
+        <enum value="0x9101" name="GL_PROXY_TEXTURE_2D_MULTISAMPLE"/>
+        <enum value="0x9102" name="GL_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x9102" name="GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES"/>
+        <enum value="0x9103" name="GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x9104" name="GL_TEXTURE_BINDING_2D_MULTISAMPLE"/>
+        <enum value="0x9105" name="GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x9105" name="GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES"/>
+        <enum value="0x9106" name="GL_TEXTURE_SAMPLES"/>
+        <enum value="0x9107" name="GL_TEXTURE_FIXED_SAMPLE_LOCATIONS"/>
+        <enum value="0x9108" name="GL_SAMPLER_2D_MULTISAMPLE"/>
+        <enum value="0x9109" name="GL_INT_SAMPLER_2D_MULTISAMPLE"/>
+        <enum value="0x910A" name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE"/>
+        <enum value="0x910B" name="GL_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x910B" name="GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES"/>
+        <enum value="0x910C" name="GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x910C" name="GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES"/>
+        <enum value="0x910D" name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+        <enum value="0x910D" name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES"/>
+        <enum value="0x910E" name="GL_MAX_COLOR_TEXTURE_SAMPLES"/>
+        <enum value="0x910F" name="GL_MAX_DEPTH_TEXTURE_SAMPLES"/>
+        <enum value="0x9110" name="GL_MAX_INTEGER_SAMPLES"/>
+        <enum value="0x9111" name="GL_MAX_SERVER_WAIT_TIMEOUT"/>
+        <enum value="0x9111" name="GL_MAX_SERVER_WAIT_TIMEOUT_APPLE"/>
+        <enum value="0x9112" name="GL_OBJECT_TYPE"/>
+        <enum value="0x9112" name="GL_OBJECT_TYPE_APPLE"/>
+        <enum value="0x9113" name="GL_SYNC_CONDITION"/>
+        <enum value="0x9113" name="GL_SYNC_CONDITION_APPLE"/>
+        <enum value="0x9114" name="GL_SYNC_STATUS"/>
+        <enum value="0x9114" name="GL_SYNC_STATUS_APPLE"/>
+        <enum value="0x9115" name="GL_SYNC_FLAGS"/>
+        <enum value="0x9115" name="GL_SYNC_FLAGS_APPLE"/>
+        <enum value="0x9116" name="GL_SYNC_FENCE"/>
+        <enum value="0x9116" name="GL_SYNC_FENCE_APPLE"/>
+        <enum value="0x9117" name="GL_SYNC_GPU_COMMANDS_COMPLETE"/>
+        <enum value="0x9117" name="GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE"/>
+        <enum value="0x9118" name="GL_UNSIGNALED"/>
+        <enum value="0x9118" name="GL_UNSIGNALED_APPLE"/>
+        <enum value="0x9119" name="GL_SIGNALED"/>
+        <enum value="0x9119" name="GL_SIGNALED_APPLE"/>
+        <enum value="0x911A" name="GL_ALREADY_SIGNALED"/>
+        <enum value="0x911A" name="GL_ALREADY_SIGNALED_APPLE"/>
+        <enum value="0x911B" name="GL_TIMEOUT_EXPIRED"/>
+        <enum value="0x911B" name="GL_TIMEOUT_EXPIRED_APPLE"/>
+        <enum value="0x911C" name="GL_CONDITION_SATISFIED"/>
+        <enum value="0x911C" name="GL_CONDITION_SATISFIED_APPLE"/>
+        <enum value="0x911D" name="GL_WAIT_FAILED"/>
+        <enum value="0x911D" name="GL_WAIT_FAILED_APPLE"/>
+        <enum value="0x911F" name="GL_BUFFER_ACCESS_FLAGS"/>
+        <enum value="0x9120" name="GL_BUFFER_MAP_LENGTH"/>
+        <enum value="0x9121" name="GL_BUFFER_MAP_OFFSET"/>
+        <enum value="0x9122" name="GL_MAX_VERTEX_OUTPUT_COMPONENTS"/>
+        <enum value="0x9123" name="GL_MAX_GEOMETRY_INPUT_COMPONENTS"/>
+        <enum value="0x9123" name="GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT"/>
+        <enum value="0x9124" name="GL_MAX_GEOMETRY_OUTPUT_COMPONENTS"/>
+        <enum value="0x9124" name="GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT"/>
+        <enum value="0x9125" name="GL_MAX_FRAGMENT_INPUT_COMPONENTS"/>
+        <enum value="0x9126" name="GL_CONTEXT_PROFILE_MASK"/>
+        <enum value="0x9127" name="GL_UNPACK_COMPRESSED_BLOCK_WIDTH"/>
+        <enum value="0x9128" name="GL_UNPACK_COMPRESSED_BLOCK_HEIGHT"/>
+        <enum value="0x9129" name="GL_UNPACK_COMPRESSED_BLOCK_DEPTH"/>
+        <enum value="0x912A" name="GL_UNPACK_COMPRESSED_BLOCK_SIZE"/>
+        <enum value="0x912B" name="GL_PACK_COMPRESSED_BLOCK_WIDTH"/>
+        <enum value="0x912C" name="GL_PACK_COMPRESSED_BLOCK_HEIGHT"/>
+        <enum value="0x912D" name="GL_PACK_COMPRESSED_BLOCK_DEPTH"/>
+        <enum value="0x912E" name="GL_PACK_COMPRESSED_BLOCK_SIZE"/>
+        <enum value="0x912F" name="GL_TEXTURE_IMMUTABLE_FORMAT"/>
+        <enum value="0x912F" name="GL_TEXTURE_IMMUTABLE_FORMAT_EXT"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9130" end="0x913F" vendor="IMG" comment="Khronos bug 882">
+        <enum value="0x9130" name="GL_SGX_PROGRAM_BINARY_IMG"/>
+            <unused start="0x9131" end="0x9132"/>
+        <enum value="0x9133" name="GL_RENDERBUFFER_SAMPLES_IMG"/>
+        <enum value="0x9134" name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG"/>
+        <enum value="0x9135" name="GL_MAX_SAMPLES_IMG"/>
+        <enum value="0x9136" name="GL_TEXTURE_SAMPLES_IMG"/>
+        <enum value="0x9137" name="GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG"/>
+        <enum value="0x9138" name="GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG"/>
+            <unused start="0x9139" end="0x913F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9140" end="0x923F" vendor="AMD" comment="Khronos bugs 5899, 6004">
+            <unused start="0x9140" end="0x9142"/>
+        <enum value="0x9143" name="GL_MAX_DEBUG_MESSAGE_LENGTH"/>
+        <enum value="0x9143" name="GL_MAX_DEBUG_MESSAGE_LENGTH_AMD"/>
+        <enum value="0x9143" name="GL_MAX_DEBUG_MESSAGE_LENGTH_ARB"/>
+        <enum value="0x9143" name="GL_MAX_DEBUG_MESSAGE_LENGTH_KHR"/>
+        <enum value="0x9144" name="GL_MAX_DEBUG_LOGGED_MESSAGES"/>
+        <enum value="0x9144" name="GL_MAX_DEBUG_LOGGED_MESSAGES_AMD"/>
+        <enum value="0x9144" name="GL_MAX_DEBUG_LOGGED_MESSAGES_ARB"/>
+        <enum value="0x9144" name="GL_MAX_DEBUG_LOGGED_MESSAGES_KHR"/>
+        <enum value="0x9145" name="GL_DEBUG_LOGGED_MESSAGES"/>
+        <enum value="0x9145" name="GL_DEBUG_LOGGED_MESSAGES_AMD"/>
+        <enum value="0x9145" name="GL_DEBUG_LOGGED_MESSAGES_ARB"/>
+        <enum value="0x9145" name="GL_DEBUG_LOGGED_MESSAGES_KHR"/>
+        <enum value="0x9146" name="GL_DEBUG_SEVERITY_HIGH"/>
+        <enum value="0x9146" name="GL_DEBUG_SEVERITY_HIGH_AMD"/>
+        <enum value="0x9146" name="GL_DEBUG_SEVERITY_HIGH_ARB"/>
+        <enum value="0x9146" name="GL_DEBUG_SEVERITY_HIGH_KHR"/>
+        <enum value="0x9147" name="GL_DEBUG_SEVERITY_MEDIUM"/>
+        <enum value="0x9147" name="GL_DEBUG_SEVERITY_MEDIUM_AMD"/>
+        <enum value="0x9147" name="GL_DEBUG_SEVERITY_MEDIUM_ARB"/>
+        <enum value="0x9147" name="GL_DEBUG_SEVERITY_MEDIUM_KHR"/>
+        <enum value="0x9148" name="GL_DEBUG_SEVERITY_LOW"/>
+        <enum value="0x9148" name="GL_DEBUG_SEVERITY_LOW_AMD"/>
+        <enum value="0x9148" name="GL_DEBUG_SEVERITY_LOW_ARB"/>
+        <enum value="0x9148" name="GL_DEBUG_SEVERITY_LOW_KHR"/>
+        <enum value="0x9149" name="GL_DEBUG_CATEGORY_API_ERROR_AMD"/>
+        <enum value="0x914A" name="GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD"/>
+        <enum value="0x914B" name="GL_DEBUG_CATEGORY_DEPRECATION_AMD"/>
+        <enum value="0x914C" name="GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD"/>
+        <enum value="0x914D" name="GL_DEBUG_CATEGORY_PERFORMANCE_AMD"/>
+        <enum value="0x914E" name="GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD"/>
+        <enum value="0x914F" name="GL_DEBUG_CATEGORY_APPLICATION_AMD"/>
+        <enum value="0x9150" name="GL_DEBUG_CATEGORY_OTHER_AMD"/>
+        <enum value="0x9151" name="GL_BUFFER_OBJECT_EXT"/>
+        <enum value="0x9151" name="GL_DATA_BUFFER_AMD"/>
+        <enum value="0x9152" name="GL_PERFORMANCE_MONITOR_AMD"/>
+        <enum value="0x9153" name="GL_QUERY_OBJECT_AMD"/>
+        <enum value="0x9153" name="GL_QUERY_OBJECT_EXT"/>
+        <enum value="0x9154" name="GL_VERTEX_ARRAY_OBJECT_AMD"/>
+        <enum value="0x9154" name="GL_VERTEX_ARRAY_OBJECT_EXT"/>
+        <enum value="0x9155" name="GL_SAMPLER_OBJECT_AMD"/>
+            <unused start="0x9156" end="0x915F"/>
+        <enum value="0x9160" name="GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD"/>
+            <unused start="0x9161"/>
+        <enum value="0x9192" name="GL_QUERY_BUFFER"/>
+        <enum value="0x9192" name="GL_QUERY_BUFFER_AMD"/>
+        <enum value="0x9193" name="GL_QUERY_BUFFER_BINDING"/>
+        <enum value="0x9193" name="GL_QUERY_BUFFER_BINDING_AMD"/>
+        <enum value="0x9194" name="GL_QUERY_RESULT_NO_WAIT"/>
+        <enum value="0x9194" name="GL_QUERY_RESULT_NO_WAIT_AMD"/>
+        <enum value="0x9195" name="GL_VIRTUAL_PAGE_SIZE_X_ARB"/>
+        <enum value="0x9195" name="GL_VIRTUAL_PAGE_SIZE_X_AMD"/>
+        <enum value="0x9196" name="GL_VIRTUAL_PAGE_SIZE_Y_ARB"/>
+        <enum value="0x9196" name="GL_VIRTUAL_PAGE_SIZE_Y_AMD"/>
+        <enum value="0x9197" name="GL_VIRTUAL_PAGE_SIZE_Z_ARB"/>
+        <enum value="0x9197" name="GL_VIRTUAL_PAGE_SIZE_Z_AMD"/>
+        <enum value="0x9198" name="GL_MAX_SPARSE_TEXTURE_SIZE_ARB"/>
+        <enum value="0x9198" name="GL_MAX_SPARSE_TEXTURE_SIZE_AMD"/>
+        <enum value="0x9199" name="GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB"/>
+        <enum value="0x9199" name="GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD"/>
+        <enum value="0x919A" name="GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB"/>
+        <enum value="0x919A" name="GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS"/>
+        <enum value="0x919B" name="GL_MIN_SPARSE_LEVEL_ARB"/>
+        <enum value="0x919B" name="GL_MIN_SPARSE_LEVEL_AMD"/>
+        <enum value="0x919C" name="GL_MIN_LOD_WARNING_AMD"/>
+        <enum value="0x919D" name="GL_TEXTURE_BUFFER_OFFSET"/>
+        <enum value="0x919D" name="GL_TEXTURE_BUFFER_OFFSET_EXT"/>
+        <enum value="0x919E" name="GL_TEXTURE_BUFFER_SIZE"/>
+        <enum value="0x919E" name="GL_TEXTURE_BUFFER_SIZE_EXT"/>
+        <enum value="0x919F" name="GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT"/>
+        <enum value="0x919F" name="GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT"/>
+        <enum value="0x91A0" name="GL_STREAM_RASTERIZATION_AMD"/>
+            <unused start="0x91A1" end="0x91A3"/>
+        <enum value="0x91A4" name="GL_VERTEX_ELEMENT_SWIZZLE_AMD"/>
+        <enum value="0x91A5" name="GL_VERTEX_ID_SWIZZLE_AMD"/>
+        <enum value="0x91A6" name="GL_TEXTURE_SPARSE_ARB"/>
+        <enum value="0x91A7" name="GL_VIRTUAL_PAGE_SIZE_INDEX_ARB"/>
+        <enum value="0x91A8" name="GL_NUM_VIRTUAL_PAGE_SIZES_ARB"/>
+        <enum value="0x91A9" name="GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB"/>
+            <unused start="0x91AA" end="0x91B8"/>
+        <enum value="0x91B9" name="GL_COMPUTE_SHADER"/>
+            <unused start="0x91BA"/>
+        <enum value="0x91BB" name="GL_MAX_COMPUTE_UNIFORM_BLOCKS"/>
+        <enum value="0x91BC" name="GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS"/>
+        <enum value="0x91BD" name="GL_MAX_COMPUTE_IMAGE_UNIFORMS"/>
+        <enum value="0x91BE" name="GL_MAX_COMPUTE_WORK_GROUP_COUNT"/>
+        <enum value="0x91BF" name="GL_MAX_COMPUTE_WORK_GROUP_SIZE"/>
+        <enum value="0x91BF" name="GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB" alias="GL_MAX_COMPUTE_WORK_GROUP_SIZE"/>
+            <unused start="0x91C0" end="0x923F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9240" end="0x924F" vendor="WEBGL" comment="Khronos bug 6473,6884">
+        <enum value="0x9240" name="GL_UNPACK_FLIP_Y_WEBGL"/>
+        <enum value="0x9241" name="GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL"/>
+        <enum value="0x9242" name="GL_CONTEXT_LOST_WEBGL"/>
+        <enum value="0x9243" name="GL_UNPACK_COLORSPACE_CONVERSION_WEBGL"/>
+        <enum value="0x9244" name="GL_BROWSER_DEFAULT_WEBGL"/>
+            <unused start="0x9245" end="0x924F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9250" end="0x925F" vendor="DMP" comment="For Eisaku Ohbuchi via email">
+        <enum value="0x9250" name="GL_SHADER_BINARY_DMP"/>
+            <unused start="0x9251" end="0x925F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9260" end="0x926F" vendor="FJ" comment="Khronos bug 7486">
+        <enum value="0x9260" name="GL_GCCSO_SHADER_BINARY_FJ"/>
+            <unused start="0x9261" end="0x926F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9270" end="0x927F" vendor="OES" comment="Khronos bug 7625">
+        <enum value="0x9270" name="GL_COMPRESSED_R11_EAC"/>
+        <enum value="0x9270" name="GL_COMPRESSED_R11_EAC_OES"/>
+        <enum value="0x9271" name="GL_COMPRESSED_SIGNED_R11_EAC"/>
+        <enum value="0x9271" name="GL_COMPRESSED_SIGNED_R11_EAC_OES"/>
+        <enum value="0x9272" name="GL_COMPRESSED_RG11_EAC"/>
+        <enum value="0x9272" name="GL_COMPRESSED_RG11_EAC_OES"/>
+        <enum value="0x9273" name="GL_COMPRESSED_SIGNED_RG11_EAC"/>
+        <enum value="0x9273" name="GL_COMPRESSED_SIGNED_RG11_EAC_OES"/>
+        <enum value="0x9274" name="GL_COMPRESSED_RGB8_ETC2"/>
+        <enum value="0x9274" name="GL_COMPRESSED_RGB8_ETC2_OES"/>
+        <enum value="0x9275" name="GL_COMPRESSED_SRGB8_ETC2"/>
+        <enum value="0x9275" name="GL_COMPRESSED_SRGB8_ETC2_OES"/>
+        <enum value="0x9276" name="GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+        <enum value="0x9276" name="GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2_OES"/>
+        <enum value="0x9277" name="GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+        <enum value="0x9277" name="GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2_OES"/>
+        <enum value="0x9278" name="GL_COMPRESSED_RGBA8_ETC2_EAC"/>
+        <enum value="0x9278" name="GL_COMPRESSED_RGBA8_ETC2_EAC_OES"/>
+        <enum value="0x9279" name="GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"/>
+        <enum value="0x9279" name="GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC_OES"/>
+            <unused start="0x927A" end="0x927F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9280" end="0x937F" vendor="NV" comment="Khronos bug 7658">
+        <enum value="0x9280" name="GL_BLEND_PREMULTIPLIED_SRC_NV"/>
+        <enum value="0x9281" name="GL_BLEND_OVERLAP_NV"/>
+        <enum value="0x9282" name="GL_UNCORRELATED_NV"/>
+        <enum value="0x9283" name="GL_DISJOINT_NV"/>
+        <enum value="0x9284" name="GL_CONJOINT_NV"/>
+        <enum value="0x9285" name="GL_BLEND_ADVANCED_COHERENT_KHR"/>
+        <enum value="0x9285" name="GL_BLEND_ADVANCED_COHERENT_NV"/>
+        <enum value="0x9286" name="GL_SRC_NV"/>
+        <enum value="0x9287" name="GL_DST_NV"/>
+        <enum value="0x9288" name="GL_SRC_OVER_NV"/>
+        <enum value="0x9289" name="GL_DST_OVER_NV"/>
+        <enum value="0x928A" name="GL_SRC_IN_NV"/>
+        <enum value="0x928B" name="GL_DST_IN_NV"/>
+        <enum value="0x928C" name="GL_SRC_OUT_NV"/>
+        <enum value="0x928D" name="GL_DST_OUT_NV"/>
+        <enum value="0x928E" name="GL_SRC_ATOP_NV"/>
+        <enum value="0x928F" name="GL_DST_ATOP_NV"/>
+            <unused start="0x9290"/>
+        <enum value="0x9291" name="GL_PLUS_NV"/>
+        <enum value="0x9292" name="GL_PLUS_DARKER_NV"/>
+            <unused start="0x9293"/>
+        <enum value="0x9294" name="GL_MULTIPLY_KHR"/>
+        <enum value="0x9294" name="GL_MULTIPLY_NV"/>
+        <enum value="0x9295" name="GL_SCREEN_KHR"/>
+        <enum value="0x9295" name="GL_SCREEN_NV"/>
+        <enum value="0x9296" name="GL_OVERLAY_KHR"/>
+        <enum value="0x9296" name="GL_OVERLAY_NV"/>
+        <enum value="0x9297" name="GL_DARKEN_KHR"/>
+        <enum value="0x9297" name="GL_DARKEN_NV"/>
+        <enum value="0x9298" name="GL_LIGHTEN_KHR"/>
+        <enum value="0x9298" name="GL_LIGHTEN_NV"/>
+        <enum value="0x9299" name="GL_COLORDODGE_KHR"/>
+        <enum value="0x9299" name="GL_COLORDODGE_NV"/>
+        <enum value="0x929A" name="GL_COLORBURN_KHR"/>
+        <enum value="0x929A" name="GL_COLORBURN_NV"/>
+        <enum value="0x929B" name="GL_HARDLIGHT_KHR"/>
+        <enum value="0x929B" name="GL_HARDLIGHT_NV"/>
+        <enum value="0x929C" name="GL_SOFTLIGHT_KHR"/>
+        <enum value="0x929C" name="GL_SOFTLIGHT_NV"/>
+            <unused start="0x929D"/>
+        <enum value="0x929E" name="GL_DIFFERENCE_KHR"/>
+        <enum value="0x929E" name="GL_DIFFERENCE_NV"/>
+        <enum value="0x929F" name="GL_MINUS_NV"/>
+        <enum value="0x92A0" name="GL_EXCLUSION_KHR"/>
+        <enum value="0x92A0" name="GL_EXCLUSION_NV"/>
+        <enum value="0x92A1" name="GL_CONTRAST_NV"/>
+            <unused start="0x92A2"/>
+        <enum value="0x92A3" name="GL_INVERT_RGB_NV"/>
+        <enum value="0x92A4" name="GL_LINEARDODGE_NV"/>
+        <enum value="0x92A5" name="GL_LINEARBURN_NV"/>
+        <enum value="0x92A6" name="GL_VIVIDLIGHT_NV"/>
+        <enum value="0x92A7" name="GL_LINEARLIGHT_NV"/>
+        <enum value="0x92A8" name="GL_PINLIGHT_NV"/>
+        <enum value="0x92A9" name="GL_HARDMIX_NV"/>
+            <unused start="0x92AA" end="0x92AC"/>
+        <enum value="0x92AD" name="GL_HSL_HUE_KHR"/>
+        <enum value="0x92AD" name="GL_HSL_HUE_NV"/>
+        <enum value="0x92AE" name="GL_HSL_SATURATION_KHR"/>
+        <enum value="0x92AE" name="GL_HSL_SATURATION_NV"/>
+        <enum value="0x92AF" name="GL_HSL_COLOR_KHR"/>
+        <enum value="0x92AF" name="GL_HSL_COLOR_NV"/>
+        <enum value="0x92B0" name="GL_HSL_LUMINOSITY_KHR"/>
+        <enum value="0x92B0" name="GL_HSL_LUMINOSITY_NV"/>
+        <enum value="0x92B1" name="GL_PLUS_CLAMPED_NV"/>
+        <enum value="0x92B2" name="GL_PLUS_CLAMPED_ALPHA_NV"/>
+        <enum value="0x92B3" name="GL_MINUS_CLAMPED_NV"/>
+        <enum value="0x92B4" name="GL_INVERT_OVG_NV"/>
+            <unused start="0x92B5" end="0x92BD"/>
+        <enum value="0x92BE" name="GL_PRIMITIVE_BOUNDING_BOX_EXT"/>
+            <unused start="0x92BF"/>
+        <enum value="0x92C0" name="GL_ATOMIC_COUNTER_BUFFER"/>
+        <enum value="0x92C1" name="GL_ATOMIC_COUNTER_BUFFER_BINDING"/>
+        <enum value="0x92C2" name="GL_ATOMIC_COUNTER_BUFFER_START"/>
+        <enum value="0x92C3" name="GL_ATOMIC_COUNTER_BUFFER_SIZE"/>
+        <enum value="0x92C4" name="GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE"/>
+        <enum value="0x92C5" name="GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS"/>
+        <enum value="0x92C6" name="GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES"/>
+        <enum value="0x92C7" name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER"/>
+        <enum value="0x92C8" name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+        <enum value="0x92C9" name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+        <enum value="0x92CA" name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER"/>
+        <enum value="0x92CB" name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER"/>
+        <enum value="0x92CC" name="GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92CD" name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92CD" name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT"/>
+        <enum value="0x92CE" name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92CE" name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT"/>
+        <enum value="0x92CF" name="GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92CF" name="GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT"/>
+        <enum value="0x92D0" name="GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92D1" name="GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92D2" name="GL_MAX_VERTEX_ATOMIC_COUNTERS"/>
+        <enum value="0x92D3" name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS"/>
+        <enum value="0x92D3" name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT"/>
+        <enum value="0x92D4" name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS"/>
+        <enum value="0x92D4" name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT"/>
+        <enum value="0x92D5" name="GL_MAX_GEOMETRY_ATOMIC_COUNTERS"/>
+        <enum value="0x92D5" name="GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT"/>
+        <enum value="0x92D6" name="GL_MAX_FRAGMENT_ATOMIC_COUNTERS"/>
+        <enum value="0x92D7" name="GL_MAX_COMBINED_ATOMIC_COUNTERS"/>
+        <enum value="0x92D8" name="GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE"/>
+        <enum value="0x92D9" name="GL_ACTIVE_ATOMIC_COUNTER_BUFFERS"/>
+        <enum value="0x92DA" name="GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX"/>
+        <enum value="0x92DB" name="GL_UNSIGNED_INT_ATOMIC_COUNTER"/>
+        <enum value="0x92DC" name="GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS"/>
+            <unused start="0x92DC" end="0x92DF"/>
+        <enum value="0x92E0" name="GL_DEBUG_OUTPUT"/>
+        <enum value="0x92E0" name="GL_DEBUG_OUTPUT_KHR"/>
+        <enum value="0x92E1" name="GL_UNIFORM"/>
+        <enum value="0x92E2" name="GL_UNIFORM_BLOCK"/>
+        <enum value="0x92E3" name="GL_PROGRAM_INPUT"/>
+        <enum value="0x92E4" name="GL_PROGRAM_OUTPUT"/>
+        <enum value="0x92E5" name="GL_BUFFER_VARIABLE"/>
+        <enum value="0x92E6" name="GL_SHADER_STORAGE_BLOCK"/>
+        <enum value="0x92E7" name="GL_IS_PER_PATCH"/>
+        <enum value="0x92E7" name="GL_IS_PER_PATCH_EXT"/>
+        <enum value="0x92E8" name="GL_VERTEX_SUBROUTINE"/>
+        <enum value="0x92E9" name="GL_TESS_CONTROL_SUBROUTINE"/>
+        <enum value="0x92EA" name="GL_TESS_EVALUATION_SUBROUTINE"/>
+        <enum value="0x92EB" name="GL_GEOMETRY_SUBROUTINE"/>
+        <enum value="0x92EC" name="GL_FRAGMENT_SUBROUTINE"/>
+        <enum value="0x92ED" name="GL_COMPUTE_SUBROUTINE"/>
+        <enum value="0x92EE" name="GL_VERTEX_SUBROUTINE_UNIFORM"/>
+        <enum value="0x92EF" name="GL_TESS_CONTROL_SUBROUTINE_UNIFORM"/>
+        <enum value="0x92F0" name="GL_TESS_EVALUATION_SUBROUTINE_UNIFORM"/>
+        <enum value="0x92F1" name="GL_GEOMETRY_SUBROUTINE_UNIFORM"/>
+        <enum value="0x92F2" name="GL_FRAGMENT_SUBROUTINE_UNIFORM"/>
+        <enum value="0x92F3" name="GL_COMPUTE_SUBROUTINE_UNIFORM"/>
+        <enum value="0x92F4" name="GL_TRANSFORM_FEEDBACK_VARYING"/>
+        <enum value="0x92F5" name="GL_ACTIVE_RESOURCES"/>
+        <enum value="0x92F6" name="GL_MAX_NAME_LENGTH"/>
+        <enum value="0x92F7" name="GL_MAX_NUM_ACTIVE_VARIABLES"/>
+        <enum value="0x92F8" name="GL_MAX_NUM_COMPATIBLE_SUBROUTINES"/>
+        <enum value="0x92F9" name="GL_NAME_LENGTH"/>
+        <enum value="0x92FA" name="GL_TYPE"/>
+        <enum value="0x92FB" name="GL_ARRAY_SIZE"/>
+        <enum value="0x92FC" name="GL_OFFSET"/>
+        <enum value="0x92FD" name="GL_BLOCK_INDEX"/>
+        <enum value="0x92FE" name="GL_ARRAY_STRIDE"/>
+        <enum value="0x92FF" name="GL_MATRIX_STRIDE"/>
+        <enum value="0x9300" name="GL_IS_ROW_MAJOR"/>
+        <enum value="0x9301" name="GL_ATOMIC_COUNTER_BUFFER_INDEX"/>
+        <enum value="0x9302" name="GL_BUFFER_BINDING"/>
+        <enum value="0x9303" name="GL_BUFFER_DATA_SIZE"/>
+        <enum value="0x9304" name="GL_NUM_ACTIVE_VARIABLES"/>
+        <enum value="0x9305" name="GL_ACTIVE_VARIABLES"/>
+        <enum value="0x9306" name="GL_REFERENCED_BY_VERTEX_SHADER"/>
+        <enum value="0x9307" name="GL_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+        <enum value="0x9307" name="GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT"/>
+        <enum value="0x9308" name="GL_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+        <enum value="0x9308" name="GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT"/>
+        <enum value="0x9309" name="GL_REFERENCED_BY_GEOMETRY_SHADER"/>
+        <enum value="0x9309" name="GL_REFERENCED_BY_GEOMETRY_SHADER_EXT"/>
+        <enum value="0x930A" name="GL_REFERENCED_BY_FRAGMENT_SHADER"/>
+        <enum value="0x930B" name="GL_REFERENCED_BY_COMPUTE_SHADER"/>
+        <enum value="0x930C" name="GL_TOP_LEVEL_ARRAY_SIZE"/>
+        <enum value="0x930D" name="GL_TOP_LEVEL_ARRAY_STRIDE"/>
+        <enum value="0x930E" name="GL_LOCATION"/>
+        <enum value="0x930F" name="GL_LOCATION_INDEX"/>
+        <enum value="0x9310" name="GL_FRAMEBUFFER_DEFAULT_WIDTH"/>
+        <enum value="0x9311" name="GL_FRAMEBUFFER_DEFAULT_HEIGHT"/>
+        <enum value="0x9312" name="GL_FRAMEBUFFER_DEFAULT_LAYERS"/>
+        <enum value="0x9312" name="GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT"/>
+        <enum value="0x9313" name="GL_FRAMEBUFFER_DEFAULT_SAMPLES"/>
+        <enum value="0x9314" name="GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS"/>
+        <enum value="0x9315" name="GL_MAX_FRAMEBUFFER_WIDTH"/>
+        <enum value="0x9316" name="GL_MAX_FRAMEBUFFER_HEIGHT"/>
+        <enum value="0x9317" name="GL_MAX_FRAMEBUFFER_LAYERS"/>
+        <enum value="0x9317" name="GL_MAX_FRAMEBUFFER_LAYERS_EXT"/>
+        <enum value="0x9318" name="GL_MAX_FRAMEBUFFER_SAMPLES"/>
+            <unused start="0x9319" end="0x9338"/>
+        <enum value="0x9339" name="GL_WARP_SIZE_NV"/>
+        <enum value="0x933A" name="GL_WARPS_PER_SM_NV"/>
+        <enum value="0x933B" name="GL_SM_COUNT_NV"/>
+            <unused start="0x933C" end="0x9343"/>
+        <enum value="0x9344" name="GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB"/>
+        <enum value="0x9345" name="GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB"/>
+            <unused start="0x9346" end="0x9349"/>
+        <enum value="0x934A" name="GL_LOCATION_COMPONENT"/>
+        <enum value="0x934B" name="GL_TRANSFORM_FEEDBACK_BUFFER_INDEX"/>
+        <enum value="0x934C" name="GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE"/>
+            <unused start="0x934D" end="0x9364"/>
+        <enum value="0x9365" name="GL_CLEAR_TEXTURE"/>
+            <unused start="0x9366" end="0x937F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9380" end="0x939F" vendor="ARB">
+        <enum value="0x9380" name="GL_NUM_SAMPLE_COUNTS"/>
+            <unused start="0x9381" end="0x939F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x93A0" end="0x93AF" vendor="ANGLE" comment="Khronos bug 8100">
+        <enum value="0x93A0" name="GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE"/>
+        <enum value="0x93A1" name="GL_BGRA8_EXT"/>
+        <enum value="0x93A2" name="GL_TEXTURE_USAGE_ANGLE"/>
+        <enum value="0x93A3" name="GL_FRAMEBUFFER_ATTACHMENT_ANGLE"/>
+        <enum value="0x93A4" name="GL_PACK_REVERSE_ROW_ORDER_ANGLE"/>
+            <unused start="0x93A5"/>
+        <enum value="0x93A6" name="GL_PROGRAM_BINARY_ANGLE"/>
+            <unused start="0x93A7" end="0x93AF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x93B0" end="0x93EF" vendor="OES" comment="Khronos bug 8853">
+        <enum value="0x93B0" name="GL_COMPRESSED_RGBA_ASTC_4x4_KHR"/>
+        <enum value="0x93B1" name="GL_COMPRESSED_RGBA_ASTC_5x4_KHR"/>
+        <enum value="0x93B2" name="GL_COMPRESSED_RGBA_ASTC_5x5_KHR"/>
+        <enum value="0x93B3" name="GL_COMPRESSED_RGBA_ASTC_6x5_KHR"/>
+        <enum value="0x93B4" name="GL_COMPRESSED_RGBA_ASTC_6x6_KHR"/>
+        <enum value="0x93B5" name="GL_COMPRESSED_RGBA_ASTC_8x5_KHR"/>
+        <enum value="0x93B6" name="GL_COMPRESSED_RGBA_ASTC_8x6_KHR"/>
+        <enum value="0x93B7" name="GL_COMPRESSED_RGBA_ASTC_8x8_KHR"/>
+        <enum value="0x93B8" name="GL_COMPRESSED_RGBA_ASTC_10x5_KHR"/>
+        <enum value="0x93B9" name="GL_COMPRESSED_RGBA_ASTC_10x6_KHR"/>
+        <enum value="0x93BA" name="GL_COMPRESSED_RGBA_ASTC_10x8_KHR"/>
+        <enum value="0x93BB" name="GL_COMPRESSED_RGBA_ASTC_10x10_KHR"/>
+        <enum value="0x93BC" name="GL_COMPRESSED_RGBA_ASTC_12x10_KHR"/>
+        <enum value="0x93BD" name="GL_COMPRESSED_RGBA_ASTC_12x12_KHR"/>
+            <unused start="0x93BE" end="0x93BF"/>
+        <enum value="0x93C0" name="GL_COMPRESSED_RGBA_ASTC_3x3x3_OES"/>
+        <enum value="0x93C1" name="GL_COMPRESSED_RGBA_ASTC_4x3x3_OES"/>
+        <enum value="0x93C2" name="GL_COMPRESSED_RGBA_ASTC_4x4x3_OES"/>
+        <enum value="0x93C3" name="GL_COMPRESSED_RGBA_ASTC_4x4x4_OES"/>
+        <enum value="0x93C4" name="GL_COMPRESSED_RGBA_ASTC_5x4x4_OES"/>
+        <enum value="0x93C5" name="GL_COMPRESSED_RGBA_ASTC_5x5x4_OES"/>
+        <enum value="0x93C6" name="GL_COMPRESSED_RGBA_ASTC_5x5x5_OES"/>
+        <enum value="0x93C7" name="GL_COMPRESSED_RGBA_ASTC_6x5x5_OES"/>
+        <enum value="0x93C8" name="GL_COMPRESSED_RGBA_ASTC_6x6x5_OES"/>
+        <enum value="0x93C9" name="GL_COMPRESSED_RGBA_ASTC_6x6x6_OES"/>
+            <unused start="0x93CA" end="0x93CF"/>
+        <enum value="0x93D0" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"/>
+        <enum value="0x93D1" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"/>
+        <enum value="0x93D2" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"/>
+        <enum value="0x93D3" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"/>
+        <enum value="0x93D4" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"/>
+        <enum value="0x93D5" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"/>
+        <enum value="0x93D6" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"/>
+        <enum value="0x93D7" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"/>
+        <enum value="0x93D8" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"/>
+        <enum value="0x93D9" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"/>
+        <enum value="0x93DA" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"/>
+        <enum value="0x93DB" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"/>
+        <enum value="0x93DC" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"/>
+        <enum value="0x93DD" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"/>
+            <unused start="0x93DE" end="0x93DF"/>
+        <enum value="0x93E0" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES"/>
+        <enum value="0x93E1" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES"/>
+        <enum value="0x93E2" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES"/>
+        <enum value="0x93E3" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES"/>
+        <enum value="0x93E4" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES"/>
+        <enum value="0x93E5" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES"/>
+        <enum value="0x93E6" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES"/>
+        <enum value="0x93E7" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES"/>
+        <enum value="0x93E8" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES"/>
+        <enum value="0x93E9" name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES"/>
+            <unused start="0x93EA" end="0x93EF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x93F0" end="0x94EF" vendor="APPLE" comment="Khronos bug 10233">
+        <enum value="0x93F0" name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG"/>
+        <enum value="0x93F1" name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG"/>
+            <unused start="0x93F2" end="0x94EF"/>
+    </enums>
+
+    <enums namespace="GL" start="0x94F0" end="0x950F" vendor="INTEL" comment="Khronos bug 11345">
+        <enum value="0x94F0" name="GL_PERFQUERY_COUNTER_EVENT_INTEL"/>
+        <enum value="0x94F1" name="GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL"/>
+        <enum value="0x94F2" name="GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL"/>
+        <enum value="0x94F3" name="GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL"/>
+        <enum value="0x94F4" name="GL_PERFQUERY_COUNTER_RAW_INTEL"/>
+        <enum value="0x94F5" name="GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL"/>
+            <unused start="0x94F6" end="0x94F7"/>
+        <enum value="0x94F8" name="GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL"/>
+        <enum value="0x94F9" name="GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL"/>
+        <enum value="0x94FA" name="GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL"/>
+        <enum value="0x94FB" name="GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL"/>
+        <enum value="0x94FC" name="GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL"/>
+        <enum value="0x94FD" name="GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL"/>
+        <enum value="0x94FE" name="GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL"/>
+        <enum value="0x94FF" name="GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL"/>
+        <enum value="0x9500" name="GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL"/>
+            <unused start="0x9501" end="0x950F"/>
+    </enums>
+
+    <enums namespace="GL" start="0x9510" end="0x952F" vendor="Broadcom" comment="Khronos bug 12203">
+            <unused start="0x9510" end="0x952F"/>
+    </enums>
+
+<!-- Enums reservable for future use. To reserve a new range, allocate one
+     or more multiples of 16 starting at the lowest available point in this
+     block and note it in a new <enums> block immediately above.
+
+     Please remember that new enumerant allocations must be obtained by
+     request to the Khronos API registrar (see comments at the top of this
+     file) File requests in the Khronos Bugzilla, OpenGL project, Registry
+     component. -->
+
+    <enums namespace="GL" start="0x9530" end="99999" vendor="ARB" comment="RESERVED FOR FUTURE ALLOCATIONS BY KHRONOS">
+        <unused start="0x9530" end="99999"/>
+    </enums>
+
+<!-- Historical large block allocations, all unused except (in older days) by IBM -->
+    <enums namespace="GL" start="100000" end="100999" vendor="ARB" comment="GLU enums"/>
+    <enums namespace="GL" start="101000" end="101999" vendor="ARB" comment="Conformance test enums"/>
+    <enums namespace="GL" start="102000" end="102999" vendor="ARB" comment="Unused, unlikely to ever be used"/>
+
+    <enums namespace="GL" start="103000" end="103999" vendor="IBM" comment="IBM is out of the graphics hardware business. Most of this range will remain unused.">
+        <enum value="0x19262" name="GL_RASTER_POSITION_UNCLIPPED_IBM"/>
+        <enum value="103050" name="GL_CULL_VERTEX_IBM"/>
+        <enum value="103060" name="GL_ALL_STATIC_DATA_IBM"/>
+        <enum value="103061" name="GL_STATIC_VERTEX_ARRAY_IBM"/>
+        <enum value="103070" name="GL_VERTEX_ARRAY_LIST_IBM"/>
+        <enum value="103071" name="GL_NORMAL_ARRAY_LIST_IBM"/>
+        <enum value="103072" name="GL_COLOR_ARRAY_LIST_IBM"/>
+        <enum value="103073" name="GL_INDEX_ARRAY_LIST_IBM"/>
+        <enum value="103074" name="GL_TEXTURE_COORD_ARRAY_LIST_IBM"/>
+        <enum value="103075" name="GL_EDGE_FLAG_ARRAY_LIST_IBM"/>
+        <enum value="103076" name="GL_FOG_COORDINATE_ARRAY_LIST_IBM"/>
+        <enum value="103077" name="GL_SECONDARY_COLOR_ARRAY_LIST_IBM"/>
+        <enum value="103080" name="GL_VERTEX_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103081" name="GL_NORMAL_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103082" name="GL_COLOR_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103083" name="GL_INDEX_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103084" name="GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103085" name="GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103086" name="GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM"/>
+        <enum value="103087" name="GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM"/>
+    </enums>
+
+    <enums namespace="GL" start="104000" end="104999" vendor="NEC" comment="NEC may be out of the graphics hardware business?"/>
+    <enums namespace="GL" start="105000" end="105999" vendor="Compaq" comment="Compaq was acquired by HP"/>
+    <enums namespace="GL" start="106000" end="106999" vendor="KPC" comment="Kubota Pacific is out of business"/>
+    <enums namespace="GL" start="107000" end="107999" vendor="PGI" comment="Portland Graphics was acquired by Template Graphics, which is out of business">
+            <!-- lots of <unused> areas here which won't be computed yet -->
+        <enum value="0x1A1F8" name="GL_PREFER_DOUBLEBUFFER_HINT_PGI"/>
+        <enum value="0x1A1FD" name="GL_CONSERVE_MEMORY_HINT_PGI"/>
+        <enum value="0x1A1FE" name="GL_RECLAIM_MEMORY_HINT_PGI"/>
+        <enum value="0x1A202" name="GL_NATIVE_GRAPHICS_HANDLE_PGI"/>
+        <enum value="0x1A203" name="GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI"/>
+        <enum value="0x1A204" name="GL_NATIVE_GRAPHICS_END_HINT_PGI"/>
+        <enum value="0x1A20C" name="GL_ALWAYS_FAST_HINT_PGI"/>
+        <enum value="0x1A20D" name="GL_ALWAYS_SOFT_HINT_PGI"/>
+        <enum value="0x1A20E" name="GL_ALLOW_DRAW_OBJ_HINT_PGI"/>
+        <enum value="0x1A20F" name="GL_ALLOW_DRAW_WIN_HINT_PGI"/>
+        <enum value="0x1A210" name="GL_ALLOW_DRAW_FRG_HINT_PGI"/>
+        <enum value="0x1A211" name="GL_ALLOW_DRAW_MEM_HINT_PGI"/>
+        <enum value="0x1A216" name="GL_STRICT_DEPTHFUNC_HINT_PGI"/>
+        <enum value="0x1A217" name="GL_STRICT_LIGHTING_HINT_PGI"/>
+        <enum value="0x1A218" name="GL_STRICT_SCISSOR_HINT_PGI"/>
+        <enum value="0x1A219" name="GL_FULL_STIPPLE_HINT_PGI"/>
+        <enum value="0x1A220" name="GL_CLIP_NEAR_HINT_PGI"/>
+        <enum value="0x1A221" name="GL_CLIP_FAR_HINT_PGI"/>
+        <enum value="0x1A222" name="GL_WIDE_LINE_HINT_PGI"/>
+        <enum value="0x1A223" name="GL_BACK_NORMALS_HINT_PGI"/>
+        <enum value="0x1A22A" name="GL_VERTEX_DATA_HINT_PGI"/>
+        <enum value="0x1A22B" name="GL_VERTEX_CONSISTENT_HINT_PGI"/>
+        <enum value="0x1A22C" name="GL_MATERIAL_SIDE_HINT_PGI"/>
+        <enum value="0x1A22D" name="GL_MAX_VERTEX_HINT_PGI"/>
+    </enums>
+
+    <enums namespace="GL" start="108000" end="108999" vendor="ES" comment="Evans and Sutherland is out of the graphics hardware business"/>
+
+    <!-- SECTION: GL command definitions. -->
+    <commands namespace="GL">
+        <command>
+            <proto>void <name>glAccum</name></proto>
+            <param group="AccumOp"><ptype>GLenum</ptype> <name>op</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>value</name></param>
+            <glx type="render" opcode="137"/>
+        </command>
+        <command>
+            <proto>void <name>glAccumxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLfixed</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glActiveProgramEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glActiveShaderProgram</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glActiveShaderProgramEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glActiveStencilFaceEXT</name></proto>
+            <param group="StencilFaceDirection"><ptype>GLenum</ptype> <name>face</name></param>
+            <glx type="render" opcode="4220"/>
+        </command>
+        <command>
+            <proto>void <name>glActiveTexture</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texture</name></param>
+            <glx type="render" opcode="197"/>
+        </command>
+        <command>
+            <proto>void <name>glActiveTextureARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texture</name></param>
+            <alias name="glActiveTexture"/>
+            <glx type="render" opcode="197"/>
+        </command>
+        <command>
+            <proto>void <name>glActiveVaryingNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFragmentOp1ATI</name></proto>
+            <param group="FragmentOpATI"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Mod</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFragmentOp2ATI</name></proto>
+            <param group="FragmentOpATI"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Mod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Mod</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFragmentOp3ATI</name></proto>
+            <param group="FragmentOpATI"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Mod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Mod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3Mod</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFunc</name></proto>
+            <param group="AlphaFunction"><ptype>GLenum</ptype> <name>func</name></param>
+            <param><ptype>GLfloat</ptype> <name>ref</name></param>
+            <glx type="render" opcode="159"/>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFuncQCOM</name></proto>
+            <param><ptype>GLenum</ptype> <name>func</name></param>
+            <param><ptype>GLclampf</ptype> <name>ref</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFuncx</name></proto>
+            <param><ptype>GLenum</ptype> <name>func</name></param>
+            <param><ptype>GLfixed</ptype> <name>ref</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAlphaFuncxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>func</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>ref</name></param>
+        </command>
+        <command>
+            <proto>void <name>glApplyTextureEXT</name></proto>
+            <param group="LightTextureModeEXT"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glAreProgramsResidentNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>programs</name></param>
+            <param group="Boolean" len="n"><ptype>GLboolean</ptype> *<name>residences</name></param>
+            <glx type="vendor" opcode="1293"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glAreTexturesResident</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <param group="Boolean" len="n"><ptype>GLboolean</ptype> *<name>residences</name></param>
+            <glx type="single" opcode="143"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glAreTexturesResidentEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <param group="Boolean" len="n"><ptype>GLboolean</ptype> *<name>residences</name></param>
+            <glx type="vendor" opcode="11"/>
+        </command>
+        <command>
+            <proto>void <name>glArrayElement</name></proto>
+            <param><ptype>GLint</ptype> <name>i</name></param>
+        </command>
+        <command>
+            <proto>void <name>glArrayElementEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>i</name></param>
+            <alias name="glArrayElement"/>
+        </command>
+        <command>
+            <proto>void <name>glArrayObjectATI</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ScalarType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAsyncMarkerSGIX</name></proto>
+            <param><ptype>GLuint</ptype> <name>marker</name></param>
+        </command>
+        <command>
+            <proto>void <name>glAttachObjectARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>containerObj</name></param>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>obj</name></param>
+            <alias name="glAttachShader"/>
+        </command>
+        <command>
+            <proto>void <name>glAttachShader</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBegin</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="4"/>
+        </command>
+        <command>
+            <proto>void <name>glBeginConditionalRender</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginConditionalRenderNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>mode</name></param>
+            <alias name="glBeginConditionalRender"/>
+            <glx type="render" opcode="348"/>
+        </command>
+        <command>
+            <proto>void <name>glBeginConditionalRenderNVX</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginFragmentShaderATI</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glBeginOcclusionQueryNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginPerfMonitorAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>monitor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginPerfQueryINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryHandle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginQuery</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <glx type="render" opcode="231"/>
+        </command>
+        <command>
+            <proto>void <name>glBeginQueryARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <alias name="glBeginQuery"/>
+        </command>
+        <command>
+            <proto>void <name>glBeginQueryEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginQueryIndexed</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginTransformFeedback</name></proto>
+            <param><ptype>GLenum</ptype> <name>primitiveMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBeginTransformFeedbackEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>primitiveMode</name></param>
+            <alias name="glBeginTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glBeginTransformFeedbackNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>primitiveMode</name></param>
+            <alias name="glBeginTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glBeginVertexShaderEXT</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glBeginVideoCaptureNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindAttribLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindAttribLocationARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param>const <ptype>GLcharARB</ptype> *<name>name</name></param>
+            <alias name="glBindAttribLocation"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBuffer</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <alias name="glBindBuffer"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferBase</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferBaseEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <alias name="glBindBufferBase"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferBaseNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <alias name="glBindBufferBase"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferOffsetEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferOffsetNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <alias name="glBindBufferOffsetEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferRange</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferRangeEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <alias name="glBindBufferRange"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBufferRangeNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <alias name="glBindBufferRange"/>
+        </command>
+        <command>
+            <proto>void <name>glBindBuffersBase</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>buffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindBuffersRange</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>buffers</name></param>
+            <param len="count">const <ptype>GLintptr</ptype> *<name>offsets</name></param>
+            <param len="count">const <ptype>GLsizeiptr</ptype> *<name>sizes</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindFragDataLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>color</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindFragDataLocationEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>color</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+            <alias name="glBindFragDataLocation"/>
+        </command>
+        <command>
+            <proto>void <name>glBindFragDataLocationIndexed</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>colorNumber</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindFragmentShaderATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindFramebuffer</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <glx type="render" opcode="236"/>
+        </command>
+        <command>
+            <proto>void <name>glBindFramebufferEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <glx type="render" opcode="4319"/>
+        </command>
+        <command>
+            <proto>void <name>glBindFramebufferOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>framebuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindImageTexture</name></proto>
+            <param><ptype>GLuint</ptype> <name>unit</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>layered</name></param>
+            <param><ptype>GLint</ptype> <name>layer</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindImageTextureEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>layered</name></param>
+            <param><ptype>GLint</ptype> <name>layer</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+            <param><ptype>GLint</ptype> <name>format</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindImageTextures</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>textures</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glBindLightParameterEXT</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glBindMaterialParameterEXT</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindMultiTextureEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glBindParameterEXT</name></proto>
+            <param group="VertexShaderParameterEXT"><ptype>GLenum</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindProgramARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <glx type="render" opcode="4180"/>
+        </command>
+        <command>
+            <proto>void <name>glBindProgramNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <alias name="glBindProgramARB"/>
+            <glx type="render" opcode="4180"/>
+        </command>
+        <command>
+            <proto>void <name>glBindProgramPipeline</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindProgramPipelineEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindRenderbuffer</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <glx type="render" opcode="235"/>
+        </command>
+        <command>
+            <proto>void <name>glBindRenderbufferEXT</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <glx type="render" opcode="4316"/>
+        </command>
+        <command>
+            <proto>void <name>glBindRenderbufferOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindSampler</name></proto>
+            <param><ptype>GLuint</ptype> <name>unit</name></param>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindSamplers</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>samplers</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glBindTexGenParameterEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>unit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindTexture</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <glx type="render" opcode="4117"/>
+        </command>
+        <command>
+            <proto>void <name>glBindTextureEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <alias name="glBindTexture"/>
+            <glx type="render" opcode="4117"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glBindTextureUnitParameterEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>unit</name></param>
+            <param group="VertexShaderTextureUnitParameter"><ptype>GLenum</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindTextures</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>textures</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindTransformFeedback</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindTransformFeedbackNV</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindVertexArray</name></proto>
+            <param><ptype>GLuint</ptype> <name>array</name></param>
+            <glx type="render" opcode="350"/>
+        </command>
+        <command>
+            <proto>void <name>glBindVertexArrayAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>array</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindVertexArrayOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>array</name></param>
+            <alias name="glBindVertexArray"/>
+        </command>
+        <command>
+            <proto>void <name>glBindVertexBuffer</name></proto>
+            <param><ptype>GLuint</ptype> <name>bindingindex</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindVertexBuffers</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>buffers</name></param>
+            <param len="count">const <ptype>GLintptr</ptype> *<name>offsets</name></param>
+            <param len="count">const <ptype>GLsizei</ptype> *<name>strides</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindVertexShaderEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindVideoCaptureStreamBufferNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>frame_region</name></param>
+            <param group="BufferOffsetARB"><ptype>GLintptrARB</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBindVideoCaptureStreamTextureNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>frame_region</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3bEXT</name></proto>
+            <param><ptype>GLbyte</ptype> <name>bx</name></param>
+            <param><ptype>GLbyte</ptype> <name>by</name></param>
+            <param><ptype>GLbyte</ptype> <name>bz</name></param>
+            <vecequiv name="glBinormal3bvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3bvEXT</name></proto>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3dEXT</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>bx</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>by</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>bz</name></param>
+            <vecequiv name="glBinormal3dvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3dvEXT</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3fEXT</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>bx</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>by</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>bz</name></param>
+            <vecequiv name="glBinormal3fvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3fvEXT</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3iEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>bx</name></param>
+            <param><ptype>GLint</ptype> <name>by</name></param>
+            <param><ptype>GLint</ptype> <name>bz</name></param>
+            <vecequiv name="glBinormal3ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3ivEXT</name></proto>
+            <param len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3sEXT</name></proto>
+            <param><ptype>GLshort</ptype> <name>bx</name></param>
+            <param><ptype>GLshort</ptype> <name>by</name></param>
+            <param><ptype>GLshort</ptype> <name>bz</name></param>
+            <vecequiv name="glBinormal3svEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glBinormal3svEXT</name></proto>
+            <param len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBinormalPointerEXT</name></proto>
+            <param group="BinormalPointerTypeEXT"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBitmap</name></proto>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>xorig</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>yorig</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>xmove</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>ymove</name></param>
+            <param len="COMPSIZE(width,height)">const <ptype>GLubyte</ptype> *<name>bitmap</name></param>
+            <glx type="render" opcode="5"/>
+            <glx type="render" opcode="311" name="glBitmapPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glBitmapxOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLfixed</ptype> <name>xorig</name></param>
+            <param><ptype>GLfixed</ptype> <name>yorig</name></param>
+            <param><ptype>GLfixed</ptype> <name>xmove</name></param>
+            <param><ptype>GLfixed</ptype> <name>ymove</name></param>
+            <param len="COMPSIZE(width,height)">const <ptype>GLubyte</ptype> *<name>bitmap</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendBarrierNV</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glBlendBarrierKHR</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glBlendColor</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="4096"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendColorEXT</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>alpha</name></param>
+            <alias name="glBlendColor"/>
+            <glx type="render" opcode="4096"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendColorxOES</name></proto>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>red</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>green</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>blue</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>alpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquation</name></proto>
+            <param group="BlendEquationMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="4097"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationEXT</name></proto>
+            <param group="BlendEquationModeEXT"><ptype>GLenum</ptype> <name>mode</name></param>
+            <alias name="glBlendEquation"/>
+            <glx type="render" opcode="4097"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationIndexedAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <alias name="glBlendEquationi"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparate</name></proto>
+            <param group="BlendEquationModeEXT"><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param group="BlendEquationModeEXT"><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+            <glx type="render" opcode="4228"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparateEXT</name></proto>
+            <param group="BlendEquationModeEXT"><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param group="BlendEquationModeEXT"><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+            <alias name="glBlendEquationSeparate"/>
+            <glx type="render" opcode="4228"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparateIndexedAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+            <alias name="glBlendEquationSeparatei"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparateOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparatei</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparateiARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+            <alias name="glBlendEquationSeparatei"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationSeparateiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>modeRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>modeAlpha</name></param>
+            <alias name="glBlendEquationSeparatei"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationi</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <alias name="glBlendEquationi"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendEquationiARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <alias name="glBlendEquationi"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFunc</name></proto>
+            <param group="BlendingFactorSrc"><ptype>GLenum</ptype> <name>sfactor</name></param>
+            <param group="BlendingFactorDest"><ptype>GLenum</ptype> <name>dfactor</name></param>
+            <glx type="render" opcode="160"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncIndexedAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>src</name></param>
+            <param><ptype>GLenum</ptype> <name>dst</name></param>
+            <alias name="glBlendFunci"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparate</name></proto>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>sfactorRGB</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>dfactorRGB</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>sfactorAlpha</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>dfactorAlpha</name></param>
+            <glx type="render" opcode="4134"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparateEXT</name></proto>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>sfactorRGB</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>dfactorRGB</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>sfactorAlpha</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>dfactorAlpha</name></param>
+            <alias name="glBlendFuncSeparate"/>
+            <glx type="render" opcode="4134"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparateINGR</name></proto>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>sfactorRGB</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>dfactorRGB</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>sfactorAlpha</name></param>
+            <param group="BlendFuncSeparateParameterEXT"><ptype>GLenum</ptype> <name>dfactorAlpha</name></param>
+            <alias name="glBlendFuncSeparate"/>
+            <glx type="render" opcode="4134"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparateIndexedAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>srcRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>dstRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>srcAlpha</name></param>
+            <param><ptype>GLenum</ptype> <name>dstAlpha</name></param>
+            <alias name="glBlendFuncSeparatei"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparateOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>srcRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>dstRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>srcAlpha</name></param>
+            <param><ptype>GLenum</ptype> <name>dstAlpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparatei</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>srcRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>dstRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>srcAlpha</name></param>
+            <param><ptype>GLenum</ptype> <name>dstAlpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparateiARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>srcRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>dstRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>srcAlpha</name></param>
+            <param><ptype>GLenum</ptype> <name>dstAlpha</name></param>
+            <alias name="glBlendFuncSeparatei"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFuncSeparateiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>srcRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>dstRGB</name></param>
+            <param><ptype>GLenum</ptype> <name>srcAlpha</name></param>
+            <param><ptype>GLenum</ptype> <name>dstAlpha</name></param>
+            <alias name="glBlendFuncSeparatei"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFunci</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>src</name></param>
+            <param><ptype>GLenum</ptype> <name>dst</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlendFunciARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>src</name></param>
+            <param><ptype>GLenum</ptype> <name>dst</name></param>
+            <alias name="glBlendFunci"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendFunciEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buf</name></param>
+            <param><ptype>GLenum</ptype> <name>src</name></param>
+            <param><ptype>GLenum</ptype> <name>dst</name></param>
+            <alias name="glBlendFunci"/>
+        </command>
+        <command>
+            <proto>void <name>glBlendParameteriNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlitFramebuffer</name></proto>
+            <param><ptype>GLint</ptype> <name>srcX0</name></param>
+            <param><ptype>GLint</ptype> <name>srcY0</name></param>
+            <param><ptype>GLint</ptype> <name>srcX1</name></param>
+            <param><ptype>GLint</ptype> <name>srcY1</name></param>
+            <param><ptype>GLint</ptype> <name>dstX0</name></param>
+            <param><ptype>GLint</ptype> <name>dstY0</name></param>
+            <param><ptype>GLint</ptype> <name>dstX1</name></param>
+            <param><ptype>GLint</ptype> <name>dstY1</name></param>
+            <param group="ClearBufferMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <param><ptype>GLenum</ptype> <name>filter</name></param>
+            <glx type="render" opcode="4330"/>
+        </command>
+        <command>
+            <proto>void <name>glBlitFramebufferANGLE</name></proto>
+            <param><ptype>GLint</ptype> <name>srcX0</name></param>
+            <param><ptype>GLint</ptype> <name>srcY0</name></param>
+            <param><ptype>GLint</ptype> <name>srcX1</name></param>
+            <param><ptype>GLint</ptype> <name>srcY1</name></param>
+            <param><ptype>GLint</ptype> <name>dstX0</name></param>
+            <param><ptype>GLint</ptype> <name>dstY0</name></param>
+            <param><ptype>GLint</ptype> <name>dstX1</name></param>
+            <param><ptype>GLint</ptype> <name>dstY1</name></param>
+            <param><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <param><ptype>GLenum</ptype> <name>filter</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBlitFramebufferEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>srcX0</name></param>
+            <param><ptype>GLint</ptype> <name>srcY0</name></param>
+            <param><ptype>GLint</ptype> <name>srcX1</name></param>
+            <param><ptype>GLint</ptype> <name>srcY1</name></param>
+            <param><ptype>GLint</ptype> <name>dstX0</name></param>
+            <param><ptype>GLint</ptype> <name>dstY0</name></param>
+            <param><ptype>GLint</ptype> <name>dstX1</name></param>
+            <param><ptype>GLint</ptype> <name>dstY1</name></param>
+            <param group="ClearBufferMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <param><ptype>GLenum</ptype> <name>filter</name></param>
+            <alias name="glBlitFramebuffer"/>
+            <glx type="render" opcode="4330"/>
+        </command>
+        <command>
+            <proto>void <name>glBlitFramebufferNV</name></proto>
+            <param><ptype>GLint</ptype> <name>srcX0</name></param>
+            <param><ptype>GLint</ptype> <name>srcY0</name></param>
+            <param><ptype>GLint</ptype> <name>srcX1</name></param>
+            <param><ptype>GLint</ptype> <name>srcY1</name></param>
+            <param><ptype>GLint</ptype> <name>dstX0</name></param>
+            <param><ptype>GLint</ptype> <name>dstY0</name></param>
+            <param><ptype>GLint</ptype> <name>dstX1</name></param>
+            <param><ptype>GLint</ptype> <name>dstY1</name></param>
+            <param><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <param><ptype>GLenum</ptype> <name>filter</name></param>
+            <alias name="glBlitFramebuffer"/>
+        </command>
+        <command>
+            <proto>void <name>glBufferAddressRangeNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>address</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBufferData</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="size">const void *<name>data</name></param>
+            <param group="BufferUsageARB"><ptype>GLenum</ptype> <name>usage</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBufferDataARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferSizeARB"><ptype>GLsizeiptrARB</ptype> <name>size</name></param>
+            <param len="size">const void *<name>data</name></param>
+            <param group="BufferUsageARB"><ptype>GLenum</ptype> <name>usage</name></param>
+            <alias name="glBufferData"/>
+        </command>
+        <command>
+            <proto>void <name>glBufferParameteriAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBufferStorage</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="size">const void *<name>data</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBufferSubData</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="size">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glBufferSubDataARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffsetARB"><ptype>GLintptrARB</ptype> <name>offset</name></param>
+            <param group="BufferSizeARB"><ptype>GLsizeiptrARB</ptype> <name>size</name></param>
+            <param len="size">const void *<name>data</name></param>
+            <alias name="glBufferSubData"/>
+        </command>
+        <command>
+            <proto>void <name>glCallList</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <glx type="render" opcode="1"/>
+        </command>
+        <command>
+            <proto>void <name>glCallLists</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="ListNameType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(n,type)">const void *<name>lists</name></param>
+            <glx type="render" opcode="2"/>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glCheckFramebufferStatus</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <glx type="vendor" opcode="1427"/>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glCheckFramebufferStatusEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glCheckFramebufferStatus"/>
+            <glx type="vendor" opcode="1427"/>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glCheckFramebufferStatusOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto group="FramebufferStatus"><ptype>GLenum</ptype> <name>glCheckNamedFramebufferStatusEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClampColor</name></proto>
+            <param group="ClampColorTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ClampColorModeARB"><ptype>GLenum</ptype> <name>clamp</name></param>
+            <glx type="render" opcode="234"/>
+        </command>
+        <command>
+            <proto>void <name>glClampColorARB</name></proto>
+            <param group="ClampColorTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ClampColorModeARB"><ptype>GLenum</ptype> <name>clamp</name></param>
+            <alias name="glClampColor"/>
+            <glx type="render" opcode="234"/>
+        </command>
+        <command>
+            <proto>void <name>glClear</name></proto>
+            <param group="ClearBufferMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <glx type="render" opcode="127"/>
+        </command>
+        <command>
+            <proto>void <name>glClearAccum</name></proto>
+            <param><ptype>GLfloat</ptype> <name>red</name></param>
+            <param><ptype>GLfloat</ptype> <name>green</name></param>
+            <param><ptype>GLfloat</ptype> <name>blue</name></param>
+            <param><ptype>GLfloat</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="128"/>
+        </command>
+        <command>
+            <proto>void <name>glClearAccumxOES</name></proto>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>red</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>green</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>blue</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>alpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearBufferData</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearBufferSubData</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearBufferfi</name></proto>
+            <param><ptype>GLenum</ptype> <name>buffer</name></param>
+            <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
+            <param><ptype>GLfloat</ptype> <name>depth</name></param>
+            <param><ptype>GLint</ptype> <name>stencil</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearBufferfv</name></proto>
+            <param><ptype>GLenum</ptype> <name>buffer</name></param>
+            <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
+            <param len="COMPSIZE(buffer)">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearBufferiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>buffer</name></param>
+            <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
+            <param len="COMPSIZE(buffer)">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearBufferuiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>buffer</name></param>
+            <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
+            <param len="COMPSIZE(buffer)">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearColor</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="130"/>
+        </command>
+        <command>
+            <proto>void <name>glClearColorIiEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>red</name></param>
+            <param><ptype>GLint</ptype> <name>green</name></param>
+            <param><ptype>GLint</ptype> <name>blue</name></param>
+            <param><ptype>GLint</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="4292"/>
+        </command>
+        <command>
+            <proto>void <name>glClearColorIuiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>red</name></param>
+            <param><ptype>GLuint</ptype> <name>green</name></param>
+            <param><ptype>GLuint</ptype> <name>blue</name></param>
+            <param><ptype>GLuint</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="4293"/>
+        </command>
+        <command>
+            <proto>void <name>glClearColorx</name></proto>
+            <param><ptype>GLfixed</ptype> <name>red</name></param>
+            <param><ptype>GLfixed</ptype> <name>green</name></param>
+            <param><ptype>GLfixed</ptype> <name>blue</name></param>
+            <param><ptype>GLfixed</ptype> <name>alpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearColorxOES</name></proto>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>red</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>green</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>blue</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>alpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearDepth</name></proto>
+            <param><ptype>GLdouble</ptype> <name>depth</name></param>
+            <glx type="render" opcode="132"/>
+        </command>
+        <command>
+            <proto>void <name>glClearDepthdNV</name></proto>
+            <param><ptype>GLdouble</ptype> <name>depth</name></param>
+            <glx type="render" opcode="4284"/>
+        </command>
+        <command>
+            <proto>void <name>glClearDepthf</name></proto>
+            <param><ptype>GLfloat</ptype> <name>d</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearDepthfOES</name></proto>
+            <param group="ClampedFloat32"><ptype>GLclampf</ptype> <name>depth</name></param>
+            <glx type="render" opcode="4308"/>
+            <alias name="glClearDepthf"/>
+        </command>
+        <command>
+            <proto>void <name>glClearDepthx</name></proto>
+            <param><ptype>GLfixed</ptype> <name>depth</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearDepthxOES</name></proto>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>depth</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearIndex</name></proto>
+            <param group="MaskedColorIndexValueF"><ptype>GLfloat</ptype> <name>c</name></param>
+            <glx type="render" opcode="129"/>
+        </command>
+        <command>
+            <proto>void <name>glClearNamedBufferDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearNamedBufferSubDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearStencil</name></proto>
+            <param group="StencilValue"><ptype>GLint</ptype> <name>s</name></param>
+            <glx type="render" opcode="131"/>
+        </command>
+        <command>
+            <proto>void <name>glClearTexImage</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClearTexSubImage</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClientActiveTexture</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texture</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClientActiveTextureARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texture</name></param>
+            <alias name="glClientActiveTexture"/>
+        </command>
+        <command>
+            <proto>void <name>glClientActiveVertexStreamATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClientAttribDefaultEXT</name></proto>
+            <param group="ClientAttribMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glClientWaitSync</name></proto>
+            <param group="sync"><ptype>GLsync</ptype> <name>sync</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+            <param><ptype>GLuint64</ptype> <name>timeout</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glClientWaitSyncAPPLE</name></proto>
+            <param><ptype>GLsync</ptype> <name>sync</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+            <param><ptype>GLuint64</ptype> <name>timeout</name></param>
+            <alias name="glClientWaitSync"/>
+        </command>
+        <command>
+            <proto>void <name>glClipPlane</name></proto>
+            <param group="ClipPlaneName"><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>equation</name></param>
+            <glx type="render" opcode="77"/>
+        </command>
+        <command>
+            <proto>void <name>glClipPlanef</name></proto>
+            <param><ptype>GLenum</ptype> <name>p</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>eqn</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClipPlanefIMG</name></proto>
+            <param><ptype>GLenum</ptype> <name>p</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>eqn</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClipPlanefOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>equation</name></param>
+            <glx type="render" opcode="4312"/>
+        </command>
+        <command>
+            <proto>void <name>glClipPlanex</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>equation</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClipPlanexIMG</name></proto>
+            <param><ptype>GLenum</ptype> <name>p</name></param>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>eqn</name></param>
+        </command>
+        <command>
+            <proto>void <name>glClipPlanexOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>equation</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor3b</name></proto>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>red</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>green</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3bv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3bv</name></proto>
+            <param group="ColorB" len="3">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="6"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3d</name></proto>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>red</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>green</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3dv</name></proto>
+            <param group="ColorD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="7"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3f</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor3fVertex3fvSUN</name></proto>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor3fv</name></proto>
+            <param group="ColorF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="8"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>red</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>green</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3hvNV</name></proto>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4244"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3i</name></proto>
+            <param group="ColorI"><ptype>GLint</ptype> <name>red</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>green</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3iv</name></proto>
+            <param group="ColorI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="9"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3s</name></proto>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>red</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>green</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3sv</name></proto>
+            <param group="ColorS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="10"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3ub</name></proto>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>red</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>green</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3ubv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3ubv</name></proto>
+            <param group="ColorUB" len="3">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="11"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3ui</name></proto>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>red</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>green</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3uiv</name></proto>
+            <param group="ColorUI" len="3">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="12"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3us</name></proto>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>red</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>green</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>blue</name></param>
+            <vecequiv name="glColor3usv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3usv</name></proto>
+            <param group="ColorUS" len="3">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="13"/>
+        </command>
+        <command>
+            <proto>void <name>glColor3xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>red</name></param>
+            <param><ptype>GLfixed</ptype> <name>green</name></param>
+            <param><ptype>GLfixed</ptype> <name>blue</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor3xvOES</name></proto>
+            <param len="3">const <ptype>GLfixed</ptype> *<name>components</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4b</name></proto>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>red</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>green</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>blue</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4bv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4bv</name></proto>
+            <param group="ColorB" len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="14"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4d</name></proto>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>red</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>green</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>blue</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4dv</name></proto>
+            <param group="ColorD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="15"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4f</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4fNormal3fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4fNormal3fVertex3fvSUN</name></proto>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4fv</name></proto>
+            <param group="ColorF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="16"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>red</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>green</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>blue</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4hvNV</name></proto>
+            <param group="Half16NV" len="4">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4245"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4i</name></proto>
+            <param group="ColorI"><ptype>GLint</ptype> <name>red</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>green</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>blue</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4iv</name></proto>
+            <param group="ColorI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="17"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4s</name></proto>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>red</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>green</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>blue</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4sv</name></proto>
+            <param group="ColorS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="18"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4ub</name></proto>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>red</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>green</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>blue</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4ubv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4ubVertex2fSUN</name></proto>
+            <param><ptype>GLubyte</ptype> <name>r</name></param>
+            <param><ptype>GLubyte</ptype> <name>g</name></param>
+            <param><ptype>GLubyte</ptype> <name>b</name></param>
+            <param><ptype>GLubyte</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4ubVertex2fvSUN</name></proto>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>c</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4ubVertex3fSUN</name></proto>
+            <param><ptype>GLubyte</ptype> <name>r</name></param>
+            <param><ptype>GLubyte</ptype> <name>g</name></param>
+            <param><ptype>GLubyte</ptype> <name>b</name></param>
+            <param><ptype>GLubyte</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4ubVertex3fvSUN</name></proto>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4ubv</name></proto>
+            <param group="ColorUB" len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="19"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4ui</name></proto>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>red</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>green</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>blue</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4uiv</name></proto>
+            <param group="ColorUI" len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="20"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4us</name></proto>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>red</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>green</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>blue</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>alpha</name></param>
+            <vecequiv name="glColor4usv"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4usv</name></proto>
+            <param group="ColorUS" len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="21"/>
+        </command>
+        <command>
+            <proto>void <name>glColor4x</name></proto>
+            <param><ptype>GLfixed</ptype> <name>red</name></param>
+            <param><ptype>GLfixed</ptype> <name>green</name></param>
+            <param><ptype>GLfixed</ptype> <name>blue</name></param>
+            <param><ptype>GLfixed</ptype> <name>alpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>red</name></param>
+            <param><ptype>GLfixed</ptype> <name>green</name></param>
+            <param><ptype>GLfixed</ptype> <name>blue</name></param>
+            <param><ptype>GLfixed</ptype> <name>alpha</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColor4xvOES</name></proto>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>components</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorFormatNV</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorFragmentOp1ATI</name></proto>
+            <param group="FragmentOpATI"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMask</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Mod</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorFragmentOp2ATI</name></proto>
+            <param group="FragmentOpATI"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMask</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Mod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Mod</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorFragmentOp3ATI</name></proto>
+            <param group="FragmentOpATI"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMask</name></param>
+            <param><ptype>GLuint</ptype> <name>dstMod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1Mod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2Mod</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3Rep</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3Mod</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorMask</name></proto>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>red</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>green</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>blue</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="134"/>
+        </command>
+        <command>
+            <proto>void <name>glColorMaskIndexedEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>r</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>g</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>b</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>a</name></param>
+            <alias name="glColorMaski"/>
+        </command>
+        <command>
+            <proto>void <name>glColorMaski</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>r</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>g</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>b</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>a</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorMaskiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>r</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>g</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>b</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>a</name></param>
+            <alias name="glColorMaski"/>
+        </command>
+        <command>
+            <proto>void <name>glColorMaterial</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="ColorMaterialParameter"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="78"/>
+        </command>
+        <command>
+            <proto>void <name>glColorP3ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>color</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorP3uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>color</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorP4ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>color</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorP4uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>color</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorPointer</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorPointerEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(size,type,stride,count)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorPointerListIBM</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorPointervINTEL</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="4">const void **<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glColorSubTable</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>start</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,count)">const void *<name>data</name></param>
+            <glx type="render" opcode="195"/>
+            <glx type="render" opcode="312" name="glColorSubTablePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glColorSubTableEXT</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>start</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,count)">const void *<name>data</name></param>
+            <alias name="glColorSubTable"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTable</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>table</name></param>
+            <glx type="render" opcode="2053"/>
+            <glx type="render" opcode="313" name="glColorTablePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTableEXT</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>table</name></param>
+            <alias name="glColorTable"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTableParameterfv</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ColorTableParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2054"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTableParameterfvSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ColorTableParameterPNameSGI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glColorTableParameterfv"/>
+            <glx type="render" opcode="2054"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTableParameteriv</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ColorTableParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2055"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTableParameterivSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ColorTableParameterPNameSGI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glColorTableParameteriv"/>
+            <glx type="render" opcode="2055"/>
+        </command>
+        <command>
+            <proto>void <name>glColorTableSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>table</name></param>
+            <alias name="glColorTable"/>
+            <glx type="render" opcode="2053"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerInputNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerPortionNV"><ptype>GLenum</ptype> <name>portion</name></param>
+            <param group="CombinerVariableNV"><ptype>GLenum</ptype> <name>variable</name></param>
+            <param group="CombinerRegisterNV"><ptype>GLenum</ptype> <name>input</name></param>
+            <param group="CombinerMappingNV"><ptype>GLenum</ptype> <name>mapping</name></param>
+            <param group="CombinerComponentUsageNV"><ptype>GLenum</ptype> <name>componentUsage</name></param>
+            <glx type="render" opcode="4140"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerOutputNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerPortionNV"><ptype>GLenum</ptype> <name>portion</name></param>
+            <param group="CombinerRegisterNV"><ptype>GLenum</ptype> <name>abOutput</name></param>
+            <param group="CombinerRegisterNV"><ptype>GLenum</ptype> <name>cdOutput</name></param>
+            <param group="CombinerRegisterNV"><ptype>GLenum</ptype> <name>sumOutput</name></param>
+            <param group="CombinerScaleNV"><ptype>GLenum</ptype> <name>scale</name></param>
+            <param group="CombinerBiasNV"><ptype>GLenum</ptype> <name>bias</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>abDotProduct</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>cdDotProduct</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>muxSum</name></param>
+            <glx type="render" opcode="4141"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerParameterfNV</name></proto>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="4136"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerParameterfvNV</name></proto>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4137"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerParameteriNV</name></proto>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="4138"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerParameterivNV</name></proto>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4139"/>
+        </command>
+        <command>
+            <proto>void <name>glCombinerStageParameterfvNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompileShader</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompileShaderARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>shaderObj</name></param>
+            <alias name="glCompileShader"/>
+        </command>
+        <command>
+            <proto>void <name>glCompileShaderIncludeARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLchar</ptype> *const*<name>path</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedMultiTexImage1DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedMultiTexImage2DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedMultiTexImage3DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedMultiTexSubImage1DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedMultiTexSubImage2DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedMultiTexSubImage3DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage1D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <glx type="render" opcode="214"/>
+            <glx type="render" opcode="314" name="glCompressedTexImage1DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage1DARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexImage1D"/>
+            <glx type="render" opcode="214"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage2D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <glx type="render" opcode="215"/>
+            <glx type="render" opcode="315" name="glCompressedTexImage2DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage2DARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexImage2D"/>
+            <glx type="render" opcode="215"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage3D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <glx type="render" opcode="216"/>
+            <glx type="render" opcode="316" name="glCompressedTexImage3DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage3DARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexImage3D"/>
+            <glx type="render" opcode="216"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexImage3DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexImage3D"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage1D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <glx type="render" opcode="217"/>
+            <glx type="render" opcode="317" name="glCompressedTexSubImage1DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage1DARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexSubImage1D"/>
+            <glx type="render" opcode="217"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage2D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <glx type="render" opcode="218"/>
+            <glx type="render" opcode="318" name="glCompressedTexSubImage2DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage2DARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexSubImage2D"/>
+            <glx type="render" opcode="218"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage3D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <glx type="render" opcode="219"/>
+            <glx type="render" opcode="319" name="glCompressedTexSubImage3DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage3DARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param group="CompressedTextureARB" len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexSubImage3D"/>
+            <glx type="render" opcode="219"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTexSubImage3DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>data</name></param>
+            <alias name="glCompressedTexSubImage3D"/>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTextureImage1DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTextureImage2DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTextureImage3DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTextureSubImage1DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTextureSubImage2DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCompressedTextureSubImage3DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>imageSize</name></param>
+            <param len="imageSize">const void *<name>bits</name></param>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionFilter1D</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>image</name></param>
+            <glx type="render" opcode="4101"/>
+            <glx type="render" opcode="320" name="glConvolutionFilter1DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionFilter1DEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>image</name></param>
+            <alias name="glConvolutionFilter1D"/>
+            <glx type="render" opcode="4101"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionFilter2D</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>image</name></param>
+            <glx type="render" opcode="4102"/>
+            <glx type="render" opcode="321" name="glConvolutionFilter2DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionFilter2DEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>image</name></param>
+            <alias name="glConvolutionFilter2D"/>
+            <glx type="render" opcode="4102"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterf</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>params</name></param>
+            <glx type="render" opcode="4103"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterfEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>params</name></param>
+            <alias name="glConvolutionParameterf"/>
+            <glx type="render" opcode="4103"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterfv</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4104"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterfvEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glConvolutionParameterfv"/>
+            <glx type="render" opcode="4104"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameteri</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>params</name></param>
+            <glx type="render" opcode="4105"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameteriEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>params</name></param>
+            <alias name="glConvolutionParameteri"/>
+            <glx type="render" opcode="4105"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameteriv</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4106"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterivEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glConvolutionParameteriv"/>
+            <glx type="render" opcode="4106"/>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glConvolutionParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyBufferSubData</name></proto>
+            <param><ptype>GLenum</ptype> <name>readTarget</name></param>
+            <param><ptype>GLenum</ptype> <name>writeTarget</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>readOffset</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>writeOffset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyBufferSubDataNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>readTarget</name></param>
+            <param><ptype>GLenum</ptype> <name>writeTarget</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>readOffset</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>writeOffset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <alias name="glCopyBufferSubData"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyColorSubTable</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>start</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <glx type="render" opcode="196"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyColorSubTableEXT</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>start</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <alias name="glCopyColorSubTable"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyColorTable</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <glx type="render" opcode="2056"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyColorTableSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <alias name="glCopyColorTable"/>
+            <glx type="render" opcode="2056"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyConvolutionFilter1D</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <glx type="render" opcode="4107"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyConvolutionFilter1DEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <alias name="glCopyConvolutionFilter1D"/>
+            <glx type="render" opcode="4107"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyConvolutionFilter2D</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="4108"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyConvolutionFilter2DEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glCopyConvolutionFilter2D"/>
+            <glx type="render" opcode="4108"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyImageSubData</name></proto>
+            <param><ptype>GLuint</ptype> <name>srcName</name></param>
+            <param><ptype>GLenum</ptype> <name>srcTarget</name></param>
+            <param><ptype>GLint</ptype> <name>srcLevel</name></param>
+            <param><ptype>GLint</ptype> <name>srcX</name></param>
+            <param><ptype>GLint</ptype> <name>srcY</name></param>
+            <param><ptype>GLint</ptype> <name>srcZ</name></param>
+            <param><ptype>GLuint</ptype> <name>dstName</name></param>
+            <param><ptype>GLenum</ptype> <name>dstTarget</name></param>
+            <param><ptype>GLint</ptype> <name>dstLevel</name></param>
+            <param><ptype>GLint</ptype> <name>dstX</name></param>
+            <param><ptype>GLint</ptype> <name>dstY</name></param>
+            <param><ptype>GLint</ptype> <name>dstZ</name></param>
+            <param><ptype>GLsizei</ptype> <name>srcWidth</name></param>
+            <param><ptype>GLsizei</ptype> <name>srcHeight</name></param>
+            <param><ptype>GLsizei</ptype> <name>srcDepth</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyImageSubDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>srcName</name></param>
+            <param><ptype>GLenum</ptype> <name>srcTarget</name></param>
+            <param><ptype>GLint</ptype> <name>srcLevel</name></param>
+            <param><ptype>GLint</ptype> <name>srcX</name></param>
+            <param><ptype>GLint</ptype> <name>srcY</name></param>
+            <param><ptype>GLint</ptype> <name>srcZ</name></param>
+            <param><ptype>GLuint</ptype> <name>dstName</name></param>
+            <param><ptype>GLenum</ptype> <name>dstTarget</name></param>
+            <param><ptype>GLint</ptype> <name>dstLevel</name></param>
+            <param><ptype>GLint</ptype> <name>dstX</name></param>
+            <param><ptype>GLint</ptype> <name>dstY</name></param>
+            <param><ptype>GLint</ptype> <name>dstZ</name></param>
+            <param><ptype>GLsizei</ptype> <name>srcWidth</name></param>
+            <param><ptype>GLsizei</ptype> <name>srcHeight</name></param>
+            <param><ptype>GLsizei</ptype> <name>srcDepth</name></param>
+            <alias name="glCopyImageSubData"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyImageSubDataNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>srcName</name></param>
+            <param><ptype>GLenum</ptype> <name>srcTarget</name></param>
+            <param><ptype>GLint</ptype> <name>srcLevel</name></param>
+            <param><ptype>GLint</ptype> <name>srcX</name></param>
+            <param><ptype>GLint</ptype> <name>srcY</name></param>
+            <param><ptype>GLint</ptype> <name>srcZ</name></param>
+            <param><ptype>GLuint</ptype> <name>dstName</name></param>
+            <param><ptype>GLenum</ptype> <name>dstTarget</name></param>
+            <param><ptype>GLint</ptype> <name>dstLevel</name></param>
+            <param><ptype>GLint</ptype> <name>dstX</name></param>
+            <param><ptype>GLint</ptype> <name>dstY</name></param>
+            <param><ptype>GLint</ptype> <name>dstZ</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <glx type="render" opcode="4291"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyMultiTexImage1DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyMultiTexImage2DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyMultiTexSubImage1DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyMultiTexSubImage2DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyMultiTexSubImage3DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>resultPath</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>srcPath</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyPixels</name></proto>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelCopyType"><ptype>GLenum</ptype> <name>type</name></param>
+            <glx type="render" opcode="172"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexImage1D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <glx type="render" opcode="4119"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexImage1DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <alias name="glCopyTexImage1D"/>
+            <glx type="render" opcode="4119"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexImage2D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <glx type="render" opcode="4120"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexImage2DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <alias name="glCopyTexImage2D"/>
+            <glx type="render" opcode="4120"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage1D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <glx type="render" opcode="4121"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage1DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <alias name="glCopyTexSubImage1D"/>
+            <glx type="render" opcode="4121"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage2D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="4122"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage2DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glCopyTexSubImage2D"/>
+            <glx type="render" opcode="4122"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage3D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="4123"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage3DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glCopyTexSubImage3D"/>
+            <glx type="render" opcode="4123"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTexSubImage3DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glCopyTexSubImage3D"/>
+        </command>
+        <command>
+            <proto>void <name>glCopyTextureImage1DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyTextureImage2DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyTextureLevelsAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>destinationTexture</name></param>
+            <param><ptype>GLuint</ptype> <name>sourceTexture</name></param>
+            <param><ptype>GLint</ptype> <name>sourceBaseLevel</name></param>
+            <param><ptype>GLsizei</ptype> <name>sourceLevelCount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyTextureSubImage1DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyTextureSubImage2DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCopyTextureSubImage3DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCoverFillPathInstancedNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>pathNameType</name></param>
+            <param group="PathElement" len="COMPSIZE(numPaths,pathNameType,paths)">const void *<name>paths</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathBase</name></param>
+            <param group="PathCoverMode"><ptype>GLenum</ptype> <name>coverMode</name></param>
+            <param group="PathTransformType"><ptype>GLenum</ptype> <name>transformType</name></param>
+            <param len="COMPSIZE(numPaths,transformType)">const <ptype>GLfloat</ptype> *<name>transformValues</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCoverFillPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathCoverMode"><ptype>GLenum</ptype> <name>coverMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCoverStrokePathInstancedNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>pathNameType</name></param>
+            <param group="PathElement" len="COMPSIZE(numPaths,pathNameType,paths)">const void *<name>paths</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathBase</name></param>
+            <param group="PathCoverMode"><ptype>GLenum</ptype> <name>coverMode</name></param>
+            <param group="PathTransformType"><ptype>GLenum</ptype> <name>transformType</name></param>
+            <param len="COMPSIZE(numPaths,transformType)">const <ptype>GLfloat</ptype> *<name>transformValues</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCoverStrokePathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathCoverMode"><ptype>GLenum</ptype> <name>coverMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCoverageMaskNV</name></proto>
+            <param><ptype>GLboolean</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCoverageOperationNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>operation</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCreatePerfQueryINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryId</name></param>
+            <param><ptype>GLuint</ptype> *<name>queryHandle</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glCreateProgram</name></proto>
+        </command>
+        <command>
+            <proto group="handleARB"><ptype>GLhandleARB</ptype> <name>glCreateProgramObjectARB</name></proto>
+            <alias name="glCreateProgram"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glCreateShader</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+        </command>
+        <command>
+            <proto group="handleARB"><ptype>GLhandleARB</ptype> <name>glCreateShaderObjectARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>shaderType</name></param>
+            <alias name="glCreateShader"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glCreateShaderProgramEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>string</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glCreateShaderProgramv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLchar</ptype> *const*<name>strings</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glCreateShaderProgramvEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLchar</ptype> **<name>strings</name></param>
+        </command>
+        <command>
+            <proto group="sync"><ptype>GLsync</ptype> <name>glCreateSyncFromCLeventARB</name></proto>
+            <param group="cl_context"><ptype>struct _cl_context</ptype> *<name>context</name></param>
+            <param group="cl_event"><ptype>struct _cl_event</ptype> *<name>event</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCullFace</name></proto>
+            <param group="CullFaceMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="79"/>
+        </command>
+        <command>
+            <proto>void <name>glCullParameterdvEXT</name></proto>
+            <param group="CullParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCullParameterfvEXT</name></proto>
+            <param group="CullParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glCurrentPaletteMatrixARB</name></proto>
+            <param><ptype>GLint</ptype> <name>index</name></param>
+            <glx type="render" opcode="4329"/>
+        </command>
+        <command>
+            <proto>void <name>glCurrentPaletteMatrixOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>matrixpaletteindex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageCallback</name></proto>
+            <param><ptype>GLDEBUGPROC</ptype> <name>callback</name></param>
+            <param>const void *<name>userParam</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageCallbackAMD</name></proto>
+            <param><ptype>GLDEBUGPROCAMD</ptype> <name>callback</name></param>
+            <param>void *<name>userParam</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageCallbackARB</name></proto>
+            <param><ptype>GLDEBUGPROCARB</ptype> <name>callback</name></param>
+            <param len="COMPSIZE(callback)">const void *<name>userParam</name></param>
+            <alias name="glDebugMessageCallback"/>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageCallbackKHR</name></proto>
+            <param><ptype>GLDEBUGPROCKHR</ptype> <name>callback</name></param>
+            <param>const void *<name>userParam</name></param>
+            <alias name="glDebugMessageCallback"/>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageControl</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>enabled</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageControlARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>enabled</name></param>
+            <alias name="glDebugMessageControl"/>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageControlKHR</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param>const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <param><ptype>GLboolean</ptype> <name>enabled</name></param>
+            <alias name="glDebugMessageControl"/>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageEnableAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>category</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>enabled</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageInsert</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="COMPSIZE(buf,length)">const <ptype>GLchar</ptype> *<name>buf</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageInsertAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>category</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">const <ptype>GLchar</ptype> *<name>buf</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageInsertARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">const <ptype>GLchar</ptype> *<name>buf</name></param>
+            <alias name="glDebugMessageInsert"/>
+        </command>
+        <command>
+            <proto>void <name>glDebugMessageInsertKHR</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>severity</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>buf</name></param>
+            <alias name="glDebugMessageInsert"/>
+        </command>
+        <command>
+            <proto>void <name>glDeformSGIX</name></proto>
+            <param group="FfdMaskSGIX"><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <glx type="render" opcode="2075"/>
+        </command>
+        <command>
+            <proto>void <name>glDeformationMap3dSGIX</name></proto>
+            <param group="FfdTargetSGIX"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>w1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>w2</name></param>
+            <param><ptype>GLint</ptype> <name>wstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>worder</name></param>
+            <param group="CoordD" len="COMPSIZE(target,ustride,uorder,vstride,vorder,wstride,worder)">const <ptype>GLdouble</ptype> *<name>points</name></param>
+            <glx type="render" opcode="2073"/>
+        </command>
+        <command>
+            <proto>void <name>glDeformationMap3fSGIX</name></proto>
+            <param group="FfdTargetSGIX"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>w1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>w2</name></param>
+            <param><ptype>GLint</ptype> <name>wstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>worder</name></param>
+            <param group="CoordF" len="COMPSIZE(target,ustride,uorder,vstride,vorder,wstride,worder)">const <ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="render" opcode="2074"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteAsyncMarkersSGIX</name></proto>
+            <param><ptype>GLuint</ptype> <name>marker</name></param>
+            <param><ptype>GLsizei</ptype> <name>range</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteBuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>buffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteBuffersARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>buffers</name></param>
+            <alias name="glDeleteBuffers"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteFencesAPPLE</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="FenceNV" len="n">const <ptype>GLuint</ptype> *<name>fences</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteFencesNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="FenceNV" len="n">const <ptype>GLuint</ptype> *<name>fences</name></param>
+            <glx type="vendor" opcode="1276"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteFragmentShaderATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteFramebuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>framebuffers</name></param>
+            <glx type="render" opcode="4320"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteFramebuffersEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>framebuffers</name></param>
+            <alias name="glDeleteFramebuffers"/>
+            <glx type="render" opcode="4320"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteFramebuffersOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>framebuffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteLists</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param><ptype>GLsizei</ptype> <name>range</name></param>
+            <glx type="single" opcode="103"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteNamedStringARB</name></proto>
+            <param><ptype>GLint</ptype> <name>namelen</name></param>
+            <param len="namelen">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteNamesAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>num</name></param>
+            <param len="num">const <ptype>GLuint</ptype> *<name>names</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteObjectARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>obj</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteOcclusionQueriesNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>ids</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeletePathsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>range</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeletePerfMonitorsAMD</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>monitors</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeletePerfQueryINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryHandle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteProgram</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <glx type="single" opcode="202"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteProgramPipelines</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>pipelines</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteProgramPipelinesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>pipelines</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteProgramsARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>programs</name></param>
+            <glx type="vendor" opcode="1294"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteProgramsNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>programs</name></param>
+            <alias name="glDeleteProgramsARB"/>
+            <glx type="vendor" opcode="1294"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteQueries</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <glx type="single" opcode="161"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteQueriesARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <alias name="glDeleteQueries"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteQueriesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>ids</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteRenderbuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+            <glx type="render" opcode="4317"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteRenderbuffersEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+            <alias name="glDeleteRenderbuffers"/>
+            <glx type="render" opcode="4317"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteRenderbuffersOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteSamplers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>samplers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteShader</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <glx type="single" opcode="195"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteSync</name></proto>
+            <param group="sync"><ptype>GLsync</ptype> <name>sync</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteSyncAPPLE</name></proto>
+            <param><ptype>GLsync</ptype> <name>sync</name></param>
+            <alias name="glDeleteSync"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteTextures</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <glx type="single" opcode="144"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteTexturesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <glx type="vendor" opcode="12"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteTransformFeedbacks</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>ids</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDeleteTransformFeedbacksNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>ids</name></param>
+            <alias name="glDeleteTransformFeedbacks"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteVertexArrays</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>arrays</name></param>
+            <glx type="render" opcode="351"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteVertexArraysAPPLE</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>arrays</name></param>
+            <alias name="glDeleteVertexArrays"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteVertexArraysOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>arrays</name></param>
+            <alias name="glDeleteVertexArrays"/>
+        </command>
+        <command>
+            <proto>void <name>glDeleteVertexShaderEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDepthBoundsEXT</name></proto>
+            <param group="ClampedFloat64"><ptype>GLclampd</ptype> <name>zmin</name></param>
+            <param group="ClampedFloat64"><ptype>GLclampd</ptype> <name>zmax</name></param>
+            <glx type="render" opcode="4229"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthBoundsdNV</name></proto>
+            <param><ptype>GLdouble</ptype> <name>zmin</name></param>
+            <param><ptype>GLdouble</ptype> <name>zmax</name></param>
+            <glx type="render" opcode="4285"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthFunc</name></proto>
+            <param group="DepthFunction"><ptype>GLenum</ptype> <name>func</name></param>
+            <glx type="render" opcode="164"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthMask</name></proto>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>flag</name></param>
+            <glx type="render" opcode="135"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthRange</name></proto>
+            <param><ptype>GLdouble</ptype> <name>near</name></param>
+            <param><ptype>GLdouble</ptype> <name>far</name></param>
+            <glx type="render" opcode="174"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangeArrayv</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(count)">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangeIndexed</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>n</name></param>
+            <param><ptype>GLdouble</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangedNV</name></proto>
+            <param><ptype>GLdouble</ptype> <name>zNear</name></param>
+            <param><ptype>GLdouble</ptype> <name>zFar</name></param>
+            <glx type="render" opcode="4283"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangef</name></proto>
+            <param><ptype>GLfloat</ptype> <name>n</name></param>
+            <param><ptype>GLfloat</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangefOES</name></proto>
+            <param group="ClampedFloat32"><ptype>GLclampf</ptype> <name>n</name></param>
+            <param group="ClampedFloat32"><ptype>GLclampf</ptype> <name>f</name></param>
+            <glx type="render" opcode="4309"/>
+            <alias name="glDepthRangef"/>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangex</name></proto>
+            <param><ptype>GLfixed</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDepthRangexOES</name></proto>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>n</name></param>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDetachObjectARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>containerObj</name></param>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>attachedObj</name></param>
+            <alias name="glDetachShader"/>
+        </command>
+        <command>
+            <proto>void <name>glDetachShader</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDetailTexFuncSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n*2">const <ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="render" opcode="2051"/>
+        </command>
+        <command>
+            <proto>void <name>glDisable</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>cap</name></param>
+            <glx type="render" opcode="138"/>
+        </command>
+        <command>
+            <proto>void <name>glDisableClientState</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableClientStateIndexedEXT</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableClientStateiEXT</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableDriverControlQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>driverControl</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableIndexedEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glDisablei"/>
+        </command>
+        <command>
+            <proto>void <name>glDisableVariantClientStateEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableVertexArrayAttribEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableVertexArrayEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableVertexAttribAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableVertexAttribArray</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableVertexAttribArrayARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glDisableVertexAttribArray"/>
+        </command>
+        <command>
+            <proto>void <name>glDisablei</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDisableiEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glDisablei"/>
+        </command>
+        <command>
+            <proto>void <name>glDiscardFramebufferEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>numAttachments</name></param>
+            <param len="numAttachments">const <ptype>GLenum</ptype> *<name>attachments</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDispatchCompute</name></proto>
+            <param><ptype>GLuint</ptype> <name>num_groups_x</name></param>
+            <param><ptype>GLuint</ptype> <name>num_groups_y</name></param>
+            <param><ptype>GLuint</ptype> <name>num_groups_z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDispatchComputeGroupSizeARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>num_groups_x</name></param>
+            <param><ptype>GLuint</ptype> <name>num_groups_y</name></param>
+            <param><ptype>GLuint</ptype> <name>num_groups_z</name></param>
+            <param><ptype>GLuint</ptype> <name>group_size_x</name></param>
+            <param><ptype>GLuint</ptype> <name>group_size_y</name></param>
+            <param><ptype>GLuint</ptype> <name>group_size_z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDispatchComputeIndirect</name></proto>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>indirect</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawArrays</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <glx type="render" opcode="193"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysEXT</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <alias name="glDrawArrays"/>
+            <glx type="render" opcode="4116"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysIndirect</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param>const void *<name>indirect</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysInstanced</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysInstancedANGLE</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawArraysInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysInstancedARB</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawArraysInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysInstancedBaseInstance</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+            <param><ptype>GLuint</ptype> <name>baseinstance</name></param>
+        </command>
+        <command comment="primcount should be renamed to instanceCount for OpenGL ES">
+            <proto>void <name>glDrawArraysInstancedEXT</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>start</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawArraysInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawArraysInstancedNV</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawArraysInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffer</name></proto>
+            <param group="DrawBufferMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="126"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="DrawBufferModeATI" len="n">const <ptype>GLenum</ptype> *<name>bufs</name></param>
+            <glx type="render" opcode="233"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffersARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="DrawBufferModeATI" len="n">const <ptype>GLenum</ptype> *<name>bufs</name></param>
+            <alias name="glDrawBuffers"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffersATI</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="DrawBufferModeATI" len="n">const <ptype>GLenum</ptype> *<name>bufs</name></param>
+            <alias name="glDrawBuffers"/>
+            <glx type="render" opcode="233"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffersEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param>const <ptype>GLenum</ptype> *<name>bufs</name></param>
+            <alias name="glDrawBuffers"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffersIndexedEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLenum</ptype> *<name>location</name></param>
+            <param len="n">const <ptype>GLint</ptype> *<name>indices</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawBuffersNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLenum</ptype> *<name>bufs</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementArrayAPPLE</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementArrayATI</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElements</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsBaseVertex</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLint</ptype> <name>basevertex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsIndirect</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param>const void *<name>indirect</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstanced</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstancedANGLE</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawElementsInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstancedARB</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawElementsInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstancedBaseInstance</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="count">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+            <param><ptype>GLuint</ptype> <name>baseinstance</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstancedBaseVertex</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+            <param><ptype>GLint</ptype> <name>basevertex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstancedBaseVertexBaseInstance</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="count">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+            <param><ptype>GLint</ptype> <name>basevertex</name></param>
+            <param><ptype>GLuint</ptype> <name>baseinstance</name></param>
+        </command>
+        <command comment="primcount should be renamed to instanceCount for OpenGL ES">
+            <proto>void <name>glDrawElementsInstancedEXT</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawElementsInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawElementsInstancedNV</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glDrawElementsInstanced"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawMeshArraysSUN</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawPixels</name></proto>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="173"/>
+            <glx type="render" opcode="322" name="glDrawPixelsPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawRangeElementArrayAPPLE</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>start</name></param>
+            <param><ptype>GLuint</ptype> <name>end</name></param>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawRangeElementArrayATI</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>start</name></param>
+            <param><ptype>GLuint</ptype> <name>end</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawRangeElements</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>start</name></param>
+            <param><ptype>GLuint</ptype> <name>end</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawRangeElementsBaseVertex</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>start</name></param>
+            <param><ptype>GLuint</ptype> <name>end</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <param><ptype>GLint</ptype> <name>basevertex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawRangeElementsEXT</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>start</name></param>
+            <param><ptype>GLuint</ptype> <name>end</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(count,type)">const void *<name>indices</name></param>
+            <alias name="glDrawRangeElements"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexfOES</name></proto>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>width</name></param>
+            <param><ptype>GLfloat</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexfvOES</name></proto>
+            <param>const <ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexiOES</name></proto>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>width</name></param>
+            <param><ptype>GLint</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexivOES</name></proto>
+            <param>const <ptype>GLint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexsOES</name></proto>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <param><ptype>GLshort</ptype> <name>width</name></param>
+            <param><ptype>GLshort</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexsvOES</name></proto>
+            <param>const <ptype>GLshort</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTextureNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLfloat</ptype> <name>x0</name></param>
+            <param><ptype>GLfloat</ptype> <name>y0</name></param>
+            <param><ptype>GLfloat</ptype> <name>x1</name></param>
+            <param><ptype>GLfloat</ptype> <name>y1</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>s0</name></param>
+            <param><ptype>GLfloat</ptype> <name>t0</name></param>
+            <param><ptype>GLfloat</ptype> <name>s1</name></param>
+            <param><ptype>GLfloat</ptype> <name>t1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+            <param><ptype>GLfixed</ptype> <name>width</name></param>
+            <param><ptype>GLfixed</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTexxvOES</name></proto>
+            <param>const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTransformFeedback</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTransformFeedbackInstanced</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTransformFeedbackNV</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <alias name="glDrawTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glDrawTransformFeedbackStream</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+        </command>
+        <command>
+            <proto>void <name>glDrawTransformFeedbackStreamInstanced</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLsizei</ptype> <name>instancecount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEGLImageTargetRenderbufferStorageOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLeglImageOES</ptype> <name>image</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEGLImageTargetTexture2DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLeglImageOES</ptype> <name>image</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEdgeFlag</name></proto>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>flag</name></param>
+            <vecequiv name="glEdgeFlagv"/>
+        </command>
+        <command>
+            <proto>void <name>glEdgeFlagFormatNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEdgeFlagPointer</name></proto>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEdgeFlagPointerEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean" len="COMPSIZE(stride,count)">const <ptype>GLboolean</ptype> *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEdgeFlagPointerListIBM</name></proto>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param group="BooleanPointer" len="COMPSIZE(stride)">const <ptype>GLboolean</ptype> **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEdgeFlagv</name></proto>
+            <param group="Boolean" len="1">const <ptype>GLboolean</ptype> *<name>flag</name></param>
+            <glx type="render" opcode="22"/>
+        </command>
+        <command>
+            <proto>void <name>glElementPointerAPPLE</name></proto>
+            <param group="ElementPointerTypeATI"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(type)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glElementPointerATI</name></proto>
+            <param group="ElementPointerTypeATI"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(type)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnable</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>cap</name></param>
+            <glx type="render" opcode="139"/>
+        </command>
+        <command>
+            <proto>void <name>glEnableClientState</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableClientStateIndexedEXT</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableClientStateiEXT</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableDriverControlQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>driverControl</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableIndexedEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glEnablei"/>
+        </command>
+        <command>
+            <proto>void <name>glEnableVariantClientStateEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableVertexArrayAttribEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableVertexArrayEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableVertexAttribAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableVertexAttribArray</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableVertexAttribArrayARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glEnableVertexAttribArray"/>
+        </command>
+        <command>
+            <proto>void <name>glEnablei</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEnableiEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glEnablei"/>
+        </command>
+        <command>
+            <proto>void <name>glEnd</name></proto>
+            <glx type="render" opcode="23"/>
+        </command>
+        <command>
+            <proto>void <name>glEndConditionalRender</name></proto>
+            <glx type="render" opcode="349"/>
+        </command>
+        <command>
+            <proto>void <name>glEndConditionalRenderNV</name></proto>
+            <alias name="glEndConditionalRender"/>
+        </command>
+        <command>
+            <proto>void <name>glEndConditionalRenderNVX</name></proto>
+            <alias name="glEndConditionalRender"/>
+        </command>
+        <command>
+            <proto>void <name>glEndFragmentShaderATI</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glEndList</name></proto>
+            <glx type="single" opcode="102"/>
+        </command>
+        <command>
+            <proto>void <name>glEndOcclusionQueryNV</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glEndPerfMonitorAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>monitor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEndPerfQueryINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryHandle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEndQuery</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <glx type="render" opcode="232"/>
+        </command>
+        <command>
+            <proto>void <name>glEndQueryARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glEndQuery"/>
+        </command>
+        <command>
+            <proto>void <name>glEndQueryEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEndQueryIndexed</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEndTilingQCOM</name></proto>
+            <param><ptype>GLbitfield</ptype> <name>preserveMask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEndTransformFeedback</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glEndTransformFeedbackEXT</name></proto>
+            <alias name="glEndTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glEndTransformFeedbackNV</name></proto>
+            <alias name="glEndTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glEndVertexShaderEXT</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glEndVideoCaptureNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord1d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u</name></param>
+            <vecequiv name="glEvalCoord1dv"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord1dv</name></proto>
+            <param group="CoordD" len="1">const <ptype>GLdouble</ptype> *<name>u</name></param>
+            <glx type="render" opcode="151"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord1f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u</name></param>
+            <vecequiv name="glEvalCoord1fv"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord1fv</name></proto>
+            <param group="CoordF" len="1">const <ptype>GLfloat</ptype> *<name>u</name></param>
+            <glx type="render" opcode="152"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord1xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>u</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord1xvOES</name></proto>
+            <param len="1">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord2d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v</name></param>
+            <vecequiv name="glEvalCoord2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord2dv</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>u</name></param>
+            <glx type="render" opcode="153"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord2f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v</name></param>
+            <vecequiv name="glEvalCoord2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord2fv</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>u</name></param>
+            <glx type="render" opcode="154"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord2xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>u</name></param>
+            <param><ptype>GLfixed</ptype> <name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEvalCoord2xvOES</name></proto>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEvalMapsNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="EvalMapsModeNV"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glEvalMesh1</name></proto>
+            <param group="MeshMode1"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>i1</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>i2</name></param>
+            <glx type="render" opcode="155"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalMesh2</name></proto>
+            <param group="MeshMode2"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>i1</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>i2</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>j1</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>j2</name></param>
+            <glx type="render" opcode="157"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalPoint1</name></proto>
+            <param><ptype>GLint</ptype> <name>i</name></param>
+            <glx type="render" opcode="156"/>
+        </command>
+        <command>
+            <proto>void <name>glEvalPoint2</name></proto>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>i</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>j</name></param>
+            <glx type="render" opcode="158"/>
+        </command>
+        <command>
+            <proto>void <name>glExecuteProgramNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4181"/>
+        </command>
+        <command>
+            <proto>void <name>glExtGetBufferPointervQCOM</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param>void **<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetBuffersQCOM</name></proto>
+            <param len="maxBuffers"><ptype>GLuint</ptype> *<name>buffers</name></param>
+            <param><ptype>GLint</ptype> <name>maxBuffers</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>numBuffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetFramebuffersQCOM</name></proto>
+            <param len="maxFramebuffers"><ptype>GLuint</ptype> *<name>framebuffers</name></param>
+            <param><ptype>GLint</ptype> <name>maxFramebuffers</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>numFramebuffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetProgramBinarySourceQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLchar</ptype> *<name>source</name></param>
+            <param><ptype>GLint</ptype> *<name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetProgramsQCOM</name></proto>
+            <param len="maxPrograms"><ptype>GLuint</ptype> *<name>programs</name></param>
+            <param><ptype>GLint</ptype> <name>maxPrograms</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>numPrograms</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetRenderbuffersQCOM</name></proto>
+            <param len="maxRenderbuffers"><ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+            <param><ptype>GLint</ptype> <name>maxRenderbuffers</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>numRenderbuffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetShadersQCOM</name></proto>
+            <param len="maxShaders"><ptype>GLuint</ptype> *<name>shaders</name></param>
+            <param><ptype>GLint</ptype> <name>maxShaders</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>numShaders</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetTexLevelParameterivQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetTexSubImageQCOM</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param>void *<name>texels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtGetTexturesQCOM</name></proto>
+            <param><ptype>GLuint</ptype> *<name>textures</name></param>
+            <param><ptype>GLint</ptype> <name>maxTextures</name></param>
+            <param><ptype>GLint</ptype> *<name>numTextures</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glExtIsProgramBinaryQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtTexObjectStateOverrideiQCOM</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glExtractComponentEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>src</name></param>
+            <param><ptype>GLuint</ptype> <name>num</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFeedbackBuffer</name></proto>
+            <param><ptype>GLsizei</ptype> <name>size</name></param>
+            <param group="FeedbackType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="FeedbackElement" len="size"><ptype>GLfloat</ptype> *<name>buffer</name></param>
+            <glx type="single" opcode="105"/>
+        </command>
+        <command>
+            <proto>void <name>glFeedbackBufferxOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="n">const <ptype>GLfixed</ptype> *<name>buffer</name></param>
+        </command>
+        <command>
+            <proto group="sync"><ptype>GLsync</ptype> <name>glFenceSync</name></proto>
+            <param><ptype>GLenum</ptype> <name>condition</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLsync</ptype> <name>glFenceSyncAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>condition</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+            <alias name="glFenceSync"/>
+        </command>
+        <command>
+            <proto>void <name>glFinalCombinerInputNV</name></proto>
+            <param group="CombinerVariableNV"><ptype>GLenum</ptype> <name>variable</name></param>
+            <param group="CombinerRegisterNV"><ptype>GLenum</ptype> <name>input</name></param>
+            <param group="CombinerMappingNV"><ptype>GLenum</ptype> <name>mapping</name></param>
+            <param group="CombinerComponentUsageNV"><ptype>GLenum</ptype> <name>componentUsage</name></param>
+            <glx type="render" opcode="4142"/>
+        </command>
+        <command>
+            <proto>void <name>glFinish</name></proto>
+            <glx type="single" opcode="108"/>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glFinishAsyncSGIX</name></proto>
+            <param len="1"><ptype>GLuint</ptype> *<name>markerp</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFinishFenceAPPLE</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFinishFenceNV</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+            <glx type="vendor" opcode="1312"/>
+        </command>
+        <command>
+            <proto>void <name>glFinishObjectAPPLE</name></proto>
+            <param group="ObjectTypeAPPLE"><ptype>GLenum</ptype> <name>object</name></param>
+            <param><ptype>GLint</ptype> <name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFinishTextureSUNX</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glFlush</name></proto>
+            <glx type="single" opcode="142"/>
+        </command>
+        <command>
+            <proto>void <name>glFlushMappedBufferRange</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFlushMappedBufferRangeAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <alias name="glFlushMappedBufferRange"/>
+        </command>
+        <command>
+            <proto>void <name>glFlushMappedBufferRangeEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>length</name></param>
+            <alias name="glFlushMappedBufferRange"/>
+        </command>
+        <command>
+            <proto>void <name>glFlushMappedNamedBufferRangeEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFlushPixelDataRangeNV</name></proto>
+            <param group="PixelDataRangeTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFlushRasterSGIX</name></proto>
+            <glx type="vendor" opcode="4105"/>
+        </command>
+        <command>
+            <proto>void <name>glFlushStaticDataIBM</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFlushVertexArrayRangeAPPLE</name></proto>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFlushVertexArrayRangeNV</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordFormatNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordPointer</name></proto>
+            <param group="FogPointerTypeEXT"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordPointerEXT</name></proto>
+            <param group="FogPointerTypeEXT"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+            <alias name="glFogCoordPointer"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordPointerListIBM</name></proto>
+            <param group="FogPointerTypeIBM"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordd</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>coord</name></param>
+            <vecequiv name="glFogCoorddv"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoorddEXT</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>coord</name></param>
+            <alias name="glFogCoordd"/>
+            <vecequiv name="glFogCoorddvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoorddv</name></proto>
+            <param group="CoordD" len="1">const <ptype>GLdouble</ptype> *<name>coord</name></param>
+            <glx type="render" opcode="4125"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoorddvEXT</name></proto>
+            <param group="CoordD" len="1">const <ptype>GLdouble</ptype> *<name>coord</name></param>
+            <alias name="glFogCoorddv"/>
+            <glx type="render" opcode="4125"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordf</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>coord</name></param>
+            <vecequiv name="glFogCoordfv"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordfEXT</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>coord</name></param>
+            <alias name="glFogCoordf"/>
+            <vecequiv name="glFogCoordfvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordfv</name></proto>
+            <param group="CoordF" len="1">const <ptype>GLfloat</ptype> *<name>coord</name></param>
+            <glx type="render" opcode="4124"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordfvEXT</name></proto>
+            <param group="CoordF" len="1">const <ptype>GLfloat</ptype> *<name>coord</name></param>
+            <alias name="glFogCoordfv"/>
+            <glx type="render" opcode="4124"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordhNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>fog</name></param>
+            <vecequiv name="glFogCoordhvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glFogCoordhvNV</name></proto>
+            <param group="Half16NV" len="1">const <ptype>GLhalfNV</ptype> *<name>fog</name></param>
+            <glx type="render" opcode="4254"/>
+        </command>
+        <command>
+            <proto>void <name>glFogFuncSGIS</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n*2">const <ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="render" opcode="2067"/>
+        </command>
+        <command>
+            <proto>void <name>glFogf</name></proto>
+            <param group="FogParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="80"/>
+        </command>
+        <command>
+            <proto>void <name>glFogfv</name></proto>
+            <param group="FogParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="81"/>
+        </command>
+        <command>
+            <proto>void <name>glFogi</name></proto>
+            <param group="FogParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="82"/>
+        </command>
+        <command>
+            <proto>void <name>glFogiv</name></proto>
+            <param group="FogParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="83"/>
+        </command>
+        <command>
+            <proto>void <name>glFogx</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFogxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFogxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFogxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentColorMaterialSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightModelfSGIX</name></proto>
+            <param group="FragmentLightModelParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightModelfvSGIX</name></proto>
+            <param group="FragmentLightModelParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightModeliSGIX</name></proto>
+            <param group="FragmentLightModelParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightModelivSGIX</name></proto>
+            <param group="FragmentLightModelParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightfSGIX</name></proto>
+            <param group="FragmentLightNameSGIX"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="FragmentLightParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightfvSGIX</name></proto>
+            <param group="FragmentLightNameSGIX"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="FragmentLightParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightiSGIX</name></proto>
+            <param group="FragmentLightNameSGIX"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="FragmentLightParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentLightivSGIX</name></proto>
+            <param group="FragmentLightNameSGIX"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="FragmentLightParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentMaterialfSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentMaterialfvSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentMaterialiSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFragmentMaterialivSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFrameTerminatorGREMEDY</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glFrameZoomSGIX</name></proto>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>factor</name></param>
+            <glx type="render" opcode="2072"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferDrawBufferEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="DrawBufferMode"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferDrawBuffersEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="DrawBufferMode" len="n">const <ptype>GLenum</ptype> *<name>bufs</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferParameteri</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferReadBufferEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="ReadBufferMode"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferRenderbuffer</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>renderbuffertarget</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <glx type="render" opcode="4324"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferRenderbufferEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>renderbuffertarget</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <alias name="glFramebufferRenderbuffer"/>
+            <glx type="render" opcode="4324"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferRenderbufferOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>renderbuffertarget</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture1D</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <glx type="render" opcode="4321"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture1DEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <alias name="glFramebufferTexture1D"/>
+            <glx type="render" opcode="4321"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture2D</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <glx type="render" opcode="4322"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture2DEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <alias name="glFramebufferTexture2D"/>
+            <glx type="render" opcode="4322"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture2DMultisampleEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture2DMultisampleIMG</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture2DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture3D</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <glx type="render" opcode="4323"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture3DEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <alias name="glFramebufferTexture3D"/>
+            <glx type="render" opcode="4323"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTexture3DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <alias name="glFramebufferTexture3D"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureARB</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <alias name="glFramebufferTexture"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <alias name="glFramebufferTextureARB"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureFaceARB</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>face</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureFaceEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>face</name></param>
+            <alias name="glFramebufferTextureFaceARB"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureLayer</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>layer</name></param>
+            <glx type="render" opcode="237"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureLayerARB</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>layer</name></param>
+            <alias name="glFramebufferTextureLayer"/>
+        </command>
+        <command>
+            <proto>void <name>glFramebufferTextureLayerEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>layer</name></param>
+            <alias name="glFramebufferTextureLayer"/>
+        </command>
+        <command>
+            <proto>void <name>glFreeObjectBufferATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFrontFace</name></proto>
+            <param group="FrontFaceDirection"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="84"/>
+        </command>
+        <command>
+            <proto>void <name>glFrustum</name></proto>
+            <param><ptype>GLdouble</ptype> <name>left</name></param>
+            <param><ptype>GLdouble</ptype> <name>right</name></param>
+            <param><ptype>GLdouble</ptype> <name>bottom</name></param>
+            <param><ptype>GLdouble</ptype> <name>top</name></param>
+            <param><ptype>GLdouble</ptype> <name>zNear</name></param>
+            <param><ptype>GLdouble</ptype> <name>zFar</name></param>
+            <glx type="render" opcode="175"/>
+        </command>
+        <command>
+            <proto>void <name>glFrustumf</name></proto>
+            <param><ptype>GLfloat</ptype> <name>l</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>n</name></param>
+            <param><ptype>GLfloat</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFrustumfOES</name></proto>
+            <param><ptype>GLfloat</ptype> <name>l</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>n</name></param>
+            <param><ptype>GLfloat</ptype> <name>f</name></param>
+            <glx type="render" opcode="4310"/>
+        </command>
+        <command>
+            <proto>void <name>glFrustumx</name></proto>
+            <param><ptype>GLfixed</ptype> <name>l</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>b</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glFrustumxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>l</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>b</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGenAsyncMarkersSGIX</name></proto>
+            <param><ptype>GLsizei</ptype> <name>range</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenBuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>buffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenBuffersARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>buffers</name></param>
+            <alias name="glGenBuffers"/>
+        </command>
+        <command>
+            <proto>void <name>glGenFencesAPPLE</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="FenceNV" len="n"><ptype>GLuint</ptype> *<name>fences</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenFencesNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="FenceNV" len="n"><ptype>GLuint</ptype> *<name>fences</name></param>
+            <glx type="vendor" opcode="1277"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGenFragmentShadersATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>range</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenFramebuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>framebuffers</name></param>
+            <glx type="vendor" opcode="1426"/>
+        </command>
+        <command>
+            <proto>void <name>glGenFramebuffersEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>framebuffers</name></param>
+            <alias name="glGenFramebuffers"/>
+            <glx type="vendor" opcode="1426"/>
+        </command>
+        <command>
+            <proto>void <name>glGenFramebuffersOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>framebuffers</name></param>
+        </command>
+        <command>
+            <proto group="List"><ptype>GLuint</ptype> <name>glGenLists</name></proto>
+            <param><ptype>GLsizei</ptype> <name>range</name></param>
+            <glx type="single" opcode="104"/>
+        </command>
+        <command>
+            <proto>void <name>glGenNamesAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>num</name></param>
+            <param len="num"><ptype>GLuint</ptype> *<name>names</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenOcclusionQueriesNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>ids</name></param>
+        </command>
+        <command>
+            <proto group="Path"><ptype>GLuint</ptype> <name>glGenPathsNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>range</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenPerfMonitorsAMD</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>monitors</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenProgramPipelines</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>pipelines</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenProgramPipelinesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>pipelines</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenProgramsARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>programs</name></param>
+            <glx type="vendor" opcode="1295"/>
+        </command>
+        <command>
+            <proto>void <name>glGenProgramsNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>programs</name></param>
+            <alias name="glGenProgramsARB"/>
+            <glx type="vendor" opcode="1295"/>
+        </command>
+        <command>
+            <proto>void <name>glGenQueries</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <glx type="single" opcode="162"/>
+        </command>
+        <command>
+            <proto>void <name>glGenQueriesARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <alias name="glGenQueries"/>
+        </command>
+        <command>
+            <proto>void <name>glGenQueriesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>ids</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenRenderbuffers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+            <glx type="vendor" opcode="1423"/>
+        </command>
+        <command>
+            <proto>void <name>glGenRenderbuffersEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+            <alias name="glGenRenderbuffers"/>
+            <glx type="vendor" opcode="1423"/>
+        </command>
+        <command>
+            <proto>void <name>glGenRenderbuffersOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>renderbuffers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenSamplers</name></proto>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count"><ptype>GLuint</ptype> *<name>samplers</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGenSymbolsEXT</name></proto>
+            <param group="DataTypeEXT"><ptype>GLenum</ptype> <name>datatype</name></param>
+            <param group="VertexShaderStorageTypeEXT"><ptype>GLenum</ptype> <name>storagetype</name></param>
+            <param group="ParameterRangeEXT"><ptype>GLenum</ptype> <name>range</name></param>
+            <param><ptype>GLuint</ptype> <name>components</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenTextures</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n"><ptype>GLuint</ptype> *<name>textures</name></param>
+            <glx type="single" opcode="145"/>
+        </command>
+        <command>
+            <proto>void <name>glGenTexturesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n"><ptype>GLuint</ptype> *<name>textures</name></param>
+            <glx type="vendor" opcode="13"/>
+        </command>
+        <command>
+            <proto>void <name>glGenTransformFeedbacks</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>ids</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenTransformFeedbacksNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <alias name="glGenTransformFeedbacks"/>
+        </command>
+        <command>
+            <proto>void <name>glGenVertexArrays</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>arrays</name></param>
+            <glx type="single" opcode="206"/>
+        </command>
+        <command>
+            <proto>void <name>glGenVertexArraysAPPLE</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>arrays</name></param>
+            <alias name="glGenVertexArrays"/>
+        </command>
+        <command>
+            <proto>void <name>glGenVertexArraysOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n"><ptype>GLuint</ptype> *<name>arrays</name></param>
+            <alias name="glGenVertexArrays"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGenVertexShadersEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>range</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenerateMipmap</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <glx type="render" opcode="4325"/>
+        </command>
+        <command>
+            <proto>void <name>glGenerateMipmapEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glGenerateMipmap"/>
+            <glx type="render" opcode="4325"/>
+        </command>
+        <command>
+            <proto>void <name>glGenerateMipmapOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenerateMultiTexMipmapEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGenerateTextureMipmapEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveAtomicCounterBufferiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>bufferIndex</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveAttrib</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveAttribARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxLength</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="maxLength"><ptype>GLcharARB</ptype> *<name>name</name></param>
+            <alias name="glGetActiveAttrib"/>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveSubroutineName</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufsize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufsize"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveSubroutineUniformName</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufsize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufsize"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveSubroutineUniformiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveUniform</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveUniformARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxLength</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="maxLength"><ptype>GLcharARB</ptype> *<name>name</name></param>
+            <alias name="glGetActiveUniform"/>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveUniformBlockName</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>uniformBlockIndex</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>uniformBlockName</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveUniformBlockiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>uniformBlockIndex</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveUniformName</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>uniformIndex</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>uniformName</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveUniformsiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>uniformCount</name></param>
+            <param len="COMPSIZE(uniformCount)">const <ptype>GLuint</ptype> *<name>uniformIndices</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetActiveVaryingNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="COMPSIZE(program,index,bufSize)"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetArrayObjectfvATI</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetArrayObjectivATI</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>array</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command comment="Could be an alias of glGetAttachedShaders except that GLhandleARB is different on MacOS X">
+            <proto>void <name>glGetAttachedObjectsARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>containerObj</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxCount</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>count</name></param>
+            <param group="handleARB" len="maxCount"><ptype>GLhandleARB</ptype> *<name>obj</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetAttachedShaders</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxCount</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>count</name></param>
+            <param len="maxCount"><ptype>GLuint</ptype> *<name>shaders</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetAttribLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetAttribLocationARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param>const <ptype>GLcharARB</ptype> *<name>name</name></param>
+            <alias name="glGetAttribLocation"/>
+        </command>
+        <command>
+            <proto>void <name>glGetBooleanIndexedvEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Boolean" len="COMPSIZE(target)"><ptype>GLboolean</ptype> *<name>data</name></param>
+            <alias name="glGetBooleani_v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetBooleani_v</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Boolean" len="COMPSIZE(target)"><ptype>GLboolean</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetBooleanv</name></proto>
+            <param group="GetPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="Boolean" len="COMPSIZE(pname)"><ptype>GLboolean</ptype> *<name>data</name></param>
+            <glx type="single" opcode="112"/>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferParameteri64v</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferPNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint64</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferParameteriv</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferPNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferParameterivARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferPNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetBufferParameteriv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferParameterui64vNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferPointerv</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferPointerNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferPointervARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferPointerNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>params</name></param>
+            <alias name="glGetBufferPointerv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferPointervOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param>void **<name>params</name></param>
+            <alias name="glGetBufferPointerv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferSubData</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="size">void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetBufferSubDataARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffsetARB"><ptype>GLintptrARB</ptype> <name>offset</name></param>
+            <param group="BufferSizeARB"><ptype>GLsizeiptrARB</ptype> <name>size</name></param>
+            <param len="size">void *<name>data</name></param>
+            <alias name="glGetBufferSubData"/>
+        </command>
+        <command>
+            <proto>void <name>glGetClipPlane</name></proto>
+            <param group="ClipPlaneName"><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>equation</name></param>
+            <glx type="single" opcode="113"/>
+        </command>
+        <command>
+            <proto>void <name>glGetClipPlanef</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>equation</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetClipPlanefOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>equation</name></param>
+            <glx type="vendor" opcode="1421"/>
+        </command>
+        <command>
+            <proto>void <name>glGetClipPlanex</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4"><ptype>GLfixed</ptype> *<name>equation</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetClipPlanexOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>plane</name></param>
+            <param len="4"><ptype>GLfixed</ptype> *<name>equation</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTable</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>table</name></param>
+            <glx type="single" opcode="147"/>
+            <glx type="render" opcode="334" name="glGetColorTablePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableEXT</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>data</name></param>
+            <alias name="glGetColorTable"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableParameterfv</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetColorTableParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="148"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableParameterfvEXT</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetColorTableParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glGetColorTableParameterfv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableParameterfvSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetColorTableParameterPNameSGI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="4099"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableParameteriv</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetColorTableParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="149"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableParameterivEXT</name></proto>
+            <param group="ColorTableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetColorTableParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetColorTableParameteriv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableParameterivSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetColorTableParameterPNameSGI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="4100"/>
+        </command>
+        <command>
+            <proto>void <name>glGetColorTableSGI</name></proto>
+            <param group="ColorTableTargetSGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>table</name></param>
+            <glx type="vendor" opcode="4098"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCombinerInputParameterfvNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerPortionNV"><ptype>GLenum</ptype> <name>portion</name></param>
+            <param group="CombinerVariableNV"><ptype>GLenum</ptype> <name>variable</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1270"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCombinerInputParameterivNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerPortionNV"><ptype>GLenum</ptype> <name>portion</name></param>
+            <param group="CombinerVariableNV"><ptype>GLenum</ptype> <name>variable</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1271"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCombinerOutputParameterfvNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerPortionNV"><ptype>GLenum</ptype> <name>portion</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1272"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCombinerOutputParameterivNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerPortionNV"><ptype>GLenum</ptype> <name>portion</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1273"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCombinerStageParameterfvNV</name></proto>
+            <param group="CombinerStageNV"><ptype>GLenum</ptype> <name>stage</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetCompressedMultiTexImageEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>lod</name></param>
+            <param len="COMPSIZE(target,lod)">void *<name>img</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetCompressedTexImage</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CompressedTextureARB" len="COMPSIZE(target,level)">void *<name>img</name></param>
+            <glx type="single" opcode="160"/>
+            <glx type="render" opcode="335" name="glGetCompressedTexImagePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCompressedTexImageARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CompressedTextureARB" len="COMPSIZE(target,level)">void *<name>img</name></param>
+            <alias name="glGetCompressedTexImage"/>
+            <glx type="single" opcode="160"/>
+        </command>
+        <command>
+            <proto>void <name>glGetCompressedTextureImageEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>lod</name></param>
+            <param len="COMPSIZE(target,lod)">void *<name>img</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionFilter</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>image</name></param>
+            <glx type="single" opcode="150"/>
+            <glx type="render" opcode="336" name="glGetConvolutionFilterPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionFilterEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>image</name></param>
+            <glx type="vendor" opcode="1"/>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionParameterfv</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetConvolutionParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="151"/>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionParameterfvEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="2"/>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionParameteriv</name></proto>
+            <param group="ConvolutionTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetConvolutionParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="152"/>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionParameterivEXT</name></proto>
+            <param group="ConvolutionTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ConvolutionParameterEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="3"/>
+        </command>
+        <command>
+            <proto>void <name>glGetConvolutionParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetDebugMessageLog</name></proto>
+            <param><ptype>GLuint</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>sources</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>types</name></param>
+            <param len="count"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>severities</name></param>
+            <param len="count"><ptype>GLsizei</ptype> *<name>lengths</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>messageLog</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetDebugMessageLogAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufsize</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>categories</name></param>
+            <param len="count"><ptype>GLuint</ptype> *<name>severities</name></param>
+            <param len="count"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <param len="count"><ptype>GLsizei</ptype> *<name>lengths</name></param>
+            <param len="bufsize"><ptype>GLchar</ptype> *<name>message</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetDebugMessageLogARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>sources</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>types</name></param>
+            <param len="count"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>severities</name></param>
+            <param len="count"><ptype>GLsizei</ptype> *<name>lengths</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>messageLog</name></param>
+            <alias name="glGetDebugMessageLog"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetDebugMessageLogKHR</name></proto>
+            <param><ptype>GLuint</ptype> <name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>sources</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>types</name></param>
+            <param len="count"><ptype>GLuint</ptype> *<name>ids</name></param>
+            <param len="count"><ptype>GLenum</ptype> *<name>severities</name></param>
+            <param len="count"><ptype>GLsizei</ptype> *<name>lengths</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>messageLog</name></param>
+            <alias name="glGetDebugMessageLog"/>
+        </command>
+        <command>
+            <proto>void <name>glGetDetailTexFuncSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="vendor" opcode="4096"/>
+        </command>
+        <command>
+            <proto>void <name>glGetDoubleIndexedvEXT</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLdouble</ptype> *<name>data</name></param>
+            <alias name="glGetDoublei_v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetDoublei_v</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLdouble</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetDoublei_vEXT</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <alias name="glGetDoublei_v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetDoublev</name></proto>
+            <param group="GetPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLdouble</ptype> *<name>data</name></param>
+            <glx type="single" opcode="114"/>
+        </command>
+        <command>
+            <proto>void <name>glGetDriverControlStringQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>driverControl</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>driverControlString</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetDriverControlsQCOM</name></proto>
+            <param><ptype>GLint</ptype> *<name>num</name></param>
+            <param><ptype>GLsizei</ptype> <name>size</name></param>
+            <param len="size"><ptype>GLuint</ptype> *<name>driverControls</name></param>
+        </command>
+        <command>
+            <proto group="ErrorCode"><ptype>GLenum</ptype> <name>glGetError</name></proto>
+            <glx type="single" opcode="115"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFenceivNV</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+            <param group="FenceParameterNameNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1280"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFinalCombinerInputParameterfvNV</name></proto>
+            <param group="CombinerVariableNV"><ptype>GLenum</ptype> <name>variable</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1274"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFinalCombinerInputParameterivNV</name></proto>
+            <param group="CombinerVariableNV"><ptype>GLenum</ptype> <name>variable</name></param>
+            <param group="CombinerParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1275"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFirstPerfQueryIdINTEL</name></proto>
+            <param><ptype>GLuint</ptype> *<name>queryId</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFixedv</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFixedvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFloatIndexedvEXT</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLfloat</ptype> *<name>data</name></param>
+            <alias name="glGetFloati_v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFloati_v</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLfloat</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFloati_vEXT</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glGetFloati_v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFloatv</name></proto>
+            <param group="GetPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>data</name></param>
+            <glx type="single" opcode="116"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFogFuncSGIS</name></proto>
+            <param len="COMPSIZE()"><ptype>GLfloat</ptype> *<name>points</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetFragDataIndex</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetFragDataLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetFragDataLocationEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+            <alias name="glGetFragDataLocation"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFragmentLightfvSGIX</name></proto>
+            <param group="FragmentLightNameSGIX"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="FragmentLightParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFragmentLightivSGIX</name></proto>
+            <param group="FragmentLightNameSGIX"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="FragmentLightParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFragmentMaterialfvSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFragmentMaterialivSGIX</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFramebufferAttachmentParameteriv</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1428"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFramebufferAttachmentParameterivEXT</name></proto>
+            <param group="FramebufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetFramebufferAttachmentParameteriv"/>
+            <glx type="vendor" opcode="1428"/>
+        </command>
+        <command>
+            <proto>void <name>glGetFramebufferAttachmentParameterivOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFramebufferParameteriv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetFramebufferParameterivEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="GetFramebufferParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glGetGraphicsResetStatusARB</name></proto>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glGetGraphicsResetStatusEXT</name></proto>
+        </command>
+        <command>
+            <proto group="handleARB"><ptype>GLhandleARB</ptype> <name>glGetHandleARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogram</name></proto>
+            <param group="HistogramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>reset</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>values</name></param>
+            <glx type="single" opcode="154"/>
+            <glx type="render" opcode="337" name="glGetHistogramPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogramEXT</name></proto>
+            <param group="HistogramTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>reset</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>values</name></param>
+            <glx type="vendor" opcode="5"/>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogramParameterfv</name></proto>
+            <param group="HistogramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetHistogramParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="155"/>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogramParameterfvEXT</name></proto>
+            <param group="HistogramTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetHistogramParameterPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="6"/>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogramParameteriv</name></proto>
+            <param group="HistogramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetHistogramParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="156"/>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogramParameterivEXT</name></proto>
+            <param group="HistogramTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetHistogramParameterPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="7"/>
+        </command>
+        <command>
+            <proto>void <name>glGetHistogramParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint64</ptype> <name>glGetImageHandleARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLboolean</ptype> <name>layered</name></param>
+            <param><ptype>GLint</ptype> <name>layer</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint64</ptype> <name>glGetImageHandleNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>layered</name></param>
+            <param><ptype>GLint</ptype> <name>layer</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetImageTransformParameterfvHP</name></proto>
+            <param group="ImageTransformTargetHP"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ImageTransformPNameHP"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetImageTransformParameterivHP</name></proto>
+            <param group="ImageTransformTargetHP"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ImageTransformPNameHP"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInfoLogARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>obj</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxLength</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="maxLength"><ptype>GLcharARB</ptype> *<name>infoLog</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetInstrumentsSGIX</name></proto>
+            <glx type="vendor" opcode="4102"/>
+        </command>
+        <command>
+            <proto>void <name>glGetInteger64i_v</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLint64</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInteger64v</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint64</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInteger64vAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint64</ptype> *<name>params</name></param>
+            <alias name="glGetInteger64v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetIntegerIndexedvEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLint</ptype> *<name>data</name></param>
+            <alias name="glGetIntegeri_v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetIntegeri_v</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLint</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetIntegeri_vEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetIntegerui64i_vNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>value</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(value)"><ptype>GLuint64EXT</ptype> *<name>result</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetIntegerui64vNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(value)"><ptype>GLuint64EXT</ptype> *<name>result</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetIntegerv</name></proto>
+            <param group="GetPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>data</name></param>
+            <glx type="single" opcode="117"/>
+        </command>
+        <command>
+            <proto>void <name>glGetInternalformati64v</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLint64</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInternalformativ</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInvariantBooleanvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param group="Boolean" len="COMPSIZE(id)"><ptype>GLboolean</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInvariantFloatvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)"><ptype>GLfloat</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetInvariantIntegervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)"><ptype>GLint</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetLightfv</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="118"/>
+        </command>
+        <command>
+            <proto>void <name>glGetLightiv</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="119"/>
+        </command>
+        <command>
+            <proto>void <name>glGetLightxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetLightxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetLightxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetListParameterfvSGIX</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetListParameterivSGIX</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetLocalConstantBooleanvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param group="Boolean" len="COMPSIZE(id)"><ptype>GLboolean</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetLocalConstantFloatvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)"><ptype>GLfloat</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetLocalConstantIntegervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)"><ptype>GLint</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMapAttribParameterfvNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="MapAttribParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMapAttribParameterivNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="MapAttribParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMapControlPointsNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="MapTypeNV"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>ustride</name></param>
+            <param><ptype>GLsizei</ptype> <name>vstride</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>packed</name></param>
+            <param len="COMPSIZE(target)">void *<name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMapParameterfvNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="MapParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(target,pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMapParameterivNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="MapParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(target,pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMapdv</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMapQuery"><ptype>GLenum</ptype> <name>query</name></param>
+            <param len="COMPSIZE(target,query)"><ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="single" opcode="120"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMapfv</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMapQuery"><ptype>GLenum</ptype> <name>query</name></param>
+            <param len="COMPSIZE(target,query)"><ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="single" opcode="121"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMapiv</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMapQuery"><ptype>GLenum</ptype> <name>query</name></param>
+            <param len="COMPSIZE(target,query)"><ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="single" opcode="122"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMapxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>query</name></param>
+            <param len="COMPSIZE(query)"><ptype>GLfixed</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMaterialfv</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="123"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMaterialiv</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="124"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMaterialxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMaterialxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMaterialxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMinmax</name></proto>
+            <param group="MinmaxTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>reset</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>values</name></param>
+            <glx type="single" opcode="157"/>
+            <glx type="render" opcode="338" name="glGetMinmaxPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMinmaxEXT</name></proto>
+            <param group="MinmaxTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>reset</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>values</name></param>
+            <glx type="vendor" opcode="8"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMinmaxParameterfv</name></proto>
+            <param group="MinmaxTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMinmaxParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="158"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMinmaxParameterfvEXT</name></proto>
+            <param group="MinmaxTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMinmaxParameterPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="9"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMinmaxParameteriv</name></proto>
+            <param group="MinmaxTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMinmaxParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="159"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMinmaxParameterivEXT</name></proto>
+            <param group="MinmaxTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetMinmaxParameterPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="10"/>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexEnvfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexEnvivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexGendvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexGenfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexGenivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexImageEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,level,format,type)">void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexLevelParameterfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexLevelParameterivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexParameterIivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexParameterIuivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexParameterfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultiTexParameterivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultisamplefv</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>val</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetMultisamplefvNV</name></proto>
+            <param group="GetMultisamplePNameNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2"><ptype>GLfloat</ptype> *<name>val</name></param>
+            <alias name="glGetMultisamplefv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedBufferParameterivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="VertexBufferObjectParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedBufferParameterui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="VertexBufferObjectParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedBufferPointervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="VertexBufferObjectParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedBufferSubDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="COMPSIZE(size)">void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedFramebufferAttachmentParameterivEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="FramebufferAttachmentParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedFramebufferParameterivEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="GetFramebufferParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedProgramLocalParameterIivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedProgramLocalParameterIuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedProgramLocalParameterdvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedProgramLocalParameterfvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedProgramStringEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ProgramStringProperty"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(program,pname)">void *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedProgramivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ProgramProperty"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedRenderbufferParameterivEXT</name></proto>
+            <param group="Renderbuffer"><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <param group="RenderbufferParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedStringARB</name></proto>
+            <param><ptype>GLint</ptype> <name>namelen</name></param>
+            <param len="namelen">const <ptype>GLchar</ptype> *<name>name</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>stringlen</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNamedStringivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>namelen</name></param>
+            <param len="namelen">const <ptype>GLchar</ptype> *<name>name</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetNextPerfQueryIdINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryId</name></param>
+            <param><ptype>GLuint</ptype> *<name>nextQueryId</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectBufferfvATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectBufferivATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectLabel</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>label</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectLabelEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>object</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>label</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectLabelKHR</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>label</name></param>
+            <alias name="glGetObjectLabel"/>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectParameterfvARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>obj</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectParameterivAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>objectType</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectParameterivARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>obj</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectPtrLabel</name></proto>
+            <param>const void *<name>ptr</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>label</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetObjectPtrLabelKHR</name></proto>
+            <param>const void *<name>ptr</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>label</name></param>
+            <alias name="glGetObjectPtrLabel"/>
+        </command>
+        <command>
+            <proto>void <name>glGetOcclusionQueryivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="OcclusionQueryParameterNameNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetOcclusionQueryuivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="OcclusionQueryParameterNameNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathColorGenfvNV</name></proto>
+            <param group="PathColor"><ptype>GLenum</ptype> <name>color</name></param>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathColorGenivNV</name></proto>
+            <param group="PathColor"><ptype>GLenum</ptype> <name>color</name></param>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathCommandsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathCommand" len="COMPSIZE(path)"><ptype>GLubyte</ptype> *<name>commands</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathCoordsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param len="COMPSIZE(path)"><ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathDashArrayNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param len="COMPSIZE(path)"><ptype>GLfloat</ptype> *<name>dashArray</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLfloat</ptype> <name>glGetPathLengthNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>startSegment</name></param>
+            <param><ptype>GLsizei</ptype> <name>numSegments</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathMetricRangeNV</name></proto>
+            <param group="PathMetricMask"><ptype>GLbitfield</ptype> <name>metricQueryMask</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>firstPathName</name></param>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(metricQueryMask,numPaths,stride)"><ptype>GLfloat</ptype> *<name>metrics</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathMetricsNV</name></proto>
+            <param group="PathMetricMask"><ptype>GLbitfield</ptype> <name>metricQueryMask</name></param>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>pathNameType</name></param>
+            <param group="PathElement" len="COMPSIZE(numPaths,pathNameType,paths)">const void *<name>paths</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathBase</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(metricQueryMask,numPaths,stride)"><ptype>GLfloat</ptype> *<name>metrics</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathParameterfvNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathParameterivNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathSpacingNV</name></proto>
+            <param group="PathListMode"><ptype>GLenum</ptype> <name>pathListMode</name></param>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>pathNameType</name></param>
+            <param group="PathElement" len="COMPSIZE(numPaths,pathNameType,paths)">const void *<name>paths</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathBase</name></param>
+            <param><ptype>GLfloat</ptype> <name>advanceScale</name></param>
+            <param><ptype>GLfloat</ptype> <name>kerningScale</name></param>
+            <param group="PathTransformType"><ptype>GLenum</ptype> <name>transformType</name></param>
+            <param len="COMPSIZE(pathListMode,numPaths)"><ptype>GLfloat</ptype> *<name>returnedSpacing</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathTexGenfvNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texCoordSet</name></param>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPathTexGenivNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texCoordSet</name></param>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfCounterInfoINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryId</name></param>
+            <param><ptype>GLuint</ptype> <name>counterId</name></param>
+            <param><ptype>GLuint</ptype> <name>counterNameLength</name></param>
+            <param><ptype>GLchar</ptype> *<name>counterName</name></param>
+            <param><ptype>GLuint</ptype> <name>counterDescLength</name></param>
+            <param><ptype>GLchar</ptype> *<name>counterDesc</name></param>
+            <param><ptype>GLuint</ptype> *<name>counterOffset</name></param>
+            <param><ptype>GLuint</ptype> *<name>counterDataSize</name></param>
+            <param><ptype>GLuint</ptype> *<name>counterTypeEnum</name></param>
+            <param><ptype>GLuint</ptype> *<name>counterDataTypeEnum</name></param>
+            <param><ptype>GLuint64</ptype> *<name>rawCounterMaxValue</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfMonitorCounterDataAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>monitor</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLsizei</ptype> <name>dataSize</name></param>
+            <param len="dataSize"><ptype>GLuint</ptype> *<name>data</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>bytesWritten</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfMonitorCounterInfoAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>group</name></param>
+            <param><ptype>GLuint</ptype> <name>counter</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfMonitorCounterStringAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>group</name></param>
+            <param><ptype>GLuint</ptype> <name>counter</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>counterString</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfMonitorCountersAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>group</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>numCounters</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>maxActiveCounters</name></param>
+            <param><ptype>GLsizei</ptype> <name>counterSize</name></param>
+            <param len="counterSize"><ptype>GLuint</ptype> *<name>counters</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfMonitorGroupStringAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>group</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>groupString</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfMonitorGroupsAMD</name></proto>
+            <param len="1"><ptype>GLint</ptype> *<name>numGroups</name></param>
+            <param><ptype>GLsizei</ptype> <name>groupsSize</name></param>
+            <param len="groupsSize"><ptype>GLuint</ptype> *<name>groups</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfQueryDataINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryHandle</name></param>
+            <param><ptype>GLuint</ptype> <name>flags</name></param>
+            <param><ptype>GLsizei</ptype> <name>dataSize</name></param>
+            <param><ptype>GLvoid</ptype> *<name>data</name></param>
+            <param><ptype>GLuint</ptype> *<name>bytesWritten</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfQueryIdByNameINTEL</name></proto>
+            <param><ptype>GLchar</ptype> *<name>queryName</name></param>
+            <param><ptype>GLuint</ptype> *<name>queryId</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPerfQueryInfoINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>queryId</name></param>
+            <param><ptype>GLuint</ptype> <name>queryNameLength</name></param>
+            <param><ptype>GLchar</ptype> *<name>queryName</name></param>
+            <param><ptype>GLuint</ptype> *<name>dataSize</name></param>
+            <param><ptype>GLuint</ptype> *<name>noCounters</name></param>
+            <param><ptype>GLuint</ptype> *<name>noInstances</name></param>
+            <param><ptype>GLuint</ptype> *<name>capsMask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelMapfv</name></proto>
+            <param group="PixelMap"><ptype>GLenum</ptype> <name>map</name></param>
+            <param len="COMPSIZE(map)"><ptype>GLfloat</ptype> *<name>values</name></param>
+            <glx type="single" opcode="125"/>
+            <glx type="render" opcode="339" name="glGetPixelMapfvPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelMapuiv</name></proto>
+            <param group="PixelMap"><ptype>GLenum</ptype> <name>map</name></param>
+            <param len="COMPSIZE(map)"><ptype>GLuint</ptype> *<name>values</name></param>
+            <glx type="single" opcode="126"/>
+            <glx type="render" opcode="340" name="glGetPixelMapuivPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelMapusv</name></proto>
+            <param group="PixelMap"><ptype>GLenum</ptype> <name>map</name></param>
+            <param len="COMPSIZE(map)"><ptype>GLushort</ptype> *<name>values</name></param>
+            <glx type="single" opcode="127"/>
+            <glx type="render" opcode="341" name="glGetPixelMapusvPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelMapxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>map</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size"><ptype>GLfixed</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelTexGenParameterfvSGIS</name></proto>
+            <param group="PixelTexGenParameterNameSGIS"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelTexGenParameterivSGIS</name></proto>
+            <param group="PixelTexGenParameterNameSGIS"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelTransformParameterfvEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="2051"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPixelTransformParameterivEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="2052"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPointerIndexedvEXT</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">void **<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPointeri_vEXT</name></proto>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">void **<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetPointerv</name></proto>
+            <param group="GetPointervPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>params</name></param>
+            <glx type="single" opcode="208"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPointervEXT</name></proto>
+            <param group="GetPointervPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>params</name></param>
+            <alias name="glGetPointerv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPointervKHR</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param>void **<name>params</name></param>
+            <alias name="glGetPointerv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetPolygonStipple</name></proto>
+            <param len="COMPSIZE()"><ptype>GLubyte</ptype> *<name>mask</name></param>
+            <glx type="single" opcode="128"/>
+            <glx type="render" opcode="342" name="glGetPolygonStipplePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramBinary</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>binaryFormat</name></param>
+            <param len="bufSize">void *<name>binary</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramBinaryOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>binaryFormat</name></param>
+            <param len="bufSize">void *<name>binary</name></param>
+            <alias name="glGetProgramBinary"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramEnvParameterIivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramEnvParameterIuivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramEnvParameterdvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramEnvParameterfvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramInfoLog</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>infoLog</name></param>
+            <glx type="single" opcode="201"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramInterfaceiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>programInterface</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramLocalParameterIivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramLocalParameterIuivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramLocalParameterdvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramLocalParameterfvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramNamedParameterdvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="1">const <ptype>GLubyte</ptype> *<name>name</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1311"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramNamedParameterfvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="1">const <ptype>GLubyte</ptype> *<name>name</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1310"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramParameterdvNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1297"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramParameterfvNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1296"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramPipelineInfoLog</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>infoLog</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramPipelineInfoLogEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>infoLog</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramPipelineiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramPipelineivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetProgramResourceIndex</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>programInterface</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetProgramResourceLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>programInterface</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetProgramResourceLocationIndex</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>programInterface</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramResourceName</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>programInterface</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramResourceiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>programInterface</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>propCount</name></param>
+            <param len="propCount">const <ptype>GLenum</ptype> *<name>props</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramStageiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramStringARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ProgramStringPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(target,pname)">void *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramStringNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="ProgramCharacterNV" len="COMPSIZE(id,pname)"><ptype>GLubyte</ptype> *<name>program</name></param>
+            <glx type="vendor" opcode="1299"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramSubroutineParameteruivNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLuint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="199"/>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramivARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ProgramPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetProgramivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1298"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryIndexediv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjecti64v</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint64</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjecti64vEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint64</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1328"/>
+            <alias name="glGetQueryObjecti64v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="165"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetQueryObjectiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetQueryObjectiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectui64v</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint64</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectui64vEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint64</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1329"/>
+            <alias name="glGetQueryObjectui64v"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectuiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="166"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectuivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+            <alias name="glGetQueryObjectuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryObjectuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="164"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryivARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetQueryiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetQueryivEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetRenderbufferParameteriv</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1424"/>
+        </command>
+        <command>
+            <proto>void <name>glGetRenderbufferParameterivEXT</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetRenderbufferParameteriv"/>
+            <glx type="vendor" opcode="1424"/>
+        </command>
+        <command>
+            <proto>void <name>glGetRenderbufferParameterivOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSamplerParameterIiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSamplerParameterIivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetSamplerParameterIiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetSamplerParameterIuiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSamplerParameterIuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+            <alias name="glGetSamplerParameterIuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetSamplerParameterfv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSamplerParameteriv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSeparableFilter</name></proto>
+            <param group="SeparableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>row</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>column</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>span</name></param>
+            <glx type="single" opcode="153"/>
+            <glx type="render" opcode="343" name="glGetSeparableFilterPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetSeparableFilterEXT</name></proto>
+            <param group="SeparableTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>row</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>column</name></param>
+            <param len="COMPSIZE(target,format,type)">void *<name>span</name></param>
+            <glx type="vendor" opcode="4"/>
+        </command>
+        <command>
+            <proto>void <name>glGetShaderInfoLog</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>infoLog</name></param>
+            <glx type="single" opcode="200"/>
+        </command>
+        <command>
+            <proto>void <name>glGetShaderPrecisionFormat</name></proto>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLenum</ptype> <name>precisiontype</name></param>
+            <param len="2"><ptype>GLint</ptype> *<name>range</name></param>
+            <param len="2"><ptype>GLint</ptype> *<name>precision</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetShaderSource</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>source</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetShaderSourceARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>obj</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxLength</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="maxLength"><ptype>GLcharARB</ptype> *<name>source</name></param>
+            <alias name="glGetShaderSource"/>
+        </command>
+        <command>
+            <proto>void <name>glGetShaderiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="198"/>
+        </command>
+        <command>
+            <proto>void <name>glGetSharpenTexFuncSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param len="COMPSIZE(target)"><ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="vendor" opcode="4097"/>
+        </command>
+        <command>
+            <proto group="String">const <ptype>GLubyte</ptype> *<name>glGetString</name></proto>
+            <param group="StringName"><ptype>GLenum</ptype> <name>name</name></param>
+            <glx type="single" opcode="129"/>
+        </command>
+        <command>
+            <proto group="String">const <ptype>GLubyte</ptype> *<name>glGetStringi</name></proto>
+            <param><ptype>GLenum</ptype> <name>name</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetSubroutineIndex</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetSubroutineUniformLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSynciv</name></proto>
+            <param group="sync"><ptype>GLsync</ptype> <name>sync</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetSyncivAPPLE</name></proto>
+            <param><ptype>GLsync</ptype> <name>sync</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>values</name></param>
+            <alias name="glGetSynciv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexBumpParameterfvATI</name></proto>
+            <param group="GetTexBumpParameterATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexBumpParameterivATI</name></proto>
+            <param group="GetTexBumpParameterATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexEnvfv</name></proto>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="130"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexEnviv</name></proto>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="131"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexEnvxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexEnvxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexFilterFuncSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureFilterSGIS"><ptype>GLenum</ptype> <name>filter</name></param>
+            <param len="COMPSIZE(target,filter)"><ptype>GLfloat</ptype> *<name>weights</name></param>
+            <glx type="vendor" opcode="4101"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexGendv</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <glx type="single" opcode="132"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexGenfv</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="133"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexGenfvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexGeniv</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="134"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexGenivOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexGenxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexImage</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,level,format,type)">void *<name>pixels</name></param>
+            <glx type="single" opcode="135"/>
+            <glx type="render" opcode="344" name="glGetTexImagePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexLevelParameterfv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="138"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexLevelParameteriv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="139"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexLevelParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterIiv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="203"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterIivEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetTexParameterIiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterIuiv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="204"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterIuivEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+            <alias name="glGetTexParameterIuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterPointervAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterfv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="single" opcode="136"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameteriv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="137"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTexParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint64</ptype> <name>glGetTextureHandleARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint64</ptype> <name>glGetTextureHandleNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureImageEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,level,format,type)">void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureLevelParameterfvEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureLevelParameterivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureParameterIivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureParameterIuivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureParameterfvEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTextureParameterivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="GetTextureParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint64</ptype> <name>glGetTextureSamplerHandleARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint64</ptype> <name>glGetTextureSamplerHandleNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTrackMatrixivNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>address</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1300"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTransformFeedbackVarying</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTransformFeedbackVaryingEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>size</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
+            <param len="bufSize"><ptype>GLchar</ptype> *<name>name</name></param>
+            <alias name="glGetTransformFeedbackVarying"/>
+        </command>
+        <command>
+            <proto>void <name>glGetTransformFeedbackVaryingNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>location</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetTranslatedShaderSourceANGLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufsize</name></param>
+            <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param><ptype>GLchar</ptype> *<name>source</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glGetUniformBlockIndex</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param len="COMPSIZE()">const <ptype>GLchar</ptype> *<name>uniformBlockName</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetUniformBufferSizeEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformIndices</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>uniformCount</name></param>
+            <param len="COMPSIZE(uniformCount)">const <ptype>GLchar</ptype> *const*<name>uniformNames</name></param>
+            <param len="COMPSIZE(uniformCount)"><ptype>GLuint</ptype> *<name>uniformIndices</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetUniformLocation</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetUniformLocationARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param>const <ptype>GLcharARB</ptype> *<name>name</name></param>
+            <alias name="glGetUniformLocation"/>
+        </command>
+        <command>
+            <proto group="BufferOffset"><ptype>GLintptr</ptype> <name>glGetUniformOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformSubroutineuiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="1"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformdv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(location)"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformfv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(location)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformfvARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(location)"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glGetUniformfv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformi64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(location)"><ptype>GLint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(location)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformivARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(location)"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetUniformiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(program,location)"><ptype>GLuint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformuiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(program,location)"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetUniformuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param len="COMPSIZE(program,location)"><ptype>GLuint</ptype> *<name>params</name></param>
+            <alias name="glGetUniformuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVariantArrayObjectfvATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVariantArrayObjectivATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVariantBooleanvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param group="Boolean" len="COMPSIZE(id)"><ptype>GLboolean</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVariantFloatvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)"><ptype>GLfloat</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVariantIntegervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)"><ptype>GLint</ptype> *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVariantPointervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="GetVariantValueEXT"><ptype>GLenum</ptype> <name>value</name></param>
+            <param len="COMPSIZE(id)">void **<name>data</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glGetVaryingLocationNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param len="COMPSIZE(name)">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexArrayIntegeri_vEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexArrayIntegervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexArrayPointeri_vEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param>void **<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexArrayPointervEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribArrayObjectfvATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribArrayObjectivATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="ArrayObjectPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribIiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribIivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribIiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribIuiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribIuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLuint</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribIuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribLdv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribLdvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribLdv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribLi64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribLui64vARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribLui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribPointerv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPointerPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>pointer</name></param>
+            <glx type="single" opcode="209"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribPointervARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPointerPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>pointer</name></param>
+            <alias name="glGetVertexAttribPointerv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribPointervNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">void **<name>pointer</name></param>
+            <alias name="glGetVertexAttribPointerv"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribdv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1301"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribdvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribdv"/>
+            <glx type="vendor" opcode="1301"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribdvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLdouble</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribdv"/>
+            <glx type="vendor" opcode="1301"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribfv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1302"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribfvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribfv"/>
+            <glx type="vendor" opcode="1302"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribfvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribfv"/>
+            <glx type="vendor" opcode="1302"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="vendor" opcode="1303"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribPropertyARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="4"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribiv"/>
+            <glx type="vendor" opcode="1303"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVertexAttribivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glGetVertexAttribiv"/>
+            <glx type="vendor" opcode="1303"/>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoCaptureStreamdvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoCaptureStreamfvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoCaptureStreamivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoCaptureivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoi64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_slot</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_slot</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideoui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_slot</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint64EXT</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetVideouivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_slot</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnColorTableARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>table</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnCompressedTexImageARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>lod</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>img</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnConvolutionFilterARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>image</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnHistogramARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>reset</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnMapdvARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>query</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnMapfvARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>query</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnMapivARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>query</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnMinmaxARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>reset</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnPixelMapfvARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>map</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLfloat</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnPixelMapuivARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>map</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLuint</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnPixelMapusvARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>map</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLushort</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnPolygonStippleARB</name></proto>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLubyte</ptype> *<name>pattern</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnSeparableFilterARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>rowBufSize</name></param>
+            <param len="rowBufSize">void *<name>row</name></param>
+            <param><ptype>GLsizei</ptype> <name>columnBufSize</name></param>
+            <param len="columnBufSize">void *<name>column</name></param>
+            <param len="0">void *<name>span</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnTexImageARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>img</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnUniformdvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnUniformfvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnUniformfvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnUniformivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnUniformivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGetnUniformuivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize"><ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactorbSUN</name></proto>
+            <param><ptype>GLbyte</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactordSUN</name></proto>
+            <param><ptype>GLdouble</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactorfSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactoriSUN</name></proto>
+            <param><ptype>GLint</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactorsSUN</name></proto>
+            <param><ptype>GLshort</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactorubSUN</name></proto>
+            <param><ptype>GLubyte</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactoruiSUN</name></proto>
+            <param><ptype>GLuint</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glGlobalAlphaFactorusSUN</name></proto>
+            <param><ptype>GLushort</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glHint</name></proto>
+            <param group="HintTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="HintMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="85"/>
+        </command>
+        <command>
+            <proto>void <name>glHintPGI</name></proto>
+            <param group="HintTargetPGI"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glHistogram</name></proto>
+            <param group="HistogramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>sink</name></param>
+            <glx type="render" opcode="4110"/>
+        </command>
+        <command>
+            <proto>void <name>glHistogramEXT</name></proto>
+            <param group="HistogramTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>sink</name></param>
+            <alias name="glHistogram"/>
+            <glx type="render" opcode="4110"/>
+        </command>
+        <command>
+            <proto>void <name>glIglooInterfaceSGIX</name></proto>
+            <param group="IglooFunctionSelectSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="IglooParameterSGIX" len="COMPSIZE(pname)">const void *<name>params</name></param>
+            <glx type="render" opcode="200"/>
+        </command>
+        <command>
+            <proto>void <name>glImageTransformParameterfHP</name></proto>
+            <param group="ImageTransformTargetHP"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ImageTransformPNameHP"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glImageTransformParameterfvHP</name></proto>
+            <param group="ImageTransformTargetHP"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ImageTransformPNameHP"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glImageTransformParameteriHP</name></proto>
+            <param group="ImageTransformTargetHP"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ImageTransformPNameHP"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glImageTransformParameterivHP</name></proto>
+            <param group="ImageTransformTargetHP"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ImageTransformPNameHP"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto group="sync"><ptype>GLsync</ptype> <name>glImportSyncEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>external_sync_type</name></param>
+            <param><ptype>GLintptr</ptype> <name>external_sync</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexFormatNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexFuncEXT</name></proto>
+            <param group="IndexFunctionEXT"><ptype>GLenum</ptype> <name>func</name></param>
+            <param group="ClampedFloat32"><ptype>GLclampf</ptype> <name>ref</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexMask</name></proto>
+            <param group="MaskedColorIndexValueI"><ptype>GLuint</ptype> <name>mask</name></param>
+            <glx type="render" opcode="136"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexMaterialEXT</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="IndexMaterialParameterEXT"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexPointer</name></proto>
+            <param group="IndexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexPointerEXT</name></proto>
+            <param group="IndexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(type,stride,count)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexPointerListIBM</name></proto>
+            <param group="IndexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexd</name></proto>
+            <param group="ColorIndexValueD"><ptype>GLdouble</ptype> <name>c</name></param>
+            <vecequiv name="glIndexdv"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexdv</name></proto>
+            <param group="ColorIndexValueD" len="1">const <ptype>GLdouble</ptype> *<name>c</name></param>
+            <glx type="render" opcode="24"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexf</name></proto>
+            <param group="ColorIndexValueF"><ptype>GLfloat</ptype> <name>c</name></param>
+            <vecequiv name="glIndexfv"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexfv</name></proto>
+            <param group="ColorIndexValueF" len="1">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <glx type="render" opcode="25"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexi</name></proto>
+            <param group="ColorIndexValueI"><ptype>GLint</ptype> <name>c</name></param>
+            <vecequiv name="glIndexiv"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexiv</name></proto>
+            <param group="ColorIndexValueI" len="1">const <ptype>GLint</ptype> *<name>c</name></param>
+            <glx type="render" opcode="26"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexs</name></proto>
+            <param group="ColorIndexValueS"><ptype>GLshort</ptype> <name>c</name></param>
+            <vecequiv name="glIndexsv"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexsv</name></proto>
+            <param group="ColorIndexValueS" len="1">const <ptype>GLshort</ptype> *<name>c</name></param>
+            <glx type="render" opcode="27"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexub</name></proto>
+            <param group="ColorIndexValueUB"><ptype>GLubyte</ptype> <name>c</name></param>
+            <vecequiv name="glIndexubv"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexubv</name></proto>
+            <param group="ColorIndexValueUB" len="1">const <ptype>GLubyte</ptype> *<name>c</name></param>
+            <glx type="render" opcode="194"/>
+        </command>
+        <command>
+            <proto>void <name>glIndexxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>component</name></param>
+        </command>
+        <command>
+            <proto>void <name>glIndexxvOES</name></proto>
+            <param len="1">const <ptype>GLfixed</ptype> *<name>component</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInitNames</name></proto>
+            <glx type="render" opcode="121"/>
+        </command>
+        <command>
+            <proto>void <name>glInsertComponentEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>src</name></param>
+            <param><ptype>GLuint</ptype> <name>num</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInsertEventMarkerEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>marker</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInstrumentsBufferSGIX</name></proto>
+            <param><ptype>GLsizei</ptype> <name>size</name></param>
+            <param len="size"><ptype>GLint</ptype> *<name>buffer</name></param>
+            <glx type="vendor" opcode="4103"/>
+        </command>
+        <command>
+            <proto>void <name>glInterleavedArrays</name></proto>
+            <param group="InterleavedArrayFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(format,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInterpolatePathsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>resultPath</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathA</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathB</name></param>
+            <param><ptype>GLfloat</ptype> <name>weight</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInvalidateBufferData</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInvalidateBufferSubData</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInvalidateFramebuffer</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>numAttachments</name></param>
+            <param len="numAttachments">const <ptype>GLenum</ptype> *<name>attachments</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInvalidateSubFramebuffer</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>numAttachments</name></param>
+            <param len="numAttachments">const <ptype>GLenum</ptype> *<name>attachments</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInvalidateTexImage</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glInvalidateTexSubImage</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsAsyncMarkerSGIX</name></proto>
+            <param><ptype>GLuint</ptype> <name>marker</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsBuffer</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsBufferARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <alias name="glIsBuffer"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsBufferResidentNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsEnabled</name></proto>
+            <param group="EnableCap"><ptype>GLenum</ptype> <name>cap</name></param>
+            <glx type="single" opcode="140"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsEnabledIndexedEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glIsEnabledi"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsEnabledi</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsEnablediEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <alias name="glIsEnabledi"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsFenceAPPLE</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsFenceNV</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+            <glx type="vendor" opcode="1278"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsFramebuffer</name></proto>
+            <param><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <glx type="vendor" opcode="1425"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsFramebufferEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <alias name="glIsFramebuffer"/>
+            <glx type="vendor" opcode="1425"/>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsFramebufferOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>framebuffer</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsImageHandleResidentARB</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsImageHandleResidentNV</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsList</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <glx type="single" opcode="141"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsNameAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsNamedBufferResidentNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsNamedStringARB</name></proto>
+            <param><ptype>GLint</ptype> <name>namelen</name></param>
+            <param len="namelen">const <ptype>GLchar</ptype> *<name>name</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsObjectBufferATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsOcclusionQueryNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsPointInFillPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsPointInStrokePathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsProgram</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <glx type="single" opcode="197"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsProgramARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <glx type="vendor" opcode="1304"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsProgramNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <alias name="glIsProgramARB"/>
+            <glx type="vendor" opcode="1304"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsProgramPipeline</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsProgramPipelineEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsQuery</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <glx type="single" opcode="163"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsQueryARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <alias name="glIsQuery"/>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsQueryEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsRenderbuffer</name></proto>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <glx type="vendor" opcode="1422"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsRenderbufferEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <alias name="glIsRenderbuffer"/>
+            <glx type="vendor" opcode="1422"/>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsRenderbufferOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsSampler</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsShader</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <glx type="single" opcode="196"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsSync</name></proto>
+            <param group="sync"><ptype>GLsync</ptype> <name>sync</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsSyncAPPLE</name></proto>
+            <param><ptype>GLsync</ptype> <name>sync</name></param>
+            <alias name="glIsSync"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsTexture</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <glx type="single" opcode="146"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsTextureEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <glx type="vendor" opcode="14"/>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsTextureHandleResidentARB</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsTextureHandleResidentNV</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsTransformFeedback</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsTransformFeedbackNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <alias name="glIsTransformFeedback"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsVariantEnabledEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="VariantCapEXT"><ptype>GLenum</ptype> <name>cap</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsVertexArray</name></proto>
+            <param><ptype>GLuint</ptype> <name>array</name></param>
+            <glx type="single" opcode="207"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsVertexArrayAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>array</name></param>
+            <alias name="glIsVertexArray"/>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glIsVertexArrayOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>array</name></param>
+            <alias name="glIsVertexArray"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsVertexAttribEnabledAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLabelObjectEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>object</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>label</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightEnviSGIX</name></proto>
+            <param group="LightEnvParameterSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightModelf</name></proto>
+            <param group="LightModelParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="90"/>
+        </command>
+        <command>
+            <proto>void <name>glLightModelfv</name></proto>
+            <param group="LightModelParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="91"/>
+        </command>
+        <command>
+            <proto>void <name>glLightModeli</name></proto>
+            <param group="LightModelParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="92"/>
+        </command>
+        <command>
+            <proto>void <name>glLightModeliv</name></proto>
+            <param group="LightModelParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="93"/>
+        </command>
+        <command>
+            <proto>void <name>glLightModelx</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightModelxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightModelxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightModelxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightf</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="86"/>
+        </command>
+        <command>
+            <proto>void <name>glLightfv</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="87"/>
+        </command>
+        <command>
+            <proto>void <name>glLighti</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="88"/>
+        </command>
+        <command>
+            <proto>void <name>glLightiv</name></proto>
+            <param group="LightName"><ptype>GLenum</ptype> <name>light</name></param>
+            <param group="LightParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="89"/>
+        </command>
+        <command>
+            <proto>void <name>glLightx</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLightxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>light</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLineStipple</name></proto>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>factor</name></param>
+            <param group="LineStipple"><ptype>GLushort</ptype> <name>pattern</name></param>
+            <glx type="render" opcode="94"/>
+        </command>
+        <command>
+            <proto>void <name>glLineWidth</name></proto>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>width</name></param>
+            <glx type="render" opcode="95"/>
+        </command>
+        <command>
+            <proto>void <name>glLineWidthx</name></proto>
+            <param><ptype>GLfixed</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLineWidthxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLinkProgram</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLinkProgramARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <alias name="glLinkProgram"/>
+        </command>
+        <command>
+            <proto>void <name>glListBase</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>base</name></param>
+            <glx type="render" opcode="3"/>
+        </command>
+        <command>
+            <proto>void <name>glListParameterfSGIX</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="2078"/>
+        </command>
+        <command>
+            <proto>void <name>glListParameterfvSGIX</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2079"/>
+        </command>
+        <command>
+            <proto>void <name>glListParameteriSGIX</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="2080"/>
+        </command>
+        <command>
+            <proto>void <name>glListParameterivSGIX</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2081"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadIdentity</name></proto>
+            <glx type="render" opcode="176"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadIdentityDeformationMapSGIX</name></proto>
+            <param group="FfdMaskSGIX"><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <glx type="render" opcode="2076"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadMatrixd</name></proto>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+            <glx type="render" opcode="178"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadMatrixf</name></proto>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+            <glx type="render" opcode="177"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadMatrixx</name></proto>
+            <param len="16">const <ptype>GLfixed</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLoadMatrixxOES</name></proto>
+            <param len="16">const <ptype>GLfixed</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLoadName</name></proto>
+            <param group="SelectName"><ptype>GLuint</ptype> <name>name</name></param>
+            <glx type="render" opcode="122"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadPaletteFromModelViewMatrixOES</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glLoadProgramNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="len">const <ptype>GLubyte</ptype> *<name>program</name></param>
+            <glx type="render" opcode="4183"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadTransposeMatrixd</name></proto>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLoadTransposeMatrixdARB</name></proto>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+            <alias name="glLoadTransposeMatrixd"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadTransposeMatrixf</name></proto>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLoadTransposeMatrixfARB</name></proto>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+            <alias name="glLoadTransposeMatrixf"/>
+        </command>
+        <command>
+            <proto>void <name>glLoadTransposeMatrixxOES</name></proto>
+            <param len="16">const <ptype>GLfixed</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLockArraysEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+        </command>
+        <command>
+            <proto>void <name>glLogicOp</name></proto>
+            <param group="LogicOp"><ptype>GLenum</ptype> <name>opcode</name></param>
+            <glx type="render" opcode="161"/>
+        </command>
+        <command>
+            <proto>void <name>glMakeBufferNonResidentNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeBufferResidentNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeImageHandleNonResidentARB</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeImageHandleNonResidentNV</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeImageHandleResidentARB</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeImageHandleResidentNV</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeNamedBufferNonResidentNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeNamedBufferResidentNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeTextureHandleNonResidentARB</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeTextureHandleNonResidentNV</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeTextureHandleResidentARB</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMakeTextureHandleResidentNV</name></proto>
+            <param><ptype>GLuint64</ptype> <name>handle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMap1d</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>order</name></param>
+            <param group="CoordD" len="COMPSIZE(target,stride,order)">const <ptype>GLdouble</ptype> *<name>points</name></param>
+            <glx type="render" opcode="143"/>
+        </command>
+        <command>
+            <proto>void <name>glMap1f</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>order</name></param>
+            <param group="CoordF" len="COMPSIZE(target,stride,order)">const <ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="render" opcode="144"/>
+        </command>
+        <command>
+            <proto>void <name>glMap1xOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLfixed</ptype> <name>u1</name></param>
+            <param><ptype>GLfixed</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param><ptype>GLint</ptype> <name>order</name></param>
+            <param><ptype>GLfixed</ptype> <name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMap2d</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="CoordD" len="COMPSIZE(target,ustride,uorder,vstride,vorder)">const <ptype>GLdouble</ptype> *<name>points</name></param>
+            <glx type="render" opcode="145"/>
+        </command>
+        <command>
+            <proto>void <name>glMap2f</name></proto>
+            <param group="MapTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="CoordF" len="COMPSIZE(target,ustride,uorder,vstride,vorder)">const <ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="render" opcode="146"/>
+        </command>
+        <command>
+            <proto>void <name>glMap2xOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLfixed</ptype> <name>u1</name></param>
+            <param><ptype>GLfixed</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param><ptype>GLint</ptype> <name>uorder</name></param>
+            <param><ptype>GLfixed</ptype> <name>v1</name></param>
+            <param><ptype>GLfixed</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param><ptype>GLint</ptype> <name>vorder</name></param>
+            <param><ptype>GLfixed</ptype> <name>points</name></param>
+        </command>
+        <command>
+            <proto>void *<name>glMapBuffer</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferAccessARB"><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void *<name>glMapBufferARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferAccessARB"><ptype>GLenum</ptype> <name>access</name></param>
+            <alias name="glMapBuffer"/>
+        </command>
+        <command>
+            <proto>void *<name>glMapBufferOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+            <alias name="glMapBuffer"/>
+        </command>
+        <command>
+            <proto>void *<name>glMapBufferRange</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>length</name></param>
+            <param group="BufferAccessMask"><ptype>GLbitfield</ptype> <name>access</name></param>
+            <glx type="single" opcode="205"/>
+        </command>
+        <command>
+            <proto>void *<name>glMapBufferRangeEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>length</name></param>
+            <param><ptype>GLbitfield</ptype> <name>access</name></param>
+            <alias name="glMapBufferRange"/>
+        </command>
+        <command>
+            <proto>void <name>glMapControlPointsNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="MapTypeNV"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>ustride</name></param>
+            <param><ptype>GLsizei</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>packed</name></param>
+            <param len="COMPSIZE(target,uorder,vorder)">const void *<name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapGrid1d</name></proto>
+            <param><ptype>GLint</ptype> <name>un</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <glx type="render" opcode="147"/>
+        </command>
+        <command>
+            <proto>void <name>glMapGrid1f</name></proto>
+            <param><ptype>GLint</ptype> <name>un</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <glx type="render" opcode="148"/>
+        </command>
+        <command>
+            <proto>void <name>glMapGrid1xOES</name></proto>
+            <param><ptype>GLint</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>u1</name></param>
+            <param><ptype>GLfixed</ptype> <name>u2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapGrid2d</name></proto>
+            <param><ptype>GLint</ptype> <name>un</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>vn</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v2</name></param>
+            <glx type="render" opcode="149"/>
+        </command>
+        <command>
+            <proto>void <name>glMapGrid2f</name></proto>
+            <param><ptype>GLint</ptype> <name>un</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>vn</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v2</name></param>
+            <glx type="render" opcode="150"/>
+        </command>
+        <command>
+            <proto>void <name>glMapGrid2xOES</name></proto>
+            <param><ptype>GLint</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>u1</name></param>
+            <param><ptype>GLfixed</ptype> <name>u2</name></param>
+            <param><ptype>GLfixed</ptype> <name>v1</name></param>
+            <param><ptype>GLfixed</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void *<name>glMapNamedBufferEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="VertexBufferObjectAccess"><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void *<name>glMapNamedBufferRangeEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>length</name></param>
+            <param group="BufferAccessMask"><ptype>GLbitfield</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void *<name>glMapObjectBufferATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapParameterfvNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="MapParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(target,pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapParameterivNV</name></proto>
+            <param group="EvalTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="MapParameterNV"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(target,pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void *<name>glMapTexture2DINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLbitfield</ptype> <name>access</name></param>
+            <param len="1"><ptype>GLint</ptype> *<name>stride</name></param>
+            <param len="1"><ptype>GLenum</ptype> *<name>layout</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapVertexAttrib1dAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>size</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>order</name></param>
+            <param group="CoordD" len="COMPSIZE(size,stride,order)">const <ptype>GLdouble</ptype> *<name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapVertexAttrib1fAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>size</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>order</name></param>
+            <param group="CoordF" len="COMPSIZE(size,stride,order)">const <ptype>GLfloat</ptype> *<name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapVertexAttrib2dAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>size</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="CoordD" len="COMPSIZE(size,ustride,uorder,vstride,vorder)">const <ptype>GLdouble</ptype> *<name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMapVertexAttrib2fAPPLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>size</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>u2</name></param>
+            <param><ptype>GLint</ptype> <name>ustride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>uorder</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>vstride</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>vorder</name></param>
+            <param group="CoordF" len="COMPSIZE(size,ustride,uorder,vstride,vorder)">const <ptype>GLfloat</ptype> *<name>points</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMaterialf</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="96"/>
+        </command>
+        <command>
+            <proto>void <name>glMaterialfv</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="97"/>
+        </command>
+        <command>
+            <proto>void <name>glMateriali</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="98"/>
+        </command>
+        <command>
+            <proto>void <name>glMaterialiv</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="99"/>
+        </command>
+        <command>
+            <proto>void <name>glMaterialx</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMaterialxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMaterialxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMaterialxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixFrustumEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLdouble</ptype> <name>left</name></param>
+            <param><ptype>GLdouble</ptype> <name>right</name></param>
+            <param><ptype>GLdouble</ptype> <name>bottom</name></param>
+            <param><ptype>GLdouble</ptype> <name>top</name></param>
+            <param><ptype>GLdouble</ptype> <name>zNear</name></param>
+            <param><ptype>GLdouble</ptype> <name>zFar</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixIndexPointerARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="MatrixIndexPointerTypeARB"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixIndexPointerOES</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixIndexubvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLubyte</ptype> *<name>indices</name></param>
+            <glx type="render" opcode="4326"/>
+        </command>
+        <command>
+            <proto>void <name>glMatrixIndexuivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLuint</ptype> *<name>indices</name></param>
+            <glx type="render" opcode="4328"/>
+        </command>
+        <command>
+            <proto>void <name>glMatrixIndexusvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLushort</ptype> *<name>indices</name></param>
+            <glx type="render" opcode="4327"/>
+        </command>
+        <command>
+            <proto>void <name>glMatrixLoadIdentityEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixLoadTransposedEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixLoadTransposefEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixLoaddEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixLoadfEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixMode</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="179"/>
+        </command>
+        <command>
+            <proto>void <name>glMatrixMultTransposedEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixMultTransposefEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixMultdEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixMultfEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixOrthoEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLdouble</ptype> <name>left</name></param>
+            <param><ptype>GLdouble</ptype> <name>right</name></param>
+            <param><ptype>GLdouble</ptype> <name>bottom</name></param>
+            <param><ptype>GLdouble</ptype> <name>top</name></param>
+            <param><ptype>GLdouble</ptype> <name>zNear</name></param>
+            <param><ptype>GLdouble</ptype> <name>zFar</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixPopEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixPushEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixRotatedEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLdouble</ptype> <name>angle</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixRotatefEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLfloat</ptype> <name>angle</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixScaledEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixScalefEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixTranslatedEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMatrixTranslatefEXT</name></proto>
+            <param group="MatrixMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMemoryBarrier</name></proto>
+            <param><ptype>GLbitfield</ptype> <name>barriers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMemoryBarrierByRegion</name></proto>
+            <param><ptype>GLbitfield</ptype> <name>barriers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMemoryBarrierEXT</name></proto>
+            <param><ptype>GLbitfield</ptype> <name>barriers</name></param>
+            <alias name="glMemoryBarrier"/>
+        </command>
+        <command>
+            <proto>void <name>glMinSampleShading</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMinSampleShadingARB</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>value</name></param>
+            <alias name="glMinSampleShading"/>
+        </command>
+        <command>
+            <proto>void <name>glMinSampleShadingOES</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>value</name></param>
+            <alias name="glMinSampleShading"/>
+        </command>
+        <command>
+            <proto>void <name>glMinmax</name></proto>
+            <param group="MinmaxTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>sink</name></param>
+            <glx type="render" opcode="4111"/>
+        </command>
+        <command>
+            <proto>void <name>glMinmaxEXT</name></proto>
+            <param group="MinmaxTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>sink</name></param>
+            <alias name="glMinmax"/>
+            <glx type="render" opcode="4111"/>
+        </command>
+        <command>
+            <proto>void <name>glMultMatrixd</name></proto>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+            <glx type="render" opcode="181"/>
+        </command>
+        <command>
+            <proto>void <name>glMultMatrixf</name></proto>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+            <glx type="render" opcode="180"/>
+        </command>
+        <command>
+            <proto>void <name>glMultMatrixx</name></proto>
+            <param len="16">const <ptype>GLfixed</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultMatrixxOES</name></proto>
+            <param len="16">const <ptype>GLfixed</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultTransposeMatrixd</name></proto>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultTransposeMatrixdARB</name></proto>
+            <param len="16">const <ptype>GLdouble</ptype> *<name>m</name></param>
+            <alias name="glMultTransposeMatrixd"/>
+        </command>
+        <command>
+            <proto>void <name>glMultTransposeMatrixf</name></proto>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultTransposeMatrixfARB</name></proto>
+            <param len="16">const <ptype>GLfloat</ptype> *<name>m</name></param>
+            <alias name="glMultTransposeMatrixf"/>
+        </command>
+        <command>
+            <proto>void <name>glMultTransposeMatrixxOES</name></proto>
+            <param len="16">const <ptype>GLfixed</ptype> *<name>m</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawArrays</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="COMPSIZE(count)">const <ptype>GLint</ptype> *<name>first</name></param>
+            <param len="COMPSIZE(drawcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawcount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawArraysEXT</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="COMPSIZE(primcount)">const <ptype>GLint</ptype> *<name>first</name></param>
+            <param len="COMPSIZE(primcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glMultiDrawArrays"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawArraysIndirect</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="COMPSIZE(drawcount,stride)">const void *<name>indirect</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawArraysIndirectAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param>const void *<name>indirect</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <alias name="glMultiDrawArraysIndirect"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawArraysIndirectBindlessNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param>const void *<name>indirect</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawCount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLint</ptype> <name>vertexBufferCount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawArraysIndirectCountARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLintptr</ptype> <name>indirect</name></param>
+            <param><ptype>GLintptr</ptype> <name>drawcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxdrawcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementArrayAPPLE</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="primcount">const <ptype>GLint</ptype> *<name>first</name></param>
+            <param len="primcount">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElements</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="COMPSIZE(drawcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(drawcount)">const void *const*<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawcount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementsBaseVertex</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="COMPSIZE(drawcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(drawcount)">const void *const*<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawcount</name></param>
+            <param len="COMPSIZE(drawcount)">const <ptype>GLint</ptype> *<name>basevertex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementsEXT</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param len="COMPSIZE(primcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(primcount)">const void *const*<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <alias name="glMultiDrawElements"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementsIndirect</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(drawcount,stride)">const void *<name>indirect</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementsIndirectAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param>const void *<name>indirect</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <alias name="glMultiDrawElementsIndirect"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementsIndirectBindlessNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param>const void *<name>indirect</name></param>
+            <param><ptype>GLsizei</ptype> <name>drawCount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLint</ptype> <name>vertexBufferCount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawElementsIndirectCountARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLintptr</ptype> <name>indirect</name></param>
+            <param><ptype>GLintptr</ptype> <name>drawcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>maxdrawcount</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiDrawRangeElementArrayAPPLE</name></proto>
+            <param group="PrimitiveType"><ptype>GLenum</ptype> <name>mode</name></param>
+            <param><ptype>GLuint</ptype> <name>start</name></param>
+            <param><ptype>GLuint</ptype> <name>end</name></param>
+            <param len="primcount">const <ptype>GLint</ptype> *<name>first</name></param>
+            <param len="primcount">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiModeDrawArraysIBM</name></proto>
+            <param group="PrimitiveType" len="COMPSIZE(primcount)">const <ptype>GLenum</ptype> *<name>mode</name></param>
+            <param len="COMPSIZE(primcount)">const <ptype>GLint</ptype> *<name>first</name></param>
+            <param len="COMPSIZE(primcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <param><ptype>GLint</ptype> <name>modestride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiModeDrawElementsIBM</name></proto>
+            <param group="PrimitiveType" len="COMPSIZE(primcount)">const <ptype>GLenum</ptype> *<name>mode</name></param>
+            <param len="COMPSIZE(primcount)">const <ptype>GLsizei</ptype> *<name>count</name></param>
+            <param group="DrawElementsType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(primcount)">const void *const*<name>indices</name></param>
+            <param><ptype>GLsizei</ptype> <name>primcount</name></param>
+            <param><ptype>GLint</ptype> <name>modestride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexBufferEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TypeEnum"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1bOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1bvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="1">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1d</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1dv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1dARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1dv"/>
+            <alias name="glMultiTexCoord1d"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1dv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="198"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1dvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord1dv"/>
+            <glx type="render" opcode="198"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1f</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1fv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1fARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1fv"/>
+            <alias name="glMultiTexCoord1f"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1fv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="1">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="199"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1fvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="1">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord1fv"/>
+            <glx type="render" opcode="199"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1hNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1hvNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV" len="1">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4250"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1i</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1iv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1iARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1iv"/>
+            <alias name="glMultiTexCoord1i"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1iv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="1">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="200"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1ivARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="1">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord1iv"/>
+            <glx type="render" opcode="200"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1s</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1sv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1sARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <vecequiv name="glMultiTexCoord1sv"/>
+            <alias name="glMultiTexCoord1s"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1sv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="1">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="201"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1svARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="1">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord1sv"/>
+            <glx type="render" opcode="201"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1xOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord1xvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="1">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2bOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+            <param><ptype>GLbyte</ptype> <name>t</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2bvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="2">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2d</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2dARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2dv"/>
+            <alias name="glMultiTexCoord2d"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2dv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="202"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2dvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord2dv"/>
+            <glx type="render" opcode="202"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2f</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2fARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2fv"/>
+            <alias name="glMultiTexCoord2f"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2fv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="203"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2fvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord2fv"/>
+            <glx type="render" opcode="203"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2hNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2hvNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV" len="2">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4251"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2i</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2iARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2iv"/>
+            <alias name="glMultiTexCoord2i"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2iv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="204"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2ivARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord2iv"/>
+            <glx type="render" opcode="204"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2s</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2sARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <vecequiv name="glMultiTexCoord2sv"/>
+            <alias name="glMultiTexCoord2s"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2sv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="205"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2svARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord2sv"/>
+            <glx type="render" opcode="205"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2xOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord2xvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3bOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+            <param><ptype>GLbyte</ptype> <name>t</name></param>
+            <param><ptype>GLbyte</ptype> <name>r</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3bvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3d</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3dARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3dv"/>
+            <alias name="glMultiTexCoord3d"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3dv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="206"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3dvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord3dv"/>
+            <glx type="render" opcode="206"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3f</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3fARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3fv"/>
+            <alias name="glMultiTexCoord3f"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3fv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="207"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3fvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord3fv"/>
+            <glx type="render" opcode="207"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3hNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>t</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3hvNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4252"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3i</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3iARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3iv"/>
+            <alias name="glMultiTexCoord3i"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3iv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="208"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3ivARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord3iv"/>
+            <glx type="render" opcode="208"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3s</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3sARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>r</name></param>
+            <vecequiv name="glMultiTexCoord3sv"/>
+            <alias name="glMultiTexCoord3s"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3sv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="209"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3svARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord3sv"/>
+            <glx type="render" opcode="209"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3xOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord3xvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="3">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4bOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+            <param><ptype>GLbyte</ptype> <name>t</name></param>
+            <param><ptype>GLbyte</ptype> <name>r</name></param>
+            <param><ptype>GLbyte</ptype> <name>q</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4bvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4d</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>r</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4dARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>r</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4dv"/>
+            <alias name="glMultiTexCoord4d"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4dv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="210"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4dvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord4dv"/>
+            <glx type="render" opcode="210"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4f</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>r</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4fARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>r</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4fv"/>
+            <alias name="glMultiTexCoord4f"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4fv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="211"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4fvARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord4fv"/>
+            <glx type="render" opcode="211"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4hNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>t</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>r</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4hvNV</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="Half16NV" len="4">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4253"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4i</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>r</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4iARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>r</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4iv"/>
+            <alias name="glMultiTexCoord4i"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4iv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="212"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4ivARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord4iv"/>
+            <glx type="render" opcode="212"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4s</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>r</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4sARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>r</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>q</name></param>
+            <vecequiv name="glMultiTexCoord4sv"/>
+            <alias name="glMultiTexCoord4s"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4sv</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="213"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4svARB</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CoordS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glMultiTexCoord4sv"/>
+            <glx type="render" opcode="213"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4x</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>q</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4xOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>q</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoord4xvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP1ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP1uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP2ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP2uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP3ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP3uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP4ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordP4uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexCoordPointerEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="TexCoordPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexEnvfEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexEnvfvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexEnvfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexEnviEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexEnvivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexEnvivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexGendEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLdouble</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexGendvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexGendvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexGenfEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexGenfvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexGenfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexGeniEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexGenivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexGenivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexImage1DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexImage2DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexImage3DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexParameterIivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexParameterIuivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexParameterfEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexParameterfvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexParameterfvEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexParameteriEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <vecequiv name="glMultiTexParameterivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexParameterivEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexRenderbufferEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexSubImage1DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexSubImage2DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glMultiTexSubImage3DEXT</name></proto>
+            <param group="TextureUnit"><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedBufferDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="COMPSIZE(size)">const void *<name>data</name></param>
+            <param group="VertexBufferObjectUsage"><ptype>GLenum</ptype> <name>usage</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedBufferStorageEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="size">const void *<name>data</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedBufferSubDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <param len="COMPSIZE(size)">const void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedCopyBufferSubDataEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>readBuffer</name></param>
+            <param><ptype>GLuint</ptype> <name>writeBuffer</name></param>
+            <param><ptype>GLintptr</ptype> <name>readOffset</name></param>
+            <param><ptype>GLintptr</ptype> <name>writeOffset</name></param>
+            <param><ptype>GLsizeiptr</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferParameteriEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferRenderbufferEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>renderbuffertarget</name></param>
+            <param group="Renderbuffer"><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferTexture1DEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferTexture2DEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferTexture3DEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>textarget</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferTextureEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferTextureFaceEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>face</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedFramebufferTextureLayerEXT</name></proto>
+            <param group="Framebuffer"><ptype>GLuint</ptype> <name>framebuffer</name></param>
+            <param group="FramebufferAttachment"><ptype>GLenum</ptype> <name>attachment</name></param>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>layer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameter4dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glNamedProgramLocalParameter4dvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameter4dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameter4fEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glNamedProgramLocalParameter4fvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameter4fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameterI4iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glNamedProgramLocalParameterI4ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameterI4ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameterI4uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <param><ptype>GLuint</ptype> <name>w</name></param>
+            <vecequiv name="glNamedProgramLocalParameterI4uivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameterI4uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParameters4fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParametersI4ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramLocalParametersI4uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedProgramStringEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ProgramFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="len">const void *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedRenderbufferStorageEXT</name></proto>
+            <param group="Renderbuffer"><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedRenderbufferStorageMultisampleCoverageEXT</name></proto>
+            <param group="Renderbuffer"><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <param><ptype>GLsizei</ptype> <name>coverageSamples</name></param>
+            <param><ptype>GLsizei</ptype> <name>colorSamples</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedRenderbufferStorageMultisampleEXT</name></proto>
+            <param group="Renderbuffer"><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNamedStringARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>namelen</name></param>
+            <param len="namelen">const <ptype>GLchar</ptype> *<name>name</name></param>
+            <param><ptype>GLint</ptype> <name>stringlen</name></param>
+            <param len="stringlen">const <ptype>GLchar</ptype> *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNewList</name></proto>
+            <param group="List"><ptype>GLuint</ptype> <name>list</name></param>
+            <param group="ListMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="single" opcode="101"/>
+        </command>
+        <command>
+            <proto><ptype>GLuint</ptype> <name>glNewObjectBufferATI</name></proto>
+            <param><ptype>GLsizei</ptype> <name>size</name></param>
+            <param len="size">const void *<name>pointer</name></param>
+            <param group="ArrayObjectUsageATI"><ptype>GLenum</ptype> <name>usage</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormal3b</name></proto>
+            <param><ptype>GLbyte</ptype> <name>nx</name></param>
+            <param><ptype>GLbyte</ptype> <name>ny</name></param>
+            <param><ptype>GLbyte</ptype> <name>nz</name></param>
+            <vecequiv name="glNormal3bv"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3bv</name></proto>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="28"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>nx</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>ny</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>nz</name></param>
+            <vecequiv name="glNormal3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3dv</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="29"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>nz</name></param>
+            <vecequiv name="glNormal3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormal3fVertex3fvSUN</name></proto>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormal3fv</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="30"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>nx</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>ny</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>nz</name></param>
+            <vecequiv name="glNormal3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3hvNV</name></proto>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4243"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3i</name></proto>
+            <param><ptype>GLint</ptype> <name>nx</name></param>
+            <param><ptype>GLint</ptype> <name>ny</name></param>
+            <param><ptype>GLint</ptype> <name>nz</name></param>
+            <vecequiv name="glNormal3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3iv</name></proto>
+            <param len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="31"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3s</name></proto>
+            <param><ptype>GLshort</ptype> <name>nx</name></param>
+            <param><ptype>GLshort</ptype> <name>ny</name></param>
+            <param><ptype>GLshort</ptype> <name>nz</name></param>
+            <vecequiv name="glNormal3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3sv</name></proto>
+            <param len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="32"/>
+        </command>
+        <command>
+            <proto>void <name>glNormal3x</name></proto>
+            <param><ptype>GLfixed</ptype> <name>nx</name></param>
+            <param><ptype>GLfixed</ptype> <name>ny</name></param>
+            <param><ptype>GLfixed</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormal3xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>nx</name></param>
+            <param><ptype>GLfixed</ptype> <name>ny</name></param>
+            <param><ptype>GLfixed</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormal3xvOES</name></proto>
+            <param len="3">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalFormatNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalP3ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalP3uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalPointer</name></proto>
+            <param group="NormalPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalPointerEXT</name></proto>
+            <param group="NormalPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(type,stride,count)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalPointerListIBM</name></proto>
+            <param group="NormalPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalPointervINTEL</name></proto>
+            <param group="NormalPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="4">const void **<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3bATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLbyte</ptype> <name>nx</name></param>
+            <param><ptype>GLbyte</ptype> <name>ny</name></param>
+            <param><ptype>GLbyte</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3bvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3dATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLdouble</ptype> <name>nx</name></param>
+            <param><ptype>GLdouble</ptype> <name>ny</name></param>
+            <param><ptype>GLdouble</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3dvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3fATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3fvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3iATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLint</ptype> <name>nx</name></param>
+            <param><ptype>GLint</ptype> <name>ny</name></param>
+            <param><ptype>GLint</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3ivATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3sATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLshort</ptype> <name>nx</name></param>
+            <param><ptype>GLshort</ptype> <name>ny</name></param>
+            <param><ptype>GLshort</ptype> <name>nz</name></param>
+        </command>
+        <command>
+            <proto>void <name>glNormalStream3svATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLshort</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glObjectLabel</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="COMPSIZE(label,length)">const <ptype>GLchar</ptype> *<name>label</name></param>
+        </command>
+        <command>
+            <proto>void <name>glObjectLabelKHR</name></proto>
+            <param><ptype>GLenum</ptype> <name>identifier</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>label</name></param>
+            <alias name="glObjectLabel"/>
+        </command>
+        <command>
+            <proto>void <name>glObjectPtrLabel</name></proto>
+            <param>const void *<name>ptr</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="COMPSIZE(label,length)">const <ptype>GLchar</ptype> *<name>label</name></param>
+        </command>
+        <command>
+            <proto>void <name>glObjectPtrLabelKHR</name></proto>
+            <param>const void *<name>ptr</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>label</name></param>
+            <alias name="glObjectPtrLabel"/>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glObjectPurgeableAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>objectType</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLenum</ptype> <name>option</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glObjectUnpurgeableAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>objectType</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+            <param><ptype>GLenum</ptype> <name>option</name></param>
+        </command>
+        <command>
+            <proto>void <name>glOrtho</name></proto>
+            <param><ptype>GLdouble</ptype> <name>left</name></param>
+            <param><ptype>GLdouble</ptype> <name>right</name></param>
+            <param><ptype>GLdouble</ptype> <name>bottom</name></param>
+            <param><ptype>GLdouble</ptype> <name>top</name></param>
+            <param><ptype>GLdouble</ptype> <name>zNear</name></param>
+            <param><ptype>GLdouble</ptype> <name>zFar</name></param>
+            <glx type="render" opcode="182"/>
+        </command>
+        <command>
+            <proto>void <name>glOrthof</name></proto>
+            <param><ptype>GLfloat</ptype> <name>l</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>n</name></param>
+            <param><ptype>GLfloat</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glOrthofOES</name></proto>
+            <param><ptype>GLfloat</ptype> <name>l</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>n</name></param>
+            <param><ptype>GLfloat</ptype> <name>f</name></param>
+            <glx type="render" opcode="4311"/>
+        </command>
+        <command>
+            <proto>void <name>glOrthox</name></proto>
+            <param><ptype>GLfixed</ptype> <name>l</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>b</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glOrthoxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>l</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>b</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>n</name></param>
+            <param><ptype>GLfixed</ptype> <name>f</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPNTrianglesfATI</name></proto>
+            <param group="PNTrianglesPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPNTrianglesiATI</name></proto>
+            <param group="PNTrianglesPNameATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPassTexCoordATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>coord</name></param>
+            <param group="SwizzleOpATI"><ptype>GLenum</ptype> <name>swizzle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPassThrough</name></proto>
+            <param group="FeedbackElement"><ptype>GLfloat</ptype> <name>token</name></param>
+            <glx type="render" opcode="123"/>
+        </command>
+        <command>
+            <proto>void <name>glPassThroughxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>token</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPatchParameterfv</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPatchParameteri</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPatchParameteriEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+            <alias name="glPatchParameteri"/>
+        </command>
+        <command>
+            <proto>void <name>glPathColorGenNV</name></proto>
+            <param group="PathColor"><ptype>GLenum</ptype> <name>color</name></param>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>genMode</name></param>
+            <param group="PathColorFormat"><ptype>GLenum</ptype> <name>colorFormat</name></param>
+            <param len="COMPSIZE(genMode,colorFormat)">const <ptype>GLfloat</ptype> *<name>coeffs</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathCommandsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>numCommands</name></param>
+            <param group="PathCommand" len="numCommands">const <ptype>GLubyte</ptype> *<name>commands</name></param>
+            <param><ptype>GLsizei</ptype> <name>numCoords</name></param>
+            <param group="PathCoordType"><ptype>GLenum</ptype> <name>coordType</name></param>
+            <param len="COMPSIZE(numCoords,coordType)">const void *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathCoordsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>numCoords</name></param>
+            <param group="PathCoordType"><ptype>GLenum</ptype> <name>coordType</name></param>
+            <param len="COMPSIZE(numCoords,coordType)">const void *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathCoverDepthFuncNV</name></proto>
+            <param group="DepthFunction"><ptype>GLenum</ptype> <name>func</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathDashArrayNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>dashCount</name></param>
+            <param len="dashCount">const <ptype>GLfloat</ptype> *<name>dashArray</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathFogGenNV</name></proto>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>genMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathGlyphRangeNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>firstPathName</name></param>
+            <param group="PathFontTarget"><ptype>GLenum</ptype> <name>fontTarget</name></param>
+            <param len="COMPSIZE(fontTarget,fontName)">const void *<name>fontName</name></param>
+            <param group="PathFontStyle"><ptype>GLbitfield</ptype> <name>fontStyle</name></param>
+            <param><ptype>GLuint</ptype> <name>firstGlyph</name></param>
+            <param><ptype>GLsizei</ptype> <name>numGlyphs</name></param>
+            <param group="PathHandleMissingGlyphs"><ptype>GLenum</ptype> <name>handleMissingGlyphs</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathParameterTemplate</name></param>
+            <param><ptype>GLfloat</ptype> <name>emScale</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathGlyphsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>firstPathName</name></param>
+            <param group="PathFontTarget"><ptype>GLenum</ptype> <name>fontTarget</name></param>
+            <param len="COMPSIZE(fontTarget,fontName)">const void *<name>fontName</name></param>
+            <param group="PathFontStyle"><ptype>GLbitfield</ptype> <name>fontStyle</name></param>
+            <param><ptype>GLsizei</ptype> <name>numGlyphs</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(numGlyphs,type,charcodes)">const void *<name>charcodes</name></param>
+            <param group="PathHandleMissingGlyphs"><ptype>GLenum</ptype> <name>handleMissingGlyphs</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathParameterTemplate</name></param>
+            <param><ptype>GLfloat</ptype> <name>emScale</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathParameterfNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathParameterfvNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathParameteriNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathParameterivNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathStencilDepthOffsetNV</name></proto>
+            <param><ptype>GLfloat</ptype> <name>factor</name></param>
+            <param><ptype>GLfloat</ptype> <name>units</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathStencilFuncNV</name></proto>
+            <param group="StencilFunction"><ptype>GLenum</ptype> <name>func</name></param>
+            <param group="ClampedStencilValue"><ptype>GLint</ptype> <name>ref</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathStringNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathStringFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">const void *<name>pathString</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathSubCommandsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>commandStart</name></param>
+            <param><ptype>GLsizei</ptype> <name>commandsToDelete</name></param>
+            <param><ptype>GLsizei</ptype> <name>numCommands</name></param>
+            <param group="PathCommand" len="numCommands">const <ptype>GLubyte</ptype> *<name>commands</name></param>
+            <param><ptype>GLsizei</ptype> <name>numCoords</name></param>
+            <param group="PathCoordType"><ptype>GLenum</ptype> <name>coordType</name></param>
+            <param len="COMPSIZE(numCoords,coordType)">const void *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathSubCoordsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>coordStart</name></param>
+            <param><ptype>GLsizei</ptype> <name>numCoords</name></param>
+            <param group="PathCoordType"><ptype>GLenum</ptype> <name>coordType</name></param>
+            <param len="COMPSIZE(numCoords,coordType)">const void *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPathTexGenNV</name></proto>
+            <param group="PathColor"><ptype>GLenum</ptype> <name>texCoordSet</name></param>
+            <param group="PathGenMode"><ptype>GLenum</ptype> <name>genMode</name></param>
+            <param><ptype>GLint</ptype> <name>components</name></param>
+            <param len="COMPSIZE(genMode,components)">const <ptype>GLfloat</ptype> *<name>coeffs</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPauseTransformFeedback</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glPauseTransformFeedbackNV</name></proto>
+            <alias name="glPauseTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelDataRangeNV</name></proto>
+            <param group="PixelDataRangeTargetNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelMapfv</name></proto>
+            <param group="PixelMap"><ptype>GLenum</ptype> <name>map</name></param>
+            <param group="CheckedInt32"><ptype>GLsizei</ptype> <name>mapsize</name></param>
+            <param len="mapsize">const <ptype>GLfloat</ptype> *<name>values</name></param>
+            <glx type="render" opcode="168"/>
+            <glx type="render" opcode="323" name="glPixelMapfvPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelMapuiv</name></proto>
+            <param group="PixelMap"><ptype>GLenum</ptype> <name>map</name></param>
+            <param group="CheckedInt32"><ptype>GLsizei</ptype> <name>mapsize</name></param>
+            <param len="mapsize">const <ptype>GLuint</ptype> *<name>values</name></param>
+            <glx type="render" opcode="169"/>
+            <glx type="render" opcode="324" name="glPixelMapuivPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelMapusv</name></proto>
+            <param group="PixelMap"><ptype>GLenum</ptype> <name>map</name></param>
+            <param group="CheckedInt32"><ptype>GLsizei</ptype> <name>mapsize</name></param>
+            <param len="mapsize">const <ptype>GLushort</ptype> *<name>values</name></param>
+            <glx type="render" opcode="170"/>
+            <glx type="render" opcode="325" name="glPixelMapusvPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelMapx</name></proto>
+            <param><ptype>GLenum</ptype> <name>map</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLfixed</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelStoref</name></proto>
+            <param group="PixelStoreParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="single" opcode="109"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelStorei</name></proto>
+            <param group="PixelStoreParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="single" opcode="110"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelStorex</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTexGenParameterfSGIS</name></proto>
+            <param group="PixelTexGenParameterNameSGIS"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTexGenParameterfvSGIS</name></proto>
+            <param group="PixelTexGenParameterNameSGIS"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTexGenParameteriSGIS</name></proto>
+            <param group="PixelTexGenParameterNameSGIS"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTexGenParameterivSGIS</name></proto>
+            <param group="PixelTexGenParameterNameSGIS"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTexGenSGIX</name></proto>
+            <param group="PixelTexGenModeSGIX"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="2059"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransferf</name></proto>
+            <param group="PixelTransferParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="166"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransferi</name></proto>
+            <param group="PixelTransferParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="167"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransferxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransformParameterfEXT</name></proto>
+            <param group="PixelTransformTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelTransformPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="16385"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransformParameterfvEXT</name></proto>
+            <param group="PixelTransformTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelTransformPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransformParameteriEXT</name></proto>
+            <param group="PixelTransformTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelTransformPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="16386"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelTransformParameterivEXT</name></proto>
+            <param group="PixelTransformTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelTransformPNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="1">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPixelZoom</name></proto>
+            <param><ptype>GLfloat</ptype> <name>xfactor</name></param>
+            <param><ptype>GLfloat</ptype> <name>yfactor</name></param>
+            <glx type="render" opcode="165"/>
+        </command>
+        <command>
+            <proto>void <name>glPixelZoomxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>xfactor</name></param>
+            <param><ptype>GLfixed</ptype> <name>yfactor</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glPointAlongPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param><ptype>GLsizei</ptype> <name>startSegment</name></param>
+            <param><ptype>GLsizei</ptype> <name>numSegments</name></param>
+            <param><ptype>GLfloat</ptype> <name>distance</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>x</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>y</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>tangentX</name></param>
+            <param len="1"><ptype>GLfloat</ptype> *<name>tangentY</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterf</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="2065"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfARB</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <alias name="glPointParameterf"/>
+            <glx type="render" opcode="2065"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfEXT</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <alias name="glPointParameterf"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfSGIS</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <alias name="glPointParameterf"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfv</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2066"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfvARB</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glPointParameterfv"/>
+            <glx type="render" opcode="2066"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfvEXT</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glPointParameterfv"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterfvSGIS</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <alias name="glPointParameterfv"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameteri</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="4221"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameteriNV</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+            <alias name="glPointParameteri"/>
+            <glx type="render" opcode="4221"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameteriv</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4222"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterivNV</name></proto>
+            <param group="PointParameterNameARB"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glPointParameteriv"/>
+            <glx type="render" opcode="4222"/>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterx</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointSize</name></proto>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>size</name></param>
+            <glx type="render" opcode="100"/>
+        </command>
+        <command>
+            <proto>void <name>glPointSizePointerOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointSizex</name></proto>
+            <param><ptype>GLfixed</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPointSizexOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glPollAsyncSGIX</name></proto>
+            <param len="1"><ptype>GLuint</ptype> *<name>markerp</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glPollInstrumentsSGIX</name></proto>
+            <param len="1"><ptype>GLint</ptype> *<name>marker_p</name></param>
+            <glx type="vendor" opcode="4104"/>
+        </command>
+        <command>
+            <proto>void <name>glPolygonMode</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="PolygonMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="101"/>
+        </command>
+        <command>
+            <proto>void <name>glPolygonOffset</name></proto>
+            <param><ptype>GLfloat</ptype> <name>factor</name></param>
+            <param><ptype>GLfloat</ptype> <name>units</name></param>
+            <glx type="render" opcode="192"/>
+        </command>
+        <command>
+            <proto>void <name>glPolygonOffsetEXT</name></proto>
+            <param><ptype>GLfloat</ptype> <name>factor</name></param>
+            <param><ptype>GLfloat</ptype> <name>bias</name></param>
+            <glx type="render" opcode="4098"/>
+        </command>
+        <command>
+            <proto>void <name>glPolygonOffsetx</name></proto>
+            <param><ptype>GLfixed</ptype> <name>factor</name></param>
+            <param><ptype>GLfixed</ptype> <name>units</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPolygonOffsetxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>factor</name></param>
+            <param><ptype>GLfixed</ptype> <name>units</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPolygonStipple</name></proto>
+            <param len="COMPSIZE()">const <ptype>GLubyte</ptype> *<name>mask</name></param>
+            <glx type="render" opcode="102"/>
+            <glx type="render" opcode="326" name="glPolygonStipplePBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glPopAttrib</name></proto>
+            <glx type="render" opcode="141"/>
+        </command>
+        <command>
+            <proto>void <name>glPopClientAttrib</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glPopDebugGroup</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glPopDebugGroupKHR</name></proto>
+            <alias name="glPopDebugGroup"/>
+        </command>
+        <command>
+            <proto>void <name>glPopGroupMarkerEXT</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glPopMatrix</name></proto>
+            <glx type="render" opcode="183"/>
+        </command>
+        <command>
+            <proto>void <name>glPopName</name></proto>
+            <glx type="render" opcode="124"/>
+        </command>
+        <command>
+            <proto>void <name>glPresentFrameDualFillNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_slot</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>minPresentTime</name></param>
+            <param><ptype>GLuint</ptype> <name>beginPresentTimeId</name></param>
+            <param><ptype>GLuint</ptype> <name>presentDurationId</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLenum</ptype> <name>target0</name></param>
+            <param><ptype>GLuint</ptype> <name>fill0</name></param>
+            <param><ptype>GLenum</ptype> <name>target1</name></param>
+            <param><ptype>GLuint</ptype> <name>fill1</name></param>
+            <param><ptype>GLenum</ptype> <name>target2</name></param>
+            <param><ptype>GLuint</ptype> <name>fill2</name></param>
+            <param><ptype>GLenum</ptype> <name>target3</name></param>
+            <param><ptype>GLuint</ptype> <name>fill3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPresentFrameKeyedNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_slot</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>minPresentTime</name></param>
+            <param><ptype>GLuint</ptype> <name>beginPresentTimeId</name></param>
+            <param><ptype>GLuint</ptype> <name>presentDurationId</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLenum</ptype> <name>target0</name></param>
+            <param><ptype>GLuint</ptype> <name>fill0</name></param>
+            <param><ptype>GLuint</ptype> <name>key0</name></param>
+            <param><ptype>GLenum</ptype> <name>target1</name></param>
+            <param><ptype>GLuint</ptype> <name>fill1</name></param>
+            <param><ptype>GLuint</ptype> <name>key1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPrimitiveBoundingBoxEXT</name></proto>
+            <param><ptype>GLfloat</ptype> <name>minX</name></param>
+            <param><ptype>GLfloat</ptype> <name>minY</name></param>
+            <param><ptype>GLfloat</ptype> <name>minZ</name></param>
+            <param><ptype>GLfloat</ptype> <name>minW</name></param>
+            <param><ptype>GLfloat</ptype> <name>maxX</name></param>
+            <param><ptype>GLfloat</ptype> <name>maxY</name></param>
+            <param><ptype>GLfloat</ptype> <name>maxZ</name></param>
+            <param><ptype>GLfloat</ptype> <name>maxW</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPrimitiveRestartIndex</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPrimitiveRestartIndexNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPrimitiveRestartNV</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glPrioritizeTextures</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <param len="n">const <ptype>GLfloat</ptype> *<name>priorities</name></param>
+            <glx type="render" opcode="4118"/>
+        </command>
+        <command>
+            <proto>void <name>glPrioritizeTexturesEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Texture" len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <param group="ClampedFloat32" len="n">const <ptype>GLclampf</ptype> *<name>priorities</name></param>
+            <alias name="glPrioritizeTextures"/>
+            <glx type="render" opcode="4118"/>
+        </command>
+        <command>
+            <proto>void <name>glPrioritizeTexturesxOES</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>textures</name></param>
+            <param group="ClampedFixed" len="n">const <ptype>GLfixed</ptype> *<name>priorities</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramBinary</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>binaryFormat</name></param>
+            <param len="length">const void *<name>binary</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramBinaryOES</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLenum</ptype> <name>binaryFormat</name></param>
+            <param len="length">const void *<name>binary</name></param>
+            <param><ptype>GLint</ptype> <name>length</name></param>
+            <alias name="glProgramBinary"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramBufferParametersIivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingIndex</name></param>
+            <param><ptype>GLuint</ptype> <name>wordIndex</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramBufferParametersIuivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingIndex</name></param>
+            <param><ptype>GLuint</ptype> <name>wordIndex</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramBufferParametersfvNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingIndex</name></param>
+            <param><ptype>GLuint</ptype> <name>wordIndex</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameter4dARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glProgramEnvParameter4dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameter4dvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameter4fARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glProgramEnvParameter4fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameter4fvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameterI4iNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glProgramEnvParameterI4ivNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameterI4ivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameterI4uiNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <param><ptype>GLuint</ptype> <name>w</name></param>
+            <vecequiv name="glProgramEnvParameterI4uivNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameterI4uivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParameters4fvEXT</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4281"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParametersI4ivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramEnvParametersI4uivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameter4dARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glProgramLocalParameter4dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameter4dvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameter4fARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glProgramLocalParameter4fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameter4fvARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameterI4iNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glProgramLocalParameterI4ivNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameterI4ivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameterI4uiNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <param><ptype>GLuint</ptype> <name>w</name></param>
+            <vecequiv name="glProgramLocalParameterI4uivNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameterI4uivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParameters4fvEXT</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="4282"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParametersI4ivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramLocalParametersI4uivNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramNamedParameter4dNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="1">const <ptype>GLubyte</ptype> *<name>name</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glProgramNamedParameter4dvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramNamedParameter4dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="1">const <ptype>GLubyte</ptype> *<name>name</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4219"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramNamedParameter4fNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="1">const <ptype>GLubyte</ptype> *<name>name</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glProgramNamedParameter4fvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramNamedParameter4fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="1">const <ptype>GLubyte</ptype> *<name>name</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4218"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameter4dNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glProgramParameter4dvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameter4dvNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4185"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameter4fNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glProgramParameter4fvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameter4fvNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4184"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameteri</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameteriARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+            <alias name="glProgramParameteri"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameteriEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param group="ProgramParameterPName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>value</name></param>
+            <alias name="glProgramParameteri"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameters4dvNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4187"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramParameters4fvNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4186"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramStringARB</name></proto>
+            <param group="ProgramTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="ProgramFormatARB"><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="len">const void *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramSubroutineParametersuivNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1d</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1f</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1fEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <alias name="glProgramUniform1f"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform1fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1i</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <alias name="glProgramUniform1i"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="1">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform1iv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <alias name="glProgramUniform1ui"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform1uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform1uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2d</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>v0</name></param>
+            <param><ptype>GLdouble</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2f</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2fEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <alias name="glProgramUniform2f"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2i</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <alias name="glProgramUniform2i"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="2">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <alias name="glProgramUniform2ui"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="2">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform2uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform2uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3d</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>v0</name></param>
+            <param><ptype>GLdouble</ptype> <name>v1</name></param>
+            <param><ptype>GLdouble</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3f</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3fEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+            <alias name="glProgramUniform3f"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3i</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+            <alias name="glProgramUniform3i"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="3">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+            <alias name="glProgramUniform3ui"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="3">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform3uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform3uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4d</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>v0</name></param>
+            <param><ptype>GLdouble</ptype> <name>v1</name></param>
+            <param><ptype>GLdouble</ptype> <name>v2</name></param>
+            <param><ptype>GLdouble</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4f</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLfloat</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4fEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLfloat</ptype> <name>v3</name></param>
+            <alias name="glProgramUniform4f"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4i</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>z</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>v3</name></param>
+            <alias name="glProgramUniform4i"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+            <param><ptype>GLuint</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>z</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+            <param><ptype>GLuint</ptype> <name>v3</name></param>
+            <alias name="glProgramUniform4ui"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniform4uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glProgramUniform4uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformHandleui64ARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformHandleui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformHandleui64vARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformHandleui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x3dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x3dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x3fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x3fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*6">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix2x3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x4dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x4dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x4fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix2x4fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*8">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix2x4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*9">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x2dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x2dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x2fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x2fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*6">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix3x2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x4dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x4dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x4fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix3x4fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*12">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix3x4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*16">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x2dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x2dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x2fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x2fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*8">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix4x2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x3dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x3dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x3fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformMatrix4x3fvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count*12">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glProgramUniformMatrix4x3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramUniformui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProgramVertexLimitNV</name></proto>
+            <param group="ProgramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>limit</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProvokingVertex</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glProvokingVertexEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+            <alias name="glProvokingVertex"/>
+        </command>
+        <command>
+            <proto>void <name>glPushAttrib</name></proto>
+            <param group="AttribMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+            <glx type="render" opcode="142"/>
+        </command>
+        <command>
+            <proto>void <name>glPushClientAttrib</name></proto>
+            <param group="ClientAttribMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPushClientAttribDefaultEXT</name></proto>
+            <param group="ClientAttribMask"><ptype>GLbitfield</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPushDebugGroup</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="COMPSIZE(message,length)">const <ptype>GLchar</ptype> *<name>message</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPushDebugGroupKHR</name></proto>
+            <param><ptype>GLenum</ptype> <name>source</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>message</name></param>
+            <alias name="glPushDebugGroup"/>
+        </command>
+        <command>
+            <proto>void <name>glPushGroupMarkerEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param>const <ptype>GLchar</ptype> *<name>marker</name></param>
+        </command>
+        <command>
+            <proto>void <name>glPushMatrix</name></proto>
+            <glx type="render" opcode="184"/>
+        </command>
+        <command>
+            <proto>void <name>glPushName</name></proto>
+            <param group="SelectName"><ptype>GLuint</ptype> <name>name</name></param>
+            <glx type="render" opcode="125"/>
+        </command>
+        <command>
+            <proto>void <name>glQueryCounter</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto>void <name>glQueryCounterEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glQueryCounter"/>
+        </command>
+        <command>
+            <proto><ptype>GLbitfield</ptype> <name>glQueryMatrixxOES</name></proto>
+            <param len="16"><ptype>GLfixed</ptype> *<name>mantissa</name></param>
+            <param len="16"><ptype>GLint</ptype> *<name>exponent</name></param>
+        </command>
+        <command>
+            <proto>void <name>glQueryObjectParameteruiAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="OcclusionQueryEventMaskAMD"><ptype>GLuint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <vecequiv name="glRasterPos2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2dv</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="33"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <vecequiv name="glRasterPos2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2fv</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="34"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <vecequiv name="glRasterPos2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2iv</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="35"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <vecequiv name="glRasterPos2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2sv</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="36"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos2xvOES</name></proto>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <vecequiv name="glRasterPos3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3dv</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="37"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <vecequiv name="glRasterPos3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3fv</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="38"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <vecequiv name="glRasterPos3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3iv</name></proto>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="39"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <vecequiv name="glRasterPos3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3sv</name></proto>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="40"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos3xvOES</name></proto>
+            <param len="3">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glRasterPos4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4dv</name></proto>
+            <param group="CoordD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="41"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glRasterPos4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4fv</name></proto>
+            <param group="CoordF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="42"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glRasterPos4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4iv</name></proto>
+            <param group="CoordI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="43"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>w</name></param>
+            <vecequiv name="glRasterPos4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4sv</name></proto>
+            <param group="CoordS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="44"/>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+            <param><ptype>GLfixed</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRasterPos4xvOES</name></proto>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReadBuffer</name></proto>
+            <param group="ReadBufferMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="171"/>
+        </command>
+        <command>
+            <proto>void <name>glReadBufferIndexedEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>src</name></param>
+            <param><ptype>GLint</ptype> <name>index</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReadBufferNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReadInstrumentsSGIX</name></proto>
+            <param><ptype>GLint</ptype> <name>marker</name></param>
+            <glx type="render" opcode="2077"/>
+        </command>
+        <command>
+            <proto>void <name>glReadPixels</name></proto>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">void *<name>pixels</name></param>
+            <glx type="single" opcode="111"/>
+            <glx type="render" opcode="345" name="glReadPixelsPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glReadnPixelsARB</name></proto>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReadnPixelsEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param len="bufSize">void *<name>data</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRectd</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y1</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x2</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y2</name></param>
+            <vecequiv name="glRectdv"/>
+        </command>
+        <command>
+            <proto>void <name>glRectdv</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v1</name></param>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v2</name></param>
+            <glx type="render" opcode="45"/>
+        </command>
+        <command>
+            <proto>void <name>glRectf</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y1</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x2</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y2</name></param>
+            <vecequiv name="glRectfv"/>
+        </command>
+        <command>
+            <proto>void <name>glRectfv</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v1</name></param>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v2</name></param>
+            <glx type="render" opcode="46"/>
+        </command>
+        <command>
+            <proto>void <name>glRecti</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x1</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y1</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x2</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y2</name></param>
+            <vecequiv name="glRectiv"/>
+        </command>
+        <command>
+            <proto>void <name>glRectiv</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v1</name></param>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v2</name></param>
+            <glx type="render" opcode="47"/>
+        </command>
+        <command>
+            <proto>void <name>glRects</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x1</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y1</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x2</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y2</name></param>
+            <vecequiv name="glRectsv"/>
+        </command>
+        <command>
+            <proto>void <name>glRectsv</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v1</name></param>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v2</name></param>
+            <glx type="render" opcode="48"/>
+        </command>
+        <command>
+            <proto>void <name>glRectxOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x1</name></param>
+            <param><ptype>GLfixed</ptype> <name>y1</name></param>
+            <param><ptype>GLfixed</ptype> <name>x2</name></param>
+            <param><ptype>GLfixed</ptype> <name>y2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRectxvOES</name></proto>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>v1</name></param>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReferencePlaneSGIX</name></proto>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>equation</name></param>
+            <glx type="render" opcode="2071"/>
+        </command>
+        <command>
+            <proto>void <name>glReleaseShaderCompiler</name></proto>
+        </command>
+        <command>
+            <proto><ptype>GLint</ptype> <name>glRenderMode</name></proto>
+            <param group="RenderingMode"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="single" opcode="107"/>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorage</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="4318"/>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageEXT</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glRenderbufferStorage"/>
+            <glx type="render" opcode="4318"/>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisample</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="4331"/>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisampleANGLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisampleAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisampleCoverageNV</name></proto>
+            <param group="RenderbufferTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>coverageSamples</name></param>
+            <param><ptype>GLsizei</ptype> <name>colorSamples</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisampleEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glRenderbufferStorageMultisample"/>
+            <glx type="render" opcode="4331"/>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisampleIMG</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageMultisampleNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glRenderbufferStorageMultisample"/>
+        </command>
+        <command>
+            <proto>void <name>glRenderbufferStorageOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodePointerSUN</name></proto>
+            <param group="ReplacementCodeTypeSUN"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void **<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeubSUN</name></proto>
+            <param><ptype>GLubyte</ptype> <name>code</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeubvSUN</name></proto>
+            <param len="COMPSIZE()">const <ptype>GLubyte</ptype> *<name>code</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiColor3fVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiColor3fVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiColor4fNormal3fVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiColor4fNormal3fVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiColor4ubVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLubyte</ptype> <name>r</name></param>
+            <param><ptype>GLubyte</ptype> <name>g</name></param>
+            <param><ptype>GLubyte</ptype> <name>b</name></param>
+            <param><ptype>GLubyte</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiColor4ubVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiNormal3fVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiNormal3fVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiSUN</name></proto>
+            <param><ptype>GLuint</ptype> <name>code</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiTexCoord2fVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiTexCoord2fVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiVertex3fSUN</name></proto>
+            <param group="ReplacementCodeSUN"><ptype>GLuint</ptype> <name>rc</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuiVertex3fvSUN</name></proto>
+            <param group="ReplacementCodeSUN" len="1">const <ptype>GLuint</ptype> *<name>rc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeuivSUN</name></proto>
+            <param len="COMPSIZE()">const <ptype>GLuint</ptype> *<name>code</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeusSUN</name></proto>
+            <param><ptype>GLushort</ptype> <name>code</name></param>
+        </command>
+        <command>
+            <proto>void <name>glReplacementCodeusvSUN</name></proto>
+            <param len="COMPSIZE()">const <ptype>GLushort</ptype> *<name>code</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRequestResidentProgramsNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLuint</ptype> *<name>programs</name></param>
+            <glx type="render" opcode="4182"/>
+        </command>
+        <command>
+            <proto>void <name>glResetHistogram</name></proto>
+            <param group="HistogramTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <glx type="render" opcode="4112"/>
+        </command>
+        <command>
+            <proto>void <name>glResetHistogramEXT</name></proto>
+            <param group="HistogramTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glResetHistogram"/>
+            <glx type="render" opcode="4112"/>
+        </command>
+        <command>
+            <proto>void <name>glResetMinmax</name></proto>
+            <param group="MinmaxTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <glx type="render" opcode="4113"/>
+        </command>
+        <command>
+            <proto>void <name>glResetMinmaxEXT</name></proto>
+            <param group="MinmaxTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glResetMinmax"/>
+            <glx type="render" opcode="4113"/>
+        </command>
+        <command>
+            <proto>void <name>glResizeBuffersMESA</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glResolveMultisampleFramebufferAPPLE</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glResumeTransformFeedback</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glResumeTransformFeedbackNV</name></proto>
+            <alias name="glResumeTransformFeedback"/>
+        </command>
+        <command>
+            <proto>void <name>glRotated</name></proto>
+            <param><ptype>GLdouble</ptype> <name>angle</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <glx type="render" opcode="185"/>
+        </command>
+        <command>
+            <proto>void <name>glRotatef</name></proto>
+            <param><ptype>GLfloat</ptype> <name>angle</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <glx type="render" opcode="186"/>
+        </command>
+        <command>
+            <proto>void <name>glRotatex</name></proto>
+            <param><ptype>GLfixed</ptype> <name>angle</name></param>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glRotatexOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>angle</name></param>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleCoverage</name></proto>
+            <param><ptype>GLfloat</ptype> <name>value</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>invert</name></param>
+            <glx type="render" opcode="229"/>
+        </command>
+        <command>
+            <proto>void <name>glSampleCoverageARB</name></proto>
+            <param><ptype>GLfloat</ptype> <name>value</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>invert</name></param>
+            <alias name="glSampleCoverage"/>
+        </command>
+        <command>
+            <proto>void <name>glSampleCoverageOES</name></proto>
+            <param group="ClampedFixed"><ptype>GLfixed</ptype> <name>value</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>invert</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleCoveragex</name></proto>
+            <param><ptype>GLclampx</ptype> <name>value</name></param>
+            <param><ptype>GLboolean</ptype> <name>invert</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleCoveragexOES</name></proto>
+            <param><ptype>GLclampx</ptype> <name>value</name></param>
+            <param><ptype>GLboolean</ptype> <name>invert</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleMapATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param><ptype>GLuint</ptype> <name>interp</name></param>
+            <param group="SwizzleOpATI"><ptype>GLenum</ptype> <name>swizzle</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleMaskEXT</name></proto>
+            <param group="ClampedFloat32"><ptype>GLclampf</ptype> <name>value</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>invert</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleMaskIndexedNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="SampleMaskNV"><ptype>GLbitfield</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSampleMaskSGIS</name></proto>
+            <param group="ClampedFloat32"><ptype>GLclampf</ptype> <name>value</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>invert</name></param>
+            <alias name="glSampleMaskEXT"/>
+            <glx type="render" opcode="2048"/>
+        </command>
+        <command>
+            <proto>void <name>glSampleMaski</name></proto>
+            <param><ptype>GLuint</ptype> <name>maskNumber</name></param>
+            <param><ptype>GLbitfield</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplePatternEXT</name></proto>
+            <param group="SamplePatternEXT"><ptype>GLenum</ptype> <name>pattern</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplePatternSGIS</name></proto>
+            <param group="SamplePatternSGIS"><ptype>GLenum</ptype> <name>pattern</name></param>
+            <alias name="glSamplePatternEXT"/>
+            <glx type="render" opcode="2049"/>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameterIiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameterIivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>param</name></param>
+            <alias name="glSamplerParameterIiv"/>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameterIuiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLuint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameterIuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLuint</ptype> *<name>param</name></param>
+            <alias name="glSamplerParameterIuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameterf</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameterfv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameteri</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSamplerParameteriv</name></proto>
+            <param><ptype>GLuint</ptype> <name>sampler</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glScaled</name></proto>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <glx type="render" opcode="187"/>
+        </command>
+        <command>
+            <proto>void <name>glScalef</name></proto>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <glx type="render" opcode="188"/>
+        </command>
+        <command>
+            <proto>void <name>glScalex</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glScalexOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glScissor</name></proto>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="103"/>
+        </command>
+        <command>
+            <proto>void <name>glScissorArrayv</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(count)">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glScissorIndexed</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>left</name></param>
+            <param><ptype>GLint</ptype> <name>bottom</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glScissorIndexedv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3b</name></proto>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>red</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>green</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3bv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3bEXT</name></proto>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>red</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>green</name></param>
+            <param group="ColorB"><ptype>GLbyte</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3b"/>
+            <vecequiv name="glSecondaryColor3bvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3bv</name></proto>
+            <param group="ColorB" len="3">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4126"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3bvEXT</name></proto>
+            <param group="ColorB" len="3">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3bv"/>
+            <glx type="render" opcode="4126"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3d</name></proto>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>red</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>green</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3dEXT</name></proto>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>red</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>green</name></param>
+            <param group="ColorD"><ptype>GLdouble</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3d"/>
+            <vecequiv name="glSecondaryColor3dvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3dv</name></proto>
+            <param group="ColorD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4130"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3dvEXT</name></proto>
+            <param group="ColorD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3dv"/>
+            <glx type="render" opcode="4130"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3f</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3fEXT</name></proto>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>red</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>green</name></param>
+            <param group="ColorF"><ptype>GLfloat</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3f"/>
+            <vecequiv name="glSecondaryColor3fvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3fv</name></proto>
+            <param group="ColorF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4129"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3fvEXT</name></proto>
+            <param group="ColorF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3fv"/>
+            <glx type="render" opcode="4129"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>red</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>green</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3hvNV</name></proto>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4255"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3i</name></proto>
+            <param group="ColorI"><ptype>GLint</ptype> <name>red</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>green</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3iEXT</name></proto>
+            <param group="ColorI"><ptype>GLint</ptype> <name>red</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>green</name></param>
+            <param group="ColorI"><ptype>GLint</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3i"/>
+            <vecequiv name="glSecondaryColor3ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3iv</name></proto>
+            <param group="ColorI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4128"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3ivEXT</name></proto>
+            <param group="ColorI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3iv"/>
+            <glx type="render" opcode="4128"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3s</name></proto>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>red</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>green</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3sEXT</name></proto>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>red</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>green</name></param>
+            <param group="ColorS"><ptype>GLshort</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3s"/>
+            <vecequiv name="glSecondaryColor3svEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3sv</name></proto>
+            <param group="ColorS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4127"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3svEXT</name></proto>
+            <param group="ColorS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3sv"/>
+            <glx type="render" opcode="4127"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3ub</name></proto>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>red</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>green</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3ubv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3ubEXT</name></proto>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>red</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>green</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3ub"/>
+            <vecequiv name="glSecondaryColor3ubvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3ubv</name></proto>
+            <param group="ColorUB" len="3">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4131"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3ubvEXT</name></proto>
+            <param group="ColorUB" len="3">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3ubv"/>
+            <glx type="render" opcode="4131"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3ui</name></proto>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>red</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>green</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3uiEXT</name></proto>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>red</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>green</name></param>
+            <param group="ColorUI"><ptype>GLuint</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3ui"/>
+            <vecequiv name="glSecondaryColor3uivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3uiv</name></proto>
+            <param group="ColorUI" len="3">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4133"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3uivEXT</name></proto>
+            <param group="ColorUI" len="3">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3uiv"/>
+            <glx type="render" opcode="4133"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3us</name></proto>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>red</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>green</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>blue</name></param>
+            <vecequiv name="glSecondaryColor3usv"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3usEXT</name></proto>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>red</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>green</name></param>
+            <param group="ColorUS"><ptype>GLushort</ptype> <name>blue</name></param>
+            <alias name="glSecondaryColor3us"/>
+            <vecequiv name="glSecondaryColor3usvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3usv</name></proto>
+            <param group="ColorUS" len="3">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4132"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColor3usvEXT</name></proto>
+            <param group="ColorUS" len="3">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <alias name="glSecondaryColor3usv"/>
+            <glx type="render" opcode="4132"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColorFormatNV</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColorP3ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>color</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColorP3uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>color</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColorPointer</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColorPointerEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+            <alias name="glSecondaryColorPointer"/>
+        </command>
+        <command>
+            <proto>void <name>glSecondaryColorPointerListIBM</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="SecondaryColorPointerTypeIBM"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSelectBuffer</name></proto>
+            <param><ptype>GLsizei</ptype> <name>size</name></param>
+            <param group="SelectName" len="size"><ptype>GLuint</ptype> *<name>buffer</name></param>
+            <glx type="single" opcode="106"/>
+        </command>
+        <command>
+            <proto>void <name>glSelectPerfMonitorCountersAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>monitor</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>enable</name></param>
+            <param><ptype>GLuint</ptype> <name>group</name></param>
+            <param><ptype>GLint</ptype> <name>numCounters</name></param>
+            <param len="numCounters"><ptype>GLuint</ptype> *<name>counterList</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSeparableFilter2D</name></proto>
+            <param group="SeparableTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type,width)">const void *<name>row</name></param>
+            <param len="COMPSIZE(target,format,type,height)">const void *<name>column</name></param>
+            <glx type="render" opcode="4109"/>
+            <glx type="render" opcode="327" name="glSeparableFilter2DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glSeparableFilter2DEXT</name></proto>
+            <param group="SeparableTargetEXT"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(target,format,type,width)">const void *<name>row</name></param>
+            <param len="COMPSIZE(target,format,type,height)">const void *<name>column</name></param>
+            <alias name="glSeparableFilter2D"/>
+            <glx type="render" opcode="4109"/>
+        </command>
+        <command>
+            <proto>void <name>glSetFenceAPPLE</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSetFenceNV</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+            <param group="FenceConditionNV"><ptype>GLenum</ptype> <name>condition</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSetFragmentShaderConstantATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>dst</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSetInvariantEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="ScalarType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(id,type)">const void *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSetLocalConstantEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="ScalarType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(id,type)">const void *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSetMultisamplefvAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>val</name></param>
+        </command>
+        <command>
+            <proto>void <name>glShadeModel</name></proto>
+            <param group="ShadingModel"><ptype>GLenum</ptype> <name>mode</name></param>
+            <glx type="render" opcode="104"/>
+        </command>
+        <command>
+            <proto>void <name>glShaderBinary</name></proto>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>shaders</name></param>
+            <param><ptype>GLenum</ptype> <name>binaryformat</name></param>
+            <param len="length">const void *<name>binary</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glShaderOp1EXT</name></proto>
+            <param group="VertexShaderOpEXT"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glShaderOp2EXT</name></proto>
+            <param group="VertexShaderOpEXT"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glShaderOp3EXT</name></proto>
+            <param group="VertexShaderOpEXT"><ptype>GLenum</ptype> <name>op</name></param>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>arg1</name></param>
+            <param><ptype>GLuint</ptype> <name>arg2</name></param>
+            <param><ptype>GLuint</ptype> <name>arg3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glShaderSource</name></proto>
+            <param><ptype>GLuint</ptype> <name>shader</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLchar</ptype> *const*<name>string</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>length</name></param>
+        </command>
+        <command>
+            <proto>void <name>glShaderSourceARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>shaderObj</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLcharARB</ptype> **<name>string</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>length</name></param>
+            <alias name="glShaderSource"/>
+        </command>
+        <command>
+            <proto>void <name>glShaderStorageBlockBinding</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>storageBlockIndex</name></param>
+            <param><ptype>GLuint</ptype> <name>storageBlockBinding</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSharpenTexFuncSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n*2">const <ptype>GLfloat</ptype> *<name>points</name></param>
+            <glx type="render" opcode="2052"/>
+        </command>
+        <command>
+            <proto>void <name>glSpriteParameterfSGIX</name></proto>
+            <param group="SpriteParameterNameSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="2060"/>
+        </command>
+        <command>
+            <proto>void <name>glSpriteParameterfvSGIX</name></proto>
+            <param group="SpriteParameterNameSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2061"/>
+        </command>
+        <command>
+            <proto>void <name>glSpriteParameteriSGIX</name></proto>
+            <param group="SpriteParameterNameSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="2062"/>
+        </command>
+        <command>
+            <proto>void <name>glSpriteParameterivSGIX</name></proto>
+            <param group="SpriteParameterNameSGIX"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="2063"/>
+        </command>
+        <command>
+            <proto>void <name>glStartInstrumentsSGIX</name></proto>
+            <glx type="render" opcode="2069"/>
+        </command>
+        <command>
+            <proto>void <name>glStartTilingQCOM</name></proto>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>width</name></param>
+            <param><ptype>GLuint</ptype> <name>height</name></param>
+            <param><ptype>GLbitfield</ptype> <name>preserveMask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilClearTagEXT</name></proto>
+            <param><ptype>GLsizei</ptype> <name>stencilTagBits</name></param>
+            <param><ptype>GLuint</ptype> <name>stencilClearTag</name></param>
+            <glx type="render" opcode="4223"/>
+        </command>
+        <command>
+            <proto>void <name>glStencilFillPathInstancedNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>pathNameType</name></param>
+            <param group="PathElement" len="COMPSIZE(numPaths,pathNameType,paths)">const void *<name>paths</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathBase</name></param>
+            <param group="PathFillMode"><ptype>GLenum</ptype> <name>fillMode</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+            <param group="PathTransformType"><ptype>GLenum</ptype> <name>transformType</name></param>
+            <param len="COMPSIZE(numPaths,transformType)">const <ptype>GLfloat</ptype> *<name>transformValues</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilFillPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="PathFillMode"><ptype>GLenum</ptype> <name>fillMode</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilFunc</name></proto>
+            <param group="StencilFunction"><ptype>GLenum</ptype> <name>func</name></param>
+            <param group="StencilValue"><ptype>GLint</ptype> <name>ref</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+            <glx type="render" opcode="162"/>
+        </command>
+        <command>
+            <proto>void <name>glStencilFuncSeparate</name></proto>
+            <param group="StencilFaceDirection"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="StencilFunction"><ptype>GLenum</ptype> <name>func</name></param>
+            <param group="StencilValue"><ptype>GLint</ptype> <name>ref</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilFuncSeparateATI</name></proto>
+            <param group="StencilFunction"><ptype>GLenum</ptype> <name>frontfunc</name></param>
+            <param group="StencilFunction"><ptype>GLenum</ptype> <name>backfunc</name></param>
+            <param group="ClampedStencilValue"><ptype>GLint</ptype> <name>ref</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilMask</name></proto>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+            <glx type="render" opcode="133"/>
+        </command>
+        <command>
+            <proto>void <name>glStencilMaskSeparate</name></proto>
+            <param group="StencilFaceDirection"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilOp</name></proto>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>fail</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>zfail</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>zpass</name></param>
+            <glx type="render" opcode="163"/>
+        </command>
+        <command>
+            <proto>void <name>glStencilOpSeparate</name></proto>
+            <param group="StencilFaceDirection"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>sfail</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>dpfail</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>dppass</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilOpSeparateATI</name></proto>
+            <param group="StencilFaceDirection"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>sfail</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>dpfail</name></param>
+            <param group="StencilOp"><ptype>GLenum</ptype> <name>dppass</name></param>
+            <alias name="glStencilOpSeparate"/>
+        </command>
+        <command>
+            <proto>void <name>glStencilOpValueAMD</name></proto>
+            <param group="StencilFaceDirection"><ptype>GLenum</ptype> <name>face</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilStrokePathInstancedNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="PathElementType"><ptype>GLenum</ptype> <name>pathNameType</name></param>
+            <param group="PathElement" len="COMPSIZE(numPaths,pathNameType,paths)">const void *<name>paths</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>pathBase</name></param>
+            <param group="StencilValue"><ptype>GLint</ptype> <name>reference</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+            <param group="PathTransformType"><ptype>GLenum</ptype> <name>transformType</name></param>
+            <param len="COMPSIZE(numPaths,transformType)">const <ptype>GLfloat</ptype> *<name>transformValues</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStencilStrokePathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>path</name></param>
+            <param group="StencilValue"><ptype>GLint</ptype> <name>reference</name></param>
+            <param group="MaskedStencilValue"><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glStopInstrumentsSGIX</name></proto>
+            <param><ptype>GLint</ptype> <name>marker</name></param>
+            <glx type="render" opcode="2070"/>
+        </command>
+        <command>
+            <proto>void <name>glStringMarkerGREMEDY</name></proto>
+            <param><ptype>GLsizei</ptype> <name>len</name></param>
+            <param len="len">const void *<name>string</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSwizzleEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>in</name></param>
+            <param group="VertexShaderCoordOutEXT"><ptype>GLenum</ptype> <name>outX</name></param>
+            <param group="VertexShaderCoordOutEXT"><ptype>GLenum</ptype> <name>outY</name></param>
+            <param group="VertexShaderCoordOutEXT"><ptype>GLenum</ptype> <name>outZ</name></param>
+            <param group="VertexShaderCoordOutEXT"><ptype>GLenum</ptype> <name>outW</name></param>
+        </command>
+        <command>
+            <proto>void <name>glSyncTextureINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTagSampleBufferSGIX</name></proto>
+            <glx type="render" opcode="2050"/>
+        </command>
+        <command>
+            <proto>void <name>glTangent3bEXT</name></proto>
+            <param><ptype>GLbyte</ptype> <name>tx</name></param>
+            <param><ptype>GLbyte</ptype> <name>ty</name></param>
+            <param><ptype>GLbyte</ptype> <name>tz</name></param>
+            <vecequiv name="glTangent3bvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTangent3bvEXT</name></proto>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTangent3dEXT</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>tx</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>ty</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>tz</name></param>
+            <vecequiv name="glTangent3dvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTangent3dvEXT</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTangent3fEXT</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>tx</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>ty</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>tz</name></param>
+            <vecequiv name="glTangent3fvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTangent3fvEXT</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTangent3iEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>tx</name></param>
+            <param><ptype>GLint</ptype> <name>ty</name></param>
+            <param><ptype>GLint</ptype> <name>tz</name></param>
+            <vecequiv name="glTangent3ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTangent3ivEXT</name></proto>
+            <param len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTangent3sEXT</name></proto>
+            <param><ptype>GLshort</ptype> <name>tx</name></param>
+            <param><ptype>GLshort</ptype> <name>ty</name></param>
+            <param><ptype>GLshort</ptype> <name>tz</name></param>
+            <vecequiv name="glTangent3svEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTangent3svEXT</name></proto>
+            <param len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTangentPointerEXT</name></proto>
+            <param group="TangentPointerTypeEXT"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTbufferMask3DFX</name></proto>
+            <param><ptype>GLuint</ptype> <name>mask</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTessellationFactorAMD</name></proto>
+            <param><ptype>GLfloat</ptype> <name>factor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTessellationModeAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glTestFenceAPPLE</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glTestFenceNV</name></proto>
+            <param group="FenceNV"><ptype>GLuint</ptype> <name>fence</name></param>
+            <glx type="vendor" opcode="1279"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glTestObjectAPPLE</name></proto>
+            <param group="ObjectTypeAPPLE"><ptype>GLenum</ptype> <name>object</name></param>
+            <param><ptype>GLuint</ptype> <name>name</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexBuffer</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexBufferARB</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <alias name="glTexBuffer"/>
+        </command>
+        <command>
+            <proto>void <name>glTexBufferEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <alias name="glTexBuffer"/>
+        </command>
+        <command>
+            <proto>void <name>glTexBufferRange</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexBufferRangeEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <alias name="glTexBufferRange"/>
+        </command>
+        <command>
+            <proto>void <name>glTexBumpParameterfvATI</name></proto>
+            <param group="TexBumpParameterATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexBumpParameterivATI</name></proto>
+            <param group="TexBumpParameterATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1bvOES</name></proto>
+            <param len="1">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <vecequiv name="glTexCoord1dv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1dv</name></proto>
+            <param group="CoordD" len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="49"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <vecequiv name="glTexCoord1fv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1fv</name></proto>
+            <param group="CoordF" len="1">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="50"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <vecequiv name="glTexCoord1hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1hvNV</name></proto>
+            <param group="Half16NV" len="1">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4246"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <vecequiv name="glTexCoord1iv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1iv</name></proto>
+            <param group="CoordI" len="1">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="51"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <vecequiv name="glTexCoord1sv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1sv</name></proto>
+            <param group="CoordS" len="1">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="52"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord1xvOES</name></proto>
+            <param len="1">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+            <param><ptype>GLbyte</ptype> <name>t</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2bvOES</name></proto>
+            <param len="2">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <vecequiv name="glTexCoord2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2dv</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="53"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <vecequiv name="glTexCoord2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fColor3fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fColor3fVertex3fvSUN</name></proto>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fColor4fNormal3fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fColor4fNormal3fVertex3fvSUN</name></proto>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fColor4ubVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLubyte</ptype> <name>r</name></param>
+            <param><ptype>GLubyte</ptype> <name>g</name></param>
+            <param><ptype>GLubyte</ptype> <name>b</name></param>
+            <param><ptype>GLubyte</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fColor4ubVertex3fvSUN</name></proto>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fNormal3fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fNormal3fVertex3fvSUN</name></proto>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fVertex3fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fVertex3fvSUN</name></proto>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2fv</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="54"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>t</name></param>
+            <vecequiv name="glTexCoord2hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2hvNV</name></proto>
+            <param group="Half16NV" len="2">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4247"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <vecequiv name="glTexCoord2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2iv</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="55"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <vecequiv name="glTexCoord2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2sv</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="56"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord2xvOES</name></proto>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+            <param><ptype>GLbyte</ptype> <name>t</name></param>
+            <param><ptype>GLbyte</ptype> <name>r</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3bvOES</name></proto>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>r</name></param>
+            <vecequiv name="glTexCoord3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3dv</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="57"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>r</name></param>
+            <vecequiv name="glTexCoord3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3fv</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="58"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>t</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>r</name></param>
+            <vecequiv name="glTexCoord3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3hvNV</name></proto>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4248"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>r</name></param>
+            <vecequiv name="glTexCoord3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3iv</name></proto>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="59"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>r</name></param>
+            <vecequiv name="glTexCoord3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3sv</name></proto>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="60"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord3xvOES</name></proto>
+            <param len="3">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>s</name></param>
+            <param><ptype>GLbyte</ptype> <name>t</name></param>
+            <param><ptype>GLbyte</ptype> <name>r</name></param>
+            <param><ptype>GLbyte</ptype> <name>q</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4bvOES</name></proto>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>s</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>t</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>r</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>q</name></param>
+            <vecequiv name="glTexCoord4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4dv</name></proto>
+            <param group="CoordD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="61"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>s</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>t</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>r</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>q</name></param>
+            <vecequiv name="glTexCoord4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4fColor4fNormal3fVertex4fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>p</name></param>
+            <param><ptype>GLfloat</ptype> <name>q</name></param>
+            <param><ptype>GLfloat</ptype> <name>r</name></param>
+            <param><ptype>GLfloat</ptype> <name>g</name></param>
+            <param><ptype>GLfloat</ptype> <name>b</name></param>
+            <param><ptype>GLfloat</ptype> <name>a</name></param>
+            <param><ptype>GLfloat</ptype> <name>nx</name></param>
+            <param><ptype>GLfloat</ptype> <name>ny</name></param>
+            <param><ptype>GLfloat</ptype> <name>nz</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4fColor4fNormal3fVertex4fvSUN</name></proto>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>c</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>n</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4fVertex4fSUN</name></proto>
+            <param><ptype>GLfloat</ptype> <name>s</name></param>
+            <param><ptype>GLfloat</ptype> <name>t</name></param>
+            <param><ptype>GLfloat</ptype> <name>p</name></param>
+            <param><ptype>GLfloat</ptype> <name>q</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4fVertex4fvSUN</name></proto>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>tc</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4fv</name></proto>
+            <param group="CoordF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="62"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>s</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>t</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>r</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>q</name></param>
+            <vecequiv name="glTexCoord4hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4hvNV</name></proto>
+            <param group="Half16NV" len="4">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4249"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>s</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>t</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>r</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>q</name></param>
+            <vecequiv name="glTexCoord4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4iv</name></proto>
+            <param group="CoordI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="63"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>s</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>t</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>r</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>q</name></param>
+            <vecequiv name="glTexCoord4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4sv</name></proto>
+            <param group="CoordS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="64"/>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>s</name></param>
+            <param><ptype>GLfixed</ptype> <name>t</name></param>
+            <param><ptype>GLfixed</ptype> <name>r</name></param>
+            <param><ptype>GLfixed</ptype> <name>q</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoord4xvOES</name></proto>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordFormatNV</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP1ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP1uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP2ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP2uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP3ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP3uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP4ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordP4uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordPointer</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="TexCoordPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordPointerEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="TexCoordPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(size,type,stride,count)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordPointerListIBM</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="TexCoordPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexCoordPointervINTEL</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="4">const void **<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvf</name></proto>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="111"/>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvfv</name></proto>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="112"/>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvi</name></proto>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="113"/>
+        </command>
+        <command>
+            <proto>void <name>glTexEnviv</name></proto>
+            <param group="TextureEnvTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureEnvParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="114"/>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvx</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexEnvxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexFilterFuncSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureFilterSGIS"><ptype>GLenum</ptype> <name>filter</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param len="n">const <ptype>GLfloat</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="2064"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGend</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLdouble</ptype> <name>param</name></param>
+            <glx type="render" opcode="115"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGendv</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLdouble</ptype> *<name>params</name></param>
+            <glx type="render" opcode="116"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGenf</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="117"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGenfOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexGenfv</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="118"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGenfvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexGeni</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="119"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGeniOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexGeniv</name></proto>
+            <param group="TextureCoordName"><ptype>GLenum</ptype> <name>coord</name></param>
+            <param group="TextureGenParameter"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="120"/>
+        </command>
+        <command>
+            <proto>void <name>glTexGenivOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexGenxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexGenxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>coord</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexImage1D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="109"/>
+            <glx type="render" opcode="328" name="glTexImage1DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glTexImage2D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="110"/>
+            <glx type="render" opcode="329" name="glTexImage2DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glTexImage2DMultisample</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexImage2DMultisampleCoverageNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>coverageSamples</name></param>
+            <param><ptype>GLsizei</ptype> <name>colorSamples</name></param>
+            <param><ptype>GLint</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedSampleLocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexImage3D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="4114"/>
+            <glx type="render" opcode="330" name="glTexImage3DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glTexImage3DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+            <alias name="glTexImage3D"/>
+            <glx type="render" opcode="4114"/>
+        </command>
+        <command>
+            <proto>void <name>glTexImage3DMultisample</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexImage3DMultisampleCoverageNV</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>coverageSamples</name></param>
+            <param><ptype>GLsizei</ptype> <name>colorSamples</name></param>
+            <param><ptype>GLint</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedSampleLocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexImage3DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLint</ptype> <name>border</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+            <alias name="glTexImage3D"/>
+        </command>
+        <command>
+            <proto>void <name>glTexImage4DSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="PixelInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLsizei</ptype> <name>size4d</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth,size4d)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="2057"/>
+        </command>
+        <command>
+            <proto>void <name>glTexPageCommitmentARB</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLboolean</ptype> <name>resident</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterIiv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="346"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterIivEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <alias name="glTexParameterIiv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterIuiv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLuint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="347"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterIuivEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLuint</ptype> *<name>params</name></param>
+            <alias name="glTexParameterIuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterf</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <glx type="render" opcode="105"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterfv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+            <glx type="render" opcode="106"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameteri</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <glx type="render" opcode="107"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameteriv</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="render" opcode="108"/>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterx</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterxOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfixed</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterxv</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexParameterxvOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfixed</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexRenderbufferNV</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage1D</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage1DEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <alias name="glTexStorage1D"/>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage2D</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage2DEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <alias name="glTexStorage2D"/>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage2DMultisample</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage3D</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage3DEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <alias name="glTexStorage3D"/>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage3DMultisample</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexStorage3DMultisampleOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+            <alias name="glTexStorage3DMultisample"/>
+        </command>
+        <command>
+            <proto>void <name>glTexStorageSparseAMD</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLsizei</ptype> <name>layers</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage1D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="4099"/>
+            <glx type="render" opcode="331" name="glTexSubImage1DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage1DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+            <alias name="glTexSubImage1D"/>
+            <glx type="render" opcode="4099"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage2D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="4100"/>
+            <glx type="render" opcode="332" name="glTexSubImage2DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage2DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+            <alias name="glTexSubImage2D"/>
+            <glx type="render" opcode="4100"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage3D</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="4115"/>
+            <glx type="render" opcode="333" name="glTexSubImage3DPBO" comment="PBO protocol"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage3DEXT</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+            <alias name="glTexSubImage3D"/>
+            <glx type="render" opcode="4115"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage3DOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLenum</ptype> <name>format</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+            <alias name="glTexSubImage3D"/>
+        </command>
+        <command>
+            <proto>void <name>glTexSubImage4DSGIS</name></proto>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>woffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLsizei</ptype> <name>size4d</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth,size4d)">const void *<name>pixels</name></param>
+            <glx type="render" opcode="2058"/>
+        </command>
+        <command>
+            <proto>void <name>glTextureBarrierNV</name></proto>
+            <glx type="render" opcode="4348"/>
+        </command>
+        <command>
+            <proto>void <name>glTextureBufferEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureBufferRangeEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureColorMaskSGIS</name></proto>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>red</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>green</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>blue</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>alpha</name></param>
+            <glx type="render" opcode="2082"/>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage1DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage2DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage2DMultisampleCoverageNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>coverageSamples</name></param>
+            <param><ptype>GLsizei</ptype> <name>colorSamples</name></param>
+            <param><ptype>GLint</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedSampleLocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage2DMultisampleNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLint</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedSampleLocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage3DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="TextureComponentCount"><ptype>GLint</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>border</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage3DMultisampleCoverageNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>coverageSamples</name></param>
+            <param><ptype>GLsizei</ptype> <name>colorSamples</name></param>
+            <param><ptype>GLint</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedSampleLocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureImage3DMultisampleNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLint</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedSampleLocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureLightEXT</name></proto>
+            <param group="LightTexturePNameEXT"><ptype>GLenum</ptype> <name>pname</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureMaterialEXT</name></proto>
+            <param group="MaterialFace"><ptype>GLenum</ptype> <name>face</name></param>
+            <param group="MaterialParameter"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureNormalEXT</name></proto>
+            <param group="TextureNormalModeEXT"><ptype>GLenum</ptype> <name>mode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTexturePageCommitmentEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+            <param><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLboolean</ptype> <name>resident</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureParameterIivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureParameterIuivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLuint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureParameterfEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32"><ptype>GLfloat</ptype> <name>param</name></param>
+            <vecequiv name="glTextureParameterfvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTextureParameterfvEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedFloat32" len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureParameteriEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>param</name></param>
+            <vecequiv name="glTextureParameterivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glTextureParameterivEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="TextureParameterName"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param group="CheckedInt32" len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureRangeAPPLE</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureRenderbufferEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>renderbuffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureStorage1DEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureStorage2DEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureStorage2DMultisampleEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param group="TextureInternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureStorage3DEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>levels</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureStorage3DMultisampleEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>samples</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>fixedsamplelocations</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureStorageSparseAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLenum</ptype> <name>internalFormat</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param><ptype>GLsizei</ptype> <name>layers</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureSubImage1DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureSubImage2DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureSubImage3DEXT</name></proto>
+            <param group="Texture"><ptype>GLuint</ptype> <name>texture</name></param>
+            <param group="TextureTarget"><ptype>GLenum</ptype> <name>target</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>level</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>xoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>yoffset</name></param>
+            <param group="CheckedInt32"><ptype>GLint</ptype> <name>zoffset</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <param><ptype>GLsizei</ptype> <name>depth</name></param>
+            <param group="PixelFormat"><ptype>GLenum</ptype> <name>format</name></param>
+            <param group="PixelType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="COMPSIZE(format,type,width,height,depth)">const void *<name>pixels</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureView</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>origtexture</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>minlevel</name></param>
+            <param><ptype>GLuint</ptype> <name>numlevels</name></param>
+            <param><ptype>GLuint</ptype> <name>minlayer</name></param>
+            <param><ptype>GLuint</ptype> <name>numlayers</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTextureViewEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>origtexture</name></param>
+            <param><ptype>GLenum</ptype> <name>internalformat</name></param>
+            <param><ptype>GLuint</ptype> <name>minlevel</name></param>
+            <param><ptype>GLuint</ptype> <name>numlevels</name></param>
+            <param><ptype>GLuint</ptype> <name>minlayer</name></param>
+            <param><ptype>GLuint</ptype> <name>numlayers</name></param>
+            <alias name="glTextureView"/>
+        </command>
+        <command>
+            <proto>void <name>glTrackMatrixNV</name></proto>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLuint</ptype> <name>address</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>matrix</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>transform</name></param>
+            <glx type="render" opcode="4188"/>
+        </command>
+        <command>
+            <proto>void <name>glTransformFeedbackAttribsNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>count</name></param>
+            <param len="COMPSIZE(count)">const <ptype>GLint</ptype> *<name>attribs</name></param>
+            <param><ptype>GLenum</ptype> <name>bufferMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTransformFeedbackStreamAttribsNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>attribs</name></param>
+            <param><ptype>GLsizei</ptype> <name>nbuffers</name></param>
+            <param len="nbuffers">const <ptype>GLint</ptype> *<name>bufstreams</name></param>
+            <param><ptype>GLenum</ptype> <name>bufferMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTransformFeedbackVaryings</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLchar</ptype> *const*<name>varyings</name></param>
+            <param><ptype>GLenum</ptype> <name>bufferMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTransformFeedbackVaryingsEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLchar</ptype> *const*<name>varyings</name></param>
+            <param><ptype>GLenum</ptype> <name>bufferMode</name></param>
+            <alias name="glTransformFeedbackVaryings"/>
+        </command>
+        <command>
+            <proto>void <name>glTransformFeedbackVaryingsNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>locations</name></param>
+            <param><ptype>GLenum</ptype> <name>bufferMode</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTransformPathNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>resultPath</name></param>
+            <param group="Path"><ptype>GLuint</ptype> <name>srcPath</name></param>
+            <param group="PathTransformType"><ptype>GLenum</ptype> <name>transformType</name></param>
+            <param len="COMPSIZE(transformType)">const <ptype>GLfloat</ptype> *<name>transformValues</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTranslated</name></proto>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <glx type="render" opcode="189"/>
+        </command>
+        <command>
+            <proto>void <name>glTranslatef</name></proto>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <glx type="render" opcode="190"/>
+        </command>
+        <command>
+            <proto>void <name>glTranslatex</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glTranslatexOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1d</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1f</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1fARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <alias name="glUniform1f"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform1fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniform1fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform1i</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1i64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1i64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1iARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <alias name="glUniform1i"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform1iv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1ivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glUniform1iv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform1ui</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1ui64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1ui64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1uiEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <alias name="glUniform1ui"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform1uiv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform1uivEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glUniform1uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform2d</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2f</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2fARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <alias name="glUniform2f"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform2fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniform2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform2i</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2i64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2i64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2iARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <alias name="glUniform2i"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform2iv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2ivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glUniform2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform2ui</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2ui64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2ui64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2uiEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <alias name="glUniform2ui"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform2uiv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform2uivEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glUniform2uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform3d</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3f</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3fARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+            <alias name="glUniform3f"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform3fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniform3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform3i</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3i64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3i64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3iARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+            <alias name="glUniform3i"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform3iv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3ivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glUniform3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform3ui</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3ui64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3ui64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3uiEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+            <alias name="glUniform3ui"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform3uiv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform3uivEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glUniform3uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform4d</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4f</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLfloat</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4fARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLfloat</ptype> <name>v0</name></param>
+            <param><ptype>GLfloat</ptype> <name>v1</name></param>
+            <param><ptype>GLfloat</ptype> <name>v2</name></param>
+            <param><ptype>GLfloat</ptype> <name>v3</name></param>
+            <alias name="glUniform4f"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform4fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniform4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform4i</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4i64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>z</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4i64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4iARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLint</ptype> <name>v0</name></param>
+            <param><ptype>GLint</ptype> <name>v1</name></param>
+            <param><ptype>GLint</ptype> <name>v2</name></param>
+            <param><ptype>GLint</ptype> <name>v3</name></param>
+            <alias name="glUniform4i"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform4iv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4ivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLint</ptype> *<name>value</name></param>
+            <alias name="glUniform4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform4ui</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+            <param><ptype>GLuint</ptype> <name>v3</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4ui64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>z</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4ui64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4uiEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>v0</name></param>
+            <param><ptype>GLuint</ptype> <name>v1</name></param>
+            <param><ptype>GLuint</ptype> <name>v2</name></param>
+            <param><ptype>GLuint</ptype> <name>v3</name></param>
+            <alias name="glUniform4ui"/>
+        </command>
+        <command>
+            <proto>void <name>glUniform4uiv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniform4uivEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <alias name="glUniform4uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformBlockBinding</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLuint</ptype> <name>uniformBlockIndex</name></param>
+            <param><ptype>GLuint</ptype> <name>uniformBlockBinding</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformBufferEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformHandleui64ARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformHandleui64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformHandleui64vARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformHandleui64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2x3dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2x3fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="6">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="305"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2x3fvNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="6">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix2x3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2x4dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2x4fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="8">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="307"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix2x4fvNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="8">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix2x4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3x2dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3x2fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="6">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="306"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3x2fvNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="6">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix3x2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3x4dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3x4fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="12">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="309"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix3x4fvNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="12">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix3x4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4fvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4x2dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4x2fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="8">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="308"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4x2fvNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="8">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix4x2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4x3dv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4x3fv</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="12">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="310"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformMatrix4x3fvNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>transpose</name></param>
+            <param len="12">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <alias name="glUniformMatrix4x3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glUniformSubroutinesuiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>shadertype</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint</ptype> *<name>indices</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformui64NV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUniformui64vNV</name></proto>
+            <param><ptype>GLint</ptype> <name>location</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLuint64EXT</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUnlockArraysEXT</name></proto>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glUnmapBuffer</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glUnmapBufferARB</name></proto>
+            <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glUnmapBuffer"/>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glUnmapBufferOES</name></proto>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <alias name="glUnmapBuffer"/>
+        </command>
+        <command>
+            <proto group="Boolean"><ptype>GLboolean</ptype> <name>glUnmapNamedBufferEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUnmapObjectBufferATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUnmapTexture2DINTEL</name></proto>
+            <param><ptype>GLuint</ptype> <name>texture</name></param>
+            <param><ptype>GLint</ptype> <name>level</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUpdateObjectBufferATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>offset</name></param>
+            <param><ptype>GLsizei</ptype> <name>size</name></param>
+            <param len="size">const void *<name>pointer</name></param>
+            <param group="PreserveModeATI"><ptype>GLenum</ptype> <name>preserve</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUseProgram</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUseProgramObjectARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <alias name="glUseProgram"/>
+        </command>
+        <command>
+            <proto>void <name>glUseProgramStages</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLbitfield</ptype> <name>stages</name></param>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUseProgramStagesEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+            <param><ptype>GLbitfield</ptype> <name>stages</name></param>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glUseShaderProgramEXT</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUFiniNV</name></proto>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUGetSurfaceivNV</name></proto>
+            <param group="vdpauSurfaceNV"><ptype>GLvdpauSurfaceNV</ptype> <name>surface</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
+            <param><ptype>GLsizei</ptype> *<name>length</name></param>
+            <param len="bufSize"><ptype>GLint</ptype> *<name>values</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUInitNV</name></proto>
+            <param>const void *<name>vdpDevice</name></param>
+            <param>const void *<name>getProcAddress</name></param>
+        </command>
+        <command>
+            <proto><ptype>GLboolean</ptype> <name>glVDPAUIsSurfaceNV</name></proto>
+            <param group="vdpauSurfaceNV"><ptype>GLvdpauSurfaceNV</ptype> <name>surface</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUMapSurfacesNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>numSurfaces</name></param>
+            <param group="vdpauSurfaceNV" len="numSurfaces">const <ptype>GLvdpauSurfaceNV</ptype> *<name>surfaces</name></param>
+        </command>
+        <command>
+            <proto group="vdpauSurfaceNV"><ptype>GLvdpauSurfaceNV</ptype> <name>glVDPAURegisterOutputSurfaceNV</name></proto>
+            <param>const void *<name>vdpSurface</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>numTextureNames</name></param>
+            <param len="numTextureNames">const <ptype>GLuint</ptype> *<name>textureNames</name></param>
+        </command>
+        <command>
+            <proto group="vdpauSurfaceNV"><ptype>GLvdpauSurfaceNV</ptype> <name>glVDPAURegisterVideoSurfaceNV</name></proto>
+            <param>const void *<name>vdpSurface</name></param>
+            <param><ptype>GLenum</ptype> <name>target</name></param>
+            <param><ptype>GLsizei</ptype> <name>numTextureNames</name></param>
+            <param len="numTextureNames">const <ptype>GLuint</ptype> *<name>textureNames</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUSurfaceAccessNV</name></proto>
+            <param group="vdpauSurfaceNV"><ptype>GLvdpauSurfaceNV</ptype> <name>surface</name></param>
+            <param><ptype>GLenum</ptype> <name>access</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUUnmapSurfacesNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>numSurface</name></param>
+            <param group="vdpauSurfaceNV" len="numSurface">const <ptype>GLvdpauSurfaceNV</ptype> *<name>surfaces</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVDPAUUnregisterSurfaceNV</name></proto>
+            <param group="vdpauSurfaceNV"><ptype>GLvdpauSurfaceNV</ptype> <name>surface</name></param>
+        </command>
+        <command>
+            <proto>void <name>glValidateProgram</name></proto>
+            <param><ptype>GLuint</ptype> <name>program</name></param>
+        </command>
+        <command>
+            <proto>void <name>glValidateProgramARB</name></proto>
+            <param group="handleARB"><ptype>GLhandleARB</ptype> <name>programObj</name></param>
+            <alias name="glValidateProgram"/>
+        </command>
+        <command>
+            <proto>void <name>glValidateProgramPipeline</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+        </command>
+        <command>
+            <proto>void <name>glValidateProgramPipelineEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>pipeline</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantArrayObjectATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="ScalarType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantPointerEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param group="ScalarType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(id,type,stride)">const void *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantbvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLbyte</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantdvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLdouble</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantfvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLfloat</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLint</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantsvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLshort</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantubvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLubyte</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantuivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLuint</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVariantusvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>id</name></param>
+            <param len="COMPSIZE(id)">const <ptype>GLushort</ptype> *<name>addr</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex2bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex2bvOES</name></proto>
+            <param len="2">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex2d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <vecequiv name="glVertex2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2dv</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="65"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <vecequiv name="glVertex2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2fv</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="66"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>y</name></param>
+            <vecequiv name="glVertex2hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2hvNV</name></proto>
+            <param group="Half16NV" len="2">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4240"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <vecequiv name="glVertex2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2iv</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="67"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <vecequiv name="glVertex2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2sv</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="68"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex2xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex2xvOES</name></proto>
+            <param len="2">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex3bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>x</name></param>
+            <param><ptype>GLbyte</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex3bvOES</name></proto>
+            <param len="3">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex3d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <vecequiv name="glVertex3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3dv</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="69"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <vecequiv name="glVertex3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3fv</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="70"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>y</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>z</name></param>
+            <vecequiv name="glVertex3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3hvNV</name></proto>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4241"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <vecequiv name="glVertex3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3iv</name></proto>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="71"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <vecequiv name="glVertex3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3sv</name></proto>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="72"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex3xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex3xvOES</name></proto>
+            <param len="3">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex4bOES</name></proto>
+            <param><ptype>GLbyte</ptype> <name>x</name></param>
+            <param><ptype>GLbyte</ptype> <name>y</name></param>
+            <param><ptype>GLbyte</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex4bvOES</name></proto>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex4d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glVertex4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4dv</name></proto>
+            <param group="CoordD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="73"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glVertex4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4fv</name></proto>
+            <param group="CoordF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="74"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4hNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>y</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>z</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>w</name></param>
+            <vecequiv name="glVertex4hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4hvNV</name></proto>
+            <param group="Half16NV" len="4">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4242"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glVertex4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4iv</name></proto>
+            <param group="CoordI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="75"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>w</name></param>
+            <vecequiv name="glVertex4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4sv</name></proto>
+            <param group="CoordS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="76"/>
+        </command>
+        <command>
+            <proto>void <name>glVertex4xOES</name></proto>
+            <param><ptype>GLfixed</ptype> <name>x</name></param>
+            <param><ptype>GLfixed</ptype> <name>y</name></param>
+            <param><ptype>GLfixed</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertex4xvOES</name></proto>
+            <param len="4">const <ptype>GLfixed</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayBindVertexBufferEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingindex</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayColorOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayEdgeFlagOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayFogCoordOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="FogCoordinatePointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayIndexOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="IndexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayMultiTexCoordOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLenum</ptype> <name>texunit</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="TexCoordPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayNormalOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param group="NormalPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayParameteriAPPLE</name></proto>
+            <param group="VertexArrayPNameAPPLE"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayRangeAPPLE</name></proto>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="length">void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayRangeNV</name></proto>
+            <param><ptype>GLsizei</ptype> <name>length</name></param>
+            <param len="COMPSIZE(length)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArraySecondaryColorOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="ColorPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayTexCoordOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="TexCoordPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribBindingEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingindex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribDivisorEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribFormatEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLuint</ptype> <name>relativeoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribIFormatEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>relativeoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribIOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribLFormatEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>relativeoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribLOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexAttribOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexBindingDivisorEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingindex</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexArrayVertexOffsetEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>vaobj</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLintptr</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <vecequiv name="glVertexAttrib1dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1dARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <alias name="glVertexAttrib1d"/>
+            <vecequiv name="glVertexAttrib1dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1dNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <alias name="glVertexAttrib1d"/>
+            <vecequiv name="glVertexAttrib1dvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4197"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1dvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib1dv"/>
+            <glx type="render" opcode="4197"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib1dv"/>
+            <glx type="render" opcode="4197"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1f</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <vecequiv name="glVertexAttrib1fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1fARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <alias name="glVertexAttrib1f"/>
+            <vecequiv name="glVertexAttrib1fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1fNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <alias name="glVertexAttrib1f"/>
+            <vecequiv name="glVertexAttrib1fvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4193"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1fvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib1fv"/>
+            <glx type="render" opcode="4193"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib1fv"/>
+            <glx type="render" opcode="4193"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1hNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <vecequiv name="glVertexAttrib1hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV" len="1">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4257"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1s</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <vecequiv name="glVertexAttrib1sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1sARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <alias name="glVertexAttrib1s"/>
+            <vecequiv name="glVertexAttrib1svARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1sNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <alias name="glVertexAttrib1s"/>
+            <vecequiv name="glVertexAttrib1svNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1sv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4189"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1svARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib1sv"/>
+            <glx type="render" opcode="4189"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib1svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib1sv"/>
+            <glx type="render" opcode="4189"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <vecequiv name="glVertexAttrib2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2dARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <alias name="glVertexAttrib2d"/>
+            <vecequiv name="glVertexAttrib2dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2dNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <alias name="glVertexAttrib2d"/>
+            <vecequiv name="glVertexAttrib2dvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4198"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2dvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib2dv"/>
+            <glx type="render" opcode="4198"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib2dv"/>
+            <glx type="render" opcode="4198"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2f</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <vecequiv name="glVertexAttrib2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2fARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <alias name="glVertexAttrib2f"/>
+            <vecequiv name="glVertexAttrib2fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2fNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <alias name="glVertexAttrib2f"/>
+            <vecequiv name="glVertexAttrib2fvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4194"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2fvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib2fv"/>
+            <glx type="render" opcode="4194"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib2fv"/>
+            <glx type="render" opcode="4194"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2hNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>y</name></param>
+            <vecequiv name="glVertexAttrib2hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV" len="2">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4258"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2s</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <vecequiv name="glVertexAttrib2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2sARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <alias name="glVertexAttrib2s"/>
+            <vecequiv name="glVertexAttrib2svARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2sNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <alias name="glVertexAttrib2s"/>
+            <vecequiv name="glVertexAttrib2svNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2sv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4190"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2svARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib2sv"/>
+            <glx type="render" opcode="4190"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib2svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib2sv"/>
+            <glx type="render" opcode="4190"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <vecequiv name="glVertexAttrib3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3dARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <alias name="glVertexAttrib3d"/>
+            <vecequiv name="glVertexAttrib3dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3dNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <alias name="glVertexAttrib3d"/>
+            <vecequiv name="glVertexAttrib3dvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4199"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3dvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib3dv"/>
+            <glx type="render" opcode="4199"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib3dv"/>
+            <glx type="render" opcode="4199"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3f</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <vecequiv name="glVertexAttrib3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3fARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <alias name="glVertexAttrib3f"/>
+            <vecequiv name="glVertexAttrib3fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3fNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <alias name="glVertexAttrib3f"/>
+            <vecequiv name="glVertexAttrib3fvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4195"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3fvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib3fv"/>
+            <glx type="render" opcode="4195"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib3fv"/>
+            <glx type="render" opcode="4195"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3hNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>y</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>z</name></param>
+            <vecequiv name="glVertexAttrib3hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV" len="3">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4259"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3s</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <vecequiv name="glVertexAttrib3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3sARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <alias name="glVertexAttrib3s"/>
+            <vecequiv name="glVertexAttrib3svARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3sNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <alias name="glVertexAttrib3s"/>
+            <vecequiv name="glVertexAttrib3svNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3sv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4191"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3svARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib3sv"/>
+            <glx type="render" opcode="4191"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib3svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib3sv"/>
+            <glx type="render" opcode="4191"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Nbv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NbvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Nbv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Niv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Niv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Nsv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NsvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Nsv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Nub</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLubyte</ptype> <name>x</name></param>
+            <param><ptype>GLubyte</ptype> <name>y</name></param>
+            <param><ptype>GLubyte</ptype> <name>z</name></param>
+            <param><ptype>GLubyte</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NubARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLubyte</ptype> <name>x</name></param>
+            <param><ptype>GLubyte</ptype> <name>y</name></param>
+            <param><ptype>GLubyte</ptype> <name>z</name></param>
+            <param><ptype>GLubyte</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4Nub"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Nubv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4201"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NubvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Nubv"/>
+            <glx type="render" opcode="4201"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Nuiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NuivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Nuiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4Nusv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4NusvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Nusv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4bv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4bvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4bv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glVertexAttrib4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4dARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4d"/>
+            <vecequiv name="glVertexAttrib4dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4dNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4d"/>
+            <vecequiv name="glVertexAttrib4dvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4200"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4dvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4dv"/>
+            <glx type="render" opcode="4200"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4dv"/>
+            <glx type="render" opcode="4200"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4f</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glVertexAttrib4fv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4fARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4f"/>
+            <vecequiv name="glVertexAttrib4fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4fNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4f"/>
+            <vecequiv name="glVertexAttrib4fvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4fv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4196"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4fvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4fv"/>
+            <glx type="render" opcode="4196"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4fv"/>
+            <glx type="render" opcode="4196"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4hNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>x</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>y</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>z</name></param>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>w</name></param>
+            <vecequiv name="glVertexAttrib4hvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="Half16NV" len="4">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4260"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4ivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4s</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <param><ptype>GLshort</ptype> <name>w</name></param>
+            <vecequiv name="glVertexAttrib4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4sARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <param><ptype>GLshort</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4s"/>
+            <vecequiv name="glVertexAttrib4svARB"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4sNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <param><ptype>GLshort</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4s"/>
+            <vecequiv name="glVertexAttrib4svNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4sv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4192"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4svARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4sv"/>
+            <glx type="render" opcode="4192"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4sv"/>
+            <glx type="render" opcode="4192"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4ubNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>x</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>y</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>z</name></param>
+            <param group="ColorUB"><ptype>GLubyte</ptype> <name>w</name></param>
+            <alias name="glVertexAttrib4Nub"/>
+            <vecequiv name="glVertexAttrib4ubvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4ubv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4ubvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4ubv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4ubvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param group="ColorUB" len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4Nubv"/>
+            <glx type="render" opcode="4201"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4uivARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4usv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttrib4usvARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttrib4usv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribArrayObjectATI</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <param><ptype>GLuint</ptype> <name>offset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribBinding</name></proto>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLuint</ptype> <name>bindingindex</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribDivisor</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribDivisorANGLE</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+            <alias name="glVertexAttribDivisor"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribDivisorARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+            <alias name="glVertexAttribDivisor"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribDivisorEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+            <alias name="glVertexAttribDivisor"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribDivisorNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+            <alias name="glVertexAttribDivisor"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribFormat</name></proto>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLuint</ptype> <name>relativeoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribFormatNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1i</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <vecequiv name="glVertexAttribI1iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <alias name="glVertexAttribI1i"/>
+            <vecequiv name="glVertexAttribI1ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI1iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <vecequiv name="glVertexAttribI1uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <alias name="glVertexAttribI1ui"/>
+            <vecequiv name="glVertexAttribI1uivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI1uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI1uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2i</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <vecequiv name="glVertexAttribI2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <alias name="glVertexAttribI2i"/>
+            <vecequiv name="glVertexAttribI2ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <vecequiv name="glVertexAttribI2uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <alias name="glVertexAttribI2ui"/>
+            <vecequiv name="glVertexAttribI2uivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLuint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI2uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI2uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3i</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <vecequiv name="glVertexAttribI3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <alias name="glVertexAttribI3i"/>
+            <vecequiv name="glVertexAttribI3ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <vecequiv name="glVertexAttribI3uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <alias name="glVertexAttribI3ui"/>
+            <vecequiv name="glVertexAttribI3uivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLuint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI3uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI3uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4bv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4bvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLbyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI4bv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4i</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glVertexAttribI4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4iEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>w</name></param>
+            <alias name="glVertexAttribI4i"/>
+            <vecequiv name="glVertexAttribI4ivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4iv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4ivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI4iv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4sv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4svEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI4sv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4ubv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4ubvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI4ubv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <param><ptype>GLuint</ptype> <name>w</name></param>
+            <vecequiv name="glVertexAttribI4uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4uiEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint</ptype> <name>x</name></param>
+            <param><ptype>GLuint</ptype> <name>y</name></param>
+            <param><ptype>GLuint</ptype> <name>z</name></param>
+            <param><ptype>GLuint</ptype> <name>w</name></param>
+            <alias name="glVertexAttribI4ui"/>
+            <vecequiv name="glVertexAttribI4uivEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4uivEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI4uiv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4usv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribI4usvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLushort</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribI4usv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribIFormat</name></proto>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>relativeoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribIFormatNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribIPointer</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribIPointerEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribEnum"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+            <alias name="glVertexAttribIPointer"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <alias name="glVertexAttribL1d"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribL1dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1ui64ARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1ui64vARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param>const <ptype>GLuint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL1ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="1">const <ptype>GLuint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <alias name="glVertexAttribL2d"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribL2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL2ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="2">const <ptype>GLuint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <alias name="glVertexAttribL3d"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribL3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL3ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="3">const <ptype>GLuint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4d</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4dEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+            <alias name="glVertexAttribL4d"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4dv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4dvEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glVertexAttribL4dv"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4i64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>z</name></param>
+            <param><ptype>GLint64EXT</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4i64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4ui64NV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>x</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>y</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>z</name></param>
+            <param><ptype>GLuint64EXT</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribL4ui64vNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLuint64EXT</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribLFormat</name></proto>
+            <param><ptype>GLuint</ptype> <name>attribindex</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>relativeoffset</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribLFormatNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribLPointer</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="size">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribLPointerEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="size">const void *<name>pointer</name></param>
+            <alias name="glVertexAttribLPointer"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP1ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP1uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP2ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP2uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP3ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP3uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP4ui</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribP4uiv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribParameteriAMD</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribPointer</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribPointerARB</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexAttribPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param group="Boolean"><ptype>GLboolean</ptype> <name>normalized</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+            <alias name="glVertexAttribPointer"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribPointerNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLint</ptype> <name>fsize</name></param>
+            <param group="VertexAttribEnumNV"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(fsize,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs1dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4210"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs1fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4206"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs1hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Half16NV" len="n">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4261"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs1svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4202"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs2dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4211"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs2fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4207"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs2hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Half16NV" len="n">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4262"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs2svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4203"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs3dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4212"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs3fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4208"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs3hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Half16NV" len="n">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4263"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs3svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4204"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs4dvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4213"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs4fvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4209"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs4hvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>n</name></param>
+            <param group="Half16NV" len="n">const <ptype>GLhalfNV</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4264"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs4svNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="count*4">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4205"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexAttribs4ubvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param group="ColorUB" len="count*4">const <ptype>GLubyte</ptype> *<name>v</name></param>
+            <glx type="render" opcode="4214"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexBindingDivisor</name></proto>
+            <param><ptype>GLuint</ptype> <name>bindingindex</name></param>
+            <param><ptype>GLuint</ptype> <name>divisor</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexBlendARB</name></proto>
+            <param><ptype>GLint</ptype> <name>count</name></param>
+            <glx type="render" opcode="226"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexBlendEnvfATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLfloat</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexBlendEnviATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>pname</name></param>
+            <param><ptype>GLint</ptype> <name>param</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexFormatNV</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexP2ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexP2uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexP3ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexP3uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexP4ui</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLuint</ptype> <name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexP4uiv</name></proto>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="1">const <ptype>GLuint</ptype> *<name>value</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexPointer</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexPointerEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(size,type,stride,count)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexPointerListIBM</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLint</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(size,type,stride)">const void **<name>pointer</name></param>
+            <param><ptype>GLint</ptype> <name>ptrstride</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexPointervINTEL</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexPointerType"><ptype>GLenum</ptype> <name>type</name></param>
+            <param len="4">const void **<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1dATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1dvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="1">const <ptype>GLdouble</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1fATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1fvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1iATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1ivATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="1">const <ptype>GLint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1sATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream1svATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="1">const <ptype>GLshort</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2dATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2dvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="2">const <ptype>GLdouble</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2fATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2fvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="2">const <ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2iATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2ivATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="2">const <ptype>GLint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2sATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream2svATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="2">const <ptype>GLshort</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3dATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3dvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLdouble</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3fATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3fvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3iATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3ivATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3sATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream3svATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="3">const <ptype>GLshort</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4dATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLdouble</ptype> <name>x</name></param>
+            <param><ptype>GLdouble</ptype> <name>y</name></param>
+            <param><ptype>GLdouble</ptype> <name>z</name></param>
+            <param><ptype>GLdouble</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4dvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="4">const <ptype>GLdouble</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4fATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>z</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4fvATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4iATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLint</ptype> <name>x</name></param>
+            <param><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLint</ptype> <name>z</name></param>
+            <param><ptype>GLint</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4ivATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="4">const <ptype>GLint</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4sATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param><ptype>GLshort</ptype> <name>x</name></param>
+            <param><ptype>GLshort</ptype> <name>y</name></param>
+            <param><ptype>GLshort</ptype> <name>z</name></param>
+            <param><ptype>GLshort</ptype> <name>w</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexStream4svATI</name></proto>
+            <param group="VertexStreamATI"><ptype>GLenum</ptype> <name>stream</name></param>
+            <param len="4">const <ptype>GLshort</ptype> *<name>coords</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexWeightPointerEXT</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="VertexWeightPointerTypeEXT"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVertexWeightfEXT</name></proto>
+            <param><ptype>GLfloat</ptype> <name>weight</name></param>
+            <vecequiv name="glVertexWeightfvEXT"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexWeightfvEXT</name></proto>
+            <param len="1">const <ptype>GLfloat</ptype> *<name>weight</name></param>
+            <glx type="render" opcode="4135"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexWeighthNV</name></proto>
+            <param group="Half16NV"><ptype>GLhalfNV</ptype> <name>weight</name></param>
+            <vecequiv name="glVertexWeighthvNV"/>
+        </command>
+        <command>
+            <proto>void <name>glVertexWeighthvNV</name></proto>
+            <param group="Half16NV" len="1">const <ptype>GLhalfNV</ptype> *<name>weight</name></param>
+            <glx type="render" opcode="4256"/>
+        </command>
+        <command>
+            <proto><ptype>GLenum</ptype> <name>glVideoCaptureNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> *<name>sequence_num</name></param>
+            <param><ptype>GLuint64EXT</ptype> *<name>capture_time</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVideoCaptureStreamParameterdvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLdouble</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVideoCaptureStreamParameterfvNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLfloat</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glVideoCaptureStreamParameterivNV</name></proto>
+            <param><ptype>GLuint</ptype> <name>video_capture_slot</name></param>
+            <param><ptype>GLuint</ptype> <name>stream</name></param>
+            <param><ptype>GLenum</ptype> <name>pname</name></param>
+            <param len="COMPSIZE(pname)">const <ptype>GLint</ptype> *<name>params</name></param>
+        </command>
+        <command>
+            <proto>void <name>glViewport</name></proto>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="WinCoord"><ptype>GLint</ptype> <name>y</name></param>
+            <param><ptype>GLsizei</ptype> <name>width</name></param>
+            <param><ptype>GLsizei</ptype> <name>height</name></param>
+            <glx type="render" opcode="191"/>
+        </command>
+        <command>
+            <proto>void <name>glViewportArrayv</name></proto>
+            <param><ptype>GLuint</ptype> <name>first</name></param>
+            <param><ptype>GLsizei</ptype> <name>count</name></param>
+            <param len="COMPSIZE(count)">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glViewportIndexedf</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param><ptype>GLfloat</ptype> <name>x</name></param>
+            <param><ptype>GLfloat</ptype> <name>y</name></param>
+            <param><ptype>GLfloat</ptype> <name>w</name></param>
+            <param><ptype>GLfloat</ptype> <name>h</name></param>
+        </command>
+        <command>
+            <proto>void <name>glViewportIndexedfv</name></proto>
+            <param><ptype>GLuint</ptype> <name>index</name></param>
+            <param len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWaitSync</name></proto>
+            <param group="sync"><ptype>GLsync</ptype> <name>sync</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+            <param><ptype>GLuint64</ptype> <name>timeout</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWaitSyncAPPLE</name></proto>
+            <param><ptype>GLsync</ptype> <name>sync</name></param>
+            <param><ptype>GLbitfield</ptype> <name>flags</name></param>
+            <param><ptype>GLuint64</ptype> <name>timeout</name></param>
+            <alias name="glWaitSync"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightPathsNV</name></proto>
+            <param group="Path"><ptype>GLuint</ptype> <name>resultPath</name></param>
+            <param><ptype>GLsizei</ptype> <name>numPaths</name></param>
+            <param group="Path" len="numPaths">const <ptype>GLuint</ptype> *<name>paths</name></param>
+            <param len="numPaths">const <ptype>GLfloat</ptype> *<name>weights</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWeightPointerARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param group="WeightPointerTypeARB"><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWeightPointerOES</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param><ptype>GLenum</ptype> <name>type</name></param>
+            <param><ptype>GLsizei</ptype> <name>stride</name></param>
+            <param len="COMPSIZE(type,stride)">const void *<name>pointer</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWeightbvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLbyte</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="220"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightdvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLdouble</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="228"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightfvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLfloat</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="227"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLint</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="224"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightsvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLshort</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="222"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightubvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLubyte</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="221"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightuivARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLuint</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="225"/>
+        </command>
+        <command>
+            <proto>void <name>glWeightusvARB</name></proto>
+            <param><ptype>GLint</ptype> <name>size</name></param>
+            <param len="size">const <ptype>GLushort</ptype> *<name>weights</name></param>
+            <glx type="render" opcode="223"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <vecequiv name="glWindowPos2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2dARB</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <alias name="glWindowPos2d"/>
+            <vecequiv name="glWindowPos2dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2dMESA</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <alias name="glWindowPos2d"/>
+            <vecequiv name="glWindowPos2dvMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2dv</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2dvARB</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2dv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2dvMESA</name></proto>
+            <param group="CoordD" len="2">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2dv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <vecequiv name="glWindowPos2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2fARB</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <alias name="glWindowPos2f"/>
+            <vecequiv name="glWindowPos2fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2fMESA</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <alias name="glWindowPos2f"/>
+            <vecequiv name="glWindowPos2fvMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2fv</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2fvARB</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2fv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2fvMESA</name></proto>
+            <param group="CoordF" len="2">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2fv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <vecequiv name="glWindowPos2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2iARB</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <alias name="glWindowPos2i"/>
+            <vecequiv name="glWindowPos2ivARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2iMESA</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <alias name="glWindowPos2i"/>
+            <vecequiv name="glWindowPos2ivMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2iv</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2ivARB</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2iv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2ivMESA</name></proto>
+            <param group="CoordI" len="2">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2iv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <vecequiv name="glWindowPos2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2sARB</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <alias name="glWindowPos2s"/>
+            <vecequiv name="glWindowPos2svARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2sMESA</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <alias name="glWindowPos2s"/>
+            <vecequiv name="glWindowPos2svMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2sv</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2svARB</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2sv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos2svMESA</name></proto>
+            <param group="CoordS" len="2">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glWindowPos2sv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3d</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <vecequiv name="glWindowPos3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3dARB</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <alias name="glWindowPos3d"/>
+            <vecequiv name="glWindowPos3dvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3dMESA</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <alias name="glWindowPos3d"/>
+            <vecequiv name="glWindowPos3dvMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3dv</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3dvARB</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3dv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3dvMESA</name></proto>
+            <param group="CoordD" len="3">const <ptype>GLdouble</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3dv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3f</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <vecequiv name="glWindowPos3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3fARB</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <alias name="glWindowPos3f"/>
+            <vecequiv name="glWindowPos3fvARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3fMESA</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <alias name="glWindowPos3f"/>
+            <vecequiv name="glWindowPos3fvMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3fv</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3fvARB</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3fv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3fvMESA</name></proto>
+            <param group="CoordF" len="3">const <ptype>GLfloat</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3fv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3i</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <vecequiv name="glWindowPos3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3iARB</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <alias name="glWindowPos3i"/>
+            <vecequiv name="glWindowPos3ivARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3iMESA</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <alias name="glWindowPos3i"/>
+            <vecequiv name="glWindowPos3ivMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3iv</name></proto>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3ivARB</name></proto>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3iv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3ivMESA</name></proto>
+            <param group="CoordI" len="3">const <ptype>GLint</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3iv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3s</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <vecequiv name="glWindowPos3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3sARB</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <alias name="glWindowPos3s"/>
+            <vecequiv name="glWindowPos3svARB"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3sMESA</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <alias name="glWindowPos3s"/>
+            <vecequiv name="glWindowPos3svMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3sv</name></proto>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3svARB</name></proto>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3sv"/>
+            <glx type="render" opcode="230"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos3svMESA</name></proto>
+            <param group="CoordS" len="3">const <ptype>GLshort</ptype> *<name>v</name></param>
+            <alias name="glWindowPos3sv"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4dMESA</name></proto>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>x</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>y</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>z</name></param>
+            <param group="CoordD"><ptype>GLdouble</ptype> <name>w</name></param>
+            <vecequiv name="glWindowPos4dvMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4dvMESA</name></proto>
+            <param group="CoordD" len="4">const <ptype>GLdouble</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4fMESA</name></proto>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>x</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>y</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>z</name></param>
+            <param group="CoordF"><ptype>GLfloat</ptype> <name>w</name></param>
+            <vecequiv name="glWindowPos4fvMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4fvMESA</name></proto>
+            <param group="CoordF" len="4">const <ptype>GLfloat</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4iMESA</name></proto>
+            <param group="CoordI"><ptype>GLint</ptype> <name>x</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>y</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>z</name></param>
+            <param group="CoordI"><ptype>GLint</ptype> <name>w</name></param>
+            <vecequiv name="glWindowPos4ivMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4ivMESA</name></proto>
+            <param group="CoordI" len="4">const <ptype>GLint</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4sMESA</name></proto>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>x</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>y</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>z</name></param>
+            <param group="CoordS"><ptype>GLshort</ptype> <name>w</name></param>
+            <vecequiv name="glWindowPos4svMESA"/>
+        </command>
+        <command>
+            <proto>void <name>glWindowPos4svMESA</name></proto>
+            <param group="CoordS" len="4">const <ptype>GLshort</ptype> *<name>v</name></param>
+        </command>
+        <command>
+            <proto>void <name>glWriteMaskEXT</name></proto>
+            <param><ptype>GLuint</ptype> <name>res</name></param>
+            <param><ptype>GLuint</ptype> <name>in</name></param>
+            <param group="VertexShaderWriteMaskEXT"><ptype>GLenum</ptype> <name>outX</name></param>
+            <param group="VertexShaderWriteMaskEXT"><ptype>GLenum</ptype> <name>outY</name></param>
+            <param group="VertexShaderWriteMaskEXT"><ptype>GLenum</ptype> <name>outZ</name></param>
+            <param group="VertexShaderWriteMaskEXT"><ptype>GLenum</ptype> <name>outW</name></param>
+        </command>
+    </commands>
+
+    <!-- SECTION: GL API interface definitions. -->
+    <feature api="gl" name="GL_VERSION_1_0" number="1.0">
+        <require>
+            <type name="GLvoid" comment="No longer used in headers"/>
+            <command name="glCullFace"/>
+            <command name="glFrontFace"/>
+            <command name="glHint"/>
+            <command name="glLineWidth"/>
+            <command name="glPointSize"/>
+            <command name="glPolygonMode"/>
+            <command name="glScissor"/>
+            <command name="glTexParameterf"/>
+            <command name="glTexParameterfv"/>
+            <command name="glTexParameteri"/>
+            <command name="glTexParameteriv"/>
+            <command name="glTexImage1D"/>
+            <command name="glTexImage2D"/>
+            <command name="glDrawBuffer"/>
+            <command name="glClear"/>
+            <command name="glClearColor"/>
+            <command name="glClearStencil"/>
+            <command name="glClearDepth"/>
+            <command name="glStencilMask"/>
+            <command name="glColorMask"/>
+            <command name="glDepthMask"/>
+            <command name="glDisable"/>
+            <command name="glEnable"/>
+            <command name="glFinish"/>
+            <command name="glFlush"/>
+            <command name="glBlendFunc"/>
+            <command name="glLogicOp"/>
+            <command name="glStencilFunc"/>
+            <command name="glStencilOp"/>
+            <command name="glDepthFunc"/>
+            <command name="glPixelStoref"/>
+            <command name="glPixelStorei"/>
+            <command name="glReadBuffer"/>
+            <command name="glReadPixels"/>
+            <command name="glGetBooleanv"/>
+            <command name="glGetDoublev"/>
+            <command name="glGetError"/>
+            <command name="glGetFloatv"/>
+            <command name="glGetIntegerv"/>
+            <command name="glGetString"/>
+            <command name="glGetTexImage"/>
+            <command name="glGetTexParameterfv"/>
+            <command name="glGetTexParameteriv"/>
+            <command name="glGetTexLevelParameterfv"/>
+            <command name="glGetTexLevelParameteriv"/>
+            <command name="glIsEnabled"/>
+            <command name="glDepthRange"/>
+            <command name="glViewport"/>
+            <command name="glNewList"/>
+            <command name="glEndList"/>
+            <command name="glCallList"/>
+            <command name="glCallLists"/>
+            <command name="glDeleteLists"/>
+            <command name="glGenLists"/>
+            <command name="glListBase"/>
+            <command name="glBegin"/>
+            <command name="glBitmap"/>
+            <command name="glColor3b"/>
+            <command name="glColor3bv"/>
+            <command name="glColor3d"/>
+            <command name="glColor3dv"/>
+            <command name="glColor3f"/>
+            <command name="glColor3fv"/>
+            <command name="glColor3i"/>
+            <command name="glColor3iv"/>
+            <command name="glColor3s"/>
+            <command name="glColor3sv"/>
+            <command name="glColor3ub"/>
+            <command name="glColor3ubv"/>
+            <command name="glColor3ui"/>
+            <command name="glColor3uiv"/>
+            <command name="glColor3us"/>
+            <command name="glColor3usv"/>
+            <command name="glColor4b"/>
+            <command name="glColor4bv"/>
+            <command name="glColor4d"/>
+            <command name="glColor4dv"/>
+            <command name="glColor4f"/>
+            <command name="glColor4fv"/>
+            <command name="glColor4i"/>
+            <command name="glColor4iv"/>
+            <command name="glColor4s"/>
+            <command name="glColor4sv"/>
+            <command name="glColor4ub"/>
+            <command name="glColor4ubv"/>
+            <command name="glColor4ui"/>
+            <command name="glColor4uiv"/>
+            <command name="glColor4us"/>
+            <command name="glColor4usv"/>
+            <command name="glEdgeFlag"/>
+            <command name="glEdgeFlagv"/>
+            <command name="glEnd"/>
+            <command name="glIndexd"/>
+            <command name="glIndexdv"/>
+            <command name="glIndexf"/>
+            <command name="glIndexfv"/>
+            <command name="glIndexi"/>
+            <command name="glIndexiv"/>
+            <command name="glIndexs"/>
+            <command name="glIndexsv"/>
+            <command name="glNormal3b"/>
+            <command name="glNormal3bv"/>
+            <command name="glNormal3d"/>
+            <command name="glNormal3dv"/>
+            <command name="glNormal3f"/>
+            <command name="glNormal3fv"/>
+            <command name="glNormal3i"/>
+            <command name="glNormal3iv"/>
+            <command name="glNormal3s"/>
+            <command name="glNormal3sv"/>
+            <command name="glRasterPos2d"/>
+            <command name="glRasterPos2dv"/>
+            <command name="glRasterPos2f"/>
+            <command name="glRasterPos2fv"/>
+            <command name="glRasterPos2i"/>
+            <command name="glRasterPos2iv"/>
+            <command name="glRasterPos2s"/>
+            <command name="glRasterPos2sv"/>
+            <command name="glRasterPos3d"/>
+            <command name="glRasterPos3dv"/>
+            <command name="glRasterPos3f"/>
+            <command name="glRasterPos3fv"/>
+            <command name="glRasterPos3i"/>
+            <command name="glRasterPos3iv"/>
+            <command name="glRasterPos3s"/>
+            <command name="glRasterPos3sv"/>
+            <command name="glRasterPos4d"/>
+            <command name="glRasterPos4dv"/>
+            <command name="glRasterPos4f"/>
+            <command name="glRasterPos4fv"/>
+            <command name="glRasterPos4i"/>
+            <command name="glRasterPos4iv"/>
+            <command name="glRasterPos4s"/>
+            <command name="glRasterPos4sv"/>
+            <command name="glRectd"/>
+            <command name="glRectdv"/>
+            <command name="glRectf"/>
+            <command name="glRectfv"/>
+            <command name="glRecti"/>
+            <command name="glRectiv"/>
+            <command name="glRects"/>
+            <command name="glRectsv"/>
+            <command name="glTexCoord1d"/>
+            <command name="glTexCoord1dv"/>
+            <command name="glTexCoord1f"/>
+            <command name="glTexCoord1fv"/>
+            <command name="glTexCoord1i"/>
+            <command name="glTexCoord1iv"/>
+            <command name="glTexCoord1s"/>
+            <command name="glTexCoord1sv"/>
+            <command name="glTexCoord2d"/>
+            <command name="glTexCoord2dv"/>
+            <command name="glTexCoord2f"/>
+            <command name="glTexCoord2fv"/>
+            <command name="glTexCoord2i"/>
+            <command name="glTexCoord2iv"/>
+            <command name="glTexCoord2s"/>
+            <command name="glTexCoord2sv"/>
+            <command name="glTexCoord3d"/>
+            <command name="glTexCoord3dv"/>
+            <command name="glTexCoord3f"/>
+            <command name="glTexCoord3fv"/>
+            <command name="glTexCoord3i"/>
+            <command name="glTexCoord3iv"/>
+            <command name="glTexCoord3s"/>
+            <command name="glTexCoord3sv"/>
+            <command name="glTexCoord4d"/>
+            <command name="glTexCoord4dv"/>
+            <command name="glTexCoord4f"/>
+            <command name="glTexCoord4fv"/>
+            <command name="glTexCoord4i"/>
+            <command name="glTexCoord4iv"/>
+            <command name="glTexCoord4s"/>
+            <command name="glTexCoord4sv"/>
+            <command name="glVertex2d"/>
+            <command name="glVertex2dv"/>
+            <command name="glVertex2f"/>
+            <command name="glVertex2fv"/>
+            <command name="glVertex2i"/>
+            <command name="glVertex2iv"/>
+            <command name="glVertex2s"/>
+            <command name="glVertex2sv"/>
+            <command name="glVertex3d"/>
+            <command name="glVertex3dv"/>
+            <command name="glVertex3f"/>
+            <command name="glVertex3fv"/>
+            <command name="glVertex3i"/>
+            <command name="glVertex3iv"/>
+            <command name="glVertex3s"/>
+            <command name="glVertex3sv"/>
+            <command name="glVertex4d"/>
+            <command name="glVertex4dv"/>
+            <command name="glVertex4f"/>
+            <command name="glVertex4fv"/>
+            <command name="glVertex4i"/>
+            <command name="glVertex4iv"/>
+            <command name="glVertex4s"/>
+            <command name="glVertex4sv"/>
+            <command name="glClipPlane"/>
+            <command name="glColorMaterial"/>
+            <command name="glFogf"/>
+            <command name="glFogfv"/>
+            <command name="glFogi"/>
+            <command name="glFogiv"/>
+            <command name="glLightf"/>
+            <command name="glLightfv"/>
+            <command name="glLighti"/>
+            <command name="glLightiv"/>
+            <command name="glLightModelf"/>
+            <command name="glLightModelfv"/>
+            <command name="glLightModeli"/>
+            <command name="glLightModeliv"/>
+            <command name="glLineStipple"/>
+            <command name="glMaterialf"/>
+            <command name="glMaterialfv"/>
+            <command name="glMateriali"/>
+            <command name="glMaterialiv"/>
+            <command name="glPolygonStipple"/>
+            <command name="glShadeModel"/>
+            <command name="glTexEnvf"/>
+            <command name="glTexEnvfv"/>
+            <command name="glTexEnvi"/>
+            <command name="glTexEnviv"/>
+            <command name="glTexGend"/>
+            <command name="glTexGendv"/>
+            <command name="glTexGenf"/>
+            <command name="glTexGenfv"/>
+            <command name="glTexGeni"/>
+            <command name="glTexGeniv"/>
+            <command name="glFeedbackBuffer"/>
+            <command name="glSelectBuffer"/>
+            <command name="glRenderMode"/>
+            <command name="glInitNames"/>
+            <command name="glLoadName"/>
+            <command name="glPassThrough"/>
+            <command name="glPopName"/>
+            <command name="glPushName"/>
+            <command name="glClearAccum"/>
+            <command name="glClearIndex"/>
+            <command name="glIndexMask"/>
+            <command name="glAccum"/>
+            <command name="glPopAttrib"/>
+            <command name="glPushAttrib"/>
+            <command name="glMap1d"/>
+            <command name="glMap1f"/>
+            <command name="glMap2d"/>
+            <command name="glMap2f"/>
+            <command name="glMapGrid1d"/>
+            <command name="glMapGrid1f"/>
+            <command name="glMapGrid2d"/>
+            <command name="glMapGrid2f"/>
+            <command name="glEvalCoord1d"/>
+            <command name="glEvalCoord1dv"/>
+            <command name="glEvalCoord1f"/>
+            <command name="glEvalCoord1fv"/>
+            <command name="glEvalCoord2d"/>
+            <command name="glEvalCoord2dv"/>
+            <command name="glEvalCoord2f"/>
+            <command name="glEvalCoord2fv"/>
+            <command name="glEvalMesh1"/>
+            <command name="glEvalPoint1"/>
+            <command name="glEvalMesh2"/>
+            <command name="glEvalPoint2"/>
+            <command name="glAlphaFunc"/>
+            <command name="glPixelZoom"/>
+            <command name="glPixelTransferf"/>
+            <command name="glPixelTransferi"/>
+            <command name="glPixelMapfv"/>
+            <command name="glPixelMapuiv"/>
+            <command name="glPixelMapusv"/>
+            <command name="glCopyPixels"/>
+            <command name="glDrawPixels"/>
+            <command name="glGetClipPlane"/>
+            <command name="glGetLightfv"/>
+            <command name="glGetLightiv"/>
+            <command name="glGetMapdv"/>
+            <command name="glGetMapfv"/>
+            <command name="glGetMapiv"/>
+            <command name="glGetMaterialfv"/>
+            <command name="glGetMaterialiv"/>
+            <command name="glGetPixelMapfv"/>
+            <command name="glGetPixelMapuiv"/>
+            <command name="glGetPixelMapusv"/>
+            <command name="glGetPolygonStipple"/>
+            <command name="glGetTexEnvfv"/>
+            <command name="glGetTexEnviv"/>
+            <command name="glGetTexGendv"/>
+            <command name="glGetTexGenfv"/>
+            <command name="glGetTexGeniv"/>
+            <command name="glIsList"/>
+            <command name="glFrustum"/>
+            <command name="glLoadIdentity"/>
+            <command name="glLoadMatrixf"/>
+            <command name="glLoadMatrixd"/>
+            <command name="glMatrixMode"/>
+            <command name="glMultMatrixf"/>
+            <command name="glMultMatrixd"/>
+            <command name="glOrtho"/>
+            <command name="glPopMatrix"/>
+            <command name="glPushMatrix"/>
+            <command name="glRotated"/>
+            <command name="glRotatef"/>
+            <command name="glScaled"/>
+            <command name="glScalef"/>
+            <command name="glTranslated"/>
+            <command name="glTranslatef"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_1_1" number="1.1">
+        <require>
+            <type name="GLclampf" comment="No longer used in GL 1.1, but still defined in Mesa gl.h"/>
+            <type name="GLclampd" comment="No longer used in GL 1.1, but still defined in Mesa gl.h"/>
+            <!-- Many of these are really VERSION_1_0 enums -->
+            <enum name="GL_DEPTH_BUFFER_BIT"/>
+            <enum name="GL_STENCIL_BUFFER_BIT"/>
+            <enum name="GL_COLOR_BUFFER_BIT"/>
+            <enum name="GL_FALSE"/>
+            <enum name="GL_TRUE"/>
+            <enum name="GL_POINTS"/>
+            <enum name="GL_LINES"/>
+            <enum name="GL_LINE_LOOP"/>
+            <enum name="GL_LINE_STRIP"/>
+            <enum name="GL_TRIANGLES"/>
+            <enum name="GL_TRIANGLE_STRIP"/>
+            <enum name="GL_TRIANGLE_FAN"/>
+            <enum name="GL_QUADS"/>
+            <enum name="GL_NEVER"/>
+            <enum name="GL_LESS"/>
+            <enum name="GL_EQUAL"/>
+            <enum name="GL_LEQUAL"/>
+            <enum name="GL_GREATER"/>
+            <enum name="GL_NOTEQUAL"/>
+            <enum name="GL_GEQUAL"/>
+            <enum name="GL_ALWAYS"/>
+            <enum name="GL_ZERO"/>
+            <enum name="GL_ONE"/>
+            <enum name="GL_SRC_COLOR"/>
+            <enum name="GL_ONE_MINUS_SRC_COLOR"/>
+            <enum name="GL_SRC_ALPHA"/>
+            <enum name="GL_ONE_MINUS_SRC_ALPHA"/>
+            <enum name="GL_DST_ALPHA"/>
+            <enum name="GL_ONE_MINUS_DST_ALPHA"/>
+            <enum name="GL_DST_COLOR"/>
+            <enum name="GL_ONE_MINUS_DST_COLOR"/>
+            <enum name="GL_SRC_ALPHA_SATURATE"/>
+            <enum name="GL_NONE"/>
+            <enum name="GL_FRONT_LEFT"/>
+            <enum name="GL_FRONT_RIGHT"/>
+            <enum name="GL_BACK_LEFT"/>
+            <enum name="GL_BACK_RIGHT"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_BACK"/>
+            <enum name="GL_LEFT"/>
+            <enum name="GL_RIGHT"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+            <enum name="GL_NO_ERROR"/>
+            <enum name="GL_INVALID_ENUM"/>
+            <enum name="GL_INVALID_VALUE"/>
+            <enum name="GL_INVALID_OPERATION"/>
+            <enum name="GL_OUT_OF_MEMORY"/>
+            <enum name="GL_CW"/>
+            <enum name="GL_CCW"/>
+            <enum name="GL_POINT_SIZE"/>
+            <enum name="GL_POINT_SIZE_RANGE"/>
+            <enum name="GL_POINT_SIZE_GRANULARITY"/>
+            <enum name="GL_LINE_SMOOTH"/>
+            <enum name="GL_LINE_WIDTH"/>
+            <enum name="GL_LINE_WIDTH_RANGE"/>
+            <enum name="GL_LINE_WIDTH_GRANULARITY"/>
+            <enum name="GL_POLYGON_MODE"/>
+            <enum name="GL_POLYGON_SMOOTH"/>
+            <enum name="GL_CULL_FACE"/>
+            <enum name="GL_CULL_FACE_MODE"/>
+            <enum name="GL_FRONT_FACE"/>
+            <enum name="GL_DEPTH_RANGE"/>
+            <enum name="GL_DEPTH_TEST"/>
+            <enum name="GL_DEPTH_WRITEMASK"/>
+            <enum name="GL_DEPTH_CLEAR_VALUE"/>
+            <enum name="GL_DEPTH_FUNC"/>
+            <enum name="GL_STENCIL_TEST"/>
+            <enum name="GL_STENCIL_CLEAR_VALUE"/>
+            <enum name="GL_STENCIL_FUNC"/>
+            <enum name="GL_STENCIL_VALUE_MASK"/>
+            <enum name="GL_STENCIL_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_PASS"/>
+            <enum name="GL_STENCIL_REF"/>
+            <enum name="GL_STENCIL_WRITEMASK"/>
+            <enum name="GL_VIEWPORT"/>
+            <enum name="GL_DITHER"/>
+            <enum name="GL_BLEND_DST"/>
+            <enum name="GL_BLEND_SRC"/>
+            <enum name="GL_BLEND"/>
+            <enum name="GL_LOGIC_OP_MODE"/>
+            <enum name="GL_COLOR_LOGIC_OP"/>
+            <enum name="GL_DRAW_BUFFER"/>
+            <enum name="GL_READ_BUFFER"/>
+            <enum name="GL_SCISSOR_BOX"/>
+            <enum name="GL_SCISSOR_TEST"/>
+            <enum name="GL_COLOR_CLEAR_VALUE"/>
+            <enum name="GL_COLOR_WRITEMASK"/>
+            <enum name="GL_DOUBLEBUFFER"/>
+            <enum name="GL_STEREO"/>
+            <enum name="GL_LINE_SMOOTH_HINT"/>
+            <enum name="GL_POLYGON_SMOOTH_HINT"/>
+            <enum name="GL_UNPACK_SWAP_BYTES"/>
+            <enum name="GL_UNPACK_LSB_FIRST"/>
+            <enum name="GL_UNPACK_ROW_LENGTH"/>
+            <enum name="GL_UNPACK_SKIP_ROWS"/>
+            <enum name="GL_UNPACK_SKIP_PIXELS"/>
+            <enum name="GL_UNPACK_ALIGNMENT"/>
+            <enum name="GL_PACK_SWAP_BYTES"/>
+            <enum name="GL_PACK_LSB_FIRST"/>
+            <enum name="GL_PACK_ROW_LENGTH"/>
+            <enum name="GL_PACK_SKIP_ROWS"/>
+            <enum name="GL_PACK_SKIP_PIXELS"/>
+            <enum name="GL_PACK_ALIGNMENT"/>
+            <enum name="GL_MAX_TEXTURE_SIZE"/>
+            <enum name="GL_MAX_VIEWPORT_DIMS"/>
+            <enum name="GL_SUBPIXEL_BITS"/>
+            <enum name="GL_TEXTURE_1D"/>
+            <enum name="GL_TEXTURE_2D"/>
+            <enum name="GL_POLYGON_OFFSET_UNITS"/>
+            <enum name="GL_POLYGON_OFFSET_POINT"/>
+            <enum name="GL_POLYGON_OFFSET_LINE"/>
+            <enum name="GL_POLYGON_OFFSET_FILL"/>
+            <enum name="GL_POLYGON_OFFSET_FACTOR"/>
+            <enum name="GL_TEXTURE_BINDING_1D"/>
+            <enum name="GL_TEXTURE_BINDING_2D"/>
+            <enum name="GL_TEXTURE_WIDTH"/>
+            <enum name="GL_TEXTURE_HEIGHT"/>
+            <enum name="GL_TEXTURE_INTERNAL_FORMAT"/>
+            <enum name="GL_TEXTURE_BORDER_COLOR"/>
+            <enum name="GL_TEXTURE_RED_SIZE"/>
+            <enum name="GL_TEXTURE_GREEN_SIZE"/>
+            <enum name="GL_TEXTURE_BLUE_SIZE"/>
+            <enum name="GL_TEXTURE_ALPHA_SIZE"/>
+            <enum name="GL_DONT_CARE"/>
+            <enum name="GL_FASTEST"/>
+            <enum name="GL_NICEST"/>
+            <enum name="GL_BYTE"/>
+            <enum name="GL_UNSIGNED_BYTE"/>
+            <enum name="GL_SHORT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_UNSIGNED_INT"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_DOUBLE"/>
+            <enum name="GL_STACK_OVERFLOW"/>
+            <enum name="GL_STACK_UNDERFLOW"/>
+            <enum name="GL_CLEAR"/>
+            <enum name="GL_AND"/>
+            <enum name="GL_AND_REVERSE"/>
+            <enum name="GL_COPY"/>
+            <enum name="GL_AND_INVERTED"/>
+            <enum name="GL_NOOP"/>
+            <enum name="GL_XOR"/>
+            <enum name="GL_OR"/>
+            <enum name="GL_NOR"/>
+            <enum name="GL_EQUIV"/>
+            <enum name="GL_INVERT"/>
+            <enum name="GL_OR_REVERSE"/>
+            <enum name="GL_COPY_INVERTED"/>
+            <enum name="GL_OR_INVERTED"/>
+            <enum name="GL_NAND"/>
+            <enum name="GL_SET"/>
+            <enum name="GL_TEXTURE"/>
+            <enum name="GL_COLOR"/>
+            <enum name="GL_DEPTH"/>
+            <enum name="GL_STENCIL"/>
+            <enum name="GL_STENCIL_INDEX"/>
+            <enum name="GL_DEPTH_COMPONENT"/>
+            <enum name="GL_RED"/>
+            <enum name="GL_GREEN"/>
+            <enum name="GL_BLUE"/>
+            <enum name="GL_ALPHA"/>
+            <enum name="GL_RGB"/>
+            <enum name="GL_RGBA"/>
+            <enum name="GL_POINT"/>
+            <enum name="GL_LINE"/>
+            <enum name="GL_FILL"/>
+            <enum name="GL_KEEP"/>
+            <enum name="GL_REPLACE"/>
+            <enum name="GL_INCR"/>
+            <enum name="GL_DECR"/>
+            <enum name="GL_VENDOR"/>
+            <enum name="GL_RENDERER"/>
+            <enum name="GL_VERSION"/>
+            <enum name="GL_EXTENSIONS"/>
+            <enum name="GL_NEAREST"/>
+            <enum name="GL_LINEAR"/>
+            <enum name="GL_NEAREST_MIPMAP_NEAREST"/>
+            <enum name="GL_LINEAR_MIPMAP_NEAREST"/>
+            <enum name="GL_NEAREST_MIPMAP_LINEAR"/>
+            <enum name="GL_LINEAR_MIPMAP_LINEAR"/>
+            <enum name="GL_TEXTURE_MAG_FILTER"/>
+            <enum name="GL_TEXTURE_MIN_FILTER"/>
+            <enum name="GL_TEXTURE_WRAP_S"/>
+            <enum name="GL_TEXTURE_WRAP_T"/>
+            <enum name="GL_PROXY_TEXTURE_1D"/>
+            <enum name="GL_PROXY_TEXTURE_2D"/>
+            <enum name="GL_REPEAT"/>
+            <enum name="GL_R3_G3_B2"/>
+            <enum name="GL_RGB4"/>
+            <enum name="GL_RGB5"/>
+            <enum name="GL_RGB8"/>
+            <enum name="GL_RGB10"/>
+            <enum name="GL_RGB12"/>
+            <enum name="GL_RGB16"/>
+            <enum name="GL_RGBA2"/>
+            <enum name="GL_RGBA4"/>
+            <enum name="GL_RGB5_A1"/>
+            <enum name="GL_RGBA8"/>
+            <enum name="GL_RGB10_A2"/>
+            <enum name="GL_RGBA12"/>
+            <enum name="GL_RGBA16"/>
+            <enum name="GL_CURRENT_BIT"/>
+            <enum name="GL_POINT_BIT"/>
+            <enum name="GL_LINE_BIT"/>
+            <enum name="GL_POLYGON_BIT"/>
+            <enum name="GL_POLYGON_STIPPLE_BIT"/>
+            <enum name="GL_PIXEL_MODE_BIT"/>
+            <enum name="GL_LIGHTING_BIT"/>
+            <enum name="GL_FOG_BIT"/>
+            <enum name="GL_ACCUM_BUFFER_BIT"/>
+            <enum name="GL_VIEWPORT_BIT"/>
+            <enum name="GL_TRANSFORM_BIT"/>
+            <enum name="GL_ENABLE_BIT"/>
+            <enum name="GL_HINT_BIT"/>
+            <enum name="GL_EVAL_BIT"/>
+            <enum name="GL_LIST_BIT"/>
+            <enum name="GL_TEXTURE_BIT"/>
+            <enum name="GL_SCISSOR_BIT"/>
+            <enum name="GL_ALL_ATTRIB_BITS"/>
+            <enum name="GL_CLIENT_PIXEL_STORE_BIT"/>
+            <enum name="GL_CLIENT_VERTEX_ARRAY_BIT"/>
+            <enum name="GL_CLIENT_ALL_ATTRIB_BITS"/>
+            <enum name="GL_QUAD_STRIP"/>
+            <enum name="GL_POLYGON"/>
+            <enum name="GL_ACCUM"/>
+            <enum name="GL_LOAD"/>
+            <enum name="GL_RETURN"/>
+            <enum name="GL_MULT"/>
+            <enum name="GL_ADD"/>
+            <enum name="GL_AUX0"/>
+            <enum name="GL_AUX1"/>
+            <enum name="GL_AUX2"/>
+            <enum name="GL_AUX3"/>
+            <enum name="GL_2D"/>
+            <enum name="GL_3D"/>
+            <enum name="GL_3D_COLOR"/>
+            <enum name="GL_3D_COLOR_TEXTURE"/>
+            <enum name="GL_4D_COLOR_TEXTURE"/>
+            <enum name="GL_PASS_THROUGH_TOKEN"/>
+            <enum name="GL_POINT_TOKEN"/>
+            <enum name="GL_LINE_TOKEN"/>
+            <enum name="GL_POLYGON_TOKEN"/>
+            <enum name="GL_BITMAP_TOKEN"/>
+            <enum name="GL_DRAW_PIXEL_TOKEN"/>
+            <enum name="GL_COPY_PIXEL_TOKEN"/>
+            <enum name="GL_LINE_RESET_TOKEN"/>
+            <enum name="GL_EXP"/>
+            <enum name="GL_EXP2"/>
+            <enum name="GL_COEFF"/>
+            <enum name="GL_ORDER"/>
+            <enum name="GL_DOMAIN"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B"/>
+            <enum name="GL_PIXEL_MAP_A_TO_A"/>
+            <enum name="GL_VERTEX_ARRAY_POINTER"/>
+            <enum name="GL_NORMAL_ARRAY_POINTER"/>
+            <enum name="GL_COLOR_ARRAY_POINTER"/>
+            <enum name="GL_INDEX_ARRAY_POINTER"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_POINTER"/>
+            <enum name="GL_FEEDBACK_BUFFER_POINTER"/>
+            <enum name="GL_SELECTION_BUFFER_POINTER"/>
+            <enum name="GL_CURRENT_COLOR"/>
+            <enum name="GL_CURRENT_INDEX"/>
+            <enum name="GL_CURRENT_NORMAL"/>
+            <enum name="GL_CURRENT_TEXTURE_COORDS"/>
+            <enum name="GL_CURRENT_RASTER_COLOR"/>
+            <enum name="GL_CURRENT_RASTER_INDEX"/>
+            <enum name="GL_CURRENT_RASTER_TEXTURE_COORDS"/>
+            <enum name="GL_CURRENT_RASTER_POSITION"/>
+            <enum name="GL_CURRENT_RASTER_POSITION_VALID"/>
+            <enum name="GL_CURRENT_RASTER_DISTANCE"/>
+            <enum name="GL_POINT_SMOOTH"/>
+            <enum name="GL_LINE_STIPPLE"/>
+            <enum name="GL_LINE_STIPPLE_PATTERN"/>
+            <enum name="GL_LINE_STIPPLE_REPEAT"/>
+            <enum name="GL_LIST_MODE"/>
+            <enum name="GL_MAX_LIST_NESTING"/>
+            <enum name="GL_LIST_BASE"/>
+            <enum name="GL_LIST_INDEX"/>
+            <enum name="GL_POLYGON_STIPPLE"/>
+            <enum name="GL_EDGE_FLAG"/>
+            <enum name="GL_LIGHTING"/>
+            <enum name="GL_LIGHT_MODEL_LOCAL_VIEWER"/>
+            <enum name="GL_LIGHT_MODEL_TWO_SIDE"/>
+            <enum name="GL_LIGHT_MODEL_AMBIENT"/>
+            <enum name="GL_SHADE_MODEL"/>
+            <enum name="GL_COLOR_MATERIAL_FACE"/>
+            <enum name="GL_COLOR_MATERIAL_PARAMETER"/>
+            <enum name="GL_COLOR_MATERIAL"/>
+            <enum name="GL_FOG"/>
+            <enum name="GL_FOG_INDEX"/>
+            <enum name="GL_FOG_DENSITY"/>
+            <enum name="GL_FOG_START"/>
+            <enum name="GL_FOG_END"/>
+            <enum name="GL_FOG_MODE"/>
+            <enum name="GL_FOG_COLOR"/>
+            <enum name="GL_ACCUM_CLEAR_VALUE"/>
+            <enum name="GL_MATRIX_MODE"/>
+            <enum name="GL_NORMALIZE"/>
+            <enum name="GL_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MODELVIEW_MATRIX"/>
+            <enum name="GL_PROJECTION_MATRIX"/>
+            <enum name="GL_TEXTURE_MATRIX"/>
+            <enum name="GL_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_CLIENT_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_ALPHA_TEST"/>
+            <enum name="GL_ALPHA_TEST_FUNC"/>
+            <enum name="GL_ALPHA_TEST_REF"/>
+            <enum name="GL_INDEX_LOGIC_OP"/>
+            <enum name="GL_LOGIC_OP"/>
+            <enum name="GL_AUX_BUFFERS"/>
+            <enum name="GL_INDEX_CLEAR_VALUE"/>
+            <enum name="GL_INDEX_WRITEMASK"/>
+            <enum name="GL_INDEX_MODE"/>
+            <enum name="GL_RGBA_MODE"/>
+            <enum name="GL_RENDER_MODE"/>
+            <enum name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+            <enum name="GL_POINT_SMOOTH_HINT"/>
+            <enum name="GL_FOG_HINT"/>
+            <enum name="GL_TEXTURE_GEN_S"/>
+            <enum name="GL_TEXTURE_GEN_T"/>
+            <enum name="GL_TEXTURE_GEN_R"/>
+            <enum name="GL_TEXTURE_GEN_Q"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I_SIZE"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A_SIZE"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R_SIZE"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G_SIZE"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B_SIZE"/>
+            <enum name="GL_PIXEL_MAP_A_TO_A_SIZE"/>
+            <enum name="GL_MAP_COLOR"/>
+            <enum name="GL_MAP_STENCIL"/>
+            <enum name="GL_INDEX_SHIFT"/>
+            <enum name="GL_INDEX_OFFSET"/>
+            <enum name="GL_RED_SCALE"/>
+            <enum name="GL_RED_BIAS"/>
+            <enum name="GL_ZOOM_X"/>
+            <enum name="GL_ZOOM_Y"/>
+            <enum name="GL_GREEN_SCALE"/>
+            <enum name="GL_GREEN_BIAS"/>
+            <enum name="GL_BLUE_SCALE"/>
+            <enum name="GL_BLUE_BIAS"/>
+            <enum name="GL_ALPHA_SCALE"/>
+            <enum name="GL_ALPHA_BIAS"/>
+            <enum name="GL_DEPTH_SCALE"/>
+            <enum name="GL_DEPTH_BIAS"/>
+            <enum name="GL_MAX_EVAL_ORDER"/>
+            <enum name="GL_MAX_LIGHTS"/>
+            <enum name="GL_MAX_CLIP_PLANES"/>
+            <enum name="GL_MAX_PIXEL_MAP_TABLE"/>
+            <enum name="GL_MAX_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_MAX_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_MAX_NAME_STACK_DEPTH"/>
+            <enum name="GL_MAX_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_MAX_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MAX_CLIENT_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_INDEX_BITS"/>
+            <enum name="GL_RED_BITS"/>
+            <enum name="GL_GREEN_BITS"/>
+            <enum name="GL_BLUE_BITS"/>
+            <enum name="GL_ALPHA_BITS"/>
+            <enum name="GL_DEPTH_BITS"/>
+            <enum name="GL_STENCIL_BITS"/>
+            <enum name="GL_ACCUM_RED_BITS"/>
+            <enum name="GL_ACCUM_GREEN_BITS"/>
+            <enum name="GL_ACCUM_BLUE_BITS"/>
+            <enum name="GL_ACCUM_ALPHA_BITS"/>
+            <enum name="GL_NAME_STACK_DEPTH"/>
+            <enum name="GL_AUTO_NORMAL"/>
+            <enum name="GL_MAP1_COLOR_4"/>
+            <enum name="GL_MAP1_INDEX"/>
+            <enum name="GL_MAP1_NORMAL"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP1_VERTEX_3"/>
+            <enum name="GL_MAP1_VERTEX_4"/>
+            <enum name="GL_MAP2_COLOR_4"/>
+            <enum name="GL_MAP2_INDEX"/>
+            <enum name="GL_MAP2_NORMAL"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP2_VERTEX_3"/>
+            <enum name="GL_MAP2_VERTEX_4"/>
+            <enum name="GL_MAP1_GRID_DOMAIN"/>
+            <enum name="GL_MAP1_GRID_SEGMENTS"/>
+            <enum name="GL_MAP2_GRID_DOMAIN"/>
+            <enum name="GL_MAP2_GRID_SEGMENTS"/>
+            <enum name="GL_FEEDBACK_BUFFER_SIZE"/>
+            <enum name="GL_FEEDBACK_BUFFER_TYPE"/>
+            <enum name="GL_SELECTION_BUFFER_SIZE"/>
+            <enum name="GL_VERTEX_ARRAY"/>
+            <enum name="GL_NORMAL_ARRAY"/>
+            <enum name="GL_COLOR_ARRAY"/>
+            <enum name="GL_INDEX_ARRAY"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY"/>
+            <enum name="GL_EDGE_FLAG_ARRAY"/>
+            <enum name="GL_VERTEX_ARRAY_SIZE"/>
+            <enum name="GL_VERTEX_ARRAY_TYPE"/>
+            <enum name="GL_VERTEX_ARRAY_STRIDE"/>
+            <enum name="GL_NORMAL_ARRAY_TYPE"/>
+            <enum name="GL_NORMAL_ARRAY_STRIDE"/>
+            <enum name="GL_COLOR_ARRAY_SIZE"/>
+            <enum name="GL_COLOR_ARRAY_TYPE"/>
+            <enum name="GL_COLOR_ARRAY_STRIDE"/>
+            <enum name="GL_INDEX_ARRAY_TYPE"/>
+            <enum name="GL_INDEX_ARRAY_STRIDE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_SIZE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_TYPE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_STRIDE"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_STRIDE"/>
+            <enum name="GL_TEXTURE_COMPONENTS"/>
+            <enum name="GL_TEXTURE_BORDER"/>
+            <enum name="GL_TEXTURE_LUMINANCE_SIZE"/>
+            <enum name="GL_TEXTURE_INTENSITY_SIZE"/>
+            <enum name="GL_TEXTURE_PRIORITY"/>
+            <enum name="GL_TEXTURE_RESIDENT"/>
+            <enum name="GL_AMBIENT"/>
+            <enum name="GL_DIFFUSE"/>
+            <enum name="GL_SPECULAR"/>
+            <enum name="GL_POSITION"/>
+            <enum name="GL_SPOT_DIRECTION"/>
+            <enum name="GL_SPOT_EXPONENT"/>
+            <enum name="GL_SPOT_CUTOFF"/>
+            <enum name="GL_CONSTANT_ATTENUATION"/>
+            <enum name="GL_LINEAR_ATTENUATION"/>
+            <enum name="GL_QUADRATIC_ATTENUATION"/>
+            <enum name="GL_COMPILE"/>
+            <enum name="GL_COMPILE_AND_EXECUTE"/>
+            <enum name="GL_2_BYTES"/>
+            <enum name="GL_3_BYTES"/>
+            <enum name="GL_4_BYTES"/>
+            <enum name="GL_EMISSION"/>
+            <enum name="GL_SHININESS"/>
+            <enum name="GL_AMBIENT_AND_DIFFUSE"/>
+            <enum name="GL_COLOR_INDEXES"/>
+            <enum name="GL_MODELVIEW"/>
+            <enum name="GL_PROJECTION"/>
+            <enum name="GL_COLOR_INDEX"/>
+            <enum name="GL_LUMINANCE"/>
+            <enum name="GL_LUMINANCE_ALPHA"/>
+            <enum name="GL_BITMAP"/>
+            <enum name="GL_RENDER"/>
+            <enum name="GL_FEEDBACK"/>
+            <enum name="GL_SELECT"/>
+            <enum name="GL_FLAT"/>
+            <enum name="GL_SMOOTH"/>
+            <enum name="GL_S"/>
+            <enum name="GL_T"/>
+            <enum name="GL_R"/>
+            <enum name="GL_Q"/>
+            <enum name="GL_MODULATE"/>
+            <enum name="GL_DECAL"/>
+            <enum name="GL_TEXTURE_ENV_MODE"/>
+            <enum name="GL_TEXTURE_ENV_COLOR"/>
+            <enum name="GL_TEXTURE_ENV"/>
+            <enum name="GL_EYE_LINEAR"/>
+            <enum name="GL_OBJECT_LINEAR"/>
+            <enum name="GL_SPHERE_MAP"/>
+            <enum name="GL_TEXTURE_GEN_MODE"/>
+            <enum name="GL_OBJECT_PLANE"/>
+            <enum name="GL_EYE_PLANE"/>
+            <enum name="GL_CLAMP"/>
+            <enum name="GL_ALPHA4"/>
+            <enum name="GL_ALPHA8"/>
+            <enum name="GL_ALPHA12"/>
+            <enum name="GL_ALPHA16"/>
+            <enum name="GL_LUMINANCE4"/>
+            <enum name="GL_LUMINANCE8"/>
+            <enum name="GL_LUMINANCE12"/>
+            <enum name="GL_LUMINANCE16"/>
+            <enum name="GL_LUMINANCE4_ALPHA4"/>
+            <enum name="GL_LUMINANCE6_ALPHA2"/>
+            <enum name="GL_LUMINANCE8_ALPHA8"/>
+            <enum name="GL_LUMINANCE12_ALPHA4"/>
+            <enum name="GL_LUMINANCE12_ALPHA12"/>
+            <enum name="GL_LUMINANCE16_ALPHA16"/>
+            <enum name="GL_INTENSITY"/>
+            <enum name="GL_INTENSITY4"/>
+            <enum name="GL_INTENSITY8"/>
+            <enum name="GL_INTENSITY12"/>
+            <enum name="GL_INTENSITY16"/>
+            <enum name="GL_V2F"/>
+            <enum name="GL_V3F"/>
+            <enum name="GL_C4UB_V2F"/>
+            <enum name="GL_C4UB_V3F"/>
+            <enum name="GL_C3F_V3F"/>
+            <enum name="GL_N3F_V3F"/>
+            <enum name="GL_C4F_N3F_V3F"/>
+            <enum name="GL_T2F_V3F"/>
+            <enum name="GL_T4F_V4F"/>
+            <enum name="GL_T2F_C4UB_V3F"/>
+            <enum name="GL_T2F_C3F_V3F"/>
+            <enum name="GL_T2F_N3F_V3F"/>
+            <enum name="GL_T2F_C4F_N3F_V3F"/>
+            <enum name="GL_T4F_C4F_N3F_V4F"/>
+            <enum name="GL_CLIP_PLANE0"/>
+            <enum name="GL_CLIP_PLANE1"/>
+            <enum name="GL_CLIP_PLANE2"/>
+            <enum name="GL_CLIP_PLANE3"/>
+            <enum name="GL_CLIP_PLANE4"/>
+            <enum name="GL_CLIP_PLANE5"/>
+            <enum name="GL_LIGHT0"/>
+            <enum name="GL_LIGHT1"/>
+            <enum name="GL_LIGHT2"/>
+            <enum name="GL_LIGHT3"/>
+            <enum name="GL_LIGHT4"/>
+            <enum name="GL_LIGHT5"/>
+            <enum name="GL_LIGHT6"/>
+            <enum name="GL_LIGHT7"/>
+            <command name="glDrawArrays"/>
+            <command name="glDrawElements"/>
+            <command name="glGetPointerv"/>
+            <command name="glPolygonOffset"/>
+            <command name="glCopyTexImage1D"/>
+            <command name="glCopyTexImage2D"/>
+            <command name="glCopyTexSubImage1D"/>
+            <command name="glCopyTexSubImage2D"/>
+            <command name="glTexSubImage1D"/>
+            <command name="glTexSubImage2D"/>
+            <command name="glBindTexture"/>
+            <command name="glDeleteTextures"/>
+            <command name="glGenTextures"/>
+            <command name="glIsTexture"/>
+            <command name="glArrayElement"/>
+            <command name="glColorPointer"/>
+            <command name="glDisableClientState"/>
+            <command name="glEdgeFlagPointer"/>
+            <command name="glEnableClientState"/>
+            <command name="glIndexPointer"/>
+            <command name="glInterleavedArrays"/>
+            <command name="glNormalPointer"/>
+            <command name="glTexCoordPointer"/>
+            <command name="glVertexPointer"/>
+            <command name="glAreTexturesResident"/>
+            <command name="glPrioritizeTextures"/>
+            <command name="glIndexub"/>
+            <command name="glIndexubv"/>
+            <command name="glPopClientAttrib"/>
+            <command name="glPushClientAttrib"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_1_2" number="1.2">
+        <require>
+            <enum name="GL_UNSIGNED_BYTE_3_3_2"/>
+            <enum name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+            <enum name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+            <enum name="GL_UNSIGNED_INT_8_8_8_8"/>
+            <enum name="GL_UNSIGNED_INT_10_10_10_2"/>
+            <enum name="GL_TEXTURE_BINDING_3D"/>
+            <enum name="GL_PACK_SKIP_IMAGES"/>
+            <enum name="GL_PACK_IMAGE_HEIGHT"/>
+            <enum name="GL_UNPACK_SKIP_IMAGES"/>
+            <enum name="GL_UNPACK_IMAGE_HEIGHT"/>
+            <enum name="GL_TEXTURE_3D"/>
+            <enum name="GL_PROXY_TEXTURE_3D"/>
+            <enum name="GL_TEXTURE_DEPTH"/>
+            <enum name="GL_TEXTURE_WRAP_R"/>
+            <enum name="GL_MAX_3D_TEXTURE_SIZE"/>
+            <enum name="GL_UNSIGNED_BYTE_2_3_3_REV"/>
+            <enum name="GL_UNSIGNED_SHORT_5_6_5"/>
+            <enum name="GL_UNSIGNED_SHORT_5_6_5_REV"/>
+            <enum name="GL_UNSIGNED_SHORT_4_4_4_4_REV"/>
+            <enum name="GL_UNSIGNED_SHORT_1_5_5_5_REV"/>
+            <enum name="GL_UNSIGNED_INT_8_8_8_8_REV"/>
+            <enum name="GL_UNSIGNED_INT_2_10_10_10_REV"/>
+            <enum name="GL_BGR"/>
+            <enum name="GL_BGRA"/>
+            <enum name="GL_MAX_ELEMENTS_VERTICES"/>
+            <enum name="GL_MAX_ELEMENTS_INDICES"/>
+            <enum name="GL_CLAMP_TO_EDGE"/>
+            <enum name="GL_TEXTURE_MIN_LOD"/>
+            <enum name="GL_TEXTURE_MAX_LOD"/>
+            <enum name="GL_TEXTURE_BASE_LEVEL"/>
+            <enum name="GL_TEXTURE_MAX_LEVEL"/>
+            <enum name="GL_SMOOTH_POINT_SIZE_RANGE"/>
+            <enum name="GL_SMOOTH_POINT_SIZE_GRANULARITY"/>
+            <enum name="GL_SMOOTH_LINE_WIDTH_RANGE"/>
+            <enum name="GL_SMOOTH_LINE_WIDTH_GRANULARITY"/>
+            <enum name="GL_ALIASED_LINE_WIDTH_RANGE"/>
+            <enum name="GL_RESCALE_NORMAL"/>
+            <enum name="GL_LIGHT_MODEL_COLOR_CONTROL"/>
+            <enum name="GL_SINGLE_COLOR"/>
+            <enum name="GL_SEPARATE_SPECULAR_COLOR"/>
+            <enum name="GL_ALIASED_POINT_SIZE_RANGE"/>
+            <command name="glDrawRangeElements"/>
+            <command name="glTexImage3D"/>
+            <command name="glTexSubImage3D"/>
+            <command name="glCopyTexSubImage3D"/>
+          </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_1_3" number="1.3">
+        <require>
+            <enum name="GL_TEXTURE0"/>
+            <enum name="GL_TEXTURE1"/>
+            <enum name="GL_TEXTURE2"/>
+            <enum name="GL_TEXTURE3"/>
+            <enum name="GL_TEXTURE4"/>
+            <enum name="GL_TEXTURE5"/>
+            <enum name="GL_TEXTURE6"/>
+            <enum name="GL_TEXTURE7"/>
+            <enum name="GL_TEXTURE8"/>
+            <enum name="GL_TEXTURE9"/>
+            <enum name="GL_TEXTURE10"/>
+            <enum name="GL_TEXTURE11"/>
+            <enum name="GL_TEXTURE12"/>
+            <enum name="GL_TEXTURE13"/>
+            <enum name="GL_TEXTURE14"/>
+            <enum name="GL_TEXTURE15"/>
+            <enum name="GL_TEXTURE16"/>
+            <enum name="GL_TEXTURE17"/>
+            <enum name="GL_TEXTURE18"/>
+            <enum name="GL_TEXTURE19"/>
+            <enum name="GL_TEXTURE20"/>
+            <enum name="GL_TEXTURE21"/>
+            <enum name="GL_TEXTURE22"/>
+            <enum name="GL_TEXTURE23"/>
+            <enum name="GL_TEXTURE24"/>
+            <enum name="GL_TEXTURE25"/>
+            <enum name="GL_TEXTURE26"/>
+            <enum name="GL_TEXTURE27"/>
+            <enum name="GL_TEXTURE28"/>
+            <enum name="GL_TEXTURE29"/>
+            <enum name="GL_TEXTURE30"/>
+            <enum name="GL_TEXTURE31"/>
+            <enum name="GL_ACTIVE_TEXTURE"/>
+            <enum name="GL_MULTISAMPLE"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_ONE"/>
+            <enum name="GL_SAMPLE_COVERAGE"/>
+            <enum name="GL_SAMPLE_BUFFERS"/>
+            <enum name="GL_SAMPLES"/>
+            <enum name="GL_SAMPLE_COVERAGE_VALUE"/>
+            <enum name="GL_SAMPLE_COVERAGE_INVERT"/>
+            <enum name="GL_TEXTURE_CUBE_MAP"/>
+            <enum name="GL_TEXTURE_BINDING_CUBE_MAP"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
+            <enum name="GL_PROXY_TEXTURE_CUBE_MAP"/>
+            <enum name="GL_MAX_CUBE_MAP_TEXTURE_SIZE"/>
+            <enum name="GL_COMPRESSED_RGB"/>
+            <enum name="GL_COMPRESSED_RGBA"/>
+            <enum name="GL_TEXTURE_COMPRESSION_HINT"/>
+            <enum name="GL_TEXTURE_COMPRESSED_IMAGE_SIZE"/>
+            <enum name="GL_TEXTURE_COMPRESSED"/>
+            <enum name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_CLAMP_TO_BORDER"/>
+            <enum name="GL_CLIENT_ACTIVE_TEXTURE"/>
+            <enum name="GL_MAX_TEXTURE_UNITS"/>
+            <enum name="GL_TRANSPOSE_MODELVIEW_MATRIX"/>
+            <enum name="GL_TRANSPOSE_PROJECTION_MATRIX"/>
+            <enum name="GL_TRANSPOSE_TEXTURE_MATRIX"/>
+            <enum name="GL_TRANSPOSE_COLOR_MATRIX"/>
+            <enum name="GL_MULTISAMPLE_BIT"/>
+            <enum name="GL_NORMAL_MAP"/>
+            <enum name="GL_REFLECTION_MAP"/>
+            <enum name="GL_COMPRESSED_ALPHA"/>
+            <enum name="GL_COMPRESSED_LUMINANCE"/>
+            <enum name="GL_COMPRESSED_LUMINANCE_ALPHA"/>
+            <enum name="GL_COMPRESSED_INTENSITY"/>
+            <enum name="GL_COMBINE"/>
+            <enum name="GL_COMBINE_RGB"/>
+            <enum name="GL_COMBINE_ALPHA"/>
+            <enum name="GL_SOURCE0_RGB"/>
+            <enum name="GL_SOURCE1_RGB"/>
+            <enum name="GL_SOURCE2_RGB"/>
+            <enum name="GL_SOURCE0_ALPHA"/>
+            <enum name="GL_SOURCE1_ALPHA"/>
+            <enum name="GL_SOURCE2_ALPHA"/>
+            <enum name="GL_OPERAND0_RGB"/>
+            <enum name="GL_OPERAND1_RGB"/>
+            <enum name="GL_OPERAND2_RGB"/>
+            <enum name="GL_OPERAND0_ALPHA"/>
+            <enum name="GL_OPERAND1_ALPHA"/>
+            <enum name="GL_OPERAND2_ALPHA"/>
+            <enum name="GL_RGB_SCALE"/>
+            <enum name="GL_ADD_SIGNED"/>
+            <enum name="GL_INTERPOLATE"/>
+            <enum name="GL_SUBTRACT"/>
+            <enum name="GL_CONSTANT"/>
+            <enum name="GL_PRIMARY_COLOR"/>
+            <enum name="GL_PREVIOUS"/>
+            <enum name="GL_DOT3_RGB"/>
+            <enum name="GL_DOT3_RGBA"/>
+            <command name="glActiveTexture"/>
+            <command name="glSampleCoverage"/>
+            <command name="glCompressedTexImage3D"/>
+            <command name="glCompressedTexImage2D"/>
+            <command name="glCompressedTexImage1D"/>
+            <command name="glCompressedTexSubImage3D"/>
+            <command name="glCompressedTexSubImage2D"/>
+            <command name="glCompressedTexSubImage1D"/>
+            <command name="glGetCompressedTexImage"/>
+            <command name="glClientActiveTexture"/>
+            <command name="glMultiTexCoord1d"/>
+            <command name="glMultiTexCoord1dv"/>
+            <command name="glMultiTexCoord1f"/>
+            <command name="glMultiTexCoord1fv"/>
+            <command name="glMultiTexCoord1i"/>
+            <command name="glMultiTexCoord1iv"/>
+            <command name="glMultiTexCoord1s"/>
+            <command name="glMultiTexCoord1sv"/>
+            <command name="glMultiTexCoord2d"/>
+            <command name="glMultiTexCoord2dv"/>
+            <command name="glMultiTexCoord2f"/>
+            <command name="glMultiTexCoord2fv"/>
+            <command name="glMultiTexCoord2i"/>
+            <command name="glMultiTexCoord2iv"/>
+            <command name="glMultiTexCoord2s"/>
+            <command name="glMultiTexCoord2sv"/>
+            <command name="glMultiTexCoord3d"/>
+            <command name="glMultiTexCoord3dv"/>
+            <command name="glMultiTexCoord3f"/>
+            <command name="glMultiTexCoord3fv"/>
+            <command name="glMultiTexCoord3i"/>
+            <command name="glMultiTexCoord3iv"/>
+            <command name="glMultiTexCoord3s"/>
+            <command name="glMultiTexCoord3sv"/>
+            <command name="glMultiTexCoord4d"/>
+            <command name="glMultiTexCoord4dv"/>
+            <command name="glMultiTexCoord4f"/>
+            <command name="glMultiTexCoord4fv"/>
+            <command name="glMultiTexCoord4i"/>
+            <command name="glMultiTexCoord4iv"/>
+            <command name="glMultiTexCoord4s"/>
+            <command name="glMultiTexCoord4sv"/>
+            <command name="glLoadTransposeMatrixf"/>
+            <command name="glLoadTransposeMatrixd"/>
+            <command name="glMultTransposeMatrixf"/>
+            <command name="glMultTransposeMatrixd"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_1_4" number="1.4">
+        <require>
+            <enum name="GL_BLEND_DST_RGB"/>
+            <enum name="GL_BLEND_SRC_RGB"/>
+            <enum name="GL_BLEND_DST_ALPHA"/>
+            <enum name="GL_BLEND_SRC_ALPHA"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE"/>
+            <enum name="GL_DEPTH_COMPONENT16"/>
+            <enum name="GL_DEPTH_COMPONENT24"/>
+            <enum name="GL_DEPTH_COMPONENT32"/>
+            <enum name="GL_MIRRORED_REPEAT"/>
+            <enum name="GL_MAX_TEXTURE_LOD_BIAS"/>
+            <enum name="GL_TEXTURE_LOD_BIAS"/>
+            <enum name="GL_INCR_WRAP"/>
+            <enum name="GL_DECR_WRAP"/>
+            <enum name="GL_TEXTURE_DEPTH_SIZE"/>
+            <enum name="GL_TEXTURE_COMPARE_MODE"/>
+            <enum name="GL_TEXTURE_COMPARE_FUNC"/>
+            <enum name="GL_POINT_SIZE_MIN"/>
+            <enum name="GL_POINT_SIZE_MAX"/>
+            <enum name="GL_POINT_DISTANCE_ATTENUATION"/>
+            <enum name="GL_GENERATE_MIPMAP"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT"/>
+            <enum name="GL_FOG_COORDINATE_SOURCE"/>
+            <enum name="GL_FOG_COORDINATE"/>
+            <enum name="GL_FRAGMENT_DEPTH"/>
+            <enum name="GL_CURRENT_FOG_COORDINATE"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_TYPE"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_STRIDE"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_POINTER"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY"/>
+            <enum name="GL_COLOR_SUM"/>
+            <enum name="GL_CURRENT_SECONDARY_COLOR"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_SIZE"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_TYPE"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_STRIDE"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_POINTER"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY"/>
+            <enum name="GL_TEXTURE_FILTER_CONTROL"/>
+            <enum name="GL_DEPTH_TEXTURE_MODE"/>
+            <enum name="GL_COMPARE_R_TO_TEXTURE"/>
+            <command name="glBlendFuncSeparate"/>
+            <command name="glMultiDrawArrays"/>
+            <command name="glMultiDrawElements"/>
+            <command name="glPointParameterf"/>
+            <command name="glPointParameterfv"/>
+            <command name="glPointParameteri"/>
+            <command name="glPointParameteriv"/>
+            <command name="glFogCoordf"/>
+            <command name="glFogCoordfv"/>
+            <command name="glFogCoordd"/>
+            <command name="glFogCoorddv"/>
+            <command name="glFogCoordPointer"/>
+            <command name="glSecondaryColor3b"/>
+            <command name="glSecondaryColor3bv"/>
+            <command name="glSecondaryColor3d"/>
+            <command name="glSecondaryColor3dv"/>
+            <command name="glSecondaryColor3f"/>
+            <command name="glSecondaryColor3fv"/>
+            <command name="glSecondaryColor3i"/>
+            <command name="glSecondaryColor3iv"/>
+            <command name="glSecondaryColor3s"/>
+            <command name="glSecondaryColor3sv"/>
+            <command name="glSecondaryColor3ub"/>
+            <command name="glSecondaryColor3ubv"/>
+            <command name="glSecondaryColor3ui"/>
+            <command name="glSecondaryColor3uiv"/>
+            <command name="glSecondaryColor3us"/>
+            <command name="glSecondaryColor3usv"/>
+            <command name="glSecondaryColorPointer"/>
+            <command name="glWindowPos2d"/>
+            <command name="glWindowPos2dv"/>
+            <command name="glWindowPos2f"/>
+            <command name="glWindowPos2fv"/>
+            <command name="glWindowPos2i"/>
+            <command name="glWindowPos2iv"/>
+            <command name="glWindowPos2s"/>
+            <command name="glWindowPos2sv"/>
+            <command name="glWindowPos3d"/>
+            <command name="glWindowPos3dv"/>
+            <command name="glWindowPos3f"/>
+            <command name="glWindowPos3fv"/>
+            <command name="glWindowPos3i"/>
+            <command name="glWindowPos3iv"/>
+            <command name="glWindowPos3s"/>
+            <command name="glWindowPos3sv"/>
+        </require>
+        <require comment="Promoted from ARB_imaging subset to core">
+            <enum name="GL_FUNC_ADD"/>
+            <enum name="GL_FUNC_SUBTRACT"/>
+            <enum name="GL_FUNC_REVERSE_SUBTRACT"/>
+            <enum name="GL_MIN"/>
+            <enum name="GL_MAX"/>
+            <enum name="GL_CONSTANT_COLOR"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_COLOR"/>
+            <enum name="GL_CONSTANT_ALPHA"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_ALPHA"/>
+            <command name="glBlendColor"/>
+            <command name="glBlendEquation"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_1_5" number="1.5">
+        <require>
+            <enum name="GL_BUFFER_SIZE"/>
+            <enum name="GL_BUFFER_USAGE"/>
+            <enum name="GL_QUERY_COUNTER_BITS"/>
+            <enum name="GL_CURRENT_QUERY"/>
+            <enum name="GL_QUERY_RESULT"/>
+            <enum name="GL_QUERY_RESULT_AVAILABLE"/>
+            <enum name="GL_ARRAY_BUFFER"/>
+            <enum name="GL_ELEMENT_ARRAY_BUFFER"/>
+            <enum name="GL_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_ELEMENT_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_READ_ONLY"/>
+            <enum name="GL_WRITE_ONLY"/>
+            <enum name="GL_READ_WRITE"/>
+            <enum name="GL_BUFFER_ACCESS"/>
+            <enum name="GL_BUFFER_MAPPED"/>
+            <enum name="GL_BUFFER_MAP_POINTER"/>
+            <enum name="GL_STREAM_DRAW"/>
+            <enum name="GL_STREAM_READ"/>
+            <enum name="GL_STREAM_COPY"/>
+            <enum name="GL_STATIC_DRAW"/>
+            <enum name="GL_STATIC_READ"/>
+            <enum name="GL_STATIC_COPY"/>
+            <enum name="GL_DYNAMIC_DRAW"/>
+            <enum name="GL_DYNAMIC_READ"/>
+            <enum name="GL_DYNAMIC_COPY"/>
+            <enum name="GL_SAMPLES_PASSED"/>
+            <enum name="GL_SRC1_ALPHA"/>
+            <enum name="GL_VERTEX_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_NORMAL_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_COLOR_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_INDEX_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_WEIGHT_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_FOG_COORD_SRC"/>
+            <enum name="GL_FOG_COORD"/>
+            <enum name="GL_CURRENT_FOG_COORD"/>
+            <enum name="GL_FOG_COORD_ARRAY_TYPE"/>
+            <enum name="GL_FOG_COORD_ARRAY_STRIDE"/>
+            <enum name="GL_FOG_COORD_ARRAY_POINTER"/>
+            <enum name="GL_FOG_COORD_ARRAY"/>
+            <enum name="GL_FOG_COORD_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_SRC0_RGB"/>
+            <enum name="GL_SRC1_RGB"/>
+            <enum name="GL_SRC2_RGB"/>
+            <enum name="GL_SRC0_ALPHA"/>
+            <enum name="GL_SRC2_ALPHA"/>
+            <command name="glGenQueries"/>
+            <command name="glDeleteQueries"/>
+            <command name="glIsQuery"/>
+            <command name="glBeginQuery"/>
+            <command name="glEndQuery"/>
+            <command name="glGetQueryiv"/>
+            <command name="glGetQueryObjectiv"/>
+            <command name="glGetQueryObjectuiv"/>
+            <command name="glBindBuffer"/>
+            <command name="glDeleteBuffers"/>
+            <command name="glGenBuffers"/>
+            <command name="glIsBuffer"/>
+            <command name="glBufferData"/>
+            <command name="glBufferSubData"/>
+            <command name="glGetBufferSubData"/>
+            <command name="glMapBuffer"/>
+            <command name="glUnmapBuffer"/>
+            <command name="glGetBufferParameteriv"/>
+            <command name="glGetBufferPointerv"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_2_0" number="2.0">
+        <require>
+            <enum name="GL_BLEND_EQUATION_RGB"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_SIZE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_TYPE"/>
+            <enum name="GL_CURRENT_VERTEX_ATTRIB"/>
+            <enum name="GL_VERTEX_PROGRAM_POINT_SIZE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_POINTER"/>
+            <enum name="GL_STENCIL_BACK_FUNC"/>
+            <enum name="GL_STENCIL_BACK_FAIL"/>
+            <enum name="GL_STENCIL_BACK_PASS_DEPTH_FAIL"/>
+            <enum name="GL_STENCIL_BACK_PASS_DEPTH_PASS"/>
+            <enum name="GL_MAX_DRAW_BUFFERS"/>
+            <enum name="GL_DRAW_BUFFER0"/>
+            <enum name="GL_DRAW_BUFFER1"/>
+            <enum name="GL_DRAW_BUFFER2"/>
+            <enum name="GL_DRAW_BUFFER3"/>
+            <enum name="GL_DRAW_BUFFER4"/>
+            <enum name="GL_DRAW_BUFFER5"/>
+            <enum name="GL_DRAW_BUFFER6"/>
+            <enum name="GL_DRAW_BUFFER7"/>
+            <enum name="GL_DRAW_BUFFER8"/>
+            <enum name="GL_DRAW_BUFFER9"/>
+            <enum name="GL_DRAW_BUFFER10"/>
+            <enum name="GL_DRAW_BUFFER11"/>
+            <enum name="GL_DRAW_BUFFER12"/>
+            <enum name="GL_DRAW_BUFFER13"/>
+            <enum name="GL_DRAW_BUFFER14"/>
+            <enum name="GL_DRAW_BUFFER15"/>
+            <enum name="GL_BLEND_EQUATION_ALPHA"/>
+            <enum name="GL_MAX_VERTEX_ATTRIBS"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"/>
+            <enum name="GL_MAX_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_FRAGMENT_SHADER"/>
+            <enum name="GL_VERTEX_SHADER"/>
+            <enum name="GL_MAX_FRAGMENT_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_VERTEX_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_VARYING_FLOATS"/>
+            <enum name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_SHADER_TYPE"/>
+            <enum name="GL_FLOAT_VEC2"/>
+            <enum name="GL_FLOAT_VEC3"/>
+            <enum name="GL_FLOAT_VEC4"/>
+            <enum name="GL_INT_VEC2"/>
+            <enum name="GL_INT_VEC3"/>
+            <enum name="GL_INT_VEC4"/>
+            <enum name="GL_BOOL"/>
+            <enum name="GL_BOOL_VEC2"/>
+            <enum name="GL_BOOL_VEC3"/>
+            <enum name="GL_BOOL_VEC4"/>
+            <enum name="GL_FLOAT_MAT2"/>
+            <enum name="GL_FLOAT_MAT3"/>
+            <enum name="GL_FLOAT_MAT4"/>
+            <enum name="GL_SAMPLER_1D"/>
+            <enum name="GL_SAMPLER_2D"/>
+            <enum name="GL_SAMPLER_3D"/>
+            <enum name="GL_SAMPLER_CUBE"/>
+            <enum name="GL_SAMPLER_1D_SHADOW"/>
+            <enum name="GL_SAMPLER_2D_SHADOW"/>
+            <enum name="GL_DELETE_STATUS"/>
+            <enum name="GL_COMPILE_STATUS"/>
+            <enum name="GL_LINK_STATUS"/>
+            <enum name="GL_VALIDATE_STATUS"/>
+            <enum name="GL_INFO_LOG_LENGTH"/>
+            <enum name="GL_ATTACHED_SHADERS"/>
+            <enum name="GL_ACTIVE_UNIFORMS"/>
+            <enum name="GL_ACTIVE_UNIFORM_MAX_LENGTH"/>
+            <enum name="GL_SHADER_SOURCE_LENGTH"/>
+            <enum name="GL_ACTIVE_ATTRIBUTES"/>
+            <enum name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"/>
+            <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT"/>
+            <enum name="GL_SHADING_LANGUAGE_VERSION"/>
+            <enum name="GL_CURRENT_PROGRAM"/>
+            <enum name="GL_POINT_SPRITE_COORD_ORIGIN"/>
+            <enum name="GL_LOWER_LEFT"/>
+            <enum name="GL_UPPER_LEFT"/>
+            <enum name="GL_STENCIL_BACK_REF"/>
+            <enum name="GL_STENCIL_BACK_VALUE_MASK"/>
+            <enum name="GL_STENCIL_BACK_WRITEMASK"/>
+            <enum name="GL_VERTEX_PROGRAM_TWO_SIDE"/>
+            <enum name="GL_POINT_SPRITE"/>
+            <enum name="GL_COORD_REPLACE"/>
+            <enum name="GL_MAX_TEXTURE_COORDS"/>
+            <command name="glBlendEquationSeparate"/>
+            <command name="glDrawBuffers"/>
+            <command name="glStencilOpSeparate"/>
+            <command name="glStencilFuncSeparate"/>
+            <command name="glStencilMaskSeparate"/>
+            <command name="glAttachShader"/>
+            <command name="glBindAttribLocation"/>
+            <command name="glCompileShader"/>
+            <command name="glCreateProgram"/>
+            <command name="glCreateShader"/>
+            <command name="glDeleteProgram"/>
+            <command name="glDeleteShader"/>
+            <command name="glDetachShader"/>
+            <command name="glDisableVertexAttribArray"/>
+            <command name="glEnableVertexAttribArray"/>
+            <command name="glGetActiveAttrib"/>
+            <command name="glGetActiveUniform"/>
+            <command name="glGetAttachedShaders"/>
+            <command name="glGetAttribLocation"/>
+            <command name="glGetProgramiv"/>
+            <command name="glGetProgramInfoLog"/>
+            <command name="glGetShaderiv"/>
+            <command name="glGetShaderInfoLog"/>
+            <command name="glGetShaderSource"/>
+            <command name="glGetUniformLocation"/>
+            <command name="glGetUniformfv"/>
+            <command name="glGetUniformiv"/>
+            <command name="glGetVertexAttribdv"/>
+            <command name="glGetVertexAttribfv"/>
+            <command name="glGetVertexAttribiv"/>
+            <command name="glGetVertexAttribPointerv"/>
+            <command name="glIsProgram"/>
+            <command name="glIsShader"/>
+            <command name="glLinkProgram"/>
+            <command name="glShaderSource"/>
+            <command name="glUseProgram"/>
+            <command name="glUniform1f"/>
+            <command name="glUniform2f"/>
+            <command name="glUniform3f"/>
+            <command name="glUniform4f"/>
+            <command name="glUniform1i"/>
+            <command name="glUniform2i"/>
+            <command name="glUniform3i"/>
+            <command name="glUniform4i"/>
+            <command name="glUniform1fv"/>
+            <command name="glUniform2fv"/>
+            <command name="glUniform3fv"/>
+            <command name="glUniform4fv"/>
+            <command name="glUniform1iv"/>
+            <command name="glUniform2iv"/>
+            <command name="glUniform3iv"/>
+            <command name="glUniform4iv"/>
+            <command name="glUniformMatrix2fv"/>
+            <command name="glUniformMatrix3fv"/>
+            <command name="glUniformMatrix4fv"/>
+            <command name="glValidateProgram"/>
+            <command name="glVertexAttrib1d"/>
+            <command name="glVertexAttrib1dv"/>
+            <command name="glVertexAttrib1f"/>
+            <command name="glVertexAttrib1fv"/>
+            <command name="glVertexAttrib1s"/>
+            <command name="glVertexAttrib1sv"/>
+            <command name="glVertexAttrib2d"/>
+            <command name="glVertexAttrib2dv"/>
+            <command name="glVertexAttrib2f"/>
+            <command name="glVertexAttrib2fv"/>
+            <command name="glVertexAttrib2s"/>
+            <command name="glVertexAttrib2sv"/>
+            <command name="glVertexAttrib3d"/>
+            <command name="glVertexAttrib3dv"/>
+            <command name="glVertexAttrib3f"/>
+            <command name="glVertexAttrib3fv"/>
+            <command name="glVertexAttrib3s"/>
+            <command name="glVertexAttrib3sv"/>
+            <command name="glVertexAttrib4Nbv"/>
+            <command name="glVertexAttrib4Niv"/>
+            <command name="glVertexAttrib4Nsv"/>
+            <command name="glVertexAttrib4Nub"/>
+            <command name="glVertexAttrib4Nubv"/>
+            <command name="glVertexAttrib4Nuiv"/>
+            <command name="glVertexAttrib4Nusv"/>
+            <command name="glVertexAttrib4bv"/>
+            <command name="glVertexAttrib4d"/>
+            <command name="glVertexAttrib4dv"/>
+            <command name="glVertexAttrib4f"/>
+            <command name="glVertexAttrib4fv"/>
+            <command name="glVertexAttrib4iv"/>
+            <command name="glVertexAttrib4s"/>
+            <command name="glVertexAttrib4sv"/>
+            <command name="glVertexAttrib4ubv"/>
+            <command name="glVertexAttrib4uiv"/>
+            <command name="glVertexAttrib4usv"/>
+            <command name="glVertexAttribPointer"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_2_1" number="2.1">
+        <require>
+            <enum name="GL_PIXEL_PACK_BUFFER"/>
+            <enum name="GL_PIXEL_UNPACK_BUFFER"/>
+            <enum name="GL_PIXEL_PACK_BUFFER_BINDING"/>
+            <enum name="GL_PIXEL_UNPACK_BUFFER_BINDING"/>
+            <enum name="GL_FLOAT_MAT2x3"/>
+            <enum name="GL_FLOAT_MAT2x4"/>
+            <enum name="GL_FLOAT_MAT3x2"/>
+            <enum name="GL_FLOAT_MAT3x4"/>
+            <enum name="GL_FLOAT_MAT4x2"/>
+            <enum name="GL_FLOAT_MAT4x3"/>
+            <enum name="GL_SRGB"/>
+            <enum name="GL_SRGB8"/>
+            <enum name="GL_SRGB_ALPHA"/>
+            <enum name="GL_SRGB8_ALPHA8"/>
+            <enum name="GL_COMPRESSED_SRGB"/>
+            <enum name="GL_COMPRESSED_SRGB_ALPHA"/>
+            <enum name="GL_CURRENT_RASTER_SECONDARY_COLOR"/>
+            <enum name="GL_SLUMINANCE_ALPHA"/>
+            <enum name="GL_SLUMINANCE8_ALPHA8"/>
+            <enum name="GL_SLUMINANCE"/>
+            <enum name="GL_SLUMINANCE8"/>
+            <enum name="GL_COMPRESSED_SLUMINANCE"/>
+            <enum name="GL_COMPRESSED_SLUMINANCE_ALPHA"/>
+            <command name="glUniformMatrix2x3fv"/>
+            <command name="glUniformMatrix3x2fv"/>
+            <command name="glUniformMatrix2x4fv"/>
+            <command name="glUniformMatrix4x2fv"/>
+            <command name="glUniformMatrix3x4fv"/>
+            <command name="glUniformMatrix4x3fv"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_3_0" number="3.0">
+        <require>
+            <enum name="GL_COMPARE_REF_TO_TEXTURE"/>
+            <enum name="GL_CLIP_DISTANCE0"/>
+            <enum name="GL_CLIP_DISTANCE1"/>
+            <enum name="GL_CLIP_DISTANCE2"/>
+            <enum name="GL_CLIP_DISTANCE3"/>
+            <enum name="GL_CLIP_DISTANCE4"/>
+            <enum name="GL_CLIP_DISTANCE5"/>
+            <enum name="GL_CLIP_DISTANCE6"/>
+            <enum name="GL_CLIP_DISTANCE7"/>
+            <enum name="GL_MAX_CLIP_DISTANCES"/>
+            <enum name="GL_MAJOR_VERSION"/>
+            <enum name="GL_MINOR_VERSION"/>
+            <enum name="GL_NUM_EXTENSIONS"/>
+            <enum name="GL_CONTEXT_FLAGS"/>
+            <enum name="GL_COMPRESSED_RED"/>
+            <enum name="GL_COMPRESSED_RG"/>
+            <enum name="GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT"/>
+            <enum name="GL_RGBA32F"/>
+            <enum name="GL_RGB32F"/>
+            <enum name="GL_RGBA16F"/>
+            <enum name="GL_RGB16F"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_INTEGER"/>
+            <enum name="GL_MAX_ARRAY_TEXTURE_LAYERS"/>
+            <enum name="GL_MIN_PROGRAM_TEXEL_OFFSET"/>
+            <enum name="GL_MAX_PROGRAM_TEXEL_OFFSET"/>
+            <enum name="GL_CLAMP_READ_COLOR"/>
+            <enum name="GL_FIXED_ONLY"/>
+            <enum name="GL_MAX_VARYING_COMPONENTS"/>
+            <enum name="GL_TEXTURE_1D_ARRAY"/>
+            <enum name="GL_PROXY_TEXTURE_1D_ARRAY"/>
+            <enum name="GL_TEXTURE_2D_ARRAY"/>
+            <enum name="GL_PROXY_TEXTURE_2D_ARRAY"/>
+            <enum name="GL_TEXTURE_BINDING_1D_ARRAY"/>
+            <enum name="GL_TEXTURE_BINDING_2D_ARRAY"/>
+            <enum name="GL_R11F_G11F_B10F"/>
+            <enum name="GL_UNSIGNED_INT_10F_11F_11F_REV"/>
+            <enum name="GL_RGB9_E5"/>
+            <enum name="GL_UNSIGNED_INT_5_9_9_9_REV"/>
+            <enum name="GL_TEXTURE_SHARED_SIZE"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE"/>
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_VARYINGS"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_START"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE"/>
+            <enum name="GL_PRIMITIVES_GENERATED"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN"/>
+            <enum name="GL_RASTERIZER_DISCARD"/>
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS"/>
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS"/>
+            <enum name="GL_INTERLEAVED_ATTRIBS"/>
+            <enum name="GL_SEPARATE_ATTRIBS"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING"/>
+            <enum name="GL_RGBA32UI"/>
+            <enum name="GL_RGB32UI"/>
+            <enum name="GL_RGBA16UI"/>
+            <enum name="GL_RGB16UI"/>
+            <enum name="GL_RGBA8UI"/>
+            <enum name="GL_RGB8UI"/>
+            <enum name="GL_RGBA32I"/>
+            <enum name="GL_RGB32I"/>
+            <enum name="GL_RGBA16I"/>
+            <enum name="GL_RGB16I"/>
+            <enum name="GL_RGBA8I"/>
+            <enum name="GL_RGB8I"/>
+            <enum name="GL_RED_INTEGER"/>
+            <enum name="GL_GREEN_INTEGER"/>
+            <enum name="GL_BLUE_INTEGER"/>
+            <enum name="GL_RGB_INTEGER"/>
+            <enum name="GL_RGBA_INTEGER"/>
+            <enum name="GL_BGR_INTEGER"/>
+            <enum name="GL_BGRA_INTEGER"/>
+            <enum name="GL_SAMPLER_1D_ARRAY"/>
+            <enum name="GL_SAMPLER_2D_ARRAY"/>
+            <enum name="GL_SAMPLER_1D_ARRAY_SHADOW"/>
+            <enum name="GL_SAMPLER_2D_ARRAY_SHADOW"/>
+            <enum name="GL_SAMPLER_CUBE_SHADOW"/>
+            <enum name="GL_UNSIGNED_INT_VEC2"/>
+            <enum name="GL_UNSIGNED_INT_VEC3"/>
+            <enum name="GL_UNSIGNED_INT_VEC4"/>
+            <enum name="GL_INT_SAMPLER_1D"/>
+            <enum name="GL_INT_SAMPLER_2D"/>
+            <enum name="GL_INT_SAMPLER_3D"/>
+            <enum name="GL_INT_SAMPLER_CUBE"/>
+            <enum name="GL_INT_SAMPLER_1D_ARRAY"/>
+            <enum name="GL_INT_SAMPLER_2D_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_1D"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_3D"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_CUBE"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_1D_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D_ARRAY"/>
+            <enum name="GL_QUERY_WAIT"/>
+            <enum name="GL_QUERY_NO_WAIT"/>
+            <enum name="GL_QUERY_BY_REGION_WAIT"/>
+            <enum name="GL_QUERY_BY_REGION_NO_WAIT"/>
+            <enum name="GL_BUFFER_ACCESS_FLAGS"/>
+            <enum name="GL_BUFFER_MAP_LENGTH"/>
+            <enum name="GL_BUFFER_MAP_OFFSET"/>
+            <command name="glColorMaski"/>
+            <command name="glGetBooleani_v"/>
+            <command name="glGetIntegeri_v"/>
+            <command name="glEnablei"/>
+            <command name="glDisablei"/>
+            <command name="glIsEnabledi"/>
+            <command name="glBeginTransformFeedback"/>
+            <command name="glEndTransformFeedback"/>
+            <command name="glBindBufferRange"/>
+            <command name="glBindBufferBase"/>
+            <command name="glTransformFeedbackVaryings"/>
+            <command name="glGetTransformFeedbackVarying"/>
+            <command name="glClampColor"/>
+            <command name="glBeginConditionalRender"/>
+            <command name="glEndConditionalRender"/>
+            <command name="glVertexAttribIPointer"/>
+            <command name="glGetVertexAttribIiv"/>
+            <command name="glGetVertexAttribIuiv"/>
+            <command name="glVertexAttribI1i"/>
+            <command name="glVertexAttribI2i"/>
+            <command name="glVertexAttribI3i"/>
+            <command name="glVertexAttribI4i"/>
+            <command name="glVertexAttribI1ui"/>
+            <command name="glVertexAttribI2ui"/>
+            <command name="glVertexAttribI3ui"/>
+            <command name="glVertexAttribI4ui"/>
+            <command name="glVertexAttribI1iv"/>
+            <command name="glVertexAttribI2iv"/>
+            <command name="glVertexAttribI3iv"/>
+            <command name="glVertexAttribI4iv"/>
+            <command name="glVertexAttribI1uiv"/>
+            <command name="glVertexAttribI2uiv"/>
+            <command name="glVertexAttribI3uiv"/>
+            <command name="glVertexAttribI4uiv"/>
+            <command name="glVertexAttribI4bv"/>
+            <command name="glVertexAttribI4sv"/>
+            <command name="glVertexAttribI4ubv"/>
+            <command name="glVertexAttribI4usv"/>
+            <command name="glGetUniformuiv"/>
+            <command name="glBindFragDataLocation"/>
+            <command name="glGetFragDataLocation"/>
+            <command name="glUniform1ui"/>
+            <command name="glUniform2ui"/>
+            <command name="glUniform3ui"/>
+            <command name="glUniform4ui"/>
+            <command name="glUniform1uiv"/>
+            <command name="glUniform2uiv"/>
+            <command name="glUniform3uiv"/>
+            <command name="glUniform4uiv"/>
+            <command name="glTexParameterIiv"/>
+            <command name="glTexParameterIuiv"/>
+            <command name="glGetTexParameterIiv"/>
+            <command name="glGetTexParameterIuiv"/>
+            <command name="glClearBufferiv"/>
+            <command name="glClearBufferuiv"/>
+            <command name="glClearBufferfv"/>
+            <command name="glClearBufferfi"/>
+            <command name="glGetStringi"/>
+        </require>
+        <require comment="Reuse ARB_depth_buffer_float">
+            <enum name="GL_DEPTH_COMPONENT32F"/>
+            <enum name="GL_DEPTH32F_STENCIL8"/>
+            <enum name="GL_FLOAT_32_UNSIGNED_INT_24_8_REV"/>
+        </require>
+        <require comment="Reuse ARB_framebuffer_object">
+            <enum name="GL_INVALID_FRAMEBUFFER_OPERATION"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT"/>
+            <enum name="GL_FRAMEBUFFER_UNDEFINED"/>
+            <enum name="GL_DEPTH_STENCIL_ATTACHMENT"/>
+            <enum name="GL_MAX_RENDERBUFFER_SIZE"/>
+            <enum name="GL_DEPTH_STENCIL"/>
+            <enum name="GL_UNSIGNED_INT_24_8"/>
+            <enum name="GL_DEPTH24_STENCIL8"/>
+            <enum name="GL_TEXTURE_STENCIL_SIZE"/>
+            <enum name="GL_TEXTURE_RED_TYPE"/>
+            <enum name="GL_TEXTURE_GREEN_TYPE"/>
+            <enum name="GL_TEXTURE_BLUE_TYPE"/>
+            <enum name="GL_TEXTURE_ALPHA_TYPE"/>
+            <enum name="GL_TEXTURE_DEPTH_TYPE"/>
+            <enum name="GL_UNSIGNED_NORMALIZED"/>
+            <enum name="GL_FRAMEBUFFER_BINDING"/>
+            <enum name="GL_DRAW_FRAMEBUFFER_BINDING"/>
+            <enum name="GL_RENDERBUFFER_BINDING"/>
+            <enum name="GL_READ_FRAMEBUFFER"/>
+            <enum name="GL_DRAW_FRAMEBUFFER"/>
+            <enum name="GL_READ_FRAMEBUFFER_BINDING"/>
+            <enum name="GL_RENDERBUFFER_SAMPLES"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"/>
+            <enum name="GL_FRAMEBUFFER_COMPLETE"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER"/>
+            <enum name="GL_FRAMEBUFFER_UNSUPPORTED"/>
+            <enum name="GL_MAX_COLOR_ATTACHMENTS"/>
+            <enum name="GL_COLOR_ATTACHMENT0"/>
+            <enum name="GL_COLOR_ATTACHMENT1"/>
+            <enum name="GL_COLOR_ATTACHMENT2"/>
+            <enum name="GL_COLOR_ATTACHMENT3"/>
+            <enum name="GL_COLOR_ATTACHMENT4"/>
+            <enum name="GL_COLOR_ATTACHMENT5"/>
+            <enum name="GL_COLOR_ATTACHMENT6"/>
+            <enum name="GL_COLOR_ATTACHMENT7"/>
+            <enum name="GL_COLOR_ATTACHMENT8"/>
+            <enum name="GL_COLOR_ATTACHMENT9"/>
+            <enum name="GL_COLOR_ATTACHMENT10"/>
+            <enum name="GL_COLOR_ATTACHMENT11"/>
+            <enum name="GL_COLOR_ATTACHMENT12"/>
+            <enum name="GL_COLOR_ATTACHMENT13"/>
+            <enum name="GL_COLOR_ATTACHMENT14"/>
+            <enum name="GL_COLOR_ATTACHMENT15"/>
+            <enum name="GL_DEPTH_ATTACHMENT"/>
+            <enum name="GL_STENCIL_ATTACHMENT"/>
+            <enum name="GL_FRAMEBUFFER"/>
+            <enum name="GL_RENDERBUFFER"/>
+            <enum name="GL_RENDERBUFFER_WIDTH"/>
+            <enum name="GL_RENDERBUFFER_HEIGHT"/>
+            <enum name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
+            <enum name="GL_STENCIL_INDEX1"/>
+            <enum name="GL_STENCIL_INDEX4"/>
+            <enum name="GL_STENCIL_INDEX8"/>
+            <enum name="GL_STENCIL_INDEX16"/>
+            <enum name="GL_RENDERBUFFER_RED_SIZE"/>
+            <enum name="GL_RENDERBUFFER_GREEN_SIZE"/>
+            <enum name="GL_RENDERBUFFER_BLUE_SIZE"/>
+            <enum name="GL_RENDERBUFFER_ALPHA_SIZE"/>
+            <enum name="GL_RENDERBUFFER_DEPTH_SIZE"/>
+            <enum name="GL_RENDERBUFFER_STENCIL_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"/>
+            <enum name="GL_MAX_SAMPLES"/>
+            <command name="glIsRenderbuffer"/>
+            <command name="glBindRenderbuffer"/>
+            <command name="glDeleteRenderbuffers"/>
+            <command name="glGenRenderbuffers"/>
+            <command name="glRenderbufferStorage"/>
+            <command name="glGetRenderbufferParameteriv"/>
+            <command name="glIsFramebuffer"/>
+            <command name="glBindFramebuffer"/>
+            <command name="glDeleteFramebuffers"/>
+            <command name="glGenFramebuffers"/>
+            <command name="glCheckFramebufferStatus"/>
+            <command name="glFramebufferTexture1D"/>
+            <command name="glFramebufferTexture2D"/>
+            <command name="glFramebufferTexture3D"/>
+            <command name="glFramebufferRenderbuffer"/>
+            <command name="glGetFramebufferAttachmentParameteriv"/>
+            <command name="glGenerateMipmap"/>
+            <command name="glBlitFramebuffer"/>
+            <command name="glRenderbufferStorageMultisample"/>
+            <command name="glFramebufferTextureLayer"/>
+        </require>
+        <require profile="compatibility" comment="Reuse ARB_framebuffer_object compatibility profile">
+            <enum name="GL_INDEX"/>
+            <enum name="GL_TEXTURE_LUMINANCE_TYPE"/>
+            <enum name="GL_TEXTURE_INTENSITY_TYPE"/>
+        </require>
+        <require comment="Reuse ARB_framebuffer_sRGB">
+            <enum name="GL_FRAMEBUFFER_SRGB"/>
+        </require>
+        <require comment="Reuse ARB_half_float_vertex">
+            <type name="GLhalf"/>
+            <enum name="GL_HALF_FLOAT"/>
+        </require>
+        <require comment="Reuse ARB_map_buffer_range">
+            <enum name="GL_MAP_READ_BIT"/>
+            <enum name="GL_MAP_WRITE_BIT"/>
+            <enum name="GL_MAP_INVALIDATE_RANGE_BIT"/>
+            <enum name="GL_MAP_INVALIDATE_BUFFER_BIT"/>
+            <enum name="GL_MAP_FLUSH_EXPLICIT_BIT"/>
+            <enum name="GL_MAP_UNSYNCHRONIZED_BIT"/>
+            <command name="glMapBufferRange"/>
+            <command name="glFlushMappedBufferRange"/>
+        </require>
+        <require comment="Reuse ARB_texture_compression_rgtc">
+            <enum name="GL_COMPRESSED_RED_RGTC1"/>
+            <enum name="GL_COMPRESSED_SIGNED_RED_RGTC1"/>
+            <enum name="GL_COMPRESSED_RG_RGTC2"/>
+            <enum name="GL_COMPRESSED_SIGNED_RG_RGTC2"/>
+        </require>
+        <require comment="Reuse ARB_texture_rg">
+            <enum name="GL_RG"/>
+            <enum name="GL_RG_INTEGER"/>
+            <enum name="GL_R8"/>
+            <enum name="GL_R16"/>
+            <enum name="GL_RG8"/>
+            <enum name="GL_RG16"/>
+            <enum name="GL_R16F"/>
+            <enum name="GL_R32F"/>
+            <enum name="GL_RG16F"/>
+            <enum name="GL_RG32F"/>
+            <enum name="GL_R8I"/>
+            <enum name="GL_R8UI"/>
+            <enum name="GL_R16I"/>
+            <enum name="GL_R16UI"/>
+            <enum name="GL_R32I"/>
+            <enum name="GL_R32UI"/>
+            <enum name="GL_RG8I"/>
+            <enum name="GL_RG8UI"/>
+            <enum name="GL_RG16I"/>
+            <enum name="GL_RG16UI"/>
+            <enum name="GL_RG32I"/>
+            <enum name="GL_RG32UI"/>
+        </require>
+        <require comment="Reuse ARB_vertex_array_object">
+            <enum name="GL_VERTEX_ARRAY_BINDING"/>
+            <enum name="GL_CLAMP_VERTEX_COLOR"/>
+            <enum name="GL_CLAMP_FRAGMENT_COLOR"/>
+            <enum name="GL_ALPHA_INTEGER"/>
+            <command name="glBindVertexArray"/>
+            <command name="glDeleteVertexArrays"/>
+            <command name="glGenVertexArrays"/>
+            <command name="glIsVertexArray"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_3_1" number="3.1">
+        <require>
+            <enum name="GL_SAMPLER_2D_RECT"/>
+            <enum name="GL_SAMPLER_2D_RECT_SHADOW"/>
+            <enum name="GL_SAMPLER_BUFFER"/>
+            <enum name="GL_INT_SAMPLER_2D_RECT"/>
+            <enum name="GL_INT_SAMPLER_BUFFER"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D_RECT"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_BUFFER"/>
+            <enum name="GL_TEXTURE_BUFFER"/>
+            <enum name="GL_MAX_TEXTURE_BUFFER_SIZE"/>
+            <enum name="GL_TEXTURE_BINDING_BUFFER"/>
+            <enum name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING"/>
+            <enum name="GL_TEXTURE_RECTANGLE"/>
+            <enum name="GL_TEXTURE_BINDING_RECTANGLE"/>
+            <enum name="GL_PROXY_TEXTURE_RECTANGLE"/>
+            <enum name="GL_MAX_RECTANGLE_TEXTURE_SIZE"/>
+            <enum name="GL_R8_SNORM"/>
+            <enum name="GL_RG8_SNORM"/>
+            <enum name="GL_RGB8_SNORM"/>
+            <enum name="GL_RGBA8_SNORM"/>
+            <enum name="GL_R16_SNORM"/>
+            <enum name="GL_RG16_SNORM"/>
+            <enum name="GL_RGB16_SNORM"/>
+            <enum name="GL_RGBA16_SNORM"/>
+            <enum name="GL_SIGNED_NORMALIZED"/>
+            <enum name="GL_PRIMITIVE_RESTART"/>
+            <enum name="GL_PRIMITIVE_RESTART_INDEX"/>
+            <command name="glDrawArraysInstanced"/>
+            <command name="glDrawElementsInstanced"/>
+            <command name="glTexBuffer"/>
+            <command name="glPrimitiveRestartIndex"/>
+        </require>
+        <require comment="Reuse ARB_copy_buffer">
+            <enum name="GL_COPY_READ_BUFFER"/>
+            <enum name="GL_COPY_WRITE_BUFFER"/>
+            <command name="glCopyBufferSubData"/>
+        </require>
+        <require comment="Reuse ARB_uniform_buffer_object">
+            <enum name="GL_UNIFORM_BUFFER"/>
+            <enum name="GL_UNIFORM_BUFFER_BINDING"/>
+            <enum name="GL_UNIFORM_BUFFER_START"/>
+            <enum name="GL_UNIFORM_BUFFER_SIZE"/>
+            <enum name="GL_MAX_VERTEX_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_FRAGMENT_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_COMBINED_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_UNIFORM_BUFFER_BINDINGS"/>
+            <enum name="GL_MAX_UNIFORM_BLOCK_SIZE"/>
+            <enum name="GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS"/>
+            <enum name="GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT"/>
+            <enum name="GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH"/>
+            <enum name="GL_ACTIVE_UNIFORM_BLOCKS"/>
+            <enum name="GL_UNIFORM_TYPE"/>
+            <enum name="GL_UNIFORM_SIZE"/>
+            <enum name="GL_UNIFORM_NAME_LENGTH"/>
+            <enum name="GL_UNIFORM_BLOCK_INDEX"/>
+            <enum name="GL_UNIFORM_OFFSET"/>
+            <enum name="GL_UNIFORM_ARRAY_STRIDE"/>
+            <enum name="GL_UNIFORM_MATRIX_STRIDE"/>
+            <enum name="GL_UNIFORM_IS_ROW_MAJOR"/>
+            <enum name="GL_UNIFORM_BLOCK_BINDING"/>
+            <enum name="GL_UNIFORM_BLOCK_DATA_SIZE"/>
+            <enum name="GL_UNIFORM_BLOCK_NAME_LENGTH"/>
+            <enum name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS"/>
+            <enum name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER"/>
+            <enum name="GL_INVALID_INDEX"/>
+            <command name="glGetUniformIndices"/>
+            <command name="glGetActiveUniformsiv"/>
+            <command name="glGetActiveUniformName"/>
+            <command name="glGetUniformBlockIndex"/>
+            <command name="glGetActiveUniformBlockiv"/>
+            <command name="glGetActiveUniformBlockName"/>
+            <command name="glUniformBlockBinding"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_3_2" number="3.2">
+        <require>
+            <enum name="GL_CONTEXT_CORE_PROFILE_BIT"/>
+            <enum name="GL_CONTEXT_COMPATIBILITY_PROFILE_BIT"/>
+            <enum name="GL_LINES_ADJACENCY"/>
+            <enum name="GL_LINE_STRIP_ADJACENCY"/>
+            <enum name="GL_TRIANGLES_ADJACENCY"/>
+            <enum name="GL_TRIANGLE_STRIP_ADJACENCY"/>
+            <enum name="GL_PROGRAM_POINT_SIZE"/>
+            <enum name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS"/>
+            <enum name="GL_GEOMETRY_SHADER"/>
+            <enum name="GL_GEOMETRY_VERTICES_OUT"/>
+            <enum name="GL_GEOMETRY_INPUT_TYPE"/>
+            <enum name="GL_GEOMETRY_OUTPUT_TYPE"/>
+            <enum name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_GEOMETRY_OUTPUT_VERTICES"/>
+            <enum name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_VERTEX_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_GEOMETRY_INPUT_COMPONENTS"/>
+            <enum name="GL_MAX_GEOMETRY_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_FRAGMENT_INPUT_COMPONENTS"/>
+            <enum name="GL_CONTEXT_PROFILE_MASK"/>
+        </require>
+        <require comment="Reuse ARB_depth_clamp">
+            <enum name="GL_DEPTH_CLAMP"/>
+        </require>
+        <require comment="Reuse ARB_draw_elements_base_vertex">
+            <command name="glDrawElementsBaseVertex"/>
+            <command name="glDrawRangeElementsBaseVertex"/>
+            <command name="glDrawElementsInstancedBaseVertex"/>
+            <command name="glMultiDrawElementsBaseVertex"/>
+        </require>
+        <require comment="Reuse ARB_fragment_coord_conventions (none)">
+        </require>
+        <require comment="Reuse ARB_provoking_vertex">
+            <enum name="GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION"/>
+            <enum name="GL_FIRST_VERTEX_CONVENTION"/>
+            <enum name="GL_LAST_VERTEX_CONVENTION"/>
+            <enum name="GL_PROVOKING_VERTEX"/>
+            <command name="glProvokingVertex"/>
+        </require>
+        <require comment="Reuse ARB_seamless_cube_map">
+            <enum name="GL_TEXTURE_CUBE_MAP_SEAMLESS"/>
+        </require>
+        <require comment="Reuse ARB_sync">
+            <enum name="GL_MAX_SERVER_WAIT_TIMEOUT"/>
+            <enum name="GL_OBJECT_TYPE"/>
+            <enum name="GL_SYNC_CONDITION"/>
+            <enum name="GL_SYNC_STATUS"/>
+            <enum name="GL_SYNC_FLAGS"/>
+            <enum name="GL_SYNC_FENCE"/>
+            <enum name="GL_SYNC_GPU_COMMANDS_COMPLETE"/>
+            <enum name="GL_UNSIGNALED"/>
+            <enum name="GL_SIGNALED"/>
+            <enum name="GL_ALREADY_SIGNALED"/>
+            <enum name="GL_TIMEOUT_EXPIRED"/>
+            <enum name="GL_CONDITION_SATISFIED"/>
+            <enum name="GL_WAIT_FAILED"/>
+            <enum name="GL_TIMEOUT_IGNORED"/>
+            <enum name="GL_SYNC_FLUSH_COMMANDS_BIT"/>
+            <command name="glFenceSync"/>
+            <command name="glIsSync"/>
+            <command name="glDeleteSync"/>
+            <command name="glClientWaitSync"/>
+            <command name="glWaitSync"/>
+            <command name="glGetInteger64v"/>
+            <command name="glGetSynciv"/>
+        </require>
+        <require comment="Reuse ARB_texture_multisample">
+            <enum name="GL_SAMPLE_POSITION"/>
+            <enum name="GL_SAMPLE_MASK"/>
+            <enum name="GL_SAMPLE_MASK_VALUE"/>
+            <enum name="GL_MAX_SAMPLE_MASK_WORDS"/>
+            <enum name="GL_TEXTURE_2D_MULTISAMPLE"/>
+            <enum name="GL_PROXY_TEXTURE_2D_MULTISAMPLE"/>
+            <enum name="GL_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_TEXTURE_BINDING_2D_MULTISAMPLE"/>
+            <enum name="GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_TEXTURE_SAMPLES"/>
+            <enum name="GL_TEXTURE_FIXED_SAMPLE_LOCATIONS"/>
+            <enum name="GL_SAMPLER_2D_MULTISAMPLE"/>
+            <enum name="GL_INT_SAMPLER_2D_MULTISAMPLE"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE"/>
+            <enum name="GL_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_MAX_COLOR_TEXTURE_SAMPLES"/>
+            <enum name="GL_MAX_DEPTH_TEXTURE_SAMPLES"/>
+            <enum name="GL_MAX_INTEGER_SAMPLES"/>
+            <!-- /* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ -->
+            <command name="glGetInteger64i_v"/>
+            <command name="glGetBufferParameteri64v"/>
+            <command name="glFramebufferTexture"/>
+            <command name="glTexImage2DMultisample"/>
+            <command name="glTexImage3DMultisample"/>
+            <command name="glGetMultisamplefv"/>
+            <command name="glSampleMaski"/>
+        </require>
+        <!-- OpenGL 3.2 is where core and compatibility profiles were first
+             introduced, so many, many things were removed from the core
+             profile in this version. A few were reintroduced later (e.g.
+             GetPointerv / STACK_{UNDER,OVER}FLOW by OpenGL 4.3 for debug
+             functionality). -->
+        <remove profile="core" comment="Compatibility-only GL 1.0 features removed from GL 3.2">
+            <command name="glNewList"/>
+            <command name="glEndList"/>
+            <command name="glCallList"/>
+            <command name="glCallLists"/>
+            <command name="glDeleteLists"/>
+            <command name="glGenLists"/>
+            <command name="glListBase"/>
+            <command name="glBegin"/>
+            <command name="glBitmap"/>
+            <command name="glColor3b"/>
+            <command name="glColor3bv"/>
+            <command name="glColor3d"/>
+            <command name="glColor3dv"/>
+            <command name="glColor3f"/>
+            <command name="glColor3fv"/>
+            <command name="glColor3i"/>
+            <command name="glColor3iv"/>
+            <command name="glColor3s"/>
+            <command name="glColor3sv"/>
+            <command name="glColor3ub"/>
+            <command name="glColor3ubv"/>
+            <command name="glColor3ui"/>
+            <command name="glColor3uiv"/>
+            <command name="glColor3us"/>
+            <command name="glColor3usv"/>
+            <command name="glColor4b"/>
+            <command name="glColor4bv"/>
+            <command name="glColor4d"/>
+            <command name="glColor4dv"/>
+            <command name="glColor4f"/>
+            <command name="glColor4fv"/>
+            <command name="glColor4i"/>
+            <command name="glColor4iv"/>
+            <command name="glColor4s"/>
+            <command name="glColor4sv"/>
+            <command name="glColor4ub"/>
+            <command name="glColor4ubv"/>
+            <command name="glColor4ui"/>
+            <command name="glColor4uiv"/>
+            <command name="glColor4us"/>
+            <command name="glColor4usv"/>
+            <command name="glEdgeFlag"/>
+            <command name="glEdgeFlagv"/>
+            <command name="glEnd"/>
+            <command name="glIndexd"/>
+            <command name="glIndexdv"/>
+            <command name="glIndexf"/>
+            <command name="glIndexfv"/>
+            <command name="glIndexi"/>
+            <command name="glIndexiv"/>
+            <command name="glIndexs"/>
+            <command name="glIndexsv"/>
+            <command name="glNormal3b"/>
+            <command name="glNormal3bv"/>
+            <command name="glNormal3d"/>
+            <command name="glNormal3dv"/>
+            <command name="glNormal3f"/>
+            <command name="glNormal3fv"/>
+            <command name="glNormal3i"/>
+            <command name="glNormal3iv"/>
+            <command name="glNormal3s"/>
+            <command name="glNormal3sv"/>
+            <command name="glRasterPos2d"/>
+            <command name="glRasterPos2dv"/>
+            <command name="glRasterPos2f"/>
+            <command name="glRasterPos2fv"/>
+            <command name="glRasterPos2i"/>
+            <command name="glRasterPos2iv"/>
+            <command name="glRasterPos2s"/>
+            <command name="glRasterPos2sv"/>
+            <command name="glRasterPos3d"/>
+            <command name="glRasterPos3dv"/>
+            <command name="glRasterPos3f"/>
+            <command name="glRasterPos3fv"/>
+            <command name="glRasterPos3i"/>
+            <command name="glRasterPos3iv"/>
+            <command name="glRasterPos3s"/>
+            <command name="glRasterPos3sv"/>
+            <command name="glRasterPos4d"/>
+            <command name="glRasterPos4dv"/>
+            <command name="glRasterPos4f"/>
+            <command name="glRasterPos4fv"/>
+            <command name="glRasterPos4i"/>
+            <command name="glRasterPos4iv"/>
+            <command name="glRasterPos4s"/>
+            <command name="glRasterPos4sv"/>
+            <command name="glRectd"/>
+            <command name="glRectdv"/>
+            <command name="glRectf"/>
+            <command name="glRectfv"/>
+            <command name="glRecti"/>
+            <command name="glRectiv"/>
+            <command name="glRects"/>
+            <command name="glRectsv"/>
+            <command name="glTexCoord1d"/>
+            <command name="glTexCoord1dv"/>
+            <command name="glTexCoord1f"/>
+            <command name="glTexCoord1fv"/>
+            <command name="glTexCoord1i"/>
+            <command name="glTexCoord1iv"/>
+            <command name="glTexCoord1s"/>
+            <command name="glTexCoord1sv"/>
+            <command name="glTexCoord2d"/>
+            <command name="glTexCoord2dv"/>
+            <command name="glTexCoord2f"/>
+            <command name="glTexCoord2fv"/>
+            <command name="glTexCoord2i"/>
+            <command name="glTexCoord2iv"/>
+            <command name="glTexCoord2s"/>
+            <command name="glTexCoord2sv"/>
+            <command name="glTexCoord3d"/>
+            <command name="glTexCoord3dv"/>
+            <command name="glTexCoord3f"/>
+            <command name="glTexCoord3fv"/>
+            <command name="glTexCoord3i"/>
+            <command name="glTexCoord3iv"/>
+            <command name="glTexCoord3s"/>
+            <command name="glTexCoord3sv"/>
+            <command name="glTexCoord4d"/>
+            <command name="glTexCoord4dv"/>
+            <command name="glTexCoord4f"/>
+            <command name="glTexCoord4fv"/>
+            <command name="glTexCoord4i"/>
+            <command name="glTexCoord4iv"/>
+            <command name="glTexCoord4s"/>
+            <command name="glTexCoord4sv"/>
+            <command name="glVertex2d"/>
+            <command name="glVertex2dv"/>
+            <command name="glVertex2f"/>
+            <command name="glVertex2fv"/>
+            <command name="glVertex2i"/>
+            <command name="glVertex2iv"/>
+            <command name="glVertex2s"/>
+            <command name="glVertex2sv"/>
+            <command name="glVertex3d"/>
+            <command name="glVertex3dv"/>
+            <command name="glVertex3f"/>
+            <command name="glVertex3fv"/>
+            <command name="glVertex3i"/>
+            <command name="glVertex3iv"/>
+            <command name="glVertex3s"/>
+            <command name="glVertex3sv"/>
+            <command name="glVertex4d"/>
+            <command name="glVertex4dv"/>
+            <command name="glVertex4f"/>
+            <command name="glVertex4fv"/>
+            <command name="glVertex4i"/>
+            <command name="glVertex4iv"/>
+            <command name="glVertex4s"/>
+            <command name="glVertex4sv"/>
+            <command name="glClipPlane"/>
+            <command name="glColorMaterial"/>
+            <command name="glFogf"/>
+            <command name="glFogfv"/>
+            <command name="glFogi"/>
+            <command name="glFogiv"/>
+            <command name="glLightf"/>
+            <command name="glLightfv"/>
+            <command name="glLighti"/>
+            <command name="glLightiv"/>
+            <command name="glLightModelf"/>
+            <command name="glLightModelfv"/>
+            <command name="glLightModeli"/>
+            <command name="glLightModeliv"/>
+            <command name="glLineStipple"/>
+            <command name="glMaterialf"/>
+            <command name="glMaterialfv"/>
+            <command name="glMateriali"/>
+            <command name="glMaterialiv"/>
+            <command name="glPolygonStipple"/>
+            <command name="glShadeModel"/>
+            <command name="glTexEnvf"/>
+            <command name="glTexEnvfv"/>
+            <command name="glTexEnvi"/>
+            <command name="glTexEnviv"/>
+            <command name="glTexGend"/>
+            <command name="glTexGendv"/>
+            <command name="glTexGenf"/>
+            <command name="glTexGenfv"/>
+            <command name="glTexGeni"/>
+            <command name="glTexGeniv"/>
+            <command name="glFeedbackBuffer"/>
+            <command name="glSelectBuffer"/>
+            <command name="glRenderMode"/>
+            <command name="glInitNames"/>
+            <command name="glLoadName"/>
+            <command name="glPassThrough"/>
+            <command name="glPopName"/>
+            <command name="glPushName"/>
+            <command name="glClearAccum"/>
+            <command name="glClearIndex"/>
+            <command name="glIndexMask"/>
+            <command name="glAccum"/>
+            <command name="glPopAttrib"/>
+            <command name="glPushAttrib"/>
+            <command name="glMap1d"/>
+            <command name="glMap1f"/>
+            <command name="glMap2d"/>
+            <command name="glMap2f"/>
+            <command name="glMapGrid1d"/>
+            <command name="glMapGrid1f"/>
+            <command name="glMapGrid2d"/>
+            <command name="glMapGrid2f"/>
+            <command name="glEvalCoord1d"/>
+            <command name="glEvalCoord1dv"/>
+            <command name="glEvalCoord1f"/>
+            <command name="glEvalCoord1fv"/>
+            <command name="glEvalCoord2d"/>
+            <command name="glEvalCoord2dv"/>
+            <command name="glEvalCoord2f"/>
+            <command name="glEvalCoord2fv"/>
+            <command name="glEvalMesh1"/>
+            <command name="glEvalPoint1"/>
+            <command name="glEvalMesh2"/>
+            <command name="glEvalPoint2"/>
+            <command name="glAlphaFunc"/>
+            <command name="glPixelZoom"/>
+            <command name="glPixelTransferf"/>
+            <command name="glPixelTransferi"/>
+            <command name="glPixelMapfv"/>
+            <command name="glPixelMapuiv"/>
+            <command name="glPixelMapusv"/>
+            <command name="glCopyPixels"/>
+            <command name="glDrawPixels"/>
+            <command name="glGetClipPlane"/>
+            <command name="glGetLightfv"/>
+            <command name="glGetLightiv"/>
+            <command name="glGetMapdv"/>
+            <command name="glGetMapfv"/>
+            <command name="glGetMapiv"/>
+            <command name="glGetMaterialfv"/>
+            <command name="glGetMaterialiv"/>
+            <command name="glGetPixelMapfv"/>
+            <command name="glGetPixelMapuiv"/>
+            <command name="glGetPixelMapusv"/>
+            <command name="glGetPolygonStipple"/>
+            <command name="glGetTexEnvfv"/>
+            <command name="glGetTexEnviv"/>
+            <command name="glGetTexGendv"/>
+            <command name="glGetTexGenfv"/>
+            <command name="glGetTexGeniv"/>
+            <command name="glIsList"/>
+            <command name="glFrustum"/>
+            <command name="glLoadIdentity"/>
+            <command name="glLoadMatrixf"/>
+            <command name="glLoadMatrixd"/>
+            <command name="glMatrixMode"/>
+            <command name="glMultMatrixf"/>
+            <command name="glMultMatrixd"/>
+            <command name="glOrtho"/>
+            <command name="glPopMatrix"/>
+            <command name="glPushMatrix"/>
+            <command name="glRotated"/>
+            <command name="glRotatef"/>
+            <command name="glScaled"/>
+            <command name="glScalef"/>
+            <command name="glTranslated"/>
+            <command name="glTranslatef"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 1.1 features removed from GL 3.2">
+            <enum name="GL_CURRENT_BIT"/>
+            <enum name="GL_POINT_BIT"/>
+            <enum name="GL_LINE_BIT"/>
+            <enum name="GL_POLYGON_BIT"/>
+            <enum name="GL_POLYGON_STIPPLE_BIT"/>
+            <enum name="GL_PIXEL_MODE_BIT"/>
+            <enum name="GL_LIGHTING_BIT"/>
+            <enum name="GL_FOG_BIT"/>
+            <enum name="GL_ACCUM_BUFFER_BIT"/>
+            <enum name="GL_VIEWPORT_BIT"/>
+            <enum name="GL_TRANSFORM_BIT"/>
+            <enum name="GL_ENABLE_BIT"/>
+            <enum name="GL_HINT_BIT"/>
+            <enum name="GL_EVAL_BIT"/>
+            <enum name="GL_LIST_BIT"/>
+            <enum name="GL_TEXTURE_BIT"/>
+            <enum name="GL_SCISSOR_BIT"/>
+            <enum name="GL_ALL_ATTRIB_BITS"/>
+            <enum name="GL_CLIENT_PIXEL_STORE_BIT"/>
+            <enum name="GL_CLIENT_VERTEX_ARRAY_BIT"/>
+            <enum name="GL_CLIENT_ALL_ATTRIB_BITS"/>
+            <enum name="GL_QUAD_STRIP"/>
+            <enum name="GL_QUADS"/>
+            <enum name="GL_POLYGON"/>
+            <enum name="GL_ACCUM"/>
+            <enum name="GL_LOAD"/>
+            <enum name="GL_RETURN"/>
+            <enum name="GL_MULT"/>
+            <enum name="GL_ADD"/>
+            <enum name="GL_STACK_OVERFLOW"/>
+            <enum name="GL_STACK_UNDERFLOW"/>
+            <enum name="GL_AUX0"/>
+            <enum name="GL_AUX1"/>
+            <enum name="GL_AUX2"/>
+            <enum name="GL_AUX3"/>
+            <enum name="GL_2D"/>
+            <enum name="GL_3D"/>
+            <enum name="GL_3D_COLOR"/>
+            <enum name="GL_3D_COLOR_TEXTURE"/>
+            <enum name="GL_4D_COLOR_TEXTURE"/>
+            <enum name="GL_PASS_THROUGH_TOKEN"/>
+            <enum name="GL_POINT_TOKEN"/>
+            <enum name="GL_LINE_TOKEN"/>
+            <enum name="GL_POLYGON_TOKEN"/>
+            <enum name="GL_BITMAP_TOKEN"/>
+            <enum name="GL_DRAW_PIXEL_TOKEN"/>
+            <enum name="GL_COPY_PIXEL_TOKEN"/>
+            <enum name="GL_LINE_RESET_TOKEN"/>
+            <enum name="GL_EXP"/>
+            <enum name="GL_EXP2"/>
+            <enum name="GL_COEFF"/>
+            <enum name="GL_ORDER"/>
+            <enum name="GL_DOMAIN"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B"/>
+            <enum name="GL_PIXEL_MAP_A_TO_A"/>
+            <enum name="GL_VERTEX_ARRAY_POINTER"/>
+            <enum name="GL_NORMAL_ARRAY_POINTER"/>
+            <enum name="GL_COLOR_ARRAY_POINTER"/>
+            <enum name="GL_INDEX_ARRAY_POINTER"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_POINTER"/>
+            <enum name="GL_FEEDBACK_BUFFER_POINTER"/>
+            <enum name="GL_SELECTION_BUFFER_POINTER"/>
+            <enum name="GL_CURRENT_COLOR"/>
+            <enum name="GL_CURRENT_INDEX"/>
+            <enum name="GL_CURRENT_NORMAL"/>
+            <enum name="GL_CURRENT_TEXTURE_COORDS"/>
+            <enum name="GL_CURRENT_RASTER_COLOR"/>
+            <enum name="GL_CURRENT_RASTER_INDEX"/>
+            <enum name="GL_CURRENT_RASTER_TEXTURE_COORDS"/>
+            <enum name="GL_CURRENT_RASTER_POSITION"/>
+            <enum name="GL_CURRENT_RASTER_POSITION_VALID"/>
+            <enum name="GL_CURRENT_RASTER_DISTANCE"/>
+            <enum name="GL_POINT_SMOOTH"/>
+            <enum name="GL_LINE_STIPPLE"/>
+            <enum name="GL_LINE_STIPPLE_PATTERN"/>
+            <enum name="GL_LINE_STIPPLE_REPEAT"/>
+            <enum name="GL_LIST_MODE"/>
+            <enum name="GL_MAX_LIST_NESTING"/>
+            <enum name="GL_LIST_BASE"/>
+            <enum name="GL_LIST_INDEX"/>
+            <enum name="GL_POLYGON_STIPPLE"/>
+            <enum name="GL_EDGE_FLAG"/>
+            <enum name="GL_LIGHTING"/>
+            <enum name="GL_LIGHT_MODEL_LOCAL_VIEWER"/>
+            <enum name="GL_LIGHT_MODEL_TWO_SIDE"/>
+            <enum name="GL_LIGHT_MODEL_AMBIENT"/>
+            <enum name="GL_SHADE_MODEL"/>
+            <enum name="GL_COLOR_MATERIAL_FACE"/>
+            <enum name="GL_COLOR_MATERIAL_PARAMETER"/>
+            <enum name="GL_COLOR_MATERIAL"/>
+            <enum name="GL_FOG"/>
+            <enum name="GL_FOG_INDEX"/>
+            <enum name="GL_FOG_DENSITY"/>
+            <enum name="GL_FOG_START"/>
+            <enum name="GL_FOG_END"/>
+            <enum name="GL_FOG_MODE"/>
+            <enum name="GL_FOG_COLOR"/>
+            <enum name="GL_ACCUM_CLEAR_VALUE"/>
+            <enum name="GL_MATRIX_MODE"/>
+            <enum name="GL_NORMALIZE"/>
+            <enum name="GL_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MODELVIEW_MATRIX"/>
+            <enum name="GL_PROJECTION_MATRIX"/>
+            <enum name="GL_TEXTURE_MATRIX"/>
+            <enum name="GL_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_CLIENT_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_ALPHA_TEST"/>
+            <enum name="GL_ALPHA_TEST_FUNC"/>
+            <enum name="GL_ALPHA_TEST_REF"/>
+            <enum name="GL_INDEX_LOGIC_OP"/>
+            <enum name="GL_LOGIC_OP"/>
+            <enum name="GL_AUX_BUFFERS"/>
+            <enum name="GL_INDEX_CLEAR_VALUE"/>
+            <enum name="GL_INDEX_WRITEMASK"/>
+            <enum name="GL_INDEX_MODE"/>
+            <enum name="GL_RGBA_MODE"/>
+            <enum name="GL_RENDER_MODE"/>
+            <enum name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+            <enum name="GL_POINT_SMOOTH_HINT"/>
+            <enum name="GL_FOG_HINT"/>
+            <enum name="GL_TEXTURE_GEN_S"/>
+            <enum name="GL_TEXTURE_GEN_T"/>
+            <enum name="GL_TEXTURE_GEN_R"/>
+            <enum name="GL_TEXTURE_GEN_Q"/>
+            <enum name="GL_PIXEL_MAP_I_TO_I_SIZE"/>
+            <enum name="GL_PIXEL_MAP_S_TO_S_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_R_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_G_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_B_SIZE"/>
+            <enum name="GL_PIXEL_MAP_I_TO_A_SIZE"/>
+            <enum name="GL_PIXEL_MAP_R_TO_R_SIZE"/>
+            <enum name="GL_PIXEL_MAP_G_TO_G_SIZE"/>
+            <enum name="GL_PIXEL_MAP_B_TO_B_SIZE"/>
+            <enum name="GL_PIXEL_MAP_A_TO_A_SIZE"/>
+            <enum name="GL_MAP_COLOR"/>
+            <enum name="GL_MAP_STENCIL"/>
+            <enum name="GL_INDEX_SHIFT"/>
+            <enum name="GL_INDEX_OFFSET"/>
+            <enum name="GL_RED_SCALE"/>
+            <enum name="GL_RED_BIAS"/>
+            <enum name="GL_ZOOM_X"/>
+            <enum name="GL_ZOOM_Y"/>
+            <enum name="GL_GREEN_SCALE"/>
+            <enum name="GL_GREEN_BIAS"/>
+            <enum name="GL_BLUE_SCALE"/>
+            <enum name="GL_BLUE_BIAS"/>
+            <enum name="GL_ALPHA_SCALE"/>
+            <enum name="GL_ALPHA_BIAS"/>
+            <enum name="GL_DEPTH_SCALE"/>
+            <enum name="GL_DEPTH_BIAS"/>
+            <enum name="GL_MAX_EVAL_ORDER"/>
+            <enum name="GL_MAX_LIGHTS"/>
+            <enum name="GL_MAX_CLIP_PLANES"/>
+            <enum name="GL_MAX_PIXEL_MAP_TABLE"/>
+            <enum name="GL_MAX_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_MAX_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_MAX_NAME_STACK_DEPTH"/>
+            <enum name="GL_MAX_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_MAX_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MAX_CLIENT_ATTRIB_STACK_DEPTH"/>
+            <enum name="GL_INDEX_BITS"/>
+            <enum name="GL_RED_BITS"/>
+            <enum name="GL_GREEN_BITS"/>
+            <enum name="GL_BLUE_BITS"/>
+            <enum name="GL_ALPHA_BITS"/>
+            <enum name="GL_DEPTH_BITS"/>
+            <enum name="GL_STENCIL_BITS"/>
+            <enum name="GL_ACCUM_RED_BITS"/>
+            <enum name="GL_ACCUM_GREEN_BITS"/>
+            <enum name="GL_ACCUM_BLUE_BITS"/>
+            <enum name="GL_ACCUM_ALPHA_BITS"/>
+            <enum name="GL_NAME_STACK_DEPTH"/>
+            <enum name="GL_AUTO_NORMAL"/>
+            <enum name="GL_MAP1_COLOR_4"/>
+            <enum name="GL_MAP1_INDEX"/>
+            <enum name="GL_MAP1_NORMAL"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP1_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP1_VERTEX_3"/>
+            <enum name="GL_MAP1_VERTEX_4"/>
+            <enum name="GL_MAP2_COLOR_4"/>
+            <enum name="GL_MAP2_INDEX"/>
+            <enum name="GL_MAP2_NORMAL"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_1"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_2"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_3"/>
+            <enum name="GL_MAP2_TEXTURE_COORD_4"/>
+            <enum name="GL_MAP2_VERTEX_3"/>
+            <enum name="GL_MAP2_VERTEX_4"/>
+            <enum name="GL_MAP1_GRID_DOMAIN"/>
+            <enum name="GL_MAP1_GRID_SEGMENTS"/>
+            <enum name="GL_MAP2_GRID_DOMAIN"/>
+            <enum name="GL_MAP2_GRID_SEGMENTS"/>
+            <enum name="GL_FEEDBACK_BUFFER_SIZE"/>
+            <enum name="GL_FEEDBACK_BUFFER_TYPE"/>
+            <enum name="GL_SELECTION_BUFFER_SIZE"/>
+            <enum name="GL_VERTEX_ARRAY"/>
+            <enum name="GL_NORMAL_ARRAY"/>
+            <enum name="GL_COLOR_ARRAY"/>
+            <enum name="GL_INDEX_ARRAY"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY"/>
+            <enum name="GL_EDGE_FLAG_ARRAY"/>
+            <enum name="GL_VERTEX_ARRAY_SIZE"/>
+            <enum name="GL_VERTEX_ARRAY_TYPE"/>
+            <enum name="GL_VERTEX_ARRAY_STRIDE"/>
+            <enum name="GL_NORMAL_ARRAY_TYPE"/>
+            <enum name="GL_NORMAL_ARRAY_STRIDE"/>
+            <enum name="GL_COLOR_ARRAY_SIZE"/>
+            <enum name="GL_COLOR_ARRAY_TYPE"/>
+            <enum name="GL_COLOR_ARRAY_STRIDE"/>
+            <enum name="GL_INDEX_ARRAY_TYPE"/>
+            <enum name="GL_INDEX_ARRAY_STRIDE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_SIZE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_TYPE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_STRIDE"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_STRIDE"/>
+            <enum name="GL_TEXTURE_COMPONENTS"/>
+            <enum name="GL_TEXTURE_BORDER"/>
+            <enum name="GL_TEXTURE_LUMINANCE_SIZE"/>
+            <enum name="GL_TEXTURE_INTENSITY_SIZE"/>
+            <enum name="GL_TEXTURE_PRIORITY"/>
+            <enum name="GL_TEXTURE_RESIDENT"/>
+            <enum name="GL_AMBIENT"/>
+            <enum name="GL_DIFFUSE"/>
+            <enum name="GL_SPECULAR"/>
+            <enum name="GL_POSITION"/>
+            <enum name="GL_SPOT_DIRECTION"/>
+            <enum name="GL_SPOT_EXPONENT"/>
+            <enum name="GL_SPOT_CUTOFF"/>
+            <enum name="GL_CONSTANT_ATTENUATION"/>
+            <enum name="GL_LINEAR_ATTENUATION"/>
+            <enum name="GL_QUADRATIC_ATTENUATION"/>
+            <enum name="GL_COMPILE"/>
+            <enum name="GL_COMPILE_AND_EXECUTE"/>
+            <enum name="GL_2_BYTES"/>
+            <enum name="GL_3_BYTES"/>
+            <enum name="GL_4_BYTES"/>
+            <enum name="GL_EMISSION"/>
+            <enum name="GL_SHININESS"/>
+            <enum name="GL_AMBIENT_AND_DIFFUSE"/>
+            <enum name="GL_COLOR_INDEXES"/>
+            <enum name="GL_MODELVIEW"/>
+            <enum name="GL_PROJECTION"/>
+            <enum name="GL_COLOR_INDEX"/>
+            <enum name="GL_LUMINANCE"/>
+            <enum name="GL_LUMINANCE_ALPHA"/>
+            <enum name="GL_BITMAP"/>
+            <enum name="GL_RENDER"/>
+            <enum name="GL_FEEDBACK"/>
+            <enum name="GL_SELECT"/>
+            <enum name="GL_FLAT"/>
+            <enum name="GL_SMOOTH"/>
+            <enum name="GL_S"/>
+            <enum name="GL_T"/>
+            <enum name="GL_R"/>
+            <enum name="GL_Q"/>
+            <enum name="GL_MODULATE"/>
+            <enum name="GL_DECAL"/>
+            <enum name="GL_TEXTURE_ENV_MODE"/>
+            <enum name="GL_TEXTURE_ENV_COLOR"/>
+            <enum name="GL_TEXTURE_ENV"/>
+            <enum name="GL_EYE_LINEAR"/>
+            <enum name="GL_OBJECT_LINEAR"/>
+            <enum name="GL_SPHERE_MAP"/>
+            <enum name="GL_TEXTURE_GEN_MODE"/>
+            <enum name="GL_OBJECT_PLANE"/>
+            <enum name="GL_EYE_PLANE"/>
+            <enum name="GL_CLAMP"/>
+            <enum name="GL_ALPHA4"/>
+            <enum name="GL_ALPHA8"/>
+            <enum name="GL_ALPHA12"/>
+            <enum name="GL_ALPHA16"/>
+            <enum name="GL_LUMINANCE4"/>
+            <enum name="GL_LUMINANCE8"/>
+            <enum name="GL_LUMINANCE12"/>
+            <enum name="GL_LUMINANCE16"/>
+            <enum name="GL_LUMINANCE4_ALPHA4"/>
+            <enum name="GL_LUMINANCE6_ALPHA2"/>
+            <enum name="GL_LUMINANCE8_ALPHA8"/>
+            <enum name="GL_LUMINANCE12_ALPHA4"/>
+            <enum name="GL_LUMINANCE12_ALPHA12"/>
+            <enum name="GL_LUMINANCE16_ALPHA16"/>
+            <enum name="GL_INTENSITY"/>
+            <enum name="GL_INTENSITY4"/>
+            <enum name="GL_INTENSITY8"/>
+            <enum name="GL_INTENSITY12"/>
+            <enum name="GL_INTENSITY16"/>
+            <enum name="GL_V2F"/>
+            <enum name="GL_V3F"/>
+            <enum name="GL_C4UB_V2F"/>
+            <enum name="GL_C4UB_V3F"/>
+            <enum name="GL_C3F_V3F"/>
+            <enum name="GL_N3F_V3F"/>
+            <enum name="GL_C4F_N3F_V3F"/>
+            <enum name="GL_T2F_V3F"/>
+            <enum name="GL_T4F_V4F"/>
+            <enum name="GL_T2F_C4UB_V3F"/>
+            <enum name="GL_T2F_C3F_V3F"/>
+            <enum name="GL_T2F_N3F_V3F"/>
+            <enum name="GL_T2F_C4F_N3F_V3F"/>
+            <enum name="GL_T4F_C4F_N3F_V4F"/>
+            <enum name="GL_CLIP_PLANE0"/>
+            <enum name="GL_CLIP_PLANE1"/>
+            <enum name="GL_CLIP_PLANE2"/>
+            <enum name="GL_CLIP_PLANE3"/>
+            <enum name="GL_CLIP_PLANE4"/>
+            <enum name="GL_CLIP_PLANE5"/>
+            <enum name="GL_LIGHT0"/>
+            <enum name="GL_LIGHT1"/>
+            <enum name="GL_LIGHT2"/>
+            <enum name="GL_LIGHT3"/>
+            <enum name="GL_LIGHT4"/>
+            <enum name="GL_LIGHT5"/>
+            <enum name="GL_LIGHT6"/>
+            <enum name="GL_LIGHT7"/>
+            <command name="glArrayElement"/>
+            <command name="glColorPointer"/>
+            <command name="glDisableClientState"/>
+            <command name="glEdgeFlagPointer"/>
+            <command name="glEnableClientState"/>
+            <command name="glIndexPointer"/>
+            <command name="glGetPointerv"/>
+            <command name="glInterleavedArrays"/>
+            <command name="glNormalPointer"/>
+            <command name="glTexCoordPointer"/>
+            <command name="glVertexPointer"/>
+            <command name="glAreTexturesResident"/>
+            <command name="glPrioritizeTextures"/>
+            <command name="glIndexub"/>
+            <command name="glIndexubv"/>
+            <command name="glPopClientAttrib"/>
+            <command name="glPushClientAttrib"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 1.2 features removed from GL 3.2">
+            <enum name="GL_RESCALE_NORMAL"/>
+            <enum name="GL_LIGHT_MODEL_COLOR_CONTROL"/>
+            <enum name="GL_SINGLE_COLOR"/>
+            <enum name="GL_SEPARATE_SPECULAR_COLOR"/>
+            <enum name="GL_ALIASED_POINT_SIZE_RANGE"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 1.3 features removed from GL 3.2">
+            <enum name="GL_CLIENT_ACTIVE_TEXTURE"/>
+            <enum name="GL_MAX_TEXTURE_UNITS"/>
+            <enum name="GL_TRANSPOSE_MODELVIEW_MATRIX"/>
+            <enum name="GL_TRANSPOSE_PROJECTION_MATRIX"/>
+            <enum name="GL_TRANSPOSE_TEXTURE_MATRIX"/>
+            <enum name="GL_TRANSPOSE_COLOR_MATRIX"/>
+            <enum name="GL_MULTISAMPLE_BIT"/>
+            <enum name="GL_NORMAL_MAP"/>
+            <enum name="GL_REFLECTION_MAP"/>
+            <enum name="GL_COMPRESSED_ALPHA"/>
+            <enum name="GL_COMPRESSED_LUMINANCE"/>
+            <enum name="GL_COMPRESSED_LUMINANCE_ALPHA"/>
+            <enum name="GL_COMPRESSED_INTENSITY"/>
+            <enum name="GL_COMBINE"/>
+            <enum name="GL_COMBINE_RGB"/>
+            <enum name="GL_COMBINE_ALPHA"/>
+            <enum name="GL_SOURCE0_RGB"/>
+            <enum name="GL_SOURCE1_RGB"/>
+            <enum name="GL_SOURCE2_RGB"/>
+            <enum name="GL_SOURCE0_ALPHA"/>
+            <enum name="GL_SOURCE1_ALPHA"/>
+            <enum name="GL_SOURCE2_ALPHA"/>
+            <enum name="GL_OPERAND0_RGB"/>
+            <enum name="GL_OPERAND1_RGB"/>
+            <enum name="GL_OPERAND2_RGB"/>
+            <enum name="GL_OPERAND0_ALPHA"/>
+            <enum name="GL_OPERAND1_ALPHA"/>
+            <enum name="GL_OPERAND2_ALPHA"/>
+            <enum name="GL_RGB_SCALE"/>
+            <enum name="GL_ADD_SIGNED"/>
+            <enum name="GL_INTERPOLATE"/>
+            <enum name="GL_SUBTRACT"/>
+            <enum name="GL_CONSTANT"/>
+            <enum name="GL_PRIMARY_COLOR"/>
+            <enum name="GL_PREVIOUS"/>
+            <enum name="GL_DOT3_RGB"/>
+            <enum name="GL_DOT3_RGBA"/>
+            <command name="glClientActiveTexture"/>
+            <command name="glMultiTexCoord1d"/>
+            <command name="glMultiTexCoord1dv"/>
+            <command name="glMultiTexCoord1f"/>
+            <command name="glMultiTexCoord1fv"/>
+            <command name="glMultiTexCoord1i"/>
+            <command name="glMultiTexCoord1iv"/>
+            <command name="glMultiTexCoord1s"/>
+            <command name="glMultiTexCoord1sv"/>
+            <command name="glMultiTexCoord2d"/>
+            <command name="glMultiTexCoord2dv"/>
+            <command name="glMultiTexCoord2f"/>
+            <command name="glMultiTexCoord2fv"/>
+            <command name="glMultiTexCoord2i"/>
+            <command name="glMultiTexCoord2iv"/>
+            <command name="glMultiTexCoord2s"/>
+            <command name="glMultiTexCoord2sv"/>
+            <command name="glMultiTexCoord3d"/>
+            <command name="glMultiTexCoord3dv"/>
+            <command name="glMultiTexCoord3f"/>
+            <command name="glMultiTexCoord3fv"/>
+            <command name="glMultiTexCoord3i"/>
+            <command name="glMultiTexCoord3iv"/>
+            <command name="glMultiTexCoord3s"/>
+            <command name="glMultiTexCoord3sv"/>
+            <command name="glMultiTexCoord4d"/>
+            <command name="glMultiTexCoord4dv"/>
+            <command name="glMultiTexCoord4f"/>
+            <command name="glMultiTexCoord4fv"/>
+            <command name="glMultiTexCoord4i"/>
+            <command name="glMultiTexCoord4iv"/>
+            <command name="glMultiTexCoord4s"/>
+            <command name="glMultiTexCoord4sv"/>
+            <command name="glLoadTransposeMatrixf"/>
+            <command name="glLoadTransposeMatrixd"/>
+            <command name="glMultTransposeMatrixf"/>
+            <command name="glMultTransposeMatrixd"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 1.4 features removed from GL 3.2">
+            <enum name="GL_POINT_SIZE_MIN"/>
+            <enum name="GL_POINT_SIZE_MAX"/>
+            <enum name="GL_POINT_DISTANCE_ATTENUATION"/>
+            <enum name="GL_GENERATE_MIPMAP"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT"/>
+            <enum name="GL_FOG_COORDINATE_SOURCE"/>
+            <enum name="GL_FOG_COORDINATE"/>
+            <enum name="GL_FRAGMENT_DEPTH"/>
+            <enum name="GL_CURRENT_FOG_COORDINATE"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_TYPE"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_STRIDE"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_POINTER"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY"/>
+            <enum name="GL_COLOR_SUM"/>
+            <enum name="GL_CURRENT_SECONDARY_COLOR"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_SIZE"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_TYPE"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_STRIDE"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_POINTER"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY"/>
+            <enum name="GL_TEXTURE_FILTER_CONTROL"/>
+            <enum name="GL_DEPTH_TEXTURE_MODE"/>
+            <enum name="GL_COMPARE_R_TO_TEXTURE"/>
+            <command name="glFogCoordf"/>
+            <command name="glFogCoordfv"/>
+            <command name="glFogCoordd"/>
+            <command name="glFogCoorddv"/>
+            <command name="glFogCoordPointer"/>
+            <command name="glSecondaryColor3b"/>
+            <command name="glSecondaryColor3bv"/>
+            <command name="glSecondaryColor3d"/>
+            <command name="glSecondaryColor3dv"/>
+            <command name="glSecondaryColor3f"/>
+            <command name="glSecondaryColor3fv"/>
+            <command name="glSecondaryColor3i"/>
+            <command name="glSecondaryColor3iv"/>
+            <command name="glSecondaryColor3s"/>
+            <command name="glSecondaryColor3sv"/>
+            <command name="glSecondaryColor3ub"/>
+            <command name="glSecondaryColor3ubv"/>
+            <command name="glSecondaryColor3ui"/>
+            <command name="glSecondaryColor3uiv"/>
+            <command name="glSecondaryColor3us"/>
+            <command name="glSecondaryColor3usv"/>
+            <command name="glSecondaryColorPointer"/>
+            <command name="glWindowPos2d"/>
+            <command name="glWindowPos2dv"/>
+            <command name="glWindowPos2f"/>
+            <command name="glWindowPos2fv"/>
+            <command name="glWindowPos2i"/>
+            <command name="glWindowPos2iv"/>
+            <command name="glWindowPos2s"/>
+            <command name="glWindowPos2sv"/>
+            <command name="glWindowPos3d"/>
+            <command name="glWindowPos3dv"/>
+            <command name="glWindowPos3f"/>
+            <command name="glWindowPos3fv"/>
+            <command name="glWindowPos3i"/>
+            <command name="glWindowPos3iv"/>
+            <command name="glWindowPos3s"/>
+            <command name="glWindowPos3sv"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 1.5 features removed from GL 3.2">
+            <enum name="GL_VERTEX_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_NORMAL_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_COLOR_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_INDEX_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_EDGE_FLAG_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_WEIGHT_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_FOG_COORD_SRC"/>
+            <enum name="GL_FOG_COORD"/>
+            <enum name="GL_CURRENT_FOG_COORD"/>
+            <enum name="GL_FOG_COORD_ARRAY_TYPE"/>
+            <enum name="GL_FOG_COORD_ARRAY_STRIDE"/>
+            <enum name="GL_FOG_COORD_ARRAY_POINTER"/>
+            <enum name="GL_FOG_COORD_ARRAY"/>
+            <enum name="GL_FOG_COORD_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_SRC0_RGB"/>
+            <enum name="GL_SRC1_RGB"/>
+            <enum name="GL_SRC2_RGB"/>
+            <enum name="GL_SRC0_ALPHA"/>
+            <enum name="GL_SRC2_ALPHA"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 2.0 features removed from GL 3.2">
+            <enum name="GL_VERTEX_PROGRAM_TWO_SIDE"/>
+            <enum name="GL_POINT_SPRITE"/>
+            <enum name="GL_COORD_REPLACE"/>
+            <enum name="GL_MAX_TEXTURE_COORDS"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 2.1 features removed from GL 3.2">
+            <enum name="GL_CURRENT_RASTER_SECONDARY_COLOR"/>
+            <enum name="GL_SLUMINANCE_ALPHA"/>
+            <enum name="GL_SLUMINANCE8_ALPHA8"/>
+            <enum name="GL_SLUMINANCE"/>
+            <enum name="GL_SLUMINANCE8"/>
+            <enum name="GL_COMPRESSED_SLUMINANCE"/>
+            <enum name="GL_COMPRESSED_SLUMINANCE_ALPHA"/>
+        </remove>
+        <remove profile="core" comment="Compatibility-only GL 3.0 features removed from GL 3.2">
+            <enum name="GL_CLAMP_VERTEX_COLOR"/>
+            <enum name="GL_CLAMP_FRAGMENT_COLOR"/>
+            <enum name="GL_ALPHA_INTEGER"/>
+            <enum name="GL_TEXTURE_LUMINANCE_TYPE"/>
+            <enum name="GL_TEXTURE_INTENSITY_TYPE"/>
+        </remove>
+        <!-- Deprecated (not removed) in OpenGL 3.2 core;
+             deprecate tag not defined/supported yet
+          <deprecate profile="core">
+            <enum name="GL_MAX_VARYING_FLOATS"/>
+            <enum name="GL_MAX_VARYING_COMPONENTS"/>
+          </deprecate>
+        -->
+    </feature>
+    <feature api="gl" name="GL_VERSION_3_3" number="3.3">
+        <require>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR"/>
+        </require>
+        <require comment="Reuse ARB_blend_func_extended">
+            <enum name="GL_SRC1_COLOR"/>
+            <enum name="GL_ONE_MINUS_SRC1_COLOR"/>
+            <enum name="GL_ONE_MINUS_SRC1_ALPHA"/>
+            <enum name="GL_MAX_DUAL_SOURCE_DRAW_BUFFERS"/>
+            <command name="glBindFragDataLocationIndexed"/>
+            <command name="glGetFragDataIndex"/>
+        </require>
+        <require comment="Reuse ARB_explicit_attrib_location (none)">
+        </require>
+        <require comment="Reuse ARB_occlusion_query2">
+            <enum name="GL_ANY_SAMPLES_PASSED"/>
+        </require>
+        <require comment="Reuse ARB_sampler_objects">
+            <enum name="GL_SAMPLER_BINDING"/>
+            <command name="glGenSamplers"/>
+            <command name="glDeleteSamplers"/>
+            <command name="glIsSampler"/>
+            <command name="glBindSampler"/>
+            <command name="glSamplerParameteri"/>
+            <command name="glSamplerParameteriv"/>
+            <command name="glSamplerParameterf"/>
+            <command name="glSamplerParameterfv"/>
+            <command name="glSamplerParameterIiv"/>
+            <command name="glSamplerParameterIuiv"/>
+            <command name="glGetSamplerParameteriv"/>
+            <command name="glGetSamplerParameterIiv"/>
+            <command name="glGetSamplerParameterfv"/>
+            <command name="glGetSamplerParameterIuiv"/>
+        </require>
+        <require comment="Reuse ARB_shader_bit_encoding (none)">
+        </require>
+        <require comment="Reuse ARB_texture_rgb10_a2ui">
+            <enum name="GL_RGB10_A2UI"/>
+        </require>
+        <require comment="Reuse ARB_texture_swizzle">
+            <enum name="GL_TEXTURE_SWIZZLE_R"/>
+            <enum name="GL_TEXTURE_SWIZZLE_G"/>
+            <enum name="GL_TEXTURE_SWIZZLE_B"/>
+            <enum name="GL_TEXTURE_SWIZZLE_A"/>
+            <enum name="GL_TEXTURE_SWIZZLE_RGBA"/>
+        </require>
+        <require comment="Reuse ARB_timer_query">
+            <enum name="GL_TIME_ELAPSED"/>
+            <enum name="GL_TIMESTAMP"/>
+            <command name="glQueryCounter"/>
+            <command name="glGetQueryObjecti64v"/>
+            <command name="glGetQueryObjectui64v"/>
+        </require>
+        <require comment="Reuse ARB_vertex_type_2_10_10_10_rev">
+            <enum name="GL_INT_2_10_10_10_REV"/>
+            <command name="glVertexAttribDivisor"/>
+            <command name="glVertexAttribP1ui"/>
+            <command name="glVertexAttribP1uiv"/>
+            <command name="glVertexAttribP2ui"/>
+            <command name="glVertexAttribP2uiv"/>
+            <command name="glVertexAttribP3ui"/>
+            <command name="glVertexAttribP3uiv"/>
+            <command name="glVertexAttribP4ui"/>
+            <command name="glVertexAttribP4uiv"/>
+        </require>
+        <require profile="compatibility" comment="Reuse ARB_vertex_type_2_10_10_10_rev compatibility profile">
+            <command name="glVertexP2ui"/>
+            <command name="glVertexP2uiv"/>
+            <command name="glVertexP3ui"/>
+            <command name="glVertexP3uiv"/>
+            <command name="glVertexP4ui"/>
+            <command name="glVertexP4uiv"/>
+            <command name="glTexCoordP1ui"/>
+            <command name="glTexCoordP1uiv"/>
+            <command name="glTexCoordP2ui"/>
+            <command name="glTexCoordP2uiv"/>
+            <command name="glTexCoordP3ui"/>
+            <command name="glTexCoordP3uiv"/>
+            <command name="glTexCoordP4ui"/>
+            <command name="glTexCoordP4uiv"/>
+            <command name="glMultiTexCoordP1ui"/>
+            <command name="glMultiTexCoordP1uiv"/>
+            <command name="glMultiTexCoordP2ui"/>
+            <command name="glMultiTexCoordP2uiv"/>
+            <command name="glMultiTexCoordP3ui"/>
+            <command name="glMultiTexCoordP3uiv"/>
+            <command name="glMultiTexCoordP4ui"/>
+            <command name="glMultiTexCoordP4uiv"/>
+            <command name="glNormalP3ui"/>
+            <command name="glNormalP3uiv"/>
+            <command name="glColorP3ui"/>
+            <command name="glColorP3uiv"/>
+            <command name="glColorP4ui"/>
+            <command name="glColorP4uiv"/>
+            <command name="glSecondaryColorP3ui"/>
+            <command name="glSecondaryColorP3uiv"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_4_0" number="4.0">
+        <require>
+            <enum name="GL_SAMPLE_SHADING"/>
+            <enum name="GL_MIN_SAMPLE_SHADING_VALUE"/>
+            <enum name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET"/>
+            <enum name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_ARRAY"/>
+            <enum name="GL_TEXTURE_BINDING_CUBE_MAP_ARRAY"/>
+            <enum name="GL_PROXY_TEXTURE_CUBE_MAP_ARRAY"/>
+            <enum name="GL_SAMPLER_CUBE_MAP_ARRAY"/>
+            <enum name="GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW"/>
+            <enum name="GL_INT_SAMPLER_CUBE_MAP_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY"/>
+            <command name="glMinSampleShading"/>
+            <command name="glBlendEquationi"/>
+            <command name="glBlendEquationSeparatei"/>
+            <command name="glBlendFunci"/>
+            <command name="glBlendFuncSeparatei"/>
+        </require>
+        <require comment="Reuse ARB_draw_buffers_blend (none)">
+        </require>
+        <require comment="Reuse ARB_draw_indirect">
+            <enum name="GL_DRAW_INDIRECT_BUFFER"/>
+            <enum name="GL_DRAW_INDIRECT_BUFFER_BINDING"/>
+            <command name="glDrawArraysIndirect"/>
+            <command name="glDrawElementsIndirect"/>
+        </require>
+        <require comment="Reuse ARB_gpu_shader5">
+            <enum name="GL_GEOMETRY_SHADER_INVOCATIONS"/>
+            <enum name="GL_MAX_GEOMETRY_SHADER_INVOCATIONS"/>
+            <enum name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET"/>
+            <enum name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET"/>
+            <enum name="GL_FRAGMENT_INTERPOLATION_OFFSET_BITS"/>
+            <enum name="GL_MAX_VERTEX_STREAMS"/>
+        </require>
+        <require comment="Reuse ARB_gpu_shader_fp64">
+            <enum name="GL_DOUBLE_VEC2"/>
+            <enum name="GL_DOUBLE_VEC3"/>
+            <enum name="GL_DOUBLE_VEC4"/>
+            <enum name="GL_DOUBLE_MAT2"/>
+            <enum name="GL_DOUBLE_MAT3"/>
+            <enum name="GL_DOUBLE_MAT4"/>
+            <enum name="GL_DOUBLE_MAT2x3"/>
+            <enum name="GL_DOUBLE_MAT2x4"/>
+            <enum name="GL_DOUBLE_MAT3x2"/>
+            <enum name="GL_DOUBLE_MAT3x4"/>
+            <enum name="GL_DOUBLE_MAT4x2"/>
+            <enum name="GL_DOUBLE_MAT4x3"/>
+            <command name="glUniform1d"/>
+            <command name="glUniform2d"/>
+            <command name="glUniform3d"/>
+            <command name="glUniform4d"/>
+            <command name="glUniform1dv"/>
+            <command name="glUniform2dv"/>
+            <command name="glUniform3dv"/>
+            <command name="glUniform4dv"/>
+            <command name="glUniformMatrix2dv"/>
+            <command name="glUniformMatrix3dv"/>
+            <command name="glUniformMatrix4dv"/>
+            <command name="glUniformMatrix2x3dv"/>
+            <command name="glUniformMatrix2x4dv"/>
+            <command name="glUniformMatrix3x2dv"/>
+            <command name="glUniformMatrix3x4dv"/>
+            <command name="glUniformMatrix4x2dv"/>
+            <command name="glUniformMatrix4x3dv"/>
+            <command name="glGetUniformdv"/>
+        </require>
+        <require comment="Reuse ARB_shader_subroutine">
+            <enum name="GL_ACTIVE_SUBROUTINES"/>
+            <enum name="GL_ACTIVE_SUBROUTINE_UNIFORMS"/>
+            <enum name="GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS"/>
+            <enum name="GL_ACTIVE_SUBROUTINE_MAX_LENGTH"/>
+            <enum name="GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH"/>
+            <enum name="GL_MAX_SUBROUTINES"/>
+            <enum name="GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS"/>
+            <enum name="GL_NUM_COMPATIBLE_SUBROUTINES"/>
+            <enum name="GL_COMPATIBLE_SUBROUTINES"/>
+            <command name="glGetSubroutineUniformLocation"/>
+            <command name="glGetSubroutineIndex"/>
+            <command name="glGetActiveSubroutineUniformiv"/>
+            <command name="glGetActiveSubroutineUniformName"/>
+            <command name="glGetActiveSubroutineName"/>
+            <command name="glUniformSubroutinesuiv"/>
+            <command name="glGetUniformSubroutineuiv"/>
+            <command name="glGetProgramStageiv"/>
+        </require>
+        <require comment="Reuse ARB_tessellation_shader">
+            <enum name="GL_PATCHES"/>
+            <enum name="GL_PATCH_VERTICES"/>
+            <enum name="GL_PATCH_DEFAULT_INNER_LEVEL"/>
+            <enum name="GL_PATCH_DEFAULT_OUTER_LEVEL"/>
+            <enum name="GL_TESS_CONTROL_OUTPUT_VERTICES"/>
+            <enum name="GL_TESS_GEN_MODE"/>
+            <enum name="GL_TESS_GEN_SPACING"/>
+            <enum name="GL_TESS_GEN_VERTEX_ORDER"/>
+            <enum name="GL_TESS_GEN_POINT_MODE"/>
+            <enum name="GL_ISOLINES"/>
+            <enum name="GL_QUADS"/>
+            <enum name="GL_FRACTIONAL_ODD"/>
+            <enum name="GL_FRACTIONAL_EVEN"/>
+            <enum name="GL_MAX_PATCH_VERTICES"/>
+            <enum name="GL_MAX_TESS_GEN_LEVEL"/>
+            <enum name="GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_PATCH_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_TESS_CONTROL_INPUT_COMPONENTS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS"/>
+            <enum name="GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+            <enum name="GL_TESS_EVALUATION_SHADER"/>
+            <enum name="GL_TESS_CONTROL_SHADER"/>
+            <command name="glPatchParameteri"/>
+            <command name="glPatchParameterfv"/>
+        </require>
+        <require comment="Reuse ARB_texture_buffer_object_rgb32 (none)">
+        </require>
+        <require comment="Reuse ARB_texture_cube_map_array (none)">
+        </require>
+        <require comment="Reuse ARB_texture_gather (none)">
+        </require>
+        <require comment="Reuse ARB_texture_query_lod (none)">
+        </require>
+        <require comment="Reuse ARB_transform_feedback2">
+            <enum name="GL_TRANSFORM_FEEDBACK"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BINDING"/>
+            <command name="glBindTransformFeedback"/>
+            <command name="glDeleteTransformFeedbacks"/>
+            <command name="glGenTransformFeedbacks"/>
+            <command name="glIsTransformFeedback"/>
+            <command name="glPauseTransformFeedback"/>
+            <command name="glResumeTransformFeedback"/>
+            <command name="glDrawTransformFeedback"/>
+        </require>
+        <require comment="Reuse ARB_transform_feedback3">
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_BUFFERS"/>
+            <enum name="GL_MAX_VERTEX_STREAMS"/>
+            <command name="glDrawTransformFeedbackStream"/>
+            <command name="glBeginQueryIndexed"/>
+            <command name="glEndQueryIndexed"/>
+            <command name="glGetQueryIndexediv"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_4_1" number="4.1">
+        <require comment="Reuse tokens from ARB_ES2_compatibility">
+            <enum name="GL_FIXED"/>
+            <enum name="GL_IMPLEMENTATION_COLOR_READ_TYPE"/>
+            <enum name="GL_IMPLEMENTATION_COLOR_READ_FORMAT"/>
+            <enum name="GL_LOW_FLOAT"/>
+            <enum name="GL_MEDIUM_FLOAT"/>
+            <enum name="GL_HIGH_FLOAT"/>
+            <enum name="GL_LOW_INT"/>
+            <enum name="GL_MEDIUM_INT"/>
+            <enum name="GL_HIGH_INT"/>
+            <enum name="GL_SHADER_COMPILER"/>
+            <enum name="GL_SHADER_BINARY_FORMATS"/>
+            <enum name="GL_NUM_SHADER_BINARY_FORMATS"/>
+            <enum name="GL_MAX_VERTEX_UNIFORM_VECTORS"/>
+            <enum name="GL_MAX_VARYING_VECTORS"/>
+            <enum name="GL_MAX_FRAGMENT_UNIFORM_VECTORS"/>
+            <enum name="GL_RGB565"/>
+        </require>
+        <require comment="Reuse tokens from ARB_get_program_binary">
+            <enum name="GL_PROGRAM_BINARY_RETRIEVABLE_HINT"/>
+            <enum name="GL_PROGRAM_BINARY_LENGTH"/>
+            <enum name="GL_NUM_PROGRAM_BINARY_FORMATS"/>
+            <enum name="GL_PROGRAM_BINARY_FORMATS"/>
+        </require>
+        <require comment="Reuse tokens from ARB_separate_shader_objects">
+            <enum name="GL_VERTEX_SHADER_BIT"/>
+            <enum name="GL_FRAGMENT_SHADER_BIT"/>
+            <enum name="GL_GEOMETRY_SHADER_BIT"/>
+            <enum name="GL_TESS_CONTROL_SHADER_BIT"/>
+            <enum name="GL_TESS_EVALUATION_SHADER_BIT"/>
+            <enum name="GL_ALL_SHADER_BITS"/>
+            <enum name="GL_PROGRAM_SEPARABLE"/>
+            <enum name="GL_ACTIVE_PROGRAM"/>
+            <enum name="GL_PROGRAM_PIPELINE_BINDING"/>
+        </require>
+        <require comment="Reuse tokens from ARB_shader_precision (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already">
+        </require>
+        <require comment="Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already">
+            <enum name="GL_MAX_VIEWPORTS"/>
+            <enum name="GL_VIEWPORT_SUBPIXEL_BITS"/>
+            <enum name="GL_VIEWPORT_BOUNDS_RANGE"/>
+            <enum name="GL_LAYER_PROVOKING_VERTEX"/>
+            <enum name="GL_VIEWPORT_INDEX_PROVOKING_VERTEX"/>
+            <enum name="GL_UNDEFINED_VERTEX"/>
+        </require>
+        <require comment="Reuse commands from ARB_ES2_compatibility">
+            <command name="glReleaseShaderCompiler"/>
+            <command name="glShaderBinary"/>
+            <command name="glGetShaderPrecisionFormat"/>
+            <command name="glDepthRangef"/>
+            <command name="glClearDepthf"/>
+        </require>
+        <require comment="Reuse commands from ARB_get_program_binary">
+            <command name="glGetProgramBinary"/>
+            <command name="glProgramBinary"/>
+            <command name="glProgramParameteri"/>
+        </require>
+        <require comment="Reuse commands from ARB_separate_shader_objects">
+            <command name="glUseProgramStages"/>
+            <command name="glActiveShaderProgram"/>
+            <command name="glCreateShaderProgramv"/>
+            <command name="glBindProgramPipeline"/>
+            <command name="glDeleteProgramPipelines"/>
+            <command name="glGenProgramPipelines"/>
+            <command name="glIsProgramPipeline"/>
+            <command name="glGetProgramPipelineiv"/>
+            <command name="glProgramUniform1i"/>
+            <command name="glProgramUniform1iv"/>
+            <command name="glProgramUniform1f"/>
+            <command name="glProgramUniform1fv"/>
+            <command name="glProgramUniform1d"/>
+            <command name="glProgramUniform1dv"/>
+            <command name="glProgramUniform1ui"/>
+            <command name="glProgramUniform1uiv"/>
+            <command name="glProgramUniform2i"/>
+            <command name="glProgramUniform2iv"/>
+            <command name="glProgramUniform2f"/>
+            <command name="glProgramUniform2fv"/>
+            <command name="glProgramUniform2d"/>
+            <command name="glProgramUniform2dv"/>
+            <command name="glProgramUniform2ui"/>
+            <command name="glProgramUniform2uiv"/>
+            <command name="glProgramUniform3i"/>
+            <command name="glProgramUniform3iv"/>
+            <command name="glProgramUniform3f"/>
+            <command name="glProgramUniform3fv"/>
+            <command name="glProgramUniform3d"/>
+            <command name="glProgramUniform3dv"/>
+            <command name="glProgramUniform3ui"/>
+            <command name="glProgramUniform3uiv"/>
+            <command name="glProgramUniform4i"/>
+            <command name="glProgramUniform4iv"/>
+            <command name="glProgramUniform4f"/>
+            <command name="glProgramUniform4fv"/>
+            <command name="glProgramUniform4d"/>
+            <command name="glProgramUniform4dv"/>
+            <command name="glProgramUniform4ui"/>
+            <command name="glProgramUniform4uiv"/>
+            <command name="glProgramUniformMatrix2fv"/>
+            <command name="glProgramUniformMatrix3fv"/>
+            <command name="glProgramUniformMatrix4fv"/>
+            <command name="glProgramUniformMatrix2dv"/>
+            <command name="glProgramUniformMatrix3dv"/>
+            <command name="glProgramUniformMatrix4dv"/>
+            <command name="glProgramUniformMatrix2x3fv"/>
+            <command name="glProgramUniformMatrix3x2fv"/>
+            <command name="glProgramUniformMatrix2x4fv"/>
+            <command name="glProgramUniformMatrix4x2fv"/>
+            <command name="glProgramUniformMatrix3x4fv"/>
+            <command name="glProgramUniformMatrix4x3fv"/>
+            <command name="glProgramUniformMatrix2x3dv"/>
+            <command name="glProgramUniformMatrix3x2dv"/>
+            <command name="glProgramUniformMatrix2x4dv"/>
+            <command name="glProgramUniformMatrix4x2dv"/>
+            <command name="glProgramUniformMatrix3x4dv"/>
+            <command name="glProgramUniformMatrix4x3dv"/>
+            <command name="glValidateProgramPipeline"/>
+            <command name="glGetProgramPipelineInfoLog"/>
+        </require>
+        <require comment="Reuse commands from ARB_shader_precision (none)">
+        </require>
+        <require comment="Reuse commands from ARB_vertex_attrib_64bit">
+            <command name="glVertexAttribL1d"/>
+            <command name="glVertexAttribL2d"/>
+            <command name="glVertexAttribL3d"/>
+            <command name="glVertexAttribL4d"/>
+            <command name="glVertexAttribL1dv"/>
+            <command name="glVertexAttribL2dv"/>
+            <command name="glVertexAttribL3dv"/>
+            <command name="glVertexAttribL4dv"/>
+            <command name="glVertexAttribLPointer"/>
+            <command name="glGetVertexAttribLdv"/>
+        </require>
+        <require comment="Reuse commands from ARB_viewport_array">
+            <command name="glViewportArrayv"/>
+            <command name="glViewportIndexedf"/>
+            <command name="glViewportIndexedfv"/>
+            <command name="glScissorArrayv"/>
+            <command name="glScissorIndexed"/>
+            <command name="glScissorIndexedv"/>
+            <command name="glDepthRangeArrayv"/>
+            <command name="glDepthRangeIndexed"/>
+            <command name="glGetFloati_v"/>
+            <command name="glGetDoublei_v"/>
+        </require>
+    </feature>
+    <feature api="gl" name="GL_VERSION_4_2" number="4.2">
+        <require comment="Reuse tokens from ARB_base_instance (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_shading_language_420pack (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_transform_feedback_instanced (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_compressed_texture_pixel_storage">
+            <enum name="GL_UNPACK_COMPRESSED_BLOCK_WIDTH"/>
+            <enum name="GL_UNPACK_COMPRESSED_BLOCK_HEIGHT"/>
+            <enum name="GL_UNPACK_COMPRESSED_BLOCK_DEPTH"/>
+            <enum name="GL_UNPACK_COMPRESSED_BLOCK_SIZE"/>
+            <enum name="GL_PACK_COMPRESSED_BLOCK_WIDTH"/>
+            <enum name="GL_PACK_COMPRESSED_BLOCK_HEIGHT"/>
+            <enum name="GL_PACK_COMPRESSED_BLOCK_DEPTH"/>
+            <enum name="GL_PACK_COMPRESSED_BLOCK_SIZE"/>
+        </require>
+        <require comment="Reuse tokens from ARB_conservative_depth (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_internalformat_query">
+            <enum name="GL_NUM_SAMPLE_COUNTS"/>
+        </require>
+        <require comment="Reuse tokens from ARB_map_buffer_alignment">
+            <enum name="GL_MIN_MAP_BUFFER_ALIGNMENT"/>
+        </require>
+        <require comment="Reuse tokens from ARB_shader_atomic_counters">
+            <enum name="GL_ATOMIC_COUNTER_BUFFER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_BINDING"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_START"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_SIZE"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER"/>
+            <enum name="GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_VERTEX_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_GEOMETRY_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_FRAGMENT_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_COMBINED_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE"/>
+            <enum name="GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS"/>
+            <enum name="GL_ACTIVE_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX"/>
+            <enum name="GL_UNSIGNED_INT_ATOMIC_COUNTER"/>
+        </require>
+        <require comment="Reuse tokens from ARB_shader_image_load_store">
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT"/>
+            <enum name="GL_ELEMENT_ARRAY_BARRIER_BIT"/>
+            <enum name="GL_UNIFORM_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_FETCH_BARRIER_BIT"/>
+            <enum name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT"/>
+            <enum name="GL_COMMAND_BARRIER_BIT"/>
+            <enum name="GL_PIXEL_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_UPDATE_BARRIER_BIT"/>
+            <enum name="GL_BUFFER_UPDATE_BARRIER_BIT"/>
+            <enum name="GL_FRAMEBUFFER_BARRIER_BIT"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT"/>
+            <enum name="GL_ATOMIC_COUNTER_BARRIER_BIT"/>
+            <enum name="GL_ALL_BARRIER_BITS"/>
+            <enum name="GL_MAX_IMAGE_UNITS"/>
+            <enum name="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS"/>
+            <enum name="GL_IMAGE_BINDING_NAME"/>
+            <enum name="GL_IMAGE_BINDING_LEVEL"/>
+            <enum name="GL_IMAGE_BINDING_LAYERED"/>
+            <enum name="GL_IMAGE_BINDING_LAYER"/>
+            <enum name="GL_IMAGE_BINDING_ACCESS"/>
+            <enum name="GL_IMAGE_1D"/>
+            <enum name="GL_IMAGE_2D"/>
+            <enum name="GL_IMAGE_3D"/>
+            <enum name="GL_IMAGE_2D_RECT"/>
+            <enum name="GL_IMAGE_CUBE"/>
+            <enum name="GL_IMAGE_BUFFER"/>
+            <enum name="GL_IMAGE_1D_ARRAY"/>
+            <enum name="GL_IMAGE_2D_ARRAY"/>
+            <enum name="GL_IMAGE_CUBE_MAP_ARRAY"/>
+            <enum name="GL_IMAGE_2D_MULTISAMPLE"/>
+            <enum name="GL_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_INT_IMAGE_1D"/>
+            <enum name="GL_INT_IMAGE_2D"/>
+            <enum name="GL_INT_IMAGE_3D"/>
+            <enum name="GL_INT_IMAGE_2D_RECT"/>
+            <enum name="GL_INT_IMAGE_CUBE"/>
+            <enum name="GL_INT_IMAGE_BUFFER"/>
+            <enum name="GL_INT_IMAGE_1D_ARRAY"/>
+            <enum name="GL_INT_IMAGE_2D_ARRAY"/>
+            <enum name="GL_INT_IMAGE_CUBE_MAP_ARRAY"/>
+            <enum name="GL_INT_IMAGE_2D_MULTISAMPLE"/>
+            <enum name="GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_1D"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_3D"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D_RECT"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_CUBE"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_BUFFER"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_1D_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+            <enum name="GL_MAX_IMAGE_SAMPLES"/>
+            <enum name="GL_IMAGE_BINDING_FORMAT"/>
+            <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_TYPE"/>
+            <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE"/>
+            <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS"/>
+            <enum name="GL_MAX_VERTEX_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_GEOMETRY_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_FRAGMENT_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_COMBINED_IMAGE_UNIFORMS"/>
+        </require>
+        <require comment="Reuse tokens from ARB_shading_language_packing (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_texture_compression_bptc">
+            <enum name="GL_COMPRESSED_RGBA_BPTC_UNORM"/>
+            <enum name="GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM"/>
+            <enum name="GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT"/>
+            <enum name="GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT"/>
+        </require>
+        <require comment="Reuse tokens from ARB_texture_storage">
+            <enum name="GL_TEXTURE_IMMUTABLE_FORMAT"/>
+        </require>
+        <require comment="Reuse commands from ARB_base_instance">
+            <command name="glDrawArraysInstancedBaseInstance"/>
+            <command name="glDrawElementsInstancedBaseInstance"/>
+            <command name="glDrawElementsInstancedBaseVertexBaseInstance"/>
+        </require>
+        <require comment="Reuse commands from ARB_compressed_texture_pixel_storage (none)">
+        </require>
+        <require comment="Reuse commands from ARB_conservative_depth (none)">
+        </require>
+        <require comment="Reuse commands from ARB_internalformat_query">
+            <command name="glGetInternalformativ"/>
+        </require>
+        <require comment="Reuse commands from ARB_map_buffer_alignment (none)">
+        </require>
+        <require comment="Reuse commands from ARB_shader_atomic_counters">
+            <command name="glGetActiveAtomicCounterBufferiv"/>
+        </require>
+        <require comment="Reuse commands from ARB_shader_image_load_store">
+            <command name="glBindImageTexture"/>
+            <command name="glMemoryBarrier"/>
+        </require>
+        <require comment="Reuse commands from ARB_shading_language_420pack (none)">
+        </require>
+        <require comment="Reuse commands from ARB_shading_language_packing (none)">
+        </require>
+        <require comment="Reuse commands from ARB_texture_storage">
+            <command name="glTexStorage1D"/>
+            <command name="glTexStorage2D"/>
+            <command name="glTexStorage3D"/>
+        </require>
+        <require comment="Reuse commands from ARB_transform_feedback_instanced">
+            <command name="glDrawTransformFeedbackInstanced"/>
+            <command name="glDrawTransformFeedbackStreamInstanced"/>
+        </require>
+        <!-- Deprecated in OpenGL 4.2 core;
+             deprecate tag not defined/supported yet
+          <deprecate profile="core">
+            <enum name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_COMPRESSED_TEXTURE_FORMATS"/>
+          </deprecate>
+        -->
+    </feature>
+    <feature api="gl" name="GL_VERSION_4_3" number="4.3">
+        <require>
+            <enum name="GL_NUM_SHADING_LANGUAGE_VERSIONS"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_LONG"/>
+        </require>
+        <require comment="Reuse tokens from ARB_arrays_of_arrays (none, GLSL only)">
+        </require>
+        <require comment="Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only)">
+        </require>
+        <require comment="Reuse tokens from ARB_shader_image_size (none, GLSL only)">
+        </require>
+        <require comment="Reuse tokens from ARB_ES3_compatibility">
+            <enum name="GL_COMPRESSED_RGB8_ETC2"/>
+            <enum name="GL_COMPRESSED_SRGB8_ETC2"/>
+            <enum name="GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+            <enum name="GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+            <enum name="GL_COMPRESSED_RGBA8_ETC2_EAC"/>
+            <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"/>
+            <enum name="GL_COMPRESSED_R11_EAC"/>
+            <enum name="GL_COMPRESSED_SIGNED_R11_EAC"/>
+            <enum name="GL_COMPRESSED_RG11_EAC"/>
+            <enum name="GL_COMPRESSED_SIGNED_RG11_EAC"/>
+            <enum name="GL_PRIMITIVE_RESTART_FIXED_INDEX"/>
+            <enum name="GL_ANY_SAMPLES_PASSED_CONSERVATIVE"/>
+            <enum name="GL_MAX_ELEMENT_INDEX"/>
+        </require>
+        <require comment="Reuse tokens from ARB_clear_buffer_object (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_compute_shader">
+            <enum name="GL_COMPUTE_SHADER"/>
+            <enum name="GL_MAX_COMPUTE_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_COMPUTE_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_COMPUTE_SHARED_MEMORY_SIZE"/>
+            <enum name="GL_MAX_COMPUTE_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"/>
+            <enum name="GL_MAX_COMPUTE_WORK_GROUP_COUNT"/>
+            <enum name="GL_MAX_COMPUTE_WORK_GROUP_SIZE"/>
+            <enum name="GL_COMPUTE_WORK_GROUP_SIZE"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER"/>
+            <enum name="GL_DISPATCH_INDIRECT_BUFFER"/>
+            <enum name="GL_DISPATCH_INDIRECT_BUFFER_BINDING"/>
+        </require>
+        <require comment="Reuse tokens from ARB_copy_image (none)">
+        </require>
+        <require comment="Reuse tokens from KHR_debug">
+            <enum name="GL_DEBUG_OUTPUT_SYNCHRONOUS"/>
+            <enum name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH"/>
+            <enum name="GL_DEBUG_CALLBACK_FUNCTION"/>
+            <enum name="GL_DEBUG_CALLBACK_USER_PARAM"/>
+            <enum name="GL_DEBUG_SOURCE_API"/>
+            <enum name="GL_DEBUG_SOURCE_WINDOW_SYSTEM"/>
+            <enum name="GL_DEBUG_SOURCE_SHADER_COMPILER"/>
+            <enum name="GL_DEBUG_SOURCE_THIRD_PARTY"/>
+            <enum name="GL_DEBUG_SOURCE_APPLICATION"/>
+            <enum name="GL_DEBUG_SOURCE_OTHER"/>
+            <enum name="GL_DEBUG_TYPE_ERROR"/>
+            <enum name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR"/>
+            <enum name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR"/>
+            <enum name="GL_DEBUG_TYPE_PORTABILITY"/>
+            <enum name="GL_DEBUG_TYPE_PERFORMANCE"/>
+            <enum name="GL_DEBUG_TYPE_OTHER"/>
+            <enum name="GL_MAX_DEBUG_MESSAGE_LENGTH"/>
+            <enum name="GL_MAX_DEBUG_LOGGED_MESSAGES"/>
+            <enum name="GL_DEBUG_LOGGED_MESSAGES"/>
+            <enum name="GL_DEBUG_SEVERITY_HIGH"/>
+            <enum name="GL_DEBUG_SEVERITY_MEDIUM"/>
+            <enum name="GL_DEBUG_SEVERITY_LOW"/>
+            <enum name="GL_DEBUG_TYPE_MARKER"/>
+            <enum name="GL_DEBUG_TYPE_PUSH_GROUP"/>
+            <enum name="GL_DEBUG_TYPE_POP_GROUP"/>
+            <enum name="GL_DEBUG_SEVERITY_NOTIFICATION"/>
+            <enum name="GL_MAX_DEBUG_GROUP_STACK_DEPTH"/>
+            <enum name="GL_DEBUG_GROUP_STACK_DEPTH"/>
+            <enum name="GL_BUFFER"/>
+            <enum name="GL_SHADER"/>
+            <enum name="GL_PROGRAM"/>
+            <enum name="GL_VERTEX_ARRAY"/>
+            <enum name="GL_QUERY"/>
+            <enum name="GL_PROGRAM_PIPELINE"/>
+            <enum name="GL_SAMPLER"/>
+            <enum name="GL_MAX_LABEL_LENGTH"/>
+            <enum name="GL_DEBUG_OUTPUT"/>
+            <enum name="GL_CONTEXT_FLAG_DEBUG_BIT"/>
+        </require>
+        <require comment="Reuse tokens from ARB_explicit_uniform_location">
+            <enum name="GL_MAX_UNIFORM_LOCATIONS"/>
+        </require>
+        <require comment="Reuse tokens from ARB_framebuffer_no_attachments">
+            <enum name="GL_FRAMEBUFFER_DEFAULT_WIDTH"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_HEIGHT"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_LAYERS"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_SAMPLES"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS"/>
+            <enum name="GL_MAX_FRAMEBUFFER_WIDTH"/>
+            <enum name="GL_MAX_FRAMEBUFFER_HEIGHT"/>
+            <enum name="GL_MAX_FRAMEBUFFER_LAYERS"/>
+            <enum name="GL_MAX_FRAMEBUFFER_SAMPLES"/>
+        </require>
+        <require comment="Reuse tokens from ARB_internalformat_query2">
+            <enum name="GL_INTERNALFORMAT_SUPPORTED"/>
+            <enum name="GL_INTERNALFORMAT_PREFERRED"/>
+            <enum name="GL_INTERNALFORMAT_RED_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_GREEN_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_BLUE_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_ALPHA_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_DEPTH_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_STENCIL_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_SHARED_SIZE"/>
+            <enum name="GL_INTERNALFORMAT_RED_TYPE"/>
+            <enum name="GL_INTERNALFORMAT_GREEN_TYPE"/>
+            <enum name="GL_INTERNALFORMAT_BLUE_TYPE"/>
+            <enum name="GL_INTERNALFORMAT_ALPHA_TYPE"/>
+            <enum name="GL_INTERNALFORMAT_DEPTH_TYPE"/>
+            <enum name="GL_INTERNALFORMAT_STENCIL_TYPE"/>
+            <enum name="GL_MAX_WIDTH"/>
+            <enum name="GL_MAX_HEIGHT"/>
+            <enum name="GL_MAX_DEPTH"/>
+            <enum name="GL_MAX_LAYERS"/>
+            <enum name="GL_MAX_COMBINED_DIMENSIONS"/>
+            <enum name="GL_COLOR_COMPONENTS"/>
+            <enum name="GL_DEPTH_COMPONENTS"/>
+            <enum name="GL_STENCIL_COMPONENTS"/>
+            <enum name="GL_COLOR_RENDERABLE"/>
+            <enum name="GL_DEPTH_RENDERABLE"/>
+            <enum name="GL_STENCIL_RENDERABLE"/>
+            <enum name="GL_FRAMEBUFFER_RENDERABLE"/>
+            <enum name="GL_FRAMEBUFFER_RENDERABLE_LAYERED"/>
+            <enum name="GL_FRAMEBUFFER_BLEND"/>
+            <enum name="GL_READ_PIXELS"/>
+            <enum name="GL_READ_PIXELS_FORMAT"/>
+            <enum name="GL_READ_PIXELS_TYPE"/>
+            <enum name="GL_TEXTURE_IMAGE_FORMAT"/>
+            <enum name="GL_TEXTURE_IMAGE_TYPE"/>
+            <enum name="GL_GET_TEXTURE_IMAGE_FORMAT"/>
+            <enum name="GL_GET_TEXTURE_IMAGE_TYPE"/>
+            <enum name="GL_MIPMAP"/>
+            <enum name="GL_MANUAL_GENERATE_MIPMAP"/>
+            <enum name="GL_AUTO_GENERATE_MIPMAP"/>
+            <enum name="GL_COLOR_ENCODING"/>
+            <enum name="GL_SRGB_READ"/>
+            <enum name="GL_SRGB_WRITE"/>
+            <enum name="GL_FILTER"/>
+            <enum name="GL_VERTEX_TEXTURE"/>
+            <enum name="GL_TESS_CONTROL_TEXTURE"/>
+            <enum name="GL_TESS_EVALUATION_TEXTURE"/>
+            <enum name="GL_GEOMETRY_TEXTURE"/>
+            <enum name="GL_FRAGMENT_TEXTURE"/>
+            <enum name="GL_COMPUTE_TEXTURE"/>
+            <enum name="GL_TEXTURE_SHADOW"/>
+            <enum name="GL_TEXTURE_GATHER"/>
+            <enum name="GL_TEXTURE_GATHER_SHADOW"/>
+            <enum name="GL_SHADER_IMAGE_LOAD"/>
+            <enum name="GL_SHADER_IMAGE_STORE"/>
+            <enum name="GL_SHADER_IMAGE_ATOMIC"/>
+            <enum name="GL_IMAGE_TEXEL_SIZE"/>
+            <enum name="GL_IMAGE_COMPATIBILITY_CLASS"/>
+            <enum name="GL_IMAGE_PIXEL_FORMAT"/>
+            <enum name="GL_IMAGE_PIXEL_TYPE"/>
+            <enum name="GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST"/>
+            <enum name="GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST"/>
+            <enum name="GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE"/>
+            <enum name="GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE"/>
+            <enum name="GL_TEXTURE_COMPRESSED_BLOCK_WIDTH"/>
+            <enum name="GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT"/>
+            <enum name="GL_TEXTURE_COMPRESSED_BLOCK_SIZE"/>
+            <enum name="GL_CLEAR_BUFFER"/>
+            <enum name="GL_TEXTURE_VIEW"/>
+            <enum name="GL_VIEW_COMPATIBILITY_CLASS"/>
+            <enum name="GL_FULL_SUPPORT"/>
+            <enum name="GL_CAVEAT_SUPPORT"/>
+            <enum name="GL_IMAGE_CLASS_4_X_32"/>
+            <enum name="GL_IMAGE_CLASS_2_X_32"/>
+            <enum name="GL_IMAGE_CLASS_1_X_32"/>
+            <enum name="GL_IMAGE_CLASS_4_X_16"/>
+            <enum name="GL_IMAGE_CLASS_2_X_16"/>
+            <enum name="GL_IMAGE_CLASS_1_X_16"/>
+            <enum name="GL_IMAGE_CLASS_4_X_8"/>
+            <enum name="GL_IMAGE_CLASS_2_X_8"/>
+            <enum name="GL_IMAGE_CLASS_1_X_8"/>
+            <enum name="GL_IMAGE_CLASS_11_11_10"/>
+            <enum name="GL_IMAGE_CLASS_10_10_10_2"/>
+            <enum name="GL_VIEW_CLASS_128_BITS"/>
+            <enum name="GL_VIEW_CLASS_96_BITS"/>
+            <enum name="GL_VIEW_CLASS_64_BITS"/>
+            <enum name="GL_VIEW_CLASS_48_BITS"/>
+            <enum name="GL_VIEW_CLASS_32_BITS"/>
+            <enum name="GL_VIEW_CLASS_24_BITS"/>
+            <enum name="GL_VIEW_CLASS_16_BITS"/>
+            <enum name="GL_VIEW_CLASS_8_BITS"/>
+            <enum name="GL_VIEW_CLASS_S3TC_DXT1_RGB"/>
+            <enum name="GL_VIEW_CLASS_S3TC_DXT1_RGBA"/>
+            <enum name="GL_VIEW_CLASS_S3TC_DXT3_RGBA"/>
+            <enum name="GL_VIEW_CLASS_S3TC_DXT5_RGBA"/>
+            <enum name="GL_VIEW_CLASS_RGTC1_RED"/>
+            <enum name="GL_VIEW_CLASS_RGTC2_RG"/>
+            <enum name="GL_VIEW_CLASS_BPTC_UNORM"/>
+            <enum name="GL_VIEW_CLASS_BPTC_FLOAT"/>
+        </require>
+        <require comment="Reuse tokens from ARB_invalidate_subdata (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_multi_draw_indirect (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_program_interface_query">
+            <enum name="GL_UNIFORM"/>
+            <enum name="GL_UNIFORM_BLOCK"/>
+            <enum name="GL_PROGRAM_INPUT"/>
+            <enum name="GL_PROGRAM_OUTPUT"/>
+            <enum name="GL_BUFFER_VARIABLE"/>
+            <enum name="GL_SHADER_STORAGE_BLOCK"/>
+            <enum name="GL_VERTEX_SUBROUTINE"/>
+            <enum name="GL_TESS_CONTROL_SUBROUTINE"/>
+            <enum name="GL_TESS_EVALUATION_SUBROUTINE"/>
+            <enum name="GL_GEOMETRY_SUBROUTINE"/>
+            <enum name="GL_FRAGMENT_SUBROUTINE"/>
+            <enum name="GL_COMPUTE_SUBROUTINE"/>
+            <enum name="GL_VERTEX_SUBROUTINE_UNIFORM"/>
+            <enum name="GL_TESS_CONTROL_SUBROUTINE_UNIFORM"/>
+            <enum name="GL_TESS_EVALUATION_SUBROUTINE_UNIFORM"/>
+            <enum name="GL_GEOMETRY_SUBROUTINE_UNIFORM"/>
+            <enum name="GL_FRAGMENT_SUBROUTINE_UNIFORM"/>
+            <enum name="GL_COMPUTE_SUBROUTINE_UNIFORM"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_VARYING"/>
+            <enum name="GL_ACTIVE_RESOURCES"/>
+            <enum name="GL_MAX_NAME_LENGTH"/>
+            <enum name="GL_MAX_NUM_ACTIVE_VARIABLES"/>
+            <enum name="GL_MAX_NUM_COMPATIBLE_SUBROUTINES"/>
+            <enum name="GL_NAME_LENGTH"/>
+            <enum name="GL_TYPE"/>
+            <enum name="GL_ARRAY_SIZE"/>
+            <enum name="GL_OFFSET"/>
+            <enum name="GL_BLOCK_INDEX"/>
+            <enum name="GL_ARRAY_STRIDE"/>
+            <enum name="GL_MATRIX_STRIDE"/>
+            <enum name="GL_IS_ROW_MAJOR"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_INDEX"/>
+            <enum name="GL_BUFFER_BINDING"/>
+            <enum name="GL_BUFFER_DATA_SIZE"/>
+            <enum name="GL_NUM_ACTIVE_VARIABLES"/>
+            <enum name="GL_ACTIVE_VARIABLES"/>
+            <enum name="GL_REFERENCED_BY_VERTEX_SHADER"/>
+            <enum name="GL_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+            <enum name="GL_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+            <enum name="GL_REFERENCED_BY_GEOMETRY_SHADER"/>
+            <enum name="GL_REFERENCED_BY_FRAGMENT_SHADER"/>
+            <enum name="GL_REFERENCED_BY_COMPUTE_SHADER"/>
+            <enum name="GL_TOP_LEVEL_ARRAY_SIZE"/>
+            <enum name="GL_TOP_LEVEL_ARRAY_STRIDE"/>
+            <enum name="GL_LOCATION"/>
+            <enum name="GL_LOCATION_INDEX"/>
+            <enum name="GL_IS_PER_PATCH"/>
+        </require>
+        <require comment="Reuse tokens from ARB_robust_buffer_access_behavior (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_shader_storage_buffer_object">
+            <enum name="GL_SHADER_STORAGE_BUFFER"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_BINDING"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_START"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_SIZE"/>
+            <enum name="GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS"/>
+            <enum name="GL_MAX_SHADER_STORAGE_BLOCK_SIZE"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT"/>
+            <enum name="GL_SHADER_STORAGE_BARRIER_BIT"/>
+            <enum name="GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES"/>
+        </require>
+        <require comment="Reuse tokens from ARB_stencil_texturing">
+            <enum name="GL_DEPTH_STENCIL_TEXTURE_MODE"/>
+        </require>
+        <require comment="Reuse tokens from ARB_texture_buffer_range">
+            <enum name="GL_TEXTURE_BUFFER_OFFSET"/>
+            <enum name="GL_TEXTURE_BUFFER_SIZE"/>
+            <enum name="GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT"/>
+        </require>
+        <require comment="Reuse tokens from ARB_texture_query_levels (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_texture_storage_multisample (none)">
+        </require>
+        <require comment="Reuse tokens from ARB_texture_view">
+            <enum name="GL_TEXTURE_VIEW_MIN_LEVEL"/>
+            <enum name="GL_TEXTURE_VIEW_NUM_LEVELS"/>
+            <enum name="GL_TEXTURE_VIEW_MIN_LAYER"/>
+            <enum name="GL_TEXTURE_VIEW_NUM_LAYERS"/>
+            <enum name="GL_TEXTURE_IMMUTABLE_LEVELS"/>
+        </require>
+        <require comment="Reuse tokens from ARB_vertex_attrib_binding">
+            <enum name="GL_VERTEX_ATTRIB_BINDING"/>
+            <enum name="GL_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+            <enum name="GL_VERTEX_BINDING_DIVISOR"/>
+            <enum name="GL_VERTEX_BINDING_OFFSET"/>
+            <enum name="GL_VERTEX_BINDING_STRIDE"/>
+            <enum name="GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+            <enum name="GL_MAX_VERTEX_ATTRIB_BINDINGS"/>
+            <enum name="GL_VERTEX_BINDING_BUFFER" comment="Added in 2013/10/22 update to the spec"/>
+        </require>
+        <require comment="Reuse commands from ARB_arrays_of_arrays (none, GLSL only)">
+        </require>
+        <require comment="Reuse commands from ARB_clear_buffer_object">
+            <command name="glClearBufferData"/>
+            <command name="glClearBufferSubData"/>
+        </require>
+        <require comment="Reuse commands from ARB_compute_shader">
+            <command name="glDispatchCompute"/>
+            <command name="glDispatchComputeIndirect"/>
+        </require>
+        <require comment="Reuse commands from ARB_copy_image">
+            <command name="glCopyImageSubData"/>
+        </require>
+        <require comment="Reuse commands from ARB_ES3_compatibility (none)">
+        </require>
+        <require comment="Reuse commands from ARB_explicit_uniform_location (none)">
+        </require>
+        <require comment="Reuse commands from ARB_fragment_layer_viewport (none, GLSL only)">
+        </require>
+        <require comment="Reuse commands from ARB_framebuffer_no_attachments">
+            <command name="glFramebufferParameteri"/>
+            <command name="glGetFramebufferParameteriv"/>
+        </require>
+        <require comment="Reuse commands from ARB_internalformat_query2">
+            <command name="glGetInternalformati64v"/>
+        </require>
+        <require comment="Reuse commands from ARB_invalidate_subdata">
+            <command name="glInvalidateTexSubImage"/>
+            <command name="glInvalidateTexImage"/>
+            <command name="glInvalidateBufferSubData"/>
+            <command name="glInvalidateBufferData"/>
+            <command name="glInvalidateFramebuffer"/>
+            <command name="glInvalidateSubFramebuffer"/>
+        </require>
+        <require comment="Reuse commands from ARB_multi_draw_indirect">
+            <command name="glMultiDrawArraysIndirect"/>
+            <command name="glMultiDrawElementsIndirect"/>
+        </require>
+        <require comment="Reuse commands from ARB_program_interface_query">
+            <command name="glGetProgramInterfaceiv"/>
+            <command name="glGetProgramResourceIndex"/>
+            <command name="glGetProgramResourceName"/>
+            <command name="glGetProgramResourceiv"/>
+            <command name="glGetProgramResourceLocation"/>
+            <command name="glGetProgramResourceLocationIndex"/>
+        </require>
+        <require comment="Reuse commands from ARB_robust_buffer_access_behavior (none)">
+        </require>
+        <require comment="Reuse commands from ARB_shader_image_size (none, GLSL only)">
+        </require>
+        <require comment="Reuse commands from ARB_shader_storage_buffer_object">
+            <command name="glShaderStorageBlockBinding"/>
+        </require>
+        <require comment="Reuse commands from ARB_stencil_texturing (none)">
+        </require>
+        <require comment="Reuse commands from ARB_texture_buffer_range">
+            <command name="glTexBufferRange"/>
+        </require>
+        <require comment="Reuse commands from ARB_texture_query_levels (none)">
+        </require>
+        <require comment="Reuse commands from ARB_texture_storage_multisample">
+            <command name="glTexStorage2DMultisample"/>
+            <command name="glTexStorage3DMultisample"/>
+        </require>
+        <require comment="Reuse commands from ARB_texture_view">
+            <command name="glTextureView"/>
+        </require>
+        <require comment="Reuse commands from ARB_vertex_attrib_binding">
+            <command name="glBindVertexBuffer"/>
+            <command name="glVertexAttribFormat"/>
+            <command name="glVertexAttribIFormat"/>
+            <command name="glVertexAttribLFormat"/>
+            <command name="glVertexAttribBinding"/>
+            <command name="glVertexBindingDivisor"/>
+        </require>
+        <require comment="Reuse commands from KHR_debug (includes ARB_debug_output commands promoted to KHR without suffixes)">
+            <command name="glDebugMessageControl"/>
+            <command name="glDebugMessageInsert"/>
+            <command name="glDebugMessageCallback"/>
+            <command name="glGetDebugMessageLog"/>
+            <command name="glPushDebugGroup"/>
+            <command name="glPopDebugGroup"/>
+            <command name="glObjectLabel"/>
+            <command name="glGetObjectLabel"/>
+            <command name="glObjectPtrLabel"/>
+            <command name="glGetObjectPtrLabel"/>
+            <command name="glGetPointerv"/>
+        </require>
+        <require profile="compatibility" comment="KHR_debug functionality not supported in core profile">
+            <enum name="GL_DISPLAY_LIST"/>
+        </require>
+        <require profile="core" comment="Restore functionality removed in GL 3.2 core to GL 4.3. Needed for debug interface.">
+            <enum name="GL_STACK_UNDERFLOW"/>
+            <enum name="GL_STACK_OVERFLOW"/>
+            <command name="glGetPointerv"/>
+        </require>
+        <!-- Deprecated in OpenGL 4.3 core;
+             deprecate tag not defined/supported yet
+          <deprecate profile="core">
+            <enum name="GL_UNPACK_LSB_FIRST"/>
+            <enum name="GL_PACK_LSB_FIRST"/>
+          </deprecate>
+        -->
+    </feature>
+    <feature api="gl" name="GL_VERSION_4_4" number="4.4">
+        <require>
+            <enum name="GL_MAX_VERTEX_ATTRIB_STRIDE"/>
+            <enum name="GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED"/>
+            <enum name="GL_TEXTURE_BUFFER_BINDING"/>
+        </require>
+        <require comment="Reuse GL_ARB_buffer_storage">
+            <enum name="GL_MAP_READ_BIT"/>
+            <enum name="GL_MAP_WRITE_BIT"/>
+            <enum name="GL_MAP_PERSISTENT_BIT"/>
+            <enum name="GL_MAP_COHERENT_BIT"/>
+            <enum name="GL_DYNAMIC_STORAGE_BIT"/>
+            <enum name="GL_CLIENT_STORAGE_BIT"/>
+            <enum name="GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_BUFFER_IMMUTABLE_STORAGE"/>
+            <enum name="GL_BUFFER_STORAGE_FLAGS"/>
+            <command name="glBufferStorage"/>
+        </require>
+        <require comment="Reuse GL_ARB_clear_texture">
+            <enum name="GL_CLEAR_TEXTURE"/>
+            <command name="glClearTexImage"/>
+            <command name="glClearTexSubImage"/>
+        </require>
+        <require comment="Reuse GL_ARB_enhanced_layouts">
+            <enum name="GL_LOCATION_COMPONENT"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_INDEX"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE"/>
+        </require>
+        <require comment="Reuse GL_ARB_multi_bind (none)">
+            <command name="glBindBuffersBase"/>
+            <command name="glBindBuffersRange"/>
+            <command name="glBindTextures"/>
+            <command name="glBindSamplers"/>
+            <command name="glBindImageTextures"/>
+            <command name="glBindVertexBuffers"/>
+        </require>
+        <require comment="Reuse GL_ARB_query_buffer_object">
+            <enum name="GL_QUERY_BUFFER"/>
+            <enum name="GL_QUERY_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_QUERY_BUFFER_BINDING"/>
+            <enum name="GL_QUERY_RESULT_NO_WAIT"/>
+        </require>
+        <require comment="Reuse GL_ARB_texture_mirror_clamp_to_edge">
+            <enum name="GL_MIRROR_CLAMP_TO_EDGE"/>
+        </require>
+        <require comment="Reuse GL_ARB_texture_stencil8">
+            <enum name="GL_STENCIL_INDEX"/>
+            <enum name="GL_STENCIL_INDEX8"/>
+        </require>
+        <require comment="Reuse GL_ARB_vertex_type_10f_11f_11f_rev">
+            <enum name="GL_UNSIGNED_INT_10F_11F_11F_REV"/>
+        </require>
+    </feature>
+
+    <!-- SECTION: OpenGL ES 1.0/1.1 API interface definitions. -->
+    <feature api="gles1" name="GL_VERSION_ES_CM_1_0" number="1.0">
+        <require>
+            <!-- Additional API definition macros - ES 1.0/1.1, common/common-lite all in one header -->
+            <enum name="GL_VERSION_ES_CL_1_0"/>
+            <enum name="GL_VERSION_ES_CM_1_1"/>
+            <enum name="GL_VERSION_ES_CL_1_1"/>
+            <type name="GLvoid" comment="No longer used in headers"/>
+            <enum name="GL_DEPTH_BUFFER_BIT"/>
+            <enum name="GL_STENCIL_BUFFER_BIT"/>
+            <enum name="GL_COLOR_BUFFER_BIT"/>
+            <enum name="GL_FALSE"/>
+            <enum name="GL_TRUE"/>
+            <enum name="GL_POINTS"/>
+            <enum name="GL_LINES"/>
+            <enum name="GL_LINE_LOOP"/>
+            <enum name="GL_LINE_STRIP"/>
+            <enum name="GL_TRIANGLES"/>
+            <enum name="GL_TRIANGLE_STRIP"/>
+            <enum name="GL_TRIANGLE_FAN"/>
+            <enum name="GL_NEVER"/>
+            <enum name="GL_LESS"/>
+            <enum name="GL_EQUAL"/>
+            <enum name="GL_LEQUAL"/>
+            <enum name="GL_GREATER"/>
+            <enum name="GL_NOTEQUAL"/>
+            <enum name="GL_GEQUAL"/>
+            <enum name="GL_ALWAYS"/>
+            <enum name="GL_ZERO"/>
+            <enum name="GL_ONE"/>
+            <enum name="GL_SRC_COLOR"/>
+            <enum name="GL_ONE_MINUS_SRC_COLOR"/>
+            <enum name="GL_SRC_ALPHA"/>
+            <enum name="GL_ONE_MINUS_SRC_ALPHA"/>
+            <enum name="GL_DST_ALPHA"/>
+            <enum name="GL_ONE_MINUS_DST_ALPHA"/>
+            <enum name="GL_DST_COLOR"/>
+            <enum name="GL_ONE_MINUS_DST_COLOR"/>
+            <enum name="GL_SRC_ALPHA_SATURATE"/>
+            <enum name="GL_CLIP_PLANE0"/>
+            <enum name="GL_CLIP_PLANE1"/>
+            <enum name="GL_CLIP_PLANE2"/>
+            <enum name="GL_CLIP_PLANE3"/>
+            <enum name="GL_CLIP_PLANE4"/>
+            <enum name="GL_CLIP_PLANE5"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_BACK"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+            <enum name="GL_FOG"/>
+            <enum name="GL_LIGHTING"/>
+            <enum name="GL_TEXTURE_2D"/>
+            <enum name="GL_CULL_FACE"/>
+            <enum name="GL_ALPHA_TEST"/>
+            <enum name="GL_BLEND"/>
+            <enum name="GL_COLOR_LOGIC_OP"/>
+            <enum name="GL_DITHER"/>
+            <enum name="GL_STENCIL_TEST"/>
+            <enum name="GL_DEPTH_TEST"/>
+            <enum name="GL_POINT_SMOOTH"/>
+            <enum name="GL_LINE_SMOOTH"/>
+            <enum name="GL_SCISSOR_TEST"/>
+            <enum name="GL_COLOR_MATERIAL"/>
+            <enum name="GL_NORMALIZE"/>
+            <enum name="GL_RESCALE_NORMAL"/>
+            <enum name="GL_VERTEX_ARRAY"/>
+            <enum name="GL_NORMAL_ARRAY"/>
+            <enum name="GL_COLOR_ARRAY"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY"/>
+            <enum name="GL_MULTISAMPLE"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_ONE"/>
+            <enum name="GL_SAMPLE_COVERAGE"/>
+            <enum name="GL_NO_ERROR"/>
+            <enum name="GL_INVALID_ENUM"/>
+            <enum name="GL_INVALID_VALUE"/>
+            <enum name="GL_INVALID_OPERATION"/>
+            <enum name="GL_STACK_OVERFLOW"/>
+            <enum name="GL_STACK_UNDERFLOW"/>
+            <enum name="GL_OUT_OF_MEMORY"/>
+            <enum name="GL_EXP"/>
+            <enum name="GL_EXP2"/>
+            <enum name="GL_FOG_DENSITY"/>
+            <enum name="GL_FOG_START"/>
+            <enum name="GL_FOG_END"/>
+            <enum name="GL_FOG_MODE"/>
+            <enum name="GL_FOG_COLOR"/>
+            <enum name="GL_CW"/>
+            <enum name="GL_CCW"/>
+            <enum name="GL_CURRENT_COLOR"/>
+            <enum name="GL_CURRENT_NORMAL"/>
+            <enum name="GL_CURRENT_TEXTURE_COORDS"/>
+            <enum name="GL_POINT_SIZE"/>
+            <enum name="GL_POINT_SIZE_MIN"/>
+            <enum name="GL_POINT_SIZE_MAX"/>
+            <enum name="GL_POINT_FADE_THRESHOLD_SIZE"/>
+            <enum name="GL_POINT_DISTANCE_ATTENUATION"/>
+            <enum name="GL_SMOOTH_POINT_SIZE_RANGE"/>
+            <enum name="GL_LINE_WIDTH"/>
+            <enum name="GL_SMOOTH_LINE_WIDTH_RANGE"/>
+            <enum name="GL_ALIASED_POINT_SIZE_RANGE"/>
+            <enum name="GL_ALIASED_LINE_WIDTH_RANGE"/>
+            <enum name="GL_CULL_FACE_MODE"/>
+            <enum name="GL_FRONT_FACE"/>
+            <enum name="GL_SHADE_MODEL"/>
+            <enum name="GL_DEPTH_RANGE"/>
+            <enum name="GL_DEPTH_WRITEMASK"/>
+            <enum name="GL_DEPTH_CLEAR_VALUE"/>
+            <enum name="GL_DEPTH_FUNC"/>
+            <enum name="GL_STENCIL_CLEAR_VALUE"/>
+            <enum name="GL_STENCIL_FUNC"/>
+            <enum name="GL_STENCIL_VALUE_MASK"/>
+            <enum name="GL_STENCIL_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_PASS"/>
+            <enum name="GL_STENCIL_REF"/>
+            <enum name="GL_STENCIL_WRITEMASK"/>
+            <enum name="GL_MATRIX_MODE"/>
+            <enum name="GL_VIEWPORT"/>
+            <enum name="GL_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MODELVIEW_MATRIX"/>
+            <enum name="GL_PROJECTION_MATRIX"/>
+            <enum name="GL_TEXTURE_MATRIX"/>
+            <enum name="GL_ALPHA_TEST_FUNC"/>
+            <enum name="GL_ALPHA_TEST_REF"/>
+            <enum name="GL_BLEND_DST"/>
+            <enum name="GL_BLEND_SRC"/>
+            <enum name="GL_LOGIC_OP_MODE"/>
+            <enum name="GL_SCISSOR_BOX"/>
+            <enum name="GL_COLOR_CLEAR_VALUE"/>
+            <enum name="GL_COLOR_WRITEMASK"/>
+            <enum name="GL_MAX_LIGHTS"/>
+            <enum name="GL_MAX_CLIP_PLANES"/>
+            <enum name="GL_MAX_TEXTURE_SIZE"/>
+            <enum name="GL_MAX_MODELVIEW_STACK_DEPTH"/>
+            <enum name="GL_MAX_PROJECTION_STACK_DEPTH"/>
+            <enum name="GL_MAX_TEXTURE_STACK_DEPTH"/>
+            <enum name="GL_MAX_VIEWPORT_DIMS"/>
+            <enum name="GL_MAX_TEXTURE_UNITS"/>
+            <enum name="GL_SUBPIXEL_BITS"/>
+            <enum name="GL_RED_BITS"/>
+            <enum name="GL_GREEN_BITS"/>
+            <enum name="GL_BLUE_BITS"/>
+            <enum name="GL_ALPHA_BITS"/>
+            <enum name="GL_DEPTH_BITS"/>
+            <enum name="GL_STENCIL_BITS"/>
+            <enum name="GL_POLYGON_OFFSET_UNITS"/>
+            <enum name="GL_POLYGON_OFFSET_FILL"/>
+            <enum name="GL_POLYGON_OFFSET_FACTOR"/>
+            <enum name="GL_TEXTURE_BINDING_2D"/>
+            <enum name="GL_VERTEX_ARRAY_SIZE"/>
+            <enum name="GL_VERTEX_ARRAY_TYPE"/>
+            <enum name="GL_VERTEX_ARRAY_STRIDE"/>
+            <enum name="GL_NORMAL_ARRAY_TYPE"/>
+            <enum name="GL_NORMAL_ARRAY_STRIDE"/>
+            <enum name="GL_COLOR_ARRAY_SIZE"/>
+            <enum name="GL_COLOR_ARRAY_TYPE"/>
+            <enum name="GL_COLOR_ARRAY_STRIDE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_SIZE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_TYPE"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_STRIDE"/>
+            <enum name="GL_VERTEX_ARRAY_POINTER"/>
+            <enum name="GL_NORMAL_ARRAY_POINTER"/>
+            <enum name="GL_COLOR_ARRAY_POINTER"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+            <enum name="GL_SAMPLE_BUFFERS"/>
+            <enum name="GL_SAMPLES"/>
+            <enum name="GL_SAMPLE_COVERAGE_VALUE"/>
+            <enum name="GL_SAMPLE_COVERAGE_INVERT"/>
+            <enum name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_DONT_CARE"/>
+            <enum name="GL_FASTEST"/>
+            <enum name="GL_NICEST"/>
+            <enum name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+            <enum name="GL_POINT_SMOOTH_HINT"/>
+            <enum name="GL_LINE_SMOOTH_HINT"/>
+            <enum name="GL_FOG_HINT"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT"/>
+            <enum name="GL_LIGHT_MODEL_AMBIENT"/>
+            <enum name="GL_LIGHT_MODEL_TWO_SIDE"/>
+            <enum name="GL_AMBIENT"/>
+            <enum name="GL_DIFFUSE"/>
+            <enum name="GL_SPECULAR"/>
+            <enum name="GL_POSITION"/>
+            <enum name="GL_SPOT_DIRECTION"/>
+            <enum name="GL_SPOT_EXPONENT"/>
+            <enum name="GL_SPOT_CUTOFF"/>
+            <enum name="GL_CONSTANT_ATTENUATION"/>
+            <enum name="GL_LINEAR_ATTENUATION"/>
+            <enum name="GL_QUADRATIC_ATTENUATION"/>
+            <enum name="GL_BYTE"/>
+            <enum name="GL_UNSIGNED_BYTE"/>
+            <enum name="GL_SHORT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_FIXED"/>
+            <enum name="GL_CLEAR"/>
+            <enum name="GL_AND"/>
+            <enum name="GL_AND_REVERSE"/>
+            <enum name="GL_COPY"/>
+            <enum name="GL_AND_INVERTED"/>
+            <enum name="GL_NOOP"/>
+            <enum name="GL_XOR"/>
+            <enum name="GL_OR"/>
+            <enum name="GL_NOR"/>
+            <enum name="GL_EQUIV"/>
+            <enum name="GL_INVERT"/>
+            <enum name="GL_OR_REVERSE"/>
+            <enum name="GL_COPY_INVERTED"/>
+            <enum name="GL_OR_INVERTED"/>
+            <enum name="GL_NAND"/>
+            <enum name="GL_SET"/>
+            <enum name="GL_EMISSION"/>
+            <enum name="GL_SHININESS"/>
+            <enum name="GL_AMBIENT_AND_DIFFUSE"/>
+            <enum name="GL_MODELVIEW"/>
+            <enum name="GL_PROJECTION"/>
+            <enum name="GL_TEXTURE"/>
+            <enum name="GL_ALPHA"/>
+            <enum name="GL_RGB"/>
+            <enum name="GL_RGBA"/>
+            <enum name="GL_LUMINANCE"/>
+            <enum name="GL_LUMINANCE_ALPHA"/>
+            <enum name="GL_UNPACK_ALIGNMENT"/>
+            <enum name="GL_PACK_ALIGNMENT"/>
+            <enum name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+            <enum name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+            <enum name="GL_UNSIGNED_SHORT_5_6_5"/>
+            <enum name="GL_FLAT"/>
+            <enum name="GL_SMOOTH"/>
+            <enum name="GL_KEEP"/>
+            <enum name="GL_REPLACE"/>
+            <enum name="GL_INCR"/>
+            <enum name="GL_DECR"/>
+            <enum name="GL_VENDOR"/>
+            <enum name="GL_RENDERER"/>
+            <enum name="GL_VERSION"/>
+            <enum name="GL_EXTENSIONS"/>
+            <enum name="GL_MODULATE"/>
+            <enum name="GL_DECAL"/>
+            <enum name="GL_ADD"/>
+            <enum name="GL_TEXTURE_ENV_MODE"/>
+            <enum name="GL_TEXTURE_ENV_COLOR"/>
+            <enum name="GL_TEXTURE_ENV"/>
+            <enum name="GL_NEAREST"/>
+            <enum name="GL_LINEAR"/>
+            <enum name="GL_NEAREST_MIPMAP_NEAREST"/>
+            <enum name="GL_LINEAR_MIPMAP_NEAREST"/>
+            <enum name="GL_NEAREST_MIPMAP_LINEAR"/>
+            <enum name="GL_LINEAR_MIPMAP_LINEAR"/>
+            <enum name="GL_TEXTURE_MAG_FILTER"/>
+            <enum name="GL_TEXTURE_MIN_FILTER"/>
+            <enum name="GL_TEXTURE_WRAP_S"/>
+            <enum name="GL_TEXTURE_WRAP_T"/>
+            <enum name="GL_GENERATE_MIPMAP"/>
+            <enum name="GL_TEXTURE0"/>
+            <enum name="GL_TEXTURE1"/>
+            <enum name="GL_TEXTURE2"/>
+            <enum name="GL_TEXTURE3"/>
+            <enum name="GL_TEXTURE4"/>
+            <enum name="GL_TEXTURE5"/>
+            <enum name="GL_TEXTURE6"/>
+            <enum name="GL_TEXTURE7"/>
+            <enum name="GL_TEXTURE8"/>
+            <enum name="GL_TEXTURE9"/>
+            <enum name="GL_TEXTURE10"/>
+            <enum name="GL_TEXTURE11"/>
+            <enum name="GL_TEXTURE12"/>
+            <enum name="GL_TEXTURE13"/>
+            <enum name="GL_TEXTURE14"/>
+            <enum name="GL_TEXTURE15"/>
+            <enum name="GL_TEXTURE16"/>
+            <enum name="GL_TEXTURE17"/>
+            <enum name="GL_TEXTURE18"/>
+            <enum name="GL_TEXTURE19"/>
+            <enum name="GL_TEXTURE20"/>
+            <enum name="GL_TEXTURE21"/>
+            <enum name="GL_TEXTURE22"/>
+            <enum name="GL_TEXTURE23"/>
+            <enum name="GL_TEXTURE24"/>
+            <enum name="GL_TEXTURE25"/>
+            <enum name="GL_TEXTURE26"/>
+            <enum name="GL_TEXTURE27"/>
+            <enum name="GL_TEXTURE28"/>
+            <enum name="GL_TEXTURE29"/>
+            <enum name="GL_TEXTURE30"/>
+            <enum name="GL_TEXTURE31"/>
+            <enum name="GL_ACTIVE_TEXTURE"/>
+            <enum name="GL_CLIENT_ACTIVE_TEXTURE"/>
+            <enum name="GL_REPEAT"/>
+            <enum name="GL_CLAMP_TO_EDGE"/>
+            <enum name="GL_LIGHT0"/>
+            <enum name="GL_LIGHT1"/>
+            <enum name="GL_LIGHT2"/>
+            <enum name="GL_LIGHT3"/>
+            <enum name="GL_LIGHT4"/>
+            <enum name="GL_LIGHT5"/>
+            <enum name="GL_LIGHT6"/>
+            <enum name="GL_LIGHT7"/>
+            <enum name="GL_ARRAY_BUFFER"/>
+            <enum name="GL_ELEMENT_ARRAY_BUFFER"/>
+            <enum name="GL_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_ELEMENT_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_VERTEX_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_NORMAL_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_COLOR_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_STATIC_DRAW"/>
+            <enum name="GL_DYNAMIC_DRAW"/>
+            <enum name="GL_BUFFER_SIZE"/>
+            <enum name="GL_BUFFER_USAGE"/>
+            <enum name="GL_SUBTRACT"/>
+            <enum name="GL_COMBINE"/>
+            <enum name="GL_COMBINE_RGB"/>
+            <enum name="GL_COMBINE_ALPHA"/>
+            <enum name="GL_RGB_SCALE"/>
+            <enum name="GL_ADD_SIGNED"/>
+            <enum name="GL_INTERPOLATE"/>
+            <enum name="GL_CONSTANT"/>
+            <enum name="GL_PRIMARY_COLOR"/>
+            <enum name="GL_PREVIOUS"/>
+            <enum name="GL_OPERAND0_RGB"/>
+            <enum name="GL_OPERAND1_RGB"/>
+            <enum name="GL_OPERAND2_RGB"/>
+            <enum name="GL_OPERAND0_ALPHA"/>
+            <enum name="GL_OPERAND1_ALPHA"/>
+            <enum name="GL_OPERAND2_ALPHA"/>
+            <enum name="GL_ALPHA_SCALE"/>
+            <enum name="GL_SRC0_RGB"/>
+            <enum name="GL_SRC1_RGB"/>
+            <enum name="GL_SRC2_RGB"/>
+            <enum name="GL_SRC0_ALPHA"/>
+            <enum name="GL_SRC1_ALPHA"/>
+            <enum name="GL_SRC2_ALPHA"/>
+            <enum name="GL_DOT3_RGB"/>
+            <enum name="GL_DOT3_RGBA"/>
+        </require>
+        <require profile="common">
+            <command name="glAlphaFunc"/>
+            <command name="glClearColor"/>
+            <command name="glClearDepthf"/>
+            <command name="glClipPlanef"/>
+            <command name="glColor4f"/>
+            <command name="glDepthRangef"/>
+            <command name="glFogf"/>
+            <command name="glFogfv"/>
+            <command name="glFrustumf"/>
+            <command name="glGetClipPlanef"/>
+            <command name="glGetFloatv"/>
+            <command name="glGetLightfv"/>
+            <command name="glGetMaterialfv"/>
+            <command name="glGetTexEnvfv"/>
+            <command name="glGetTexParameterfv"/>
+            <command name="glLightModelf"/>
+            <command name="glLightModelfv"/>
+            <command name="glLightf"/>
+            <command name="glLightfv"/>
+            <command name="glLineWidth"/>
+            <command name="glLoadMatrixf"/>
+            <command name="glMaterialf"/>
+            <command name="glMaterialfv"/>
+            <command name="glMultMatrixf"/>
+            <command name="glMultiTexCoord4f"/>
+            <command name="glNormal3f"/>
+            <command name="glOrthof"/>
+            <command name="glPointParameterf"/>
+            <command name="glPointParameterfv"/>
+            <command name="glPointSize"/>
+            <command name="glPolygonOffset"/>
+            <command name="glRotatef"/>
+            <command name="glScalef"/>
+            <command name="glTexEnvf"/>
+            <command name="glTexEnvfv"/>
+            <command name="glTexParameterf"/>
+            <command name="glTexParameterfv"/>
+            <command name="glTranslatef"/>
+        </require>
+        <require>
+            <command name="glActiveTexture"/>
+            <command name="glAlphaFuncx"/>
+            <command name="glBindBuffer"/>
+            <command name="glBindTexture"/>
+            <command name="glBlendFunc"/>
+            <command name="glBufferData"/>
+            <command name="glBufferSubData"/>
+            <command name="glClear"/>
+            <command name="glClearColorx"/>
+            <command name="glClearDepthx"/>
+            <command name="glClearStencil"/>
+            <command name="glClientActiveTexture"/>
+            <command name="glClipPlanex"/>
+            <command name="glColor4ub"/>
+            <command name="glColor4x"/>
+            <command name="glColorMask"/>
+            <command name="glColorPointer"/>
+            <command name="glCompressedTexImage2D"/>
+            <command name="glCompressedTexSubImage2D"/>
+            <command name="glCopyTexImage2D"/>
+            <command name="glCopyTexSubImage2D"/>
+            <command name="glCullFace"/>
+            <command name="glDeleteBuffers"/>
+            <command name="glDeleteTextures"/>
+            <command name="glDepthFunc"/>
+            <command name="glDepthMask"/>
+            <command name="glDepthRangex"/>
+            <command name="glDisable"/>
+            <command name="glDisableClientState"/>
+            <command name="glDrawArrays"/>
+            <command name="glDrawElements"/>
+            <command name="glEnable"/>
+            <command name="glEnableClientState"/>
+            <command name="glFinish"/>
+            <command name="glFlush"/>
+            <command name="glFogx"/>
+            <command name="glFogxv"/>
+            <command name="glFrontFace"/>
+            <command name="glFrustumx"/>
+            <command name="glGetBooleanv"/>
+            <command name="glGetBufferParameteriv"/>
+            <command name="glGetClipPlanex"/>
+            <command name="glGenBuffers"/>
+            <command name="glGenTextures"/>
+            <command name="glGetError"/>
+            <command name="glGetFixedv"/>
+            <command name="glGetIntegerv"/>
+            <command name="glGetLightxv"/>
+            <command name="glGetMaterialxv"/>
+            <command name="glGetPointerv"/>
+            <command name="glGetString"/>
+            <command name="glGetTexEnviv"/>
+            <command name="glGetTexEnvxv"/>
+            <command name="glGetTexParameteriv"/>
+            <command name="glGetTexParameterxv"/>
+            <command name="glHint"/>
+            <command name="glIsBuffer"/>
+            <command name="glIsEnabled"/>
+            <command name="glIsTexture"/>
+            <command name="glLightModelx"/>
+            <command name="glLightModelxv"/>
+            <command name="glLightx"/>
+            <command name="glLightxv"/>
+            <command name="glLineWidthx"/>
+            <command name="glLoadIdentity"/>
+            <command name="glLoadMatrixx"/>
+            <command name="glLogicOp"/>
+            <command name="glMaterialx"/>
+            <command name="glMaterialxv"/>
+            <command name="glMatrixMode"/>
+            <command name="glMultMatrixx"/>
+            <command name="glMultiTexCoord4x"/>
+            <command name="glNormal3x"/>
+            <command name="glNormalPointer"/>
+            <command name="glOrthox"/>
+            <command name="glPixelStorei"/>
+            <command name="glPointParameterx"/>
+            <command name="glPointParameterxv"/>
+            <command name="glPointSizex"/>
+            <command name="glPolygonOffsetx"/>
+            <command name="glPopMatrix"/>
+            <command name="glPushMatrix"/>
+            <command name="glReadPixels"/>
+            <command name="glRotatex"/>
+            <command name="glSampleCoverage"/>
+            <command name="glSampleCoveragex"/>
+            <command name="glScalex"/>
+            <command name="glScissor"/>
+            <command name="glShadeModel"/>
+            <command name="glStencilFunc"/>
+            <command name="glStencilMask"/>
+            <command name="glStencilOp"/>
+            <command name="glTexCoordPointer"/>
+            <command name="glTexEnvi"/>
+            <command name="glTexEnvx"/>
+            <command name="glTexEnviv"/>
+            <command name="glTexEnvxv"/>
+            <command name="glTexImage2D"/>
+            <command name="glTexParameteri"/>
+            <command name="glTexParameterx"/>
+            <command name="glTexParameteriv"/>
+            <command name="glTexParameterxv"/>
+            <command name="glTexSubImage2D"/>
+            <command name="glTranslatex"/>
+            <command name="glVertexPointer"/>
+            <command name="glViewport"/>
+        </require>
+    </feature>
+    <feature api="gles2" name="GL_ES_VERSION_2_0" number="2.0">
+        <require comment="Not used by the API, for compatibility with old gl2.h">
+            <type name="GLbyte"/>
+            <type name="GLclampf"/>
+            <type name="GLfixed"/>
+            <type name="GLshort"/>
+            <type name="GLushort"/>
+            <type name="GLvoid" comment="No longer used in headers"/>
+        </require>
+        <require comment="Not used by the API; put here so this type doesn't need to be declared in gl2ext.h">
+            <type name="GLsync"/>
+            <type name="GLint64"/>
+            <type name="GLuint64"/>
+        </require>
+        <require>
+            <enum name="GL_DEPTH_BUFFER_BIT"/>
+            <enum name="GL_STENCIL_BUFFER_BIT"/>
+            <enum name="GL_COLOR_BUFFER_BIT"/>
+            <enum name="GL_FALSE"/>
+            <enum name="GL_TRUE"/>
+            <enum name="GL_POINTS"/>
+            <enum name="GL_LINES"/>
+            <enum name="GL_LINE_LOOP"/>
+            <enum name="GL_LINE_STRIP"/>
+            <enum name="GL_TRIANGLES"/>
+            <enum name="GL_TRIANGLE_STRIP"/>
+            <enum name="GL_TRIANGLE_FAN"/>
+            <enum name="GL_ZERO"/>
+            <enum name="GL_ONE"/>
+            <enum name="GL_SRC_COLOR"/>
+            <enum name="GL_ONE_MINUS_SRC_COLOR"/>
+            <enum name="GL_SRC_ALPHA"/>
+            <enum name="GL_ONE_MINUS_SRC_ALPHA"/>
+            <enum name="GL_DST_ALPHA"/>
+            <enum name="GL_ONE_MINUS_DST_ALPHA"/>
+            <enum name="GL_DST_COLOR"/>
+            <enum name="GL_ONE_MINUS_DST_COLOR"/>
+            <enum name="GL_SRC_ALPHA_SATURATE"/>
+            <enum name="GL_FUNC_ADD"/>
+            <enum name="GL_BLEND_EQUATION"/>
+            <enum name="GL_BLEND_EQUATION_RGB"/>
+            <enum name="GL_BLEND_EQUATION_ALPHA"/>
+            <enum name="GL_FUNC_SUBTRACT"/>
+            <enum name="GL_FUNC_REVERSE_SUBTRACT"/>
+            <enum name="GL_BLEND_DST_RGB"/>
+            <enum name="GL_BLEND_SRC_RGB"/>
+            <enum name="GL_BLEND_DST_ALPHA"/>
+            <enum name="GL_BLEND_SRC_ALPHA"/>
+            <enum name="GL_CONSTANT_COLOR"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_COLOR"/>
+            <enum name="GL_CONSTANT_ALPHA"/>
+            <enum name="GL_ONE_MINUS_CONSTANT_ALPHA"/>
+            <enum name="GL_BLEND_COLOR"/>
+            <enum name="GL_ARRAY_BUFFER"/>
+            <enum name="GL_ELEMENT_ARRAY_BUFFER"/>
+            <enum name="GL_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_ELEMENT_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_STREAM_DRAW"/>
+            <enum name="GL_STATIC_DRAW"/>
+            <enum name="GL_DYNAMIC_DRAW"/>
+            <enum name="GL_BUFFER_SIZE"/>
+            <enum name="GL_BUFFER_USAGE"/>
+            <enum name="GL_CURRENT_VERTEX_ATTRIB"/>
+            <enum name="GL_FRONT"/>
+            <enum name="GL_BACK"/>
+            <enum name="GL_FRONT_AND_BACK"/>
+            <enum name="GL_TEXTURE_2D"/>
+            <enum name="GL_CULL_FACE"/>
+            <enum name="GL_BLEND"/>
+            <enum name="GL_DITHER"/>
+            <enum name="GL_STENCIL_TEST"/>
+            <enum name="GL_DEPTH_TEST"/>
+            <enum name="GL_SCISSOR_TEST"/>
+            <enum name="GL_POLYGON_OFFSET_FILL"/>
+            <enum name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+            <enum name="GL_SAMPLE_COVERAGE"/>
+            <enum name="GL_NO_ERROR"/>
+            <enum name="GL_INVALID_ENUM"/>
+            <enum name="GL_INVALID_VALUE"/>
+            <enum name="GL_INVALID_OPERATION"/>
+            <enum name="GL_OUT_OF_MEMORY"/>
+            <enum name="GL_CW"/>
+            <enum name="GL_CCW"/>
+            <enum name="GL_LINE_WIDTH"/>
+            <enum name="GL_ALIASED_POINT_SIZE_RANGE"/>
+            <enum name="GL_ALIASED_LINE_WIDTH_RANGE"/>
+            <enum name="GL_CULL_FACE_MODE"/>
+            <enum name="GL_FRONT_FACE"/>
+            <enum name="GL_DEPTH_RANGE"/>
+            <enum name="GL_DEPTH_WRITEMASK"/>
+            <enum name="GL_DEPTH_CLEAR_VALUE"/>
+            <enum name="GL_DEPTH_FUNC"/>
+            <enum name="GL_STENCIL_CLEAR_VALUE"/>
+            <enum name="GL_STENCIL_FUNC"/>
+            <enum name="GL_STENCIL_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_FAIL"/>
+            <enum name="GL_STENCIL_PASS_DEPTH_PASS"/>
+            <enum name="GL_STENCIL_REF"/>
+            <enum name="GL_STENCIL_VALUE_MASK"/>
+            <enum name="GL_STENCIL_WRITEMASK"/>
+            <enum name="GL_STENCIL_BACK_FUNC"/>
+            <enum name="GL_STENCIL_BACK_FAIL"/>
+            <enum name="GL_STENCIL_BACK_PASS_DEPTH_FAIL"/>
+            <enum name="GL_STENCIL_BACK_PASS_DEPTH_PASS"/>
+            <enum name="GL_STENCIL_BACK_REF"/>
+            <enum name="GL_STENCIL_BACK_VALUE_MASK"/>
+            <enum name="GL_STENCIL_BACK_WRITEMASK"/>
+            <enum name="GL_VIEWPORT"/>
+            <enum name="GL_SCISSOR_BOX"/>
+            <enum name="GL_COLOR_CLEAR_VALUE"/>
+            <enum name="GL_COLOR_WRITEMASK"/>
+            <enum name="GL_UNPACK_ALIGNMENT"/>
+            <enum name="GL_PACK_ALIGNMENT"/>
+            <enum name="GL_MAX_TEXTURE_SIZE"/>
+            <enum name="GL_MAX_VIEWPORT_DIMS"/>
+            <enum name="GL_SUBPIXEL_BITS"/>
+            <enum name="GL_RED_BITS"/>
+            <enum name="GL_GREEN_BITS"/>
+            <enum name="GL_BLUE_BITS"/>
+            <enum name="GL_ALPHA_BITS"/>
+            <enum name="GL_DEPTH_BITS"/>
+            <enum name="GL_STENCIL_BITS"/>
+            <enum name="GL_POLYGON_OFFSET_UNITS"/>
+            <enum name="GL_POLYGON_OFFSET_FACTOR"/>
+            <enum name="GL_TEXTURE_BINDING_2D"/>
+            <enum name="GL_SAMPLE_BUFFERS"/>
+            <enum name="GL_SAMPLES"/>
+            <enum name="GL_SAMPLE_COVERAGE_VALUE"/>
+            <enum name="GL_SAMPLE_COVERAGE_INVERT"/>
+            <enum name="GL_NUM_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_COMPRESSED_TEXTURE_FORMATS"/>
+            <enum name="GL_DONT_CARE"/>
+            <enum name="GL_FASTEST"/>
+            <enum name="GL_NICEST"/>
+            <enum name="GL_GENERATE_MIPMAP_HINT"/>
+            <enum name="GL_BYTE"/>
+            <enum name="GL_UNSIGNED_BYTE"/>
+            <enum name="GL_SHORT"/>
+            <enum name="GL_UNSIGNED_SHORT"/>
+            <enum name="GL_INT"/>
+            <enum name="GL_UNSIGNED_INT"/>
+            <enum name="GL_FLOAT"/>
+            <enum name="GL_FIXED"/>
+            <enum name="GL_DEPTH_COMPONENT"/>
+            <enum name="GL_ALPHA"/>
+            <enum name="GL_RGB"/>
+            <enum name="GL_RGBA"/>
+            <enum name="GL_LUMINANCE"/>
+            <enum name="GL_LUMINANCE_ALPHA"/>
+            <enum name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+            <enum name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+            <enum name="GL_UNSIGNED_SHORT_5_6_5"/>
+            <enum name="GL_FRAGMENT_SHADER"/>
+            <enum name="GL_VERTEX_SHADER"/>
+            <enum name="GL_MAX_VERTEX_ATTRIBS"/>
+            <enum name="GL_MAX_VERTEX_UNIFORM_VECTORS"/>
+            <enum name="GL_MAX_VARYING_VECTORS"/>
+            <enum name="GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_FRAGMENT_UNIFORM_VECTORS"/>
+            <enum name="GL_SHADER_TYPE"/>
+            <enum name="GL_DELETE_STATUS"/>
+            <enum name="GL_LINK_STATUS"/>
+            <enum name="GL_VALIDATE_STATUS"/>
+            <enum name="GL_ATTACHED_SHADERS"/>
+            <enum name="GL_ACTIVE_UNIFORMS"/>
+            <enum name="GL_ACTIVE_UNIFORM_MAX_LENGTH"/>
+            <enum name="GL_ACTIVE_ATTRIBUTES"/>
+            <enum name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"/>
+            <enum name="GL_SHADING_LANGUAGE_VERSION"/>
+            <enum name="GL_CURRENT_PROGRAM"/>
+            <enum name="GL_NEVER"/>
+            <enum name="GL_LESS"/>
+            <enum name="GL_EQUAL"/>
+            <enum name="GL_LEQUAL"/>
+            <enum name="GL_GREATER"/>
+            <enum name="GL_NOTEQUAL"/>
+            <enum name="GL_GEQUAL"/>
+            <enum name="GL_ALWAYS"/>
+            <enum name="GL_KEEP"/>
+            <enum name="GL_REPLACE"/>
+            <enum name="GL_INCR"/>
+            <enum name="GL_DECR"/>
+            <enum name="GL_INVERT"/>
+            <enum name="GL_INCR_WRAP"/>
+            <enum name="GL_DECR_WRAP"/>
+            <enum name="GL_VENDOR"/>
+            <enum name="GL_RENDERER"/>
+            <enum name="GL_VERSION"/>
+            <enum name="GL_EXTENSIONS"/>
+            <enum name="GL_NEAREST"/>
+            <enum name="GL_LINEAR"/>
+            <enum name="GL_NEAREST_MIPMAP_NEAREST"/>
+            <enum name="GL_LINEAR_MIPMAP_NEAREST"/>
+            <enum name="GL_NEAREST_MIPMAP_LINEAR"/>
+            <enum name="GL_LINEAR_MIPMAP_LINEAR"/>
+            <enum name="GL_TEXTURE_MAG_FILTER"/>
+            <enum name="GL_TEXTURE_MIN_FILTER"/>
+            <enum name="GL_TEXTURE_WRAP_S"/>
+            <enum name="GL_TEXTURE_WRAP_T"/>
+            <enum name="GL_TEXTURE"/>
+            <enum name="GL_TEXTURE_CUBE_MAP"/>
+            <enum name="GL_TEXTURE_BINDING_CUBE_MAP"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_X"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z"/>
+            <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"/>
+            <enum name="GL_MAX_CUBE_MAP_TEXTURE_SIZE"/>
+            <enum name="GL_TEXTURE0"/>
+            <enum name="GL_TEXTURE1"/>
+            <enum name="GL_TEXTURE2"/>
+            <enum name="GL_TEXTURE3"/>
+            <enum name="GL_TEXTURE4"/>
+            <enum name="GL_TEXTURE5"/>
+            <enum name="GL_TEXTURE6"/>
+            <enum name="GL_TEXTURE7"/>
+            <enum name="GL_TEXTURE8"/>
+            <enum name="GL_TEXTURE9"/>
+            <enum name="GL_TEXTURE10"/>
+            <enum name="GL_TEXTURE11"/>
+            <enum name="GL_TEXTURE12"/>
+            <enum name="GL_TEXTURE13"/>
+            <enum name="GL_TEXTURE14"/>
+            <enum name="GL_TEXTURE15"/>
+            <enum name="GL_TEXTURE16"/>
+            <enum name="GL_TEXTURE17"/>
+            <enum name="GL_TEXTURE18"/>
+            <enum name="GL_TEXTURE19"/>
+            <enum name="GL_TEXTURE20"/>
+            <enum name="GL_TEXTURE21"/>
+            <enum name="GL_TEXTURE22"/>
+            <enum name="GL_TEXTURE23"/>
+            <enum name="GL_TEXTURE24"/>
+            <enum name="GL_TEXTURE25"/>
+            <enum name="GL_TEXTURE26"/>
+            <enum name="GL_TEXTURE27"/>
+            <enum name="GL_TEXTURE28"/>
+            <enum name="GL_TEXTURE29"/>
+            <enum name="GL_TEXTURE30"/>
+            <enum name="GL_TEXTURE31"/>
+            <enum name="GL_ACTIVE_TEXTURE"/>
+            <enum name="GL_REPEAT"/>
+            <enum name="GL_CLAMP_TO_EDGE"/>
+            <enum name="GL_MIRRORED_REPEAT"/>
+            <enum name="GL_FLOAT_VEC2"/>
+            <enum name="GL_FLOAT_VEC3"/>
+            <enum name="GL_FLOAT_VEC4"/>
+            <enum name="GL_INT_VEC2"/>
+            <enum name="GL_INT_VEC3"/>
+            <enum name="GL_INT_VEC4"/>
+            <enum name="GL_BOOL"/>
+            <enum name="GL_BOOL_VEC2"/>
+            <enum name="GL_BOOL_VEC3"/>
+            <enum name="GL_BOOL_VEC4"/>
+            <enum name="GL_FLOAT_MAT2"/>
+            <enum name="GL_FLOAT_MAT3"/>
+            <enum name="GL_FLOAT_MAT4"/>
+            <enum name="GL_SAMPLER_2D"/>
+            <enum name="GL_SAMPLER_CUBE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_SIZE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_TYPE"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_POINTER"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"/>
+            <enum name="GL_IMPLEMENTATION_COLOR_READ_TYPE"/>
+            <enum name="GL_IMPLEMENTATION_COLOR_READ_FORMAT"/>
+            <enum name="GL_COMPILE_STATUS"/>
+            <enum name="GL_INFO_LOG_LENGTH"/>
+            <enum name="GL_SHADER_SOURCE_LENGTH"/>
+            <enum name="GL_SHADER_COMPILER"/>
+            <enum name="GL_SHADER_BINARY_FORMATS"/>
+            <enum name="GL_NUM_SHADER_BINARY_FORMATS"/>
+            <enum name="GL_LOW_FLOAT"/>
+            <enum name="GL_MEDIUM_FLOAT"/>
+            <enum name="GL_HIGH_FLOAT"/>
+            <enum name="GL_LOW_INT"/>
+            <enum name="GL_MEDIUM_INT"/>
+            <enum name="GL_HIGH_INT"/>
+            <enum name="GL_FRAMEBUFFER"/>
+            <enum name="GL_RENDERBUFFER"/>
+            <enum name="GL_RGBA4"/>
+            <enum name="GL_RGB5_A1"/>
+            <enum name="GL_RGB565"/>
+            <enum name="GL_DEPTH_COMPONENT16"/>
+            <enum name="GL_STENCIL_INDEX8"/>
+            <enum name="GL_RENDERBUFFER_WIDTH"/>
+            <enum name="GL_RENDERBUFFER_HEIGHT"/>
+            <enum name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
+            <enum name="GL_RENDERBUFFER_RED_SIZE"/>
+            <enum name="GL_RENDERBUFFER_GREEN_SIZE"/>
+            <enum name="GL_RENDERBUFFER_BLUE_SIZE"/>
+            <enum name="GL_RENDERBUFFER_ALPHA_SIZE"/>
+            <enum name="GL_RENDERBUFFER_DEPTH_SIZE"/>
+            <enum name="GL_RENDERBUFFER_STENCIL_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"/>
+            <enum name="GL_COLOR_ATTACHMENT0"/>
+            <enum name="GL_DEPTH_ATTACHMENT"/>
+            <enum name="GL_STENCIL_ATTACHMENT"/>
+            <enum name="GL_NONE"/>
+            <enum name="GL_FRAMEBUFFER_COMPLETE"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS"/>
+            <enum name="GL_FRAMEBUFFER_UNSUPPORTED"/>
+            <enum name="GL_FRAMEBUFFER_BINDING"/>
+            <enum name="GL_RENDERBUFFER_BINDING"/>
+            <enum name="GL_MAX_RENDERBUFFER_SIZE"/>
+            <enum name="GL_INVALID_FRAMEBUFFER_OPERATION"/>
+            <command name="glActiveTexture"/>
+            <command name="glAttachShader"/>
+            <command name="glBindAttribLocation"/>
+            <command name="glBindBuffer"/>
+            <command name="glBindFramebuffer"/>
+            <command name="glBindRenderbuffer"/>
+            <command name="glBindTexture"/>
+            <command name="glBlendColor"/>
+            <command name="glBlendEquation"/>
+            <command name="glBlendEquationSeparate"/>
+            <command name="glBlendFunc"/>
+            <command name="glBlendFuncSeparate"/>
+            <command name="glBufferData"/>
+            <command name="glBufferSubData"/>
+            <command name="glCheckFramebufferStatus"/>
+            <command name="glClear"/>
+            <command name="glClearColor"/>
+            <command name="glClearDepthf"/>
+            <command name="glClearStencil"/>
+            <command name="glColorMask"/>
+            <command name="glCompileShader"/>
+            <command name="glCompressedTexImage2D"/>
+            <command name="glCompressedTexSubImage2D"/>
+            <command name="glCopyTexImage2D"/>
+            <command name="glCopyTexSubImage2D"/>
+            <command name="glCreateProgram"/>
+            <command name="glCreateShader"/>
+            <command name="glCullFace"/>
+            <command name="glDeleteBuffers"/>
+            <command name="glDeleteFramebuffers"/>
+            <command name="glDeleteProgram"/>
+            <command name="glDeleteRenderbuffers"/>
+            <command name="glDeleteShader"/>
+            <command name="glDeleteTextures"/>
+            <command name="glDepthFunc"/>
+            <command name="glDepthMask"/>
+            <command name="glDepthRangef"/>
+            <command name="glDetachShader"/>
+            <command name="glDisable"/>
+            <command name="glDisableVertexAttribArray"/>
+            <command name="glDrawArrays"/>
+            <command name="glDrawElements"/>
+            <command name="glEnable"/>
+            <command name="glEnableVertexAttribArray"/>
+            <command name="glFinish"/>
+            <command name="glFlush"/>
+            <command name="glFramebufferRenderbuffer"/>
+            <command name="glFramebufferTexture2D"/>
+            <command name="glFrontFace"/>
+            <command name="glGenBuffers"/>
+            <command name="glGenerateMipmap"/>
+            <command name="glGenFramebuffers"/>
+            <command name="glGenRenderbuffers"/>
+            <command name="glGenTextures"/>
+            <command name="glGetActiveAttrib"/>
+            <command name="glGetActiveUniform"/>
+            <command name="glGetAttachedShaders"/>
+            <command name="glGetAttribLocation"/>
+            <command name="glGetBooleanv"/>
+            <command name="glGetBufferParameteriv"/>
+            <command name="glGetError"/>
+            <command name="glGetFloatv"/>
+            <command name="glGetFramebufferAttachmentParameteriv"/>
+            <command name="glGetIntegerv"/>
+            <command name="glGetProgramiv"/>
+            <command name="glGetProgramInfoLog"/>
+            <command name="glGetRenderbufferParameteriv"/>
+            <command name="glGetShaderiv"/>
+            <command name="glGetShaderInfoLog"/>
+            <command name="glGetShaderPrecisionFormat"/>
+            <command name="glGetShaderSource"/>
+            <command name="glGetString"/>
+            <command name="glGetTexParameterfv"/>
+            <command name="glGetTexParameteriv"/>
+            <command name="glGetUniformfv"/>
+            <command name="glGetUniformiv"/>
+            <command name="glGetUniformLocation"/>
+            <command name="glGetVertexAttribfv"/>
+            <command name="glGetVertexAttribiv"/>
+            <command name="glGetVertexAttribPointerv"/>
+            <command name="glHint"/>
+            <command name="glIsBuffer"/>
+            <command name="glIsEnabled"/>
+            <command name="glIsFramebuffer"/>
+            <command name="glIsProgram"/>
+            <command name="glIsRenderbuffer"/>
+            <command name="glIsShader"/>
+            <command name="glIsTexture"/>
+            <command name="glLineWidth"/>
+            <command name="glLinkProgram"/>
+            <command name="glPixelStorei"/>
+            <command name="glPolygonOffset"/>
+            <command name="glReadPixels"/>
+            <command name="glReleaseShaderCompiler"/>
+            <command name="glRenderbufferStorage"/>
+            <command name="glSampleCoverage"/>
+            <command name="glScissor"/>
+            <command name="glShaderBinary"/>
+            <command name="glShaderSource"/>
+            <command name="glStencilFunc"/>
+            <command name="glStencilFuncSeparate"/>
+            <command name="glStencilMask"/>
+            <command name="glStencilMaskSeparate"/>
+            <command name="glStencilOp"/>
+            <command name="glStencilOpSeparate"/>
+            <command name="glTexImage2D"/>
+            <command name="glTexParameterf"/>
+            <command name="glTexParameterfv"/>
+            <command name="glTexParameteri"/>
+            <command name="glTexParameteriv"/>
+            <command name="glTexSubImage2D"/>
+            <command name="glUniform1f"/>
+            <command name="glUniform1fv"/>
+            <command name="glUniform1i"/>
+            <command name="glUniform1iv"/>
+            <command name="glUniform2f"/>
+            <command name="glUniform2fv"/>
+            <command name="glUniform2i"/>
+            <command name="glUniform2iv"/>
+            <command name="glUniform3f"/>
+            <command name="glUniform3fv"/>
+            <command name="glUniform3i"/>
+            <command name="glUniform3iv"/>
+            <command name="glUniform4f"/>
+            <command name="glUniform4fv"/>
+            <command name="glUniform4i"/>
+            <command name="glUniform4iv"/>
+            <command name="glUniformMatrix2fv"/>
+            <command name="glUniformMatrix3fv"/>
+            <command name="glUniformMatrix4fv"/>
+            <command name="glUseProgram"/>
+            <command name="glValidateProgram"/>
+            <command name="glVertexAttrib1f"/>
+            <command name="glVertexAttrib1fv"/>
+            <command name="glVertexAttrib2f"/>
+            <command name="glVertexAttrib2fv"/>
+            <command name="glVertexAttrib3f"/>
+            <command name="glVertexAttrib3fv"/>
+            <command name="glVertexAttrib4f"/>
+            <command name="glVertexAttrib4fv"/>
+            <command name="glVertexAttribPointer"/>
+            <command name="glViewport"/>
+        </require>
+    </feature>
+    <feature api="gles2" name="GL_ES_VERSION_3_0" number="3.0">
+        <require comment="Not used by the API, for compatibility with old gl2.h">
+            <type name="GLhalf"/>
+        </require>
+        <require>
+            <enum name="GL_READ_BUFFER"/>
+            <enum name="GL_UNPACK_ROW_LENGTH"/>
+            <enum name="GL_UNPACK_SKIP_ROWS"/>
+            <enum name="GL_UNPACK_SKIP_PIXELS"/>
+            <enum name="GL_PACK_ROW_LENGTH"/>
+            <enum name="GL_PACK_SKIP_ROWS"/>
+            <enum name="GL_PACK_SKIP_PIXELS"/>
+            <enum name="GL_COLOR"/>
+            <enum name="GL_DEPTH"/>
+            <enum name="GL_STENCIL"/>
+            <enum name="GL_RED"/>
+            <enum name="GL_RGB8"/>
+            <enum name="GL_RGBA8"/>
+            <enum name="GL_RGB10_A2"/>
+            <enum name="GL_TEXTURE_BINDING_3D"/>
+            <enum name="GL_UNPACK_SKIP_IMAGES"/>
+            <enum name="GL_UNPACK_IMAGE_HEIGHT"/>
+            <enum name="GL_TEXTURE_3D"/>
+            <enum name="GL_TEXTURE_WRAP_R"/>
+            <enum name="GL_MAX_3D_TEXTURE_SIZE"/>
+            <enum name="GL_UNSIGNED_INT_2_10_10_10_REV"/>
+            <enum name="GL_MAX_ELEMENTS_VERTICES"/>
+            <enum name="GL_MAX_ELEMENTS_INDICES"/>
+            <enum name="GL_TEXTURE_MIN_LOD"/>
+            <enum name="GL_TEXTURE_MAX_LOD"/>
+            <enum name="GL_TEXTURE_BASE_LEVEL"/>
+            <enum name="GL_TEXTURE_MAX_LEVEL"/>
+            <enum name="GL_MIN"/>
+            <enum name="GL_MAX"/>
+            <enum name="GL_DEPTH_COMPONENT24"/>
+            <enum name="GL_MAX_TEXTURE_LOD_BIAS"/>
+            <enum name="GL_TEXTURE_COMPARE_MODE"/>
+            <enum name="GL_TEXTURE_COMPARE_FUNC"/>
+            <enum name="GL_CURRENT_QUERY"/>
+            <enum name="GL_QUERY_RESULT"/>
+            <enum name="GL_QUERY_RESULT_AVAILABLE"/>
+            <enum name="GL_BUFFER_MAPPED"/>
+            <enum name="GL_BUFFER_MAP_POINTER"/>
+            <enum name="GL_STREAM_READ"/>
+            <enum name="GL_STREAM_COPY"/>
+            <enum name="GL_STATIC_READ"/>
+            <enum name="GL_STATIC_COPY"/>
+            <enum name="GL_DYNAMIC_READ"/>
+            <enum name="GL_DYNAMIC_COPY"/>
+            <enum name="GL_MAX_DRAW_BUFFERS"/>
+            <enum name="GL_DRAW_BUFFER0"/>
+            <enum name="GL_DRAW_BUFFER1"/>
+            <enum name="GL_DRAW_BUFFER2"/>
+            <enum name="GL_DRAW_BUFFER3"/>
+            <enum name="GL_DRAW_BUFFER4"/>
+            <enum name="GL_DRAW_BUFFER5"/>
+            <enum name="GL_DRAW_BUFFER6"/>
+            <enum name="GL_DRAW_BUFFER7"/>
+            <enum name="GL_DRAW_BUFFER8"/>
+            <enum name="GL_DRAW_BUFFER9"/>
+            <enum name="GL_DRAW_BUFFER10"/>
+            <enum name="GL_DRAW_BUFFER11"/>
+            <enum name="GL_DRAW_BUFFER12"/>
+            <enum name="GL_DRAW_BUFFER13"/>
+            <enum name="GL_DRAW_BUFFER14"/>
+            <enum name="GL_DRAW_BUFFER15"/>
+            <enum name="GL_MAX_FRAGMENT_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_VERTEX_UNIFORM_COMPONENTS"/>
+            <enum name="GL_SAMPLER_3D"/>
+            <enum name="GL_SAMPLER_2D_SHADOW"/>
+            <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT"/>
+            <enum name="GL_PIXEL_PACK_BUFFER"/>
+            <enum name="GL_PIXEL_UNPACK_BUFFER"/>
+            <enum name="GL_PIXEL_PACK_BUFFER_BINDING"/>
+            <enum name="GL_PIXEL_UNPACK_BUFFER_BINDING"/>
+            <enum name="GL_FLOAT_MAT2x3"/>
+            <enum name="GL_FLOAT_MAT2x4"/>
+            <enum name="GL_FLOAT_MAT3x2"/>
+            <enum name="GL_FLOAT_MAT3x4"/>
+            <enum name="GL_FLOAT_MAT4x2"/>
+            <enum name="GL_FLOAT_MAT4x3"/>
+            <enum name="GL_SRGB"/>
+            <enum name="GL_SRGB8"/>
+            <enum name="GL_SRGB8_ALPHA8"/>
+            <enum name="GL_COMPARE_REF_TO_TEXTURE"/>
+            <enum name="GL_MAJOR_VERSION"/>
+            <enum name="GL_MINOR_VERSION"/>
+            <enum name="GL_NUM_EXTENSIONS"/>
+            <enum name="GL_RGBA32F"/>
+            <enum name="GL_RGB32F"/>
+            <enum name="GL_RGBA16F"/>
+            <enum name="GL_RGB16F"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_INTEGER"/>
+            <enum name="GL_MAX_ARRAY_TEXTURE_LAYERS"/>
+            <enum name="GL_MIN_PROGRAM_TEXEL_OFFSET"/>
+            <enum name="GL_MAX_PROGRAM_TEXEL_OFFSET"/>
+            <enum name="GL_MAX_VARYING_COMPONENTS"/>
+            <enum name="GL_TEXTURE_2D_ARRAY"/>
+            <enum name="GL_TEXTURE_BINDING_2D_ARRAY"/>
+            <enum name="GL_R11F_G11F_B10F"/>
+            <enum name="GL_UNSIGNED_INT_10F_11F_11F_REV"/>
+            <enum name="GL_RGB9_E5"/>
+            <enum name="GL_UNSIGNED_INT_5_9_9_9_REV"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE"/>
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_VARYINGS"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_START"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN"/>
+            <enum name="GL_RASTERIZER_DISCARD"/>
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS"/>
+            <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS"/>
+            <enum name="GL_INTERLEAVED_ATTRIBS"/>
+            <enum name="GL_SEPARATE_ATTRIBS"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING"/>
+            <enum name="GL_RGBA32UI"/>
+            <enum name="GL_RGB32UI"/>
+            <enum name="GL_RGBA16UI"/>
+            <enum name="GL_RGB16UI"/>
+            <enum name="GL_RGBA8UI"/>
+            <enum name="GL_RGB8UI"/>
+            <enum name="GL_RGBA32I"/>
+            <enum name="GL_RGB32I"/>
+            <enum name="GL_RGBA16I"/>
+            <enum name="GL_RGB16I"/>
+            <enum name="GL_RGBA8I"/>
+            <enum name="GL_RGB8I"/>
+            <enum name="GL_RED_INTEGER"/>
+            <enum name="GL_RGB_INTEGER"/>
+            <enum name="GL_RGBA_INTEGER"/>
+            <enum name="GL_SAMPLER_2D_ARRAY"/>
+            <enum name="GL_SAMPLER_2D_ARRAY_SHADOW"/>
+            <enum name="GL_SAMPLER_CUBE_SHADOW"/>
+            <enum name="GL_UNSIGNED_INT_VEC2"/>
+            <enum name="GL_UNSIGNED_INT_VEC3"/>
+            <enum name="GL_UNSIGNED_INT_VEC4"/>
+            <enum name="GL_INT_SAMPLER_2D"/>
+            <enum name="GL_INT_SAMPLER_3D"/>
+            <enum name="GL_INT_SAMPLER_CUBE"/>
+            <enum name="GL_INT_SAMPLER_2D_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_3D"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_CUBE"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D_ARRAY"/>
+            <enum name="GL_BUFFER_ACCESS_FLAGS"/>
+            <enum name="GL_BUFFER_MAP_LENGTH"/>
+            <enum name="GL_BUFFER_MAP_OFFSET"/>
+            <enum name="GL_DEPTH_COMPONENT32F"/>
+            <enum name="GL_DEPTH32F_STENCIL8"/>
+            <enum name="GL_FLOAT_32_UNSIGNED_INT_24_8_REV"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT"/>
+            <enum name="GL_FRAMEBUFFER_UNDEFINED"/>
+            <enum name="GL_DEPTH_STENCIL_ATTACHMENT"/>
+            <enum name="GL_DEPTH_STENCIL"/>
+            <enum name="GL_UNSIGNED_INT_24_8"/>
+            <enum name="GL_DEPTH24_STENCIL8"/>
+            <enum name="GL_UNSIGNED_NORMALIZED"/>
+            <enum name="GL_DRAW_FRAMEBUFFER_BINDING"/>
+            <enum name="GL_READ_FRAMEBUFFER"/>
+            <enum name="GL_DRAW_FRAMEBUFFER"/>
+            <enum name="GL_READ_FRAMEBUFFER_BINDING"/>
+            <enum name="GL_RENDERBUFFER_SAMPLES"/>
+            <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"/>
+            <enum name="GL_MAX_COLOR_ATTACHMENTS"/>
+            <enum name="GL_COLOR_ATTACHMENT1"/>
+            <enum name="GL_COLOR_ATTACHMENT2"/>
+            <enum name="GL_COLOR_ATTACHMENT3"/>
+            <enum name="GL_COLOR_ATTACHMENT4"/>
+            <enum name="GL_COLOR_ATTACHMENT5"/>
+            <enum name="GL_COLOR_ATTACHMENT6"/>
+            <enum name="GL_COLOR_ATTACHMENT7"/>
+            <enum name="GL_COLOR_ATTACHMENT8"/>
+            <enum name="GL_COLOR_ATTACHMENT9"/>
+            <enum name="GL_COLOR_ATTACHMENT10"/>
+            <enum name="GL_COLOR_ATTACHMENT11"/>
+            <enum name="GL_COLOR_ATTACHMENT12"/>
+            <enum name="GL_COLOR_ATTACHMENT13"/>
+            <enum name="GL_COLOR_ATTACHMENT14"/>
+            <enum name="GL_COLOR_ATTACHMENT15"/>
+            <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"/>
+            <enum name="GL_MAX_SAMPLES"/>
+            <enum name="GL_HALF_FLOAT"/>
+            <enum name="GL_MAP_READ_BIT"/>
+            <enum name="GL_MAP_WRITE_BIT"/>
+            <enum name="GL_MAP_INVALIDATE_RANGE_BIT"/>
+            <enum name="GL_MAP_INVALIDATE_BUFFER_BIT"/>
+            <enum name="GL_MAP_FLUSH_EXPLICIT_BIT"/>
+            <enum name="GL_MAP_UNSYNCHRONIZED_BIT"/>
+            <enum name="GL_RG"/>
+            <enum name="GL_RG_INTEGER"/>
+            <enum name="GL_R8"/>
+            <enum name="GL_RG8"/>
+            <enum name="GL_R16F"/>
+            <enum name="GL_R32F"/>
+            <enum name="GL_RG16F"/>
+            <enum name="GL_RG32F"/>
+            <enum name="GL_R8I"/>
+            <enum name="GL_R8UI"/>
+            <enum name="GL_R16I"/>
+            <enum name="GL_R16UI"/>
+            <enum name="GL_R32I"/>
+            <enum name="GL_R32UI"/>
+            <enum name="GL_RG8I"/>
+            <enum name="GL_RG8UI"/>
+            <enum name="GL_RG16I"/>
+            <enum name="GL_RG16UI"/>
+            <enum name="GL_RG32I"/>
+            <enum name="GL_RG32UI"/>
+            <enum name="GL_VERTEX_ARRAY_BINDING"/>
+            <enum name="GL_R8_SNORM"/>
+            <enum name="GL_RG8_SNORM"/>
+            <enum name="GL_RGB8_SNORM"/>
+            <enum name="GL_RGBA8_SNORM"/>
+            <enum name="GL_SIGNED_NORMALIZED"/>
+            <enum name="GL_PRIMITIVE_RESTART_FIXED_INDEX"/>
+            <enum name="GL_COPY_READ_BUFFER"/>
+            <enum name="GL_COPY_WRITE_BUFFER"/>
+            <enum name="GL_COPY_READ_BUFFER_BINDING"/>
+            <enum name="GL_COPY_WRITE_BUFFER_BINDING"/>
+            <enum name="GL_UNIFORM_BUFFER"/>
+            <enum name="GL_UNIFORM_BUFFER_BINDING"/>
+            <enum name="GL_UNIFORM_BUFFER_START"/>
+            <enum name="GL_UNIFORM_BUFFER_SIZE"/>
+            <enum name="GL_MAX_VERTEX_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_FRAGMENT_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_COMBINED_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_UNIFORM_BUFFER_BINDINGS"/>
+            <enum name="GL_MAX_UNIFORM_BLOCK_SIZE"/>
+            <enum name="GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS"/>
+            <enum name="GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT"/>
+            <enum name="GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH"/>
+            <enum name="GL_ACTIVE_UNIFORM_BLOCKS"/>
+            <enum name="GL_UNIFORM_TYPE"/>
+            <enum name="GL_UNIFORM_SIZE"/>
+            <enum name="GL_UNIFORM_NAME_LENGTH"/>
+            <enum name="GL_UNIFORM_BLOCK_INDEX"/>
+            <enum name="GL_UNIFORM_OFFSET"/>
+            <enum name="GL_UNIFORM_ARRAY_STRIDE"/>
+            <enum name="GL_UNIFORM_MATRIX_STRIDE"/>
+            <enum name="GL_UNIFORM_IS_ROW_MAJOR"/>
+            <enum name="GL_UNIFORM_BLOCK_BINDING"/>
+            <enum name="GL_UNIFORM_BLOCK_DATA_SIZE"/>
+            <enum name="GL_UNIFORM_BLOCK_NAME_LENGTH"/>
+            <enum name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS"/>
+            <enum name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER"/>
+            <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER"/>
+            <enum name="GL_INVALID_INDEX"/>
+            <enum name="GL_MAX_VERTEX_OUTPUT_COMPONENTS"/>
+            <enum name="GL_MAX_FRAGMENT_INPUT_COMPONENTS"/>
+            <enum name="GL_MAX_SERVER_WAIT_TIMEOUT"/>
+            <enum name="GL_OBJECT_TYPE"/>
+            <enum name="GL_SYNC_CONDITION"/>
+            <enum name="GL_SYNC_STATUS"/>
+            <enum name="GL_SYNC_FLAGS"/>
+            <enum name="GL_SYNC_FENCE"/>
+            <enum name="GL_SYNC_GPU_COMMANDS_COMPLETE"/>
+            <enum name="GL_UNSIGNALED"/>
+            <enum name="GL_SIGNALED"/>
+            <enum name="GL_ALREADY_SIGNALED"/>
+            <enum name="GL_TIMEOUT_EXPIRED"/>
+            <enum name="GL_CONDITION_SATISFIED"/>
+            <enum name="GL_WAIT_FAILED"/>
+            <enum name="GL_SYNC_FLUSH_COMMANDS_BIT"/>
+            <enum name="GL_TIMEOUT_IGNORED"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR"/>
+            <enum name="GL_ANY_SAMPLES_PASSED"/>
+            <enum name="GL_ANY_SAMPLES_PASSED_CONSERVATIVE"/>
+            <enum name="GL_SAMPLER_BINDING"/>
+            <enum name="GL_RGB10_A2UI"/>
+            <enum name="GL_TEXTURE_SWIZZLE_R"/>
+            <enum name="GL_TEXTURE_SWIZZLE_G"/>
+            <enum name="GL_TEXTURE_SWIZZLE_B"/>
+            <enum name="GL_TEXTURE_SWIZZLE_A"/>
+            <enum name="GL_GREEN"/>
+            <enum name="GL_BLUE"/>
+            <enum name="GL_INT_2_10_10_10_REV"/>
+            <enum name="GL_TRANSFORM_FEEDBACK"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_PAUSED"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_ACTIVE"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BINDING"/>
+            <enum name="GL_PROGRAM_BINARY_RETRIEVABLE_HINT"/>
+            <enum name="GL_PROGRAM_BINARY_LENGTH"/>
+            <enum name="GL_NUM_PROGRAM_BINARY_FORMATS"/>
+            <enum name="GL_PROGRAM_BINARY_FORMATS"/>
+            <enum name="GL_COMPRESSED_R11_EAC"/>
+            <enum name="GL_COMPRESSED_SIGNED_R11_EAC"/>
+            <enum name="GL_COMPRESSED_RG11_EAC"/>
+            <enum name="GL_COMPRESSED_SIGNED_RG11_EAC"/>
+            <enum name="GL_COMPRESSED_RGB8_ETC2"/>
+            <enum name="GL_COMPRESSED_SRGB8_ETC2"/>
+            <enum name="GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+            <enum name="GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+            <enum name="GL_COMPRESSED_RGBA8_ETC2_EAC"/>
+            <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"/>
+            <enum name="GL_TEXTURE_IMMUTABLE_FORMAT"/>
+            <enum name="GL_MAX_ELEMENT_INDEX"/>
+            <enum name="GL_NUM_SAMPLE_COUNTS"/>
+            <enum name="GL_TEXTURE_IMMUTABLE_LEVELS"/>
+            <command name="glReadBuffer"/>
+            <command name="glDrawRangeElements"/>
+            <command name="glTexImage3D"/>
+            <command name="glTexSubImage3D"/>
+            <command name="glCopyTexSubImage3D"/>
+            <command name="glCompressedTexImage3D"/>
+            <command name="glCompressedTexSubImage3D"/>
+            <command name="glGenQueries"/>
+            <command name="glDeleteQueries"/>
+            <command name="glIsQuery"/>
+            <command name="glBeginQuery"/>
+            <command name="glEndQuery"/>
+            <command name="glGetQueryiv"/>
+            <command name="glGetQueryObjectuiv"/>
+            <command name="glUnmapBuffer"/>
+            <command name="glGetBufferPointerv"/>
+            <command name="glDrawBuffers"/>
+            <command name="glUniformMatrix2x3fv"/>
+            <command name="glUniformMatrix3x2fv"/>
+            <command name="glUniformMatrix2x4fv"/>
+            <command name="glUniformMatrix4x2fv"/>
+            <command name="glUniformMatrix3x4fv"/>
+            <command name="glUniformMatrix4x3fv"/>
+            <command name="glBlitFramebuffer"/>
+            <command name="glRenderbufferStorageMultisample"/>
+            <command name="glFramebufferTextureLayer"/>
+            <command name="glMapBufferRange"/>
+            <command name="glFlushMappedBufferRange"/>
+            <command name="glBindVertexArray"/>
+            <command name="glDeleteVertexArrays"/>
+            <command name="glGenVertexArrays"/>
+            <command name="glIsVertexArray"/>
+            <command name="glGetIntegeri_v"/>
+            <command name="glBeginTransformFeedback"/>
+            <command name="glEndTransformFeedback"/>
+            <command name="glBindBufferRange"/>
+            <command name="glBindBufferBase"/>
+            <command name="glTransformFeedbackVaryings"/>
+            <command name="glGetTransformFeedbackVarying"/>
+            <command name="glVertexAttribIPointer"/>
+            <command name="glGetVertexAttribIiv"/>
+            <command name="glGetVertexAttribIuiv"/>
+            <command name="glVertexAttribI4i"/>
+            <command name="glVertexAttribI4ui"/>
+            <command name="glVertexAttribI4iv"/>
+            <command name="glVertexAttribI4uiv"/>
+            <command name="glGetUniformuiv"/>
+            <command name="glGetFragDataLocation"/>
+            <command name="glUniform1ui"/>
+            <command name="glUniform2ui"/>
+            <command name="glUniform3ui"/>
+            <command name="glUniform4ui"/>
+            <command name="glUniform1uiv"/>
+            <command name="glUniform2uiv"/>
+            <command name="glUniform3uiv"/>
+            <command name="glUniform4uiv"/>
+            <command name="glClearBufferiv"/>
+            <command name="glClearBufferuiv"/>
+            <command name="glClearBufferfv"/>
+            <command name="glClearBufferfi"/>
+            <command name="glGetStringi"/>
+            <command name="glCopyBufferSubData"/>
+            <command name="glGetUniformIndices"/>
+            <command name="glGetActiveUniformsiv"/>
+            <command name="glGetUniformBlockIndex"/>
+            <command name="glGetActiveUniformBlockiv"/>
+            <command name="glGetActiveUniformBlockName"/>
+            <command name="glUniformBlockBinding"/>
+            <command name="glDrawArraysInstanced"/>
+            <command name="glDrawElementsInstanced"/>
+            <command name="glFenceSync"/>
+            <command name="glIsSync"/>
+            <command name="glDeleteSync"/>
+            <command name="glClientWaitSync"/>
+            <command name="glWaitSync"/>
+            <command name="glGetInteger64v"/>
+            <command name="glGetSynciv"/>
+            <command name="glGetInteger64i_v"/>
+            <command name="glGetBufferParameteri64v"/>
+            <command name="glGenSamplers"/>
+            <command name="glDeleteSamplers"/>
+            <command name="glIsSampler"/>
+            <command name="glBindSampler"/>
+            <command name="glSamplerParameteri"/>
+            <command name="glSamplerParameteriv"/>
+            <command name="glSamplerParameterf"/>
+            <command name="glSamplerParameterfv"/>
+            <command name="glGetSamplerParameteriv"/>
+            <command name="glGetSamplerParameterfv"/>
+            <command name="glVertexAttribDivisor"/>
+            <command name="glBindTransformFeedback"/>
+            <command name="glDeleteTransformFeedbacks"/>
+            <command name="glGenTransformFeedbacks"/>
+            <command name="glIsTransformFeedback"/>
+            <command name="glPauseTransformFeedback"/>
+            <command name="glResumeTransformFeedback"/>
+            <command name="glGetProgramBinary"/>
+            <command name="glProgramBinary"/>
+            <command name="glProgramParameteri"/>
+            <command name="glInvalidateFramebuffer"/>
+            <command name="glInvalidateSubFramebuffer"/>
+            <command name="glTexStorage2D"/>
+            <command name="glTexStorage3D"/>
+            <command name="glGetInternalformativ"/>
+        </require>
+    </feature>
+    <feature api="gles2" name="GL_ES_VERSION_3_1" number="3.1">
+        <!-- arrays_of_arrays features -->
+        <require/>
+        <!-- compute_shader features -->
+        <require>
+            <command name="glDispatchCompute"/>
+            <command name="glDispatchComputeIndirect"/>
+            <enum name="GL_COMPUTE_SHADER"/>
+            <enum name="GL_MAX_COMPUTE_UNIFORM_BLOCKS"/>
+            <enum name="GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS"/>
+            <enum name="GL_MAX_COMPUTE_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_COMPUTE_SHARED_MEMORY_SIZE"/>
+            <enum name="GL_MAX_COMPUTE_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS"/>
+            <enum name="GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"/>
+            <enum name="GL_MAX_COMPUTE_WORK_GROUP_COUNT"/>
+            <enum name="GL_MAX_COMPUTE_WORK_GROUP_SIZE"/>
+            <enum name="GL_COMPUTE_WORK_GROUP_SIZE"/>
+            <enum name="GL_DISPATCH_INDIRECT_BUFFER"/>
+            <enum name="GL_DISPATCH_INDIRECT_BUFFER_BINDING"/>
+            <enum name="GL_COMPUTE_SHADER_BIT"/>
+        </require>
+        <!-- draw_indirect features -->
+        <require>
+            <command name="glDrawArraysIndirect"/>
+            <command name="glDrawElementsIndirect"/>
+            <enum name="GL_DRAW_INDIRECT_BUFFER"/>
+            <enum name="GL_DRAW_INDIRECT_BUFFER_BINDING"/>
+        </require>
+        <!-- explicit_uniform_location features -->
+        <require>
+            <enum name="GL_MAX_UNIFORM_LOCATIONS"/>
+        </require>
+        <!-- framebuffer_no_attachments features -->
+        <require>
+            <command name="glFramebufferParameteri"/>
+            <command name="glGetFramebufferParameteriv"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_WIDTH"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_HEIGHT"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_SAMPLES"/>
+            <enum name="GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS"/>
+            <enum name="GL_MAX_FRAMEBUFFER_WIDTH"/>
+            <enum name="GL_MAX_FRAMEBUFFER_HEIGHT"/>
+            <enum name="GL_MAX_FRAMEBUFFER_SAMPLES"/>
+        </require>
+        <!-- program_interface_query features -->
+        <require>
+            <command name="glGetProgramInterfaceiv"/>
+            <command name="glGetProgramResourceIndex"/>
+            <command name="glGetProgramResourceName"/>
+            <command name="glGetProgramResourceiv"/>
+            <command name="glGetProgramResourceLocation"/>
+            <enum name="GL_UNIFORM"/>
+            <enum name="GL_UNIFORM_BLOCK"/>
+            <enum name="GL_PROGRAM_INPUT"/>
+            <enum name="GL_PROGRAM_OUTPUT"/>
+            <enum name="GL_BUFFER_VARIABLE"/>
+            <enum name="GL_SHADER_STORAGE_BLOCK"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_VARYING"/>
+            <enum name="GL_ACTIVE_RESOURCES"/>
+            <enum name="GL_MAX_NAME_LENGTH"/>
+            <enum name="GL_MAX_NUM_ACTIVE_VARIABLES"/>
+            <enum name="GL_NAME_LENGTH"/>
+            <enum name="GL_TYPE"/>
+            <enum name="GL_ARRAY_SIZE"/>
+            <enum name="GL_OFFSET"/>
+            <enum name="GL_BLOCK_INDEX"/>
+            <enum name="GL_ARRAY_STRIDE"/>
+            <enum name="GL_MATRIX_STRIDE"/>
+            <enum name="GL_IS_ROW_MAJOR"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_INDEX"/>
+            <enum name="GL_BUFFER_BINDING"/>
+            <enum name="GL_BUFFER_DATA_SIZE"/>
+            <enum name="GL_NUM_ACTIVE_VARIABLES"/>
+            <enum name="GL_ACTIVE_VARIABLES"/>
+            <enum name="GL_REFERENCED_BY_VERTEX_SHADER"/>
+            <enum name="GL_REFERENCED_BY_FRAGMENT_SHADER"/>
+            <enum name="GL_REFERENCED_BY_COMPUTE_SHADER"/>
+            <enum name="GL_TOP_LEVEL_ARRAY_SIZE"/>
+            <enum name="GL_TOP_LEVEL_ARRAY_STRIDE"/>
+            <enum name="GL_LOCATION"/>
+        </require>
+        <!-- separate_shader_objects features -->
+        <require>
+            <command name="glUseProgramStages"/>
+            <command name="glActiveShaderProgram"/>
+            <command name="glCreateShaderProgramv"/>
+            <command name="glBindProgramPipeline"/>
+            <command name="glDeleteProgramPipelines"/>
+            <command name="glGenProgramPipelines"/>
+            <command name="glIsProgramPipeline"/>
+            <command name="glGetProgramPipelineiv"/>
+            <command name="glProgramUniform1i"/>
+            <command name="glProgramUniform2i"/>
+            <command name="glProgramUniform3i"/>
+            <command name="glProgramUniform4i"/>
+            <command name="glProgramUniform1ui"/>
+            <command name="glProgramUniform2ui"/>
+            <command name="glProgramUniform3ui"/>
+            <command name="glProgramUniform4ui"/>
+            <command name="glProgramUniform1f"/>
+            <command name="glProgramUniform2f"/>
+            <command name="glProgramUniform3f"/>
+            <command name="glProgramUniform4f"/>
+            <command name="glProgramUniform1iv"/>
+            <command name="glProgramUniform2iv"/>
+            <command name="glProgramUniform3iv"/>
+            <command name="glProgramUniform4iv"/>
+            <command name="glProgramUniform1uiv"/>
+            <command name="glProgramUniform2uiv"/>
+            <command name="glProgramUniform3uiv"/>
+            <command name="glProgramUniform4uiv"/>
+            <command name="glProgramUniform1fv"/>
+            <command name="glProgramUniform2fv"/>
+            <command name="glProgramUniform3fv"/>
+            <command name="glProgramUniform4fv"/>
+            <command name="glProgramUniformMatrix2fv"/>
+            <command name="glProgramUniformMatrix3fv"/>
+            <command name="glProgramUniformMatrix4fv"/>
+            <command name="glProgramUniformMatrix2x3fv"/>
+            <command name="glProgramUniformMatrix3x2fv"/>
+            <command name="glProgramUniformMatrix2x4fv"/>
+            <command name="glProgramUniformMatrix4x2fv"/>
+            <command name="glProgramUniformMatrix3x4fv"/>
+            <command name="glProgramUniformMatrix4x3fv"/>
+            <command name="glValidateProgramPipeline"/>
+            <command name="glGetProgramPipelineInfoLog"/>
+            <enum name="GL_VERTEX_SHADER_BIT"/>
+            <enum name="GL_FRAGMENT_SHADER_BIT"/>
+            <enum name="GL_ALL_SHADER_BITS"/>
+            <enum name="GL_PROGRAM_SEPARABLE"/>
+            <enum name="GL_ACTIVE_PROGRAM"/>
+            <enum name="GL_PROGRAM_PIPELINE_BINDING"/>
+        </require>
+        <!-- shader_atomic_counters features -->
+        <require>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_BINDING"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_START"/>
+            <enum name="GL_ATOMIC_COUNTER_BUFFER_SIZE"/>
+            <enum name="GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_MAX_VERTEX_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_FRAGMENT_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_COMBINED_ATOMIC_COUNTERS"/>
+            <enum name="GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE"/>
+            <enum name="GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS"/>
+            <enum name="GL_ACTIVE_ATOMIC_COUNTER_BUFFERS"/>
+            <enum name="GL_UNSIGNED_INT_ATOMIC_COUNTER"/>
+        </require>
+        <!-- shader_bitfield_operations features -->
+        <require/>
+        <!-- shader_image_load_store features -->
+        <require>
+            <command name="glBindImageTexture"/>
+            <command name="glGetBooleani_v"/>
+            <command name="glMemoryBarrier"/>
+            <command name="glMemoryBarrierByRegion"/>
+            <enum name="GL_MAX_IMAGE_UNITS"/>
+            <enum name="GL_MAX_VERTEX_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_FRAGMENT_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_COMPUTE_IMAGE_UNIFORMS"/>
+            <enum name="GL_MAX_COMBINED_IMAGE_UNIFORMS"/>
+            <enum name="GL_IMAGE_BINDING_NAME"/>
+            <enum name="GL_IMAGE_BINDING_LEVEL"/>
+            <enum name="GL_IMAGE_BINDING_LAYERED"/>
+            <enum name="GL_IMAGE_BINDING_LAYER"/>
+            <enum name="GL_IMAGE_BINDING_ACCESS"/>
+            <enum name="GL_IMAGE_BINDING_FORMAT"/>
+            <enum name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT"/>
+            <enum name="GL_ELEMENT_ARRAY_BARRIER_BIT"/>
+            <enum name="GL_UNIFORM_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_FETCH_BARRIER_BIT"/>
+            <enum name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT"/>
+            <enum name="GL_COMMAND_BARRIER_BIT"/>
+            <enum name="GL_PIXEL_BUFFER_BARRIER_BIT"/>
+            <enum name="GL_TEXTURE_UPDATE_BARRIER_BIT"/>
+            <enum name="GL_BUFFER_UPDATE_BARRIER_BIT"/>
+            <enum name="GL_FRAMEBUFFER_BARRIER_BIT"/>
+            <enum name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT"/>
+            <enum name="GL_ATOMIC_COUNTER_BARRIER_BIT"/>
+            <enum name="GL_ALL_BARRIER_BITS"/>
+            <enum name="GL_IMAGE_2D"/>
+            <enum name="GL_IMAGE_3D"/>
+            <enum name="GL_IMAGE_CUBE"/>
+            <enum name="GL_IMAGE_2D_ARRAY"/>
+            <enum name="GL_INT_IMAGE_2D"/>
+            <enum name="GL_INT_IMAGE_3D"/>
+            <enum name="GL_INT_IMAGE_CUBE"/>
+            <enum name="GL_INT_IMAGE_2D_ARRAY"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_3D"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_CUBE"/>
+            <enum name="GL_UNSIGNED_INT_IMAGE_2D_ARRAY"/>
+            <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_TYPE"/>
+            <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE"/>
+            <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS"/>
+            <enum name="GL_READ_ONLY"/>
+            <enum name="GL_WRITE_ONLY"/>
+            <enum name="GL_READ_WRITE"/>
+        </require>
+        <!-- shader_layout_binding features -->
+        <require/>
+        <!-- shader_storage_buffer_object features -->
+        <require>
+            <enum name="GL_SHADER_STORAGE_BUFFER"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_BINDING"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_START"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_SIZE"/>
+            <enum name="GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS"/>
+            <enum name="GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS"/>
+            <enum name="GL_MAX_SHADER_STORAGE_BLOCK_SIZE"/>
+            <enum name="GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT"/>
+            <enum name="GL_SHADER_STORAGE_BARRIER_BIT"/>
+            <enum name="GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES"/>
+        </require>
+        <!-- stencil_texturing features -->
+        <require>
+            <enum name="GL_DEPTH_STENCIL_TEXTURE_MODE"/>
+            <enum name="GL_STENCIL_INDEX"/>
+        </require>
+        <!-- texture_gather features -->
+        <require>
+            <enum name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET"/>
+            <enum name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET"/>
+        </require>
+        <!-- texture_storage_multisample features -->
+        <require>
+            <command name="glTexStorage2DMultisample"/>
+            <command name="glGetMultisamplefv"/>
+            <command name="glSampleMaski"/>
+            <command name="glGetTexLevelParameteriv"/>
+            <command name="glGetTexLevelParameterfv"/>
+            <enum name="GL_SAMPLE_POSITION"/>
+            <enum name="GL_SAMPLE_MASK"/>
+            <enum name="GL_SAMPLE_MASK_VALUE"/>
+            <enum name="GL_TEXTURE_2D_MULTISAMPLE"/>
+            <enum name="GL_MAX_SAMPLE_MASK_WORDS"/>
+            <enum name="GL_MAX_COLOR_TEXTURE_SAMPLES"/>
+            <enum name="GL_MAX_DEPTH_TEXTURE_SAMPLES"/>
+            <enum name="GL_MAX_INTEGER_SAMPLES"/>
+            <enum name="GL_TEXTURE_BINDING_2D_MULTISAMPLE"/>
+            <enum name="GL_TEXTURE_SAMPLES"/>
+            <enum name="GL_TEXTURE_FIXED_SAMPLE_LOCATIONS"/>
+            <enum name="GL_TEXTURE_WIDTH"/>
+            <enum name="GL_TEXTURE_HEIGHT"/>
+            <enum name="GL_TEXTURE_DEPTH"/>
+            <enum name="GL_TEXTURE_INTERNAL_FORMAT"/>
+            <enum name="GL_TEXTURE_RED_SIZE"/>
+            <enum name="GL_TEXTURE_GREEN_SIZE"/>
+            <enum name="GL_TEXTURE_BLUE_SIZE"/>
+            <enum name="GL_TEXTURE_ALPHA_SIZE"/>
+            <enum name="GL_TEXTURE_DEPTH_SIZE"/>
+            <enum name="GL_TEXTURE_STENCIL_SIZE"/>
+            <enum name="GL_TEXTURE_SHARED_SIZE"/>
+            <enum name="GL_TEXTURE_RED_TYPE"/>
+            <enum name="GL_TEXTURE_GREEN_TYPE"/>
+            <enum name="GL_TEXTURE_BLUE_TYPE"/>
+            <enum name="GL_TEXTURE_ALPHA_TYPE"/>
+            <enum name="GL_TEXTURE_DEPTH_TYPE"/>
+            <enum name="GL_TEXTURE_COMPRESSED"/>
+            <enum name="GL_SAMPLER_2D_MULTISAMPLE"/>
+            <enum name="GL_INT_SAMPLER_2D_MULTISAMPLE"/>
+            <enum name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE"/>
+        </require>
+        <!-- vertex_attrib_binding features -->
+        <require>
+            <command name="glBindVertexBuffer"/>
+            <command name="glVertexAttribFormat"/>
+            <command name="glVertexAttribIFormat"/>
+            <command name="glVertexAttribBinding"/>
+            <command name="glVertexBindingDivisor"/>
+            <enum name="GL_VERTEX_ATTRIB_BINDING"/>
+            <enum name="GL_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+            <enum name="GL_VERTEX_BINDING_DIVISOR"/>
+            <enum name="GL_VERTEX_BINDING_OFFSET"/>
+            <enum name="GL_VERTEX_BINDING_STRIDE"/>
+            <enum name="GL_VERTEX_BINDING_BUFFER"/>
+            <enum name="GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+            <enum name="GL_MAX_VERTEX_ATTRIB_BINDINGS"/>
+            <enum name="GL_MAX_VERTEX_ATTRIB_STRIDE"/>
+        </require>
+    </feature>
+
+    <!-- SECTION: OpenGL / OpenGL ES extension interface definitions -->
+    <extensions>
+        <extension name="GL_3DFX_multisample" supported="gl">
+            <require>
+                <enum name="GL_MULTISAMPLE_3DFX"/>
+                <enum name="GL_SAMPLE_BUFFERS_3DFX"/>
+                <enum name="GL_SAMPLES_3DFX"/>
+                <enum name="GL_MULTISAMPLE_BIT_3DFX"/>
+            </require>
+        </extension>
+        <extension name="GL_3DFX_tbuffer" supported="gl">
+            <require>
+                <command name="glTbufferMask3DFX"/>
+            </require>
+        </extension>
+        <extension name="GL_3DFX_texture_compression_FXT1" supported="gl">
+            <require>
+                <enum name="GL_COMPRESSED_RGB_FXT1_3DFX"/>
+                <enum name="GL_COMPRESSED_RGBA_FXT1_3DFX"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_blend_minmax_factor" supported="gl">
+            <require>
+                <enum name="GL_FACTOR_MIN_AMD"/>
+                <enum name="GL_FACTOR_MAX_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_compressed_3DC_texture" supported="gles1|gles2">
+            <require>
+                <enum name="GL_3DC_X_AMD"/>
+                <enum name="GL_3DC_XY_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_compressed_ATC_texture" supported="gles1|gles2">
+            <require>
+                <enum name="GL_ATC_RGB_AMD"/>
+                <enum name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD"/>
+                <enum name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_conservative_depth" supported="gl"/>
+        <extension name="GL_AMD_debug_output" supported="gl">
+            <require>
+                <enum name="GL_MAX_DEBUG_MESSAGE_LENGTH_AMD"/>
+                <enum name="GL_MAX_DEBUG_LOGGED_MESSAGES_AMD"/>
+                <enum name="GL_DEBUG_LOGGED_MESSAGES_AMD"/>
+                <enum name="GL_DEBUG_SEVERITY_HIGH_AMD"/>
+                <enum name="GL_DEBUG_SEVERITY_MEDIUM_AMD"/>
+                <enum name="GL_DEBUG_SEVERITY_LOW_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_API_ERROR_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_DEPRECATION_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_PERFORMANCE_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_APPLICATION_AMD"/>
+                <enum name="GL_DEBUG_CATEGORY_OTHER_AMD"/>
+                <command name="glDebugMessageEnableAMD"/>
+                <command name="glDebugMessageInsertAMD"/>
+                <command name="glDebugMessageCallbackAMD"/>
+                <command name="glGetDebugMessageLogAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_depth_clamp_separate" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_CLAMP_NEAR_AMD"/>
+                <enum name="GL_DEPTH_CLAMP_FAR_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_draw_buffers_blend" supported="gl">
+            <require>
+                <command name="glBlendFuncIndexedAMD"/>
+                <command name="glBlendFuncSeparateIndexedAMD"/>
+                <command name="glBlendEquationIndexedAMD"/>
+                <command name="glBlendEquationSeparateIndexedAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_gpu_shader_int64" supported="gl">
+            <require>
+                <enum name="GL_INT64_NV"/>
+                <enum name="GL_UNSIGNED_INT64_NV"/>
+                <enum name="GL_INT8_NV"/>
+                <enum name="GL_INT8_VEC2_NV"/>
+                <enum name="GL_INT8_VEC3_NV"/>
+                <enum name="GL_INT8_VEC4_NV"/>
+                <enum name="GL_INT16_NV"/>
+                <enum name="GL_INT16_VEC2_NV"/>
+                <enum name="GL_INT16_VEC3_NV"/>
+                <enum name="GL_INT16_VEC4_NV"/>
+                <enum name="GL_INT64_VEC2_NV"/>
+                <enum name="GL_INT64_VEC3_NV"/>
+                <enum name="GL_INT64_VEC4_NV"/>
+                <enum name="GL_UNSIGNED_INT8_NV"/>
+                <enum name="GL_UNSIGNED_INT8_VEC2_NV"/>
+                <enum name="GL_UNSIGNED_INT8_VEC3_NV"/>
+                <enum name="GL_UNSIGNED_INT8_VEC4_NV"/>
+                <enum name="GL_UNSIGNED_INT16_NV"/>
+                <enum name="GL_UNSIGNED_INT16_VEC2_NV"/>
+                <enum name="GL_UNSIGNED_INT16_VEC3_NV"/>
+                <enum name="GL_UNSIGNED_INT16_VEC4_NV"/>
+                <enum name="GL_UNSIGNED_INT64_VEC2_NV"/>
+                <enum name="GL_UNSIGNED_INT64_VEC3_NV"/>
+                <enum name="GL_UNSIGNED_INT64_VEC4_NV"/>
+                <enum name="GL_FLOAT16_NV"/>
+                <enum name="GL_FLOAT16_VEC2_NV"/>
+                <enum name="GL_FLOAT16_VEC3_NV"/>
+                <enum name="GL_FLOAT16_VEC4_NV"/>
+                <command name="glUniform1i64NV"/>
+                <command name="glUniform2i64NV"/>
+                <command name="glUniform3i64NV"/>
+                <command name="glUniform4i64NV"/>
+                <command name="glUniform1i64vNV"/>
+                <command name="glUniform2i64vNV"/>
+                <command name="glUniform3i64vNV"/>
+                <command name="glUniform4i64vNV"/>
+                <command name="glUniform1ui64NV"/>
+                <command name="glUniform2ui64NV"/>
+                <command name="glUniform3ui64NV"/>
+                <command name="glUniform4ui64NV"/>
+                <command name="glUniform1ui64vNV"/>
+                <command name="glUniform2ui64vNV"/>
+                <command name="glUniform3ui64vNV"/>
+                <command name="glUniform4ui64vNV"/>
+                <command name="glGetUniformi64vNV"/>
+                <command name="glGetUniformui64vNV"/>
+            </require>
+            <require comment="Supported only if GL_EXT_direct_state_access is supported">
+                <command name="glProgramUniform1i64NV"/>
+                <command name="glProgramUniform2i64NV"/>
+                <command name="glProgramUniform3i64NV"/>
+                <command name="glProgramUniform4i64NV"/>
+                <command name="glProgramUniform1i64vNV"/>
+                <command name="glProgramUniform2i64vNV"/>
+                <command name="glProgramUniform3i64vNV"/>
+                <command name="glProgramUniform4i64vNV"/>
+                <command name="glProgramUniform1ui64NV"/>
+                <command name="glProgramUniform2ui64NV"/>
+                <command name="glProgramUniform3ui64NV"/>
+                <command name="glProgramUniform4ui64NV"/>
+                <command name="glProgramUniform1ui64vNV"/>
+                <command name="glProgramUniform2ui64vNV"/>
+                <command name="glProgramUniform3ui64vNV"/>
+                <command name="glProgramUniform4ui64vNV"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_interleaved_elements" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ELEMENT_SWIZZLE_AMD"/>
+                <enum name="GL_VERTEX_ID_SWIZZLE_AMD"/>
+                <enum name="GL_RED"/>
+                <enum name="GL_GREEN"/>
+                <enum name="GL_BLUE"/>
+                <enum name="GL_ALPHA"/>
+                <enum name="GL_RG8UI"/>
+                <enum name="GL_RG16UI"/>
+                <enum name="GL_RGBA8UI"/>
+                <command name="glVertexAttribParameteriAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_gcn_shader" supported="gl"/>
+        <extension name="GL_AMD_multi_draw_indirect" supported="gl">
+            <require>
+                <command name="glMultiDrawArraysIndirectAMD"/>
+                <command name="glMultiDrawElementsIndirectAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_name_gen_delete" supported="gl">
+            <require>
+                <enum name="GL_DATA_BUFFER_AMD"/>
+                <enum name="GL_PERFORMANCE_MONITOR_AMD"/>
+                <enum name="GL_QUERY_OBJECT_AMD"/>
+                <enum name="GL_VERTEX_ARRAY_OBJECT_AMD"/>
+                <enum name="GL_SAMPLER_OBJECT_AMD"/>
+                <command name="glGenNamesAMD"/>
+                <command name="glDeleteNamesAMD"/>
+                <command name="glIsNameAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_occlusion_query_event" supported="gl">
+            <require>
+                <enum name="GL_OCCLUSION_QUERY_EVENT_MASK_AMD"/>
+                <enum name="GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD"/>
+                <enum name="GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD"/>
+                <enum name="GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD"/>
+                <enum name="GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD"/>
+                <enum name="GL_QUERY_ALL_EVENT_BITS_AMD"/>
+                <command name="glQueryObjectParameteruiAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_performance_monitor" supported="gl|gles2">
+            <require>
+                <enum name="GL_COUNTER_TYPE_AMD"/>
+                <enum name="GL_COUNTER_RANGE_AMD"/>
+                <enum name="GL_UNSIGNED_INT64_AMD"/>
+                <enum name="GL_PERCENTAGE_AMD"/>
+                <enum name="GL_PERFMON_RESULT_AVAILABLE_AMD"/>
+                <enum name="GL_PERFMON_RESULT_SIZE_AMD"/>
+                <enum name="GL_PERFMON_RESULT_AMD"/>
+                <command name="glGetPerfMonitorGroupsAMD"/>
+                <command name="glGetPerfMonitorCountersAMD"/>
+                <command name="glGetPerfMonitorGroupStringAMD"/>
+                <command name="glGetPerfMonitorCounterStringAMD"/>
+                <command name="glGetPerfMonitorCounterInfoAMD"/>
+                <command name="glGenPerfMonitorsAMD"/>
+                <command name="glDeletePerfMonitorsAMD"/>
+                <command name="glSelectPerfMonitorCountersAMD"/>
+                <command name="glBeginPerfMonitorAMD"/>
+                <command name="glEndPerfMonitorAMD"/>
+                <command name="glGetPerfMonitorCounterDataAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_pinned_memory" supported="gl">
+            <require>
+                <enum name="GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_program_binary_Z400" supported="gles2">
+            <require>
+                <enum name="GL_Z400_BINARY_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_query_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_QUERY_BUFFER_AMD"/>
+                <enum name="GL_QUERY_BUFFER_BINDING_AMD"/>
+                <enum name="GL_QUERY_RESULT_NO_WAIT_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_sample_positions" supported="gl">
+            <require>
+                <enum name="GL_SUBSAMPLE_DISTANCE_AMD"/>
+                <command name="glSetMultisamplefvAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_seamless_cubemap_per_texture" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_CUBE_MAP_SEAMLESS"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_shader_atomic_counter_ops" supported="gl"/>
+        <extension name="GL_AMD_shader_stencil_export" supported="gl"/>
+        <extension name="GL_AMD_shader_trinary_minmax" supported="gl"/>
+        <extension name="GL_AMD_sparse_texture" supported="gl">
+            <require>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_X_AMD"/>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_Y_AMD"/>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_Z_AMD"/>
+                <enum name="GL_MAX_SPARSE_TEXTURE_SIZE_AMD"/>
+                <enum name="GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD"/>
+                <enum name="GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS"/>
+                <enum name="GL_MIN_SPARSE_LEVEL_AMD"/>
+                <enum name="GL_MIN_LOD_WARNING_AMD"/>
+                <enum name="GL_TEXTURE_STORAGE_SPARSE_BIT_AMD"/>
+                <command name="glTexStorageSparseAMD"/>
+                <command name="glTextureStorageSparseAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_stencil_operation_extended" supported="gl">
+            <require>
+                <enum name="GL_SET_AMD"/>
+                <enum name="GL_REPLACE_VALUE_AMD"/>
+                <enum name="GL_STENCIL_OP_VALUE_AMD"/>
+                <enum name="GL_STENCIL_BACK_OP_VALUE_AMD"/>
+                <command name="glStencilOpValueAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_texture_texture4" supported="gl"/>
+        <extension name="GL_AMD_transform_feedback3_lines_triangles" supported="gl"/>
+        <extension name="GL_AMD_transform_feedback4" supported="gl">
+            <require>
+                <enum name="GL_STREAM_RASTERIZATION_AMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_vertex_shader_layer" supported="gl"/>
+        <extension name="GL_AMD_vertex_shader_tessellator" supported="gl">
+            <require>
+                <enum name="GL_SAMPLER_BUFFER_AMD"/>
+                <enum name="GL_INT_SAMPLER_BUFFER_AMD"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD"/>
+                <enum name="GL_TESSELLATION_MODE_AMD"/>
+                <enum name="GL_TESSELLATION_FACTOR_AMD"/>
+                <enum name="GL_DISCRETE_AMD"/>
+                <enum name="GL_CONTINUOUS_AMD"/>
+                <command name="glTessellationFactorAMD"/>
+                <command name="glTessellationModeAMD"/>
+            </require>
+        </extension>
+        <extension name="GL_AMD_vertex_shader_viewport_index" supported="gl"/>
+        <extension name="GL_ANGLE_depth_texture" supported="gles2">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT"/>
+                <enum name="GL_DEPTH_STENCIL_OES"/>
+                <enum name="GL_UNSIGNED_SHORT"/>
+                <enum name="GL_UNSIGNED_INT"/>
+                <enum name="GL_UNSIGNED_INT_24_8_OES"/>
+                <enum name="GL_DEPTH_COMPONENT16"/>
+                <enum name="GL_DEPTH_COMPONENT32_OES"/>
+                <enum name="GL_DEPTH24_STENCIL8_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_framebuffer_blit" supported="gles2">
+            <require>
+                <enum name="GL_READ_FRAMEBUFFER_ANGLE"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_ANGLE"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_BINDING_ANGLE"/>
+                <enum name="GL_READ_FRAMEBUFFER_BINDING_ANGLE"/>
+                <command name="glBlitFramebufferANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_framebuffer_multisample" supported="gles2">
+            <require>
+                <enum name="GL_RENDERBUFFER_SAMPLES_ANGLE"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE"/>
+                <enum name="GL_MAX_SAMPLES_ANGLE"/>
+                <command name="glRenderbufferStorageMultisampleANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_instanced_arrays" supported="gles2">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE"/>
+                <command name="glDrawArraysInstancedANGLE"/>
+                <command name="glDrawElementsInstancedANGLE"/>
+                <command name="glVertexAttribDivisorANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_pack_reverse_row_order" supported="gles2">
+            <require>
+                <enum name="GL_PACK_REVERSE_ROW_ORDER_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_program_binary" supported="gles2">
+            <require>
+                <enum name="GL_PROGRAM_BINARY_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_texture_compression_dxt3" supported="gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_texture_compression_dxt5" supported="gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_texture_usage" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_USAGE_ANGLE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_ANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ANGLE_translated_shader_source" supported="gles2">
+            <require>
+                <enum name="GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE"/>
+                <command name="glGetTranslatedShaderSourceANGLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_aux_depth_stencil" supported="gl">
+            <require>
+                <enum name="GL_AUX_DEPTH_STENCIL_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_client_storage" supported="gl">
+            <require>
+                <enum name="GL_UNPACK_CLIENT_STORAGE_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_copy_texture_levels" supported="gles1|gles2">
+            <require>
+                <command name="glCopyTextureLevelsAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_element_array" supported="gl">
+            <require>
+                <enum name="GL_ELEMENT_ARRAY_APPLE"/>
+                <enum name="GL_ELEMENT_ARRAY_TYPE_APPLE"/>
+                <enum name="GL_ELEMENT_ARRAY_POINTER_APPLE"/>
+                <command name="glElementPointerAPPLE"/>
+                <command name="glDrawElementArrayAPPLE"/>
+                <command name="glDrawRangeElementArrayAPPLE"/>
+                <command name="glMultiDrawElementArrayAPPLE"/>
+                <command name="glMultiDrawRangeElementArrayAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_fence" supported="gl">
+            <require>
+                <enum name="GL_DRAW_PIXELS_APPLE"/>
+                <enum name="GL_FENCE_APPLE"/>
+                <command name="glGenFencesAPPLE"/>
+                <command name="glDeleteFencesAPPLE"/>
+                <command name="glSetFenceAPPLE"/>
+                <command name="glIsFenceAPPLE"/>
+                <command name="glTestFenceAPPLE"/>
+                <command name="glFinishFenceAPPLE"/>
+                <command name="glTestObjectAPPLE"/>
+                <command name="glFinishObjectAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_float_pixels" supported="gl">
+            <require>
+                <enum name="GL_HALF_APPLE"/>
+                <enum name="GL_RGBA_FLOAT32_APPLE"/>
+                <enum name="GL_RGB_FLOAT32_APPLE"/>
+                <enum name="GL_ALPHA_FLOAT32_APPLE"/>
+                <enum name="GL_INTENSITY_FLOAT32_APPLE"/>
+                <enum name="GL_LUMINANCE_FLOAT32_APPLE"/>
+                <enum name="GL_LUMINANCE_ALPHA_FLOAT32_APPLE"/>
+                <enum name="GL_RGBA_FLOAT16_APPLE"/>
+                <enum name="GL_RGB_FLOAT16_APPLE"/>
+                <enum name="GL_ALPHA_FLOAT16_APPLE"/>
+                <enum name="GL_INTENSITY_FLOAT16_APPLE"/>
+                <enum name="GL_LUMINANCE_FLOAT16_APPLE"/>
+                <enum name="GL_LUMINANCE_ALPHA_FLOAT16_APPLE"/>
+                <enum name="GL_COLOR_FLOAT_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_flush_buffer_range" supported="gl">
+            <require>
+                <enum name="GL_BUFFER_SERIALIZED_MODIFY_APPLE"/>
+                <enum name="GL_BUFFER_FLUSHING_UNMAP_APPLE"/>
+                <command name="glBufferParameteriAPPLE"/>
+                <command name="glFlushMappedBufferRangeAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_framebuffer_multisample" supported="gles1|gles2">
+            <require>
+                <enum name="GL_RENDERBUFFER_SAMPLES_APPLE"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE"/>
+                <enum name="GL_MAX_SAMPLES_APPLE"/>
+                <enum name="GL_READ_FRAMEBUFFER_APPLE"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_APPLE"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_BINDING_APPLE"/>
+                <enum name="GL_READ_FRAMEBUFFER_BINDING_APPLE"/>
+                <command name="glRenderbufferStorageMultisampleAPPLE"/>
+                <command name="glResolveMultisampleFramebufferAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_object_purgeable" supported="gl">
+            <require>
+                <enum name="GL_BUFFER_OBJECT_APPLE"/>
+                <enum name="GL_RELEASED_APPLE"/>
+                <enum name="GL_VOLATILE_APPLE"/>
+                <enum name="GL_RETAINED_APPLE"/>
+                <enum name="GL_UNDEFINED_APPLE"/>
+                <enum name="GL_PURGEABLE_APPLE"/>
+                <command name="glObjectPurgeableAPPLE"/>
+                <command name="glObjectUnpurgeableAPPLE"/>
+                <command name="glGetObjectParameterivAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_rgb_422" supported="gl|gles2">
+            <require>
+                <enum name="GL_RGB_422_APPLE"/>
+                <enum name="GL_UNSIGNED_SHORT_8_8_APPLE"/>
+                <enum name="GL_UNSIGNED_SHORT_8_8_REV_APPLE"/>
+            </require>
+            <require comment="Depends on TexStorage* (EXT_texture_storage / ES 3.0 / GL 4.4 / etc.)">
+                <enum name="GL_RGB_RAW_422_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_row_bytes" supported="gl">
+            <require>
+                <enum name="GL_PACK_ROW_BYTES_APPLE"/>
+                <enum name="GL_UNPACK_ROW_BYTES_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_specular_vector" supported="gl">
+            <require>
+                <enum name="GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_sync" supported="gles1|gles2">
+            <require>
+                <enum name="GL_SYNC_OBJECT_APPLE"/>
+                <enum name="GL_MAX_SERVER_WAIT_TIMEOUT_APPLE"/>
+                <enum name="GL_OBJECT_TYPE_APPLE"/>
+                <enum name="GL_SYNC_CONDITION_APPLE"/>
+                <enum name="GL_SYNC_STATUS_APPLE"/>
+                <enum name="GL_SYNC_FLAGS_APPLE"/>
+                <enum name="GL_SYNC_FENCE_APPLE"/>
+                <enum name="GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE"/>
+                <enum name="GL_UNSIGNALED_APPLE"/>
+                <enum name="GL_SIGNALED_APPLE"/>
+                <enum name="GL_ALREADY_SIGNALED_APPLE"/>
+                <enum name="GL_TIMEOUT_EXPIRED_APPLE"/>
+                <enum name="GL_CONDITION_SATISFIED_APPLE"/>
+                <enum name="GL_WAIT_FAILED_APPLE"/>
+                <enum name="GL_SYNC_FLUSH_COMMANDS_BIT_APPLE"/>
+                <enum name="GL_TIMEOUT_IGNORED_APPLE"/>
+                <command name="glFenceSyncAPPLE"/>
+                <command name="glIsSyncAPPLE"/>
+                <command name="glDeleteSyncAPPLE"/>
+                <command name="glClientWaitSyncAPPLE"/>
+                <command name="glWaitSyncAPPLE"/>
+                <command name="glGetInteger64vAPPLE"/>
+                <command name="glGetSyncivAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_texture_2D_limited_npot" supported="gles1"/>
+        <extension name="GL_APPLE_texture_format_BGRA8888" supported="gles1|gles2">
+            <require>
+                <enum name="GL_BGRA_EXT"/>
+            </require>
+            <require comment="Depends on TexStorage* (EXT_texture_storage / ES 3.0 / GL 4.4 / etc.)">
+                <enum name="GL_BGRA8_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_texture_max_level" supported="gles1|gles2">
+            <require>
+                <enum name="GL_TEXTURE_MAX_LEVEL_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_texture_range" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_RANGE_LENGTH_APPLE"/>
+                <enum name="GL_TEXTURE_RANGE_POINTER_APPLE"/>
+                <enum name="GL_TEXTURE_STORAGE_HINT_APPLE"/>
+                <enum name="GL_STORAGE_PRIVATE_APPLE"/>
+                <enum name="GL_STORAGE_CACHED_APPLE"/>
+                <enum name="GL_STORAGE_SHARED_APPLE"/>
+                <command name="glTextureRangeAPPLE"/>
+                <command name="glGetTexParameterPointervAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_transform_hint" supported="gl">
+            <require>
+                <enum name="GL_TRANSFORM_HINT_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_vertex_array_object" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_BINDING_APPLE"/>
+                <command name="glBindVertexArrayAPPLE"/>
+                <command name="glDeleteVertexArraysAPPLE"/>
+                <command name="glGenVertexArraysAPPLE"/>
+                <command name="glIsVertexArrayAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_vertex_array_range" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_RANGE_APPLE"/>
+                <enum name="GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE"/>
+                <enum name="GL_VERTEX_ARRAY_STORAGE_HINT_APPLE"/>
+                <enum name="GL_VERTEX_ARRAY_RANGE_POINTER_APPLE"/>
+                <enum name="GL_STORAGE_CLIENT_APPLE"/>
+                <enum name="GL_STORAGE_CACHED_APPLE"/>
+                <enum name="GL_STORAGE_SHARED_APPLE"/>
+                <command name="glVertexArrayRangeAPPLE"/>
+                <command name="glFlushVertexArrayRangeAPPLE"/>
+                <command name="glVertexArrayParameteriAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_vertex_program_evaluators" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_MAP1_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP2_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE"/>
+                <enum name="GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE"/>
+                <command name="glEnableVertexAttribAPPLE"/>
+                <command name="glDisableVertexAttribAPPLE"/>
+                <command name="glIsVertexAttribEnabledAPPLE"/>
+                <command name="glMapVertexAttrib1dAPPLE"/>
+                <command name="glMapVertexAttrib1fAPPLE"/>
+                <command name="glMapVertexAttrib2dAPPLE"/>
+                <command name="glMapVertexAttrib2fAPPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_APPLE_ycbcr_422" supported="gl">
+            <require>
+                <enum name="GL_YCBCR_422_APPLE"/>
+                <enum name="GL_UNSIGNED_SHORT_8_8_APPLE"/>
+                <enum name="GL_UNSIGNED_SHORT_8_8_REV_APPLE"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_ES2_compatibility" supported="gl|glcore">
+            <require>
+                <enum name="GL_FIXED"/>
+                <enum name="GL_IMPLEMENTATION_COLOR_READ_TYPE"/>
+                <enum name="GL_IMPLEMENTATION_COLOR_READ_FORMAT"/>
+                <enum name="GL_LOW_FLOAT"/>
+                <enum name="GL_MEDIUM_FLOAT"/>
+                <enum name="GL_HIGH_FLOAT"/>
+                <enum name="GL_LOW_INT"/>
+                <enum name="GL_MEDIUM_INT"/>
+                <enum name="GL_HIGH_INT"/>
+                <enum name="GL_SHADER_COMPILER"/>
+                <enum name="GL_SHADER_BINARY_FORMATS"/>
+                <enum name="GL_NUM_SHADER_BINARY_FORMATS"/>
+                <enum name="GL_MAX_VERTEX_UNIFORM_VECTORS"/>
+                <enum name="GL_MAX_VARYING_VECTORS"/>
+                <enum name="GL_MAX_FRAGMENT_UNIFORM_VECTORS"/>
+                <enum name="GL_RGB565"/>
+                <command name="glReleaseShaderCompiler"/>
+                <command name="glShaderBinary"/>
+                <command name="glGetShaderPrecisionFormat"/>
+                <command name="glDepthRangef"/>
+                <command name="glClearDepthf"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_ES3_compatibility" supported="gl|glcore">
+            <require>
+                <enum name="GL_COMPRESSED_RGB8_ETC2"/>
+                <enum name="GL_COMPRESSED_SRGB8_ETC2"/>
+                <enum name="GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+                <enum name="GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"/>
+                <enum name="GL_COMPRESSED_RGBA8_ETC2_EAC"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"/>
+                <enum name="GL_COMPRESSED_R11_EAC"/>
+                <enum name="GL_COMPRESSED_SIGNED_R11_EAC"/>
+                <enum name="GL_COMPRESSED_RG11_EAC"/>
+                <enum name="GL_COMPRESSED_SIGNED_RG11_EAC"/>
+                <enum name="GL_PRIMITIVE_RESTART_FIXED_INDEX"/>
+                <enum name="GL_ANY_SAMPLES_PASSED_CONSERVATIVE"/>
+                <enum name="GL_MAX_ELEMENT_INDEX"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_arrays_of_arrays" supported="gl|glcore"/>
+        <extension name="GL_ARB_base_instance" supported="gl|glcore">
+            <require>
+                <command name="glDrawArraysInstancedBaseInstance"/>
+                <command name="glDrawElementsInstancedBaseInstance"/>
+                <command name="glDrawElementsInstancedBaseVertexBaseInstance"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_bindless_texture" supported="gl|glcore">
+            <require>
+                <enum name="GL_UNSIGNED_INT64_ARB"/>
+                <command name="glGetTextureHandleARB"/>
+                <command name="glGetTextureSamplerHandleARB"/>
+                <command name="glMakeTextureHandleResidentARB"/>
+                <command name="glMakeTextureHandleNonResidentARB"/>
+                <command name="glGetImageHandleARB"/>
+                <command name="glMakeImageHandleResidentARB"/>
+                <command name="glMakeImageHandleNonResidentARB"/>
+                <command name="glUniformHandleui64ARB"/>
+                <command name="glUniformHandleui64vARB"/>
+                <command name="glProgramUniformHandleui64ARB"/>
+                <command name="glProgramUniformHandleui64vARB"/>
+                <command name="glIsTextureHandleResidentARB"/>
+                <command name="glIsImageHandleResidentARB"/>
+                <command name="glVertexAttribL1ui64ARB"/>
+                <command name="glVertexAttribL1ui64vARB"/>
+                <command name="glGetVertexAttribLui64vARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_blend_func_extended" supported="gl|glcore">
+            <require>
+                <enum name="GL_SRC1_COLOR"/>
+                <enum name="GL_SRC1_ALPHA"/>
+                <enum name="GL_ONE_MINUS_SRC1_COLOR"/>
+                <enum name="GL_ONE_MINUS_SRC1_ALPHA"/>
+                <enum name="GL_MAX_DUAL_SOURCE_DRAW_BUFFERS"/>
+                <command name="glBindFragDataLocationIndexed"/>
+                <command name="glGetFragDataIndex"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_buffer_storage" supported="gl|glcore">
+            <require>
+                <enum name="GL_MAP_READ_BIT"/>
+                <enum name="GL_MAP_WRITE_BIT"/>
+                <enum name="GL_MAP_PERSISTENT_BIT"/>
+                <enum name="GL_MAP_COHERENT_BIT"/>
+                <enum name="GL_DYNAMIC_STORAGE_BIT"/>
+                <enum name="GL_CLIENT_STORAGE_BIT"/>
+                <enum name="GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT"/>
+                <enum name="GL_BUFFER_IMMUTABLE_STORAGE"/>
+                <enum name="GL_BUFFER_STORAGE_FLAGS"/>
+                <command name="glBufferStorage"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_cl_event" supported="gl|glcore">
+            <require>
+                <enum name="GL_SYNC_CL_EVENT_ARB"/>
+                <enum name="GL_SYNC_CL_EVENT_COMPLETE_ARB"/>
+                <command name="glCreateSyncFromCLeventARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_clear_buffer_object" supported="gl|glcore">
+            <require>
+                <command name="glClearBufferData"/>
+                <command name="glClearBufferSubData"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_clear_texture" supported="gl|glcore">
+            <require>
+                <enum name="GL_CLEAR_TEXTURE"/>
+                <command name="glClearTexImage"/>
+                <command name="glClearTexSubImage"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_color_buffer_float" supported="gl">
+            <require>
+                <enum name="GL_RGBA_FLOAT_MODE_ARB"/>
+                <enum name="GL_CLAMP_VERTEX_COLOR_ARB"/>
+                <enum name="GL_CLAMP_FRAGMENT_COLOR_ARB"/>
+                <enum name="GL_CLAMP_READ_COLOR_ARB"/>
+                <enum name="GL_FIXED_ONLY_ARB"/>
+                <command name="glClampColorARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_compatibility" supported="gl">
+            <require comment="Defines features from OpenGL 3.0 that were removed in OpenGL 3.1 - not enumerated here yet">
+            </require>
+        </extension>
+        <extension name="GL_ARB_compressed_texture_pixel_storage" supported="gl|glcore">
+            <require>
+                <enum name="GL_UNPACK_COMPRESSED_BLOCK_WIDTH"/>
+                <enum name="GL_UNPACK_COMPRESSED_BLOCK_HEIGHT"/>
+                <enum name="GL_UNPACK_COMPRESSED_BLOCK_DEPTH"/>
+                <enum name="GL_UNPACK_COMPRESSED_BLOCK_SIZE"/>
+                <enum name="GL_PACK_COMPRESSED_BLOCK_WIDTH"/>
+                <enum name="GL_PACK_COMPRESSED_BLOCK_HEIGHT"/>
+                <enum name="GL_PACK_COMPRESSED_BLOCK_DEPTH"/>
+                <enum name="GL_PACK_COMPRESSED_BLOCK_SIZE"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_compute_shader" supported="gl|glcore">
+            <require>
+                <enum name="GL_COMPUTE_SHADER"/>
+                <enum name="GL_MAX_COMPUTE_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS"/>
+                <enum name="GL_MAX_COMPUTE_IMAGE_UNIFORMS"/>
+                <enum name="GL_MAX_COMPUTE_SHARED_MEMORY_SIZE"/>
+                <enum name="GL_MAX_COMPUTE_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_COMPUTE_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS"/>
+                <enum name="GL_MAX_COMPUTE_WORK_GROUP_COUNT"/>
+                <enum name="GL_MAX_COMPUTE_WORK_GROUP_SIZE"/>
+                <enum name="GL_COMPUTE_WORK_GROUP_SIZE"/>
+                <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER"/>
+                <enum name="GL_DISPATCH_INDIRECT_BUFFER"/>
+                <enum name="GL_DISPATCH_INDIRECT_BUFFER_BINDING"/>
+                <enum name="GL_COMPUTE_SHADER_BIT"/>
+                <command name="glDispatchCompute"/>
+                <command name="glDispatchComputeIndirect"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_compute_variable_group_size" supported="gl|glcore">
+            <require>
+                <enum name="GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB"/>
+                <enum name="GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB"/>
+                <enum name="GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB"/>
+                <enum name="GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB"/>
+                <command name="glDispatchComputeGroupSizeARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_conservative_depth" supported="gl|glcore"/>
+        <extension name="GL_ARB_copy_buffer" supported="gl|glcore">
+            <require>
+                <enum name="GL_COPY_READ_BUFFER_BINDING"/>
+                <enum name="GL_COPY_READ_BUFFER"/>
+                <enum name="GL_COPY_WRITE_BUFFER_BINDING"/>
+                <enum name="GL_COPY_WRITE_BUFFER"/>
+                <command name="glCopyBufferSubData"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_copy_image" supported="gl|glcore">
+            <require>
+                <command name="glCopyImageSubData"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_debug_output" supported="gl|glcore">
+            <require>
+                <enum name="GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB"/>
+                <enum name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB"/>
+                <enum name="GL_DEBUG_CALLBACK_FUNCTION_ARB"/>
+                <enum name="GL_DEBUG_CALLBACK_USER_PARAM_ARB"/>
+                <enum name="GL_DEBUG_SOURCE_API_ARB"/>
+                <enum name="GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB"/>
+                <enum name="GL_DEBUG_SOURCE_SHADER_COMPILER_ARB"/>
+                <enum name="GL_DEBUG_SOURCE_THIRD_PARTY_ARB"/>
+                <enum name="GL_DEBUG_SOURCE_APPLICATION_ARB"/>
+                <enum name="GL_DEBUG_SOURCE_OTHER_ARB"/>
+                <enum name="GL_DEBUG_TYPE_ERROR_ARB"/>
+                <enum name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB"/>
+                <enum name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB"/>
+                <enum name="GL_DEBUG_TYPE_PORTABILITY_ARB"/>
+                <enum name="GL_DEBUG_TYPE_PERFORMANCE_ARB"/>
+                <enum name="GL_DEBUG_TYPE_OTHER_ARB"/>
+                <enum name="GL_MAX_DEBUG_MESSAGE_LENGTH_ARB"/>
+                <enum name="GL_MAX_DEBUG_LOGGED_MESSAGES_ARB"/>
+                <enum name="GL_DEBUG_LOGGED_MESSAGES_ARB"/>
+                <enum name="GL_DEBUG_SEVERITY_HIGH_ARB"/>
+                <enum name="GL_DEBUG_SEVERITY_MEDIUM_ARB"/>
+                <enum name="GL_DEBUG_SEVERITY_LOW_ARB"/>
+                <command name="glDebugMessageControlARB"/>
+                <command name="glDebugMessageInsertARB"/>
+                <command name="glDebugMessageCallbackARB"/>
+                <command name="glGetDebugMessageLogARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_depth_buffer_float" supported="gl|glcore">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT32F"/>
+                <enum name="GL_DEPTH32F_STENCIL8"/>
+                <enum name="GL_FLOAT_32_UNSIGNED_INT_24_8_REV"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_depth_clamp" supported="gl|glcore">
+            <require>
+                <enum name="GL_DEPTH_CLAMP"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_depth_texture" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT16_ARB"/>
+                <enum name="GL_DEPTH_COMPONENT24_ARB"/>
+                <enum name="GL_DEPTH_COMPONENT32_ARB"/>
+                <enum name="GL_TEXTURE_DEPTH_SIZE_ARB"/>
+                <enum name="GL_DEPTH_TEXTURE_MODE_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_draw_buffers" supported="gl">
+            <require>
+                <enum name="GL_MAX_DRAW_BUFFERS_ARB"/>
+                <enum name="GL_DRAW_BUFFER0_ARB"/>
+                <enum name="GL_DRAW_BUFFER1_ARB"/>
+                <enum name="GL_DRAW_BUFFER2_ARB"/>
+                <enum name="GL_DRAW_BUFFER3_ARB"/>
+                <enum name="GL_DRAW_BUFFER4_ARB"/>
+                <enum name="GL_DRAW_BUFFER5_ARB"/>
+                <enum name="GL_DRAW_BUFFER6_ARB"/>
+                <enum name="GL_DRAW_BUFFER7_ARB"/>
+                <enum name="GL_DRAW_BUFFER8_ARB"/>
+                <enum name="GL_DRAW_BUFFER9_ARB"/>
+                <enum name="GL_DRAW_BUFFER10_ARB"/>
+                <enum name="GL_DRAW_BUFFER11_ARB"/>
+                <enum name="GL_DRAW_BUFFER12_ARB"/>
+                <enum name="GL_DRAW_BUFFER13_ARB"/>
+                <enum name="GL_DRAW_BUFFER14_ARB"/>
+                <enum name="GL_DRAW_BUFFER15_ARB"/>
+                <command name="glDrawBuffersARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_draw_buffers_blend" supported="gl|glcore">
+            <require>
+                <command name="glBlendEquationiARB"/>
+                <command name="glBlendEquationSeparateiARB"/>
+                <command name="glBlendFunciARB"/>
+                <command name="glBlendFuncSeparateiARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_draw_elements_base_vertex" supported="gl|glcore">
+            <require>
+                <command name="glDrawElementsBaseVertex"/>
+                <command name="glDrawRangeElementsBaseVertex"/>
+                <command name="glDrawElementsInstancedBaseVertex"/>
+                <command name="glMultiDrawElementsBaseVertex"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_draw_indirect" supported="gl|glcore">
+            <require>
+                <enum name="GL_DRAW_INDIRECT_BUFFER"/>
+                <enum name="GL_DRAW_INDIRECT_BUFFER_BINDING"/>
+                <command name="glDrawArraysIndirect"/>
+                <command name="glDrawElementsIndirect"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_draw_instanced" supported="gl">
+            <require>
+                <command name="glDrawArraysInstancedARB"/>
+                <command name="glDrawElementsInstancedARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_enhanced_layouts" supported="gl|glcore">
+            <require>
+                <enum name="GL_LOCATION_COMPONENT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_INDEX"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_explicit_attrib_location" supported="gl|glcore"/>
+        <extension name="GL_ARB_explicit_uniform_location" supported="gl|glcore">
+            <require>
+                <enum name="GL_MAX_UNIFORM_LOCATIONS"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_fragment_coord_conventions" supported="gl|glcore"/>
+        <extension name="GL_ARB_fragment_layer_viewport" supported="gl|glcore"/>
+        <extension name="GL_ARB_fragment_program" supported="gl">
+            <require>
+                <enum name="GL_FRAGMENT_PROGRAM_ARB"/>
+                <enum name="GL_PROGRAM_FORMAT_ASCII_ARB"/>
+                <enum name="GL_PROGRAM_LENGTH_ARB"/>
+                <enum name="GL_PROGRAM_FORMAT_ARB"/>
+                <enum name="GL_PROGRAM_BINDING_ARB"/>
+                <enum name="GL_PROGRAM_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_TEMPORARIES_ARB"/>
+                <enum name="GL_MAX_PROGRAM_TEMPORARIES_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_TEMPORARIES_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB"/>
+                <enum name="GL_PROGRAM_PARAMETERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_PARAMETERS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_PARAMETERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB"/>
+                <enum name="GL_PROGRAM_ATTRIBS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_ATTRIBS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_ATTRIBS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_ENV_PARAMETERS_ARB"/>
+                <enum name="GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB"/>
+                <enum name="GL_PROGRAM_ALU_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_TEX_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_TEX_INDIRECTIONS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB"/>
+                <enum name="GL_PROGRAM_STRING_ARB"/>
+                <enum name="GL_PROGRAM_ERROR_POSITION_ARB"/>
+                <enum name="GL_CURRENT_MATRIX_ARB"/>
+                <enum name="GL_TRANSPOSE_CURRENT_MATRIX_ARB"/>
+                <enum name="GL_CURRENT_MATRIX_STACK_DEPTH_ARB"/>
+                <enum name="GL_MAX_PROGRAM_MATRICES_ARB"/>
+                <enum name="GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB"/>
+                <enum name="GL_MAX_TEXTURE_COORDS_ARB"/>
+                <enum name="GL_MAX_TEXTURE_IMAGE_UNITS_ARB"/>
+                <enum name="GL_PROGRAM_ERROR_STRING_ARB"/>
+                <enum name="GL_MATRIX0_ARB"/>
+                <enum name="GL_MATRIX1_ARB"/>
+                <enum name="GL_MATRIX2_ARB"/>
+                <enum name="GL_MATRIX3_ARB"/>
+                <enum name="GL_MATRIX4_ARB"/>
+                <enum name="GL_MATRIX5_ARB"/>
+                <enum name="GL_MATRIX6_ARB"/>
+                <enum name="GL_MATRIX7_ARB"/>
+                <enum name="GL_MATRIX8_ARB"/>
+                <enum name="GL_MATRIX9_ARB"/>
+                <enum name="GL_MATRIX10_ARB"/>
+                <enum name="GL_MATRIX11_ARB"/>
+                <enum name="GL_MATRIX12_ARB"/>
+                <enum name="GL_MATRIX13_ARB"/>
+                <enum name="GL_MATRIX14_ARB"/>
+                <enum name="GL_MATRIX15_ARB"/>
+                <enum name="GL_MATRIX16_ARB"/>
+                <enum name="GL_MATRIX17_ARB"/>
+                <enum name="GL_MATRIX18_ARB"/>
+                <enum name="GL_MATRIX19_ARB"/>
+                <enum name="GL_MATRIX20_ARB"/>
+                <enum name="GL_MATRIX21_ARB"/>
+                <enum name="GL_MATRIX22_ARB"/>
+                <enum name="GL_MATRIX23_ARB"/>
+                <enum name="GL_MATRIX24_ARB"/>
+                <enum name="GL_MATRIX25_ARB"/>
+                <enum name="GL_MATRIX26_ARB"/>
+                <enum name="GL_MATRIX27_ARB"/>
+                <enum name="GL_MATRIX28_ARB"/>
+                <enum name="GL_MATRIX29_ARB"/>
+                <enum name="GL_MATRIX30_ARB"/>
+                <enum name="GL_MATRIX31_ARB"/>
+            </require>
+            <require comment="Shared with ARB_vertex_program">
+                <command name="glProgramStringARB"/>
+                <command name="glBindProgramARB"/>
+                <command name="glDeleteProgramsARB"/>
+                <command name="glGenProgramsARB"/>
+                <command name="glProgramEnvParameter4dARB"/>
+                <command name="glProgramEnvParameter4dvARB"/>
+                <command name="glProgramEnvParameter4fARB"/>
+                <command name="glProgramEnvParameter4fvARB"/>
+                <command name="glProgramLocalParameter4dARB"/>
+                <command name="glProgramLocalParameter4dvARB"/>
+                <command name="glProgramLocalParameter4fARB"/>
+                <command name="glProgramLocalParameter4fvARB"/>
+                <command name="glGetProgramEnvParameterdvARB"/>
+                <command name="glGetProgramEnvParameterfvARB"/>
+                <command name="glGetProgramLocalParameterdvARB"/>
+                <command name="glGetProgramLocalParameterfvARB"/>
+                <command name="glGetProgramivARB"/>
+                <command name="glGetProgramStringARB"/>
+                <command name="glIsProgramARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_fragment_program_shadow" supported="gl"/>
+        <extension name="GL_ARB_fragment_shader" supported="gl">
+            <require>
+                <enum name="GL_FRAGMENT_SHADER_ARB"/>
+                <enum name="GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB"/>
+                <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_framebuffer_no_attachments" supported="gl|glcore">
+            <require>
+                <enum name="GL_FRAMEBUFFER_DEFAULT_WIDTH"/>
+                <enum name="GL_FRAMEBUFFER_DEFAULT_HEIGHT"/>
+                <enum name="GL_FRAMEBUFFER_DEFAULT_LAYERS"/>
+                <enum name="GL_FRAMEBUFFER_DEFAULT_SAMPLES"/>
+                <enum name="GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS"/>
+                <enum name="GL_MAX_FRAMEBUFFER_WIDTH"/>
+                <enum name="GL_MAX_FRAMEBUFFER_HEIGHT"/>
+                <enum name="GL_MAX_FRAMEBUFFER_LAYERS"/>
+                <enum name="GL_MAX_FRAMEBUFFER_SAMPLES"/>
+                <command name="glFramebufferParameteri"/>
+                <command name="glGetFramebufferParameteriv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_framebuffer_object" supported="gl|glcore">
+            <require>
+                <enum name="GL_INVALID_FRAMEBUFFER_OPERATION"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_DEFAULT"/>
+                <enum name="GL_FRAMEBUFFER_UNDEFINED"/>
+                <enum name="GL_DEPTH_STENCIL_ATTACHMENT"/>
+                <enum name="GL_MAX_RENDERBUFFER_SIZE"/>
+                <enum name="GL_DEPTH_STENCIL"/>
+                <enum name="GL_UNSIGNED_INT_24_8"/>
+                <enum name="GL_DEPTH24_STENCIL8"/>
+                <enum name="GL_TEXTURE_STENCIL_SIZE"/>
+                <enum name="GL_TEXTURE_RED_TYPE"/>
+                <enum name="GL_TEXTURE_GREEN_TYPE"/>
+                <enum name="GL_TEXTURE_BLUE_TYPE"/>
+                <enum name="GL_TEXTURE_ALPHA_TYPE"/>
+                <enum name="GL_TEXTURE_DEPTH_TYPE"/>
+                <enum name="GL_UNSIGNED_NORMALIZED"/>
+                <enum name="GL_FRAMEBUFFER_BINDING"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_BINDING"/>
+                <enum name="GL_RENDERBUFFER_BINDING"/>
+                <enum name="GL_READ_FRAMEBUFFER"/>
+                <enum name="GL_DRAW_FRAMEBUFFER"/>
+                <enum name="GL_READ_FRAMEBUFFER_BINDING"/>
+                <enum name="GL_RENDERBUFFER_SAMPLES"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"/>
+                <enum name="GL_FRAMEBUFFER_COMPLETE"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER"/>
+                <enum name="GL_FRAMEBUFFER_UNSUPPORTED"/>
+                <enum name="GL_MAX_COLOR_ATTACHMENTS"/>
+                <enum name="GL_COLOR_ATTACHMENT0"/>
+                <enum name="GL_COLOR_ATTACHMENT1"/>
+                <enum name="GL_COLOR_ATTACHMENT2"/>
+                <enum name="GL_COLOR_ATTACHMENT3"/>
+                <enum name="GL_COLOR_ATTACHMENT4"/>
+                <enum name="GL_COLOR_ATTACHMENT5"/>
+                <enum name="GL_COLOR_ATTACHMENT6"/>
+                <enum name="GL_COLOR_ATTACHMENT7"/>
+                <enum name="GL_COLOR_ATTACHMENT8"/>
+                <enum name="GL_COLOR_ATTACHMENT9"/>
+                <enum name="GL_COLOR_ATTACHMENT10"/>
+                <enum name="GL_COLOR_ATTACHMENT11"/>
+                <enum name="GL_COLOR_ATTACHMENT12"/>
+                <enum name="GL_COLOR_ATTACHMENT13"/>
+                <enum name="GL_COLOR_ATTACHMENT14"/>
+                <enum name="GL_COLOR_ATTACHMENT15"/>
+                <enum name="GL_DEPTH_ATTACHMENT"/>
+                <enum name="GL_STENCIL_ATTACHMENT"/>
+                <enum name="GL_FRAMEBUFFER"/>
+                <enum name="GL_RENDERBUFFER"/>
+                <enum name="GL_RENDERBUFFER_WIDTH"/>
+                <enum name="GL_RENDERBUFFER_HEIGHT"/>
+                <enum name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
+                <enum name="GL_STENCIL_INDEX1"/>
+                <enum name="GL_STENCIL_INDEX4"/>
+                <enum name="GL_STENCIL_INDEX8"/>
+                <enum name="GL_STENCIL_INDEX16"/>
+                <enum name="GL_RENDERBUFFER_RED_SIZE"/>
+                <enum name="GL_RENDERBUFFER_GREEN_SIZE"/>
+                <enum name="GL_RENDERBUFFER_BLUE_SIZE"/>
+                <enum name="GL_RENDERBUFFER_ALPHA_SIZE"/>
+                <enum name="GL_RENDERBUFFER_DEPTH_SIZE"/>
+                <enum name="GL_RENDERBUFFER_STENCIL_SIZE"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"/>
+                <enum name="GL_MAX_SAMPLES"/>
+                <command name="glIsRenderbuffer"/>
+                <command name="glBindRenderbuffer"/>
+                <command name="glDeleteRenderbuffers"/>
+                <command name="glGenRenderbuffers"/>
+                <command name="glRenderbufferStorage"/>
+                <command name="glGetRenderbufferParameteriv"/>
+                <command name="glIsFramebuffer"/>
+                <command name="glBindFramebuffer"/>
+                <command name="glDeleteFramebuffers"/>
+                <command name="glGenFramebuffers"/>
+                <command name="glCheckFramebufferStatus"/>
+                <command name="glFramebufferTexture1D"/>
+                <command name="glFramebufferTexture2D"/>
+                <command name="glFramebufferTexture3D"/>
+                <command name="glFramebufferRenderbuffer"/>
+                <command name="glGetFramebufferAttachmentParameteriv"/>
+                <command name="glGenerateMipmap"/>
+                <command name="glBlitFramebuffer"/>
+                <command name="glRenderbufferStorageMultisample"/>
+                <command name="glFramebufferTextureLayer"/>
+            </require>
+            <require api="gl" profile="compatibility">
+                <enum name="GL_INDEX"/>
+                <enum name="GL_TEXTURE_LUMINANCE_TYPE"/>
+                <enum name="GL_TEXTURE_INTENSITY_TYPE"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_framebuffer_sRGB" supported="gl|glcore">
+            <require>
+                <enum name="GL_FRAMEBUFFER_SRGB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_geometry_shader4" supported="gl">
+            <require>
+                <enum name="GL_LINES_ADJACENCY_ARB"/>
+                <enum name="GL_LINE_STRIP_ADJACENCY_ARB"/>
+                <enum name="GL_TRIANGLES_ADJACENCY_ARB"/>
+                <enum name="GL_TRIANGLE_STRIP_ADJACENCY_ARB"/>
+                <enum name="GL_PROGRAM_POINT_SIZE_ARB"/>
+                <enum name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB"/>
+                <enum name="GL_GEOMETRY_SHADER_ARB"/>
+                <enum name="GL_GEOMETRY_VERTICES_OUT_ARB"/>
+                <enum name="GL_GEOMETRY_INPUT_TYPE_ARB"/>
+                <enum name="GL_GEOMETRY_OUTPUT_TYPE_ARB"/>
+                <enum name="GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB"/>
+                <enum name="GL_MAX_VERTEX_VARYING_COMPONENTS_ARB"/>
+                <enum name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB"/>
+                <enum name="GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB"/>
+                <enum name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB"/>
+                <enum name="GL_MAX_VARYING_COMPONENTS"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"/>
+                <command name="glProgramParameteriARB"/>
+                <command name="glFramebufferTextureARB"/>
+                <command name="glFramebufferTextureLayerARB"/>
+                <command name="glFramebufferTextureFaceARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_get_program_binary" supported="gl|glcore">
+            <require>
+                <enum name="GL_PROGRAM_BINARY_RETRIEVABLE_HINT"/>
+                <enum name="GL_PROGRAM_BINARY_LENGTH"/>
+                <enum name="GL_NUM_PROGRAM_BINARY_FORMATS"/>
+                <enum name="GL_PROGRAM_BINARY_FORMATS"/>
+                <command name="glGetProgramBinary"/>
+                <command name="glProgramBinary"/>
+                <command name="glProgramParameteri"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_gpu_shader5" supported="gl|glcore">
+            <require>
+                <enum name="GL_GEOMETRY_SHADER_INVOCATIONS"/>
+                <enum name="GL_MAX_GEOMETRY_SHADER_INVOCATIONS"/>
+                <enum name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET"/>
+                <enum name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET"/>
+                <enum name="GL_FRAGMENT_INTERPOLATION_OFFSET_BITS"/>
+                <enum name="GL_MAX_VERTEX_STREAMS"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_gpu_shader_fp64" supported="gl|glcore">
+            <require>
+                <enum name="GL_DOUBLE"/>
+                <enum name="GL_DOUBLE_VEC2"/>
+                <enum name="GL_DOUBLE_VEC3"/>
+                <enum name="GL_DOUBLE_VEC4"/>
+                <enum name="GL_DOUBLE_MAT2"/>
+                <enum name="GL_DOUBLE_MAT3"/>
+                <enum name="GL_DOUBLE_MAT4"/>
+                <enum name="GL_DOUBLE_MAT2x3"/>
+                <enum name="GL_DOUBLE_MAT2x4"/>
+                <enum name="GL_DOUBLE_MAT3x2"/>
+                <enum name="GL_DOUBLE_MAT3x4"/>
+                <enum name="GL_DOUBLE_MAT4x2"/>
+                <enum name="GL_DOUBLE_MAT4x3"/>
+                <command name="glUniform1d"/>
+                <command name="glUniform2d"/>
+                <command name="glUniform3d"/>
+                <command name="glUniform4d"/>
+                <command name="glUniform1dv"/>
+                <command name="glUniform2dv"/>
+                <command name="glUniform3dv"/>
+                <command name="glUniform4dv"/>
+                <command name="glUniformMatrix2dv"/>
+                <command name="glUniformMatrix3dv"/>
+                <command name="glUniformMatrix4dv"/>
+                <command name="glUniformMatrix2x3dv"/>
+                <command name="glUniformMatrix2x4dv"/>
+                <command name="glUniformMatrix3x2dv"/>
+                <command name="glUniformMatrix3x4dv"/>
+                <command name="glUniformMatrix4x2dv"/>
+                <command name="glUniformMatrix4x3dv"/>
+                <command name="glGetUniformdv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_half_float_pixel" supported="gl">
+            <require>
+                <type name="GLhalfARB"/>
+                <enum name="GL_HALF_FLOAT_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_half_float_vertex" supported="gl|glcore">
+            <require>
+                <type name="GLhalf"/>
+                <enum name="GL_HALF_FLOAT"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_imaging" supported="gl|glcore" comment="Now treating ARB_imaging as an extension, not a GL API version">
+            <require>
+                <enum name="GL_CONSTANT_COLOR"/>
+                <enum name="GL_ONE_MINUS_CONSTANT_COLOR"/>
+                <enum name="GL_CONSTANT_ALPHA"/>
+                <enum name="GL_ONE_MINUS_CONSTANT_ALPHA"/>
+                <enum name="GL_BLEND_COLOR"/>
+                <enum name="GL_FUNC_ADD"/>
+                <enum name="GL_MIN"/>
+                <enum name="GL_MAX"/>
+                <enum name="GL_BLEND_EQUATION"/>
+                <enum name="GL_FUNC_SUBTRACT"/>
+                <enum name="GL_FUNC_REVERSE_SUBTRACT"/>
+                <command name="glBlendColor"/>
+                <command name="glBlendEquation"/>
+            </require>
+            <require api="gl" profile="compatibility">
+                <enum name="GL_CONVOLUTION_1D"/>
+                <enum name="GL_CONVOLUTION_2D"/>
+                <enum name="GL_SEPARABLE_2D"/>
+                <enum name="GL_CONVOLUTION_BORDER_MODE"/>
+                <enum name="GL_CONVOLUTION_FILTER_SCALE"/>
+                <enum name="GL_CONVOLUTION_FILTER_BIAS"/>
+                <enum name="GL_REDUCE"/>
+                <enum name="GL_CONVOLUTION_FORMAT"/>
+                <enum name="GL_CONVOLUTION_WIDTH"/>
+                <enum name="GL_CONVOLUTION_HEIGHT"/>
+                <enum name="GL_MAX_CONVOLUTION_WIDTH"/>
+                <enum name="GL_MAX_CONVOLUTION_HEIGHT"/>
+                <enum name="GL_POST_CONVOLUTION_RED_SCALE"/>
+                <enum name="GL_POST_CONVOLUTION_GREEN_SCALE"/>
+                <enum name="GL_POST_CONVOLUTION_BLUE_SCALE"/>
+                <enum name="GL_POST_CONVOLUTION_ALPHA_SCALE"/>
+                <enum name="GL_POST_CONVOLUTION_RED_BIAS"/>
+                <enum name="GL_POST_CONVOLUTION_GREEN_BIAS"/>
+                <enum name="GL_POST_CONVOLUTION_BLUE_BIAS"/>
+                <enum name="GL_POST_CONVOLUTION_ALPHA_BIAS"/>
+                <enum name="GL_HISTOGRAM"/>
+                <enum name="GL_PROXY_HISTOGRAM"/>
+                <enum name="GL_HISTOGRAM_WIDTH"/>
+                <enum name="GL_HISTOGRAM_FORMAT"/>
+                <enum name="GL_HISTOGRAM_RED_SIZE"/>
+                <enum name="GL_HISTOGRAM_GREEN_SIZE"/>
+                <enum name="GL_HISTOGRAM_BLUE_SIZE"/>
+                <enum name="GL_HISTOGRAM_ALPHA_SIZE"/>
+                <enum name="GL_HISTOGRAM_LUMINANCE_SIZE"/>
+                <enum name="GL_HISTOGRAM_SINK"/>
+                <enum name="GL_MINMAX"/>
+                <enum name="GL_MINMAX_FORMAT"/>
+                <enum name="GL_MINMAX_SINK"/>
+                <enum name="GL_TABLE_TOO_LARGE"/>
+                <enum name="GL_COLOR_MATRIX"/>
+                <enum name="GL_COLOR_MATRIX_STACK_DEPTH"/>
+                <enum name="GL_MAX_COLOR_MATRIX_STACK_DEPTH"/>
+                <enum name="GL_POST_COLOR_MATRIX_RED_SCALE"/>
+                <enum name="GL_POST_COLOR_MATRIX_GREEN_SCALE"/>
+                <enum name="GL_POST_COLOR_MATRIX_BLUE_SCALE"/>
+                <enum name="GL_POST_COLOR_MATRIX_ALPHA_SCALE"/>
+                <enum name="GL_POST_COLOR_MATRIX_RED_BIAS"/>
+                <enum name="GL_POST_COLOR_MATRIX_GREEN_BIAS"/>
+                <enum name="GL_POST_COLOR_MATRIX_BLUE_BIAS"/>
+                <enum name="GL_POST_COLOR_MATRIX_ALPHA_BIAS"/>
+                <enum name="GL_COLOR_TABLE"/>
+                <enum name="GL_POST_CONVOLUTION_COLOR_TABLE"/>
+                <enum name="GL_POST_COLOR_MATRIX_COLOR_TABLE"/>
+                <enum name="GL_PROXY_COLOR_TABLE"/>
+                <enum name="GL_PROXY_POST_CONVOLUTION_COLOR_TABLE"/>
+                <enum name="GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE"/>
+                <enum name="GL_COLOR_TABLE_SCALE"/>
+                <enum name="GL_COLOR_TABLE_BIAS"/>
+                <enum name="GL_COLOR_TABLE_FORMAT"/>
+                <enum name="GL_COLOR_TABLE_WIDTH"/>
+                <enum name="GL_COLOR_TABLE_RED_SIZE"/>
+                <enum name="GL_COLOR_TABLE_GREEN_SIZE"/>
+                <enum name="GL_COLOR_TABLE_BLUE_SIZE"/>
+                <enum name="GL_COLOR_TABLE_ALPHA_SIZE"/>
+                <enum name="GL_COLOR_TABLE_LUMINANCE_SIZE"/>
+                <enum name="GL_COLOR_TABLE_INTENSITY_SIZE"/>
+                <enum name="GL_CONSTANT_BORDER"/>
+                <enum name="GL_REPLICATE_BORDER"/>
+                <enum name="GL_CONVOLUTION_BORDER_COLOR"/>
+                <command name="glColorTable"/>
+                <command name="glColorTableParameterfv"/>
+                <command name="glColorTableParameteriv"/>
+                <command name="glCopyColorTable"/>
+                <command name="glGetColorTable"/>
+                <command name="glGetColorTableParameterfv"/>
+                <command name="glGetColorTableParameteriv"/>
+                <command name="glColorSubTable"/>
+                <command name="glCopyColorSubTable"/>
+                <command name="glConvolutionFilter1D"/>
+                <command name="glConvolutionFilter2D"/>
+                <command name="glConvolutionParameterf"/>
+                <command name="glConvolutionParameterfv"/>
+                <command name="glConvolutionParameteri"/>
+                <command name="glConvolutionParameteriv"/>
+                <command name="glCopyConvolutionFilter1D"/>
+                <command name="glCopyConvolutionFilter2D"/>
+                <command name="glGetConvolutionFilter"/>
+                <command name="glGetConvolutionParameterfv"/>
+                <command name="glGetConvolutionParameteriv"/>
+                <command name="glGetSeparableFilter"/>
+                <command name="glSeparableFilter2D"/>
+                <command name="glGetHistogram"/>
+                <command name="glGetHistogramParameterfv"/>
+                <command name="glGetHistogramParameteriv"/>
+                <command name="glGetMinmax"/>
+                <command name="glGetMinmaxParameterfv"/>
+                <command name="glGetMinmaxParameteriv"/>
+                <command name="glHistogram"/>
+                <command name="glMinmax"/>
+                <command name="glResetHistogram"/>
+                <command name="glResetMinmax"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_indirect_parameters" supported="gl|glcore">
+            <require>
+                <enum name="GL_PARAMETER_BUFFER_ARB"/>
+                <enum name="GL_PARAMETER_BUFFER_BINDING_ARB"/>
+                <command name="glMultiDrawArraysIndirectCountARB"/>
+                <command name="glMultiDrawElementsIndirectCountARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_instanced_arrays" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB"/>
+                <command name="glVertexAttribDivisorARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_internalformat_query" supported="gl|glcore">
+            <require>
+                <enum name="GL_NUM_SAMPLE_COUNTS"/>
+                <command name="glGetInternalformativ"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_internalformat_query2" supported="gl|glcore">
+            <require>
+                <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_TYPE"/>
+                <enum name="GL_NUM_SAMPLE_COUNTS"/>
+                <enum name="GL_RENDERBUFFER"/>
+                <enum name="GL_SAMPLES"/>
+                <enum name="GL_TEXTURE_1D"/>
+                <enum name="GL_TEXTURE_1D_ARRAY"/>
+                <enum name="GL_TEXTURE_2D"/>
+                <enum name="GL_TEXTURE_2D_ARRAY"/>
+                <enum name="GL_TEXTURE_3D"/>
+                <enum name="GL_TEXTURE_CUBE_MAP"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_ARRAY"/>
+                <enum name="GL_TEXTURE_RECTANGLE"/>
+                <enum name="GL_TEXTURE_BUFFER"/>
+                <enum name="GL_TEXTURE_2D_MULTISAMPLE"/>
+                <enum name="GL_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_TEXTURE_COMPRESSED"/>
+                <enum name="GL_INTERNALFORMAT_SUPPORTED"/>
+                <enum name="GL_INTERNALFORMAT_PREFERRED"/>
+                <enum name="GL_INTERNALFORMAT_RED_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_GREEN_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_BLUE_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_ALPHA_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_DEPTH_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_STENCIL_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_SHARED_SIZE"/>
+                <enum name="GL_INTERNALFORMAT_RED_TYPE"/>
+                <enum name="GL_INTERNALFORMAT_GREEN_TYPE"/>
+                <enum name="GL_INTERNALFORMAT_BLUE_TYPE"/>
+                <enum name="GL_INTERNALFORMAT_ALPHA_TYPE"/>
+                <enum name="GL_INTERNALFORMAT_DEPTH_TYPE"/>
+                <enum name="GL_INTERNALFORMAT_STENCIL_TYPE"/>
+                <enum name="GL_MAX_WIDTH"/>
+                <enum name="GL_MAX_HEIGHT"/>
+                <enum name="GL_MAX_DEPTH"/>
+                <enum name="GL_MAX_LAYERS"/>
+                <enum name="GL_MAX_COMBINED_DIMENSIONS"/>
+                <enum name="GL_COLOR_COMPONENTS"/>
+                <enum name="GL_DEPTH_COMPONENTS"/>
+                <enum name="GL_STENCIL_COMPONENTS"/>
+                <enum name="GL_COLOR_RENDERABLE"/>
+                <enum name="GL_DEPTH_RENDERABLE"/>
+                <enum name="GL_STENCIL_RENDERABLE"/>
+                <enum name="GL_FRAMEBUFFER_RENDERABLE"/>
+                <enum name="GL_FRAMEBUFFER_RENDERABLE_LAYERED"/>
+                <enum name="GL_FRAMEBUFFER_BLEND"/>
+                <enum name="GL_READ_PIXELS"/>
+                <enum name="GL_READ_PIXELS_FORMAT"/>
+                <enum name="GL_READ_PIXELS_TYPE"/>
+                <enum name="GL_TEXTURE_IMAGE_FORMAT"/>
+                <enum name="GL_TEXTURE_IMAGE_TYPE"/>
+                <enum name="GL_GET_TEXTURE_IMAGE_FORMAT"/>
+                <enum name="GL_GET_TEXTURE_IMAGE_TYPE"/>
+                <enum name="GL_MIPMAP"/>
+                <enum name="GL_MANUAL_GENERATE_MIPMAP"/>
+                <enum name="GL_AUTO_GENERATE_MIPMAP"/>
+                <enum name="GL_COLOR_ENCODING"/>
+                <enum name="GL_SRGB_READ"/>
+                <enum name="GL_SRGB_WRITE"/>
+                <enum name="GL_SRGB_DECODE_ARB"/>
+                <enum name="GL_FILTER"/>
+                <enum name="GL_VERTEX_TEXTURE"/>
+                <enum name="GL_TESS_CONTROL_TEXTURE"/>
+                <enum name="GL_TESS_EVALUATION_TEXTURE"/>
+                <enum name="GL_GEOMETRY_TEXTURE"/>
+                <enum name="GL_FRAGMENT_TEXTURE"/>
+                <enum name="GL_COMPUTE_TEXTURE"/>
+                <enum name="GL_TEXTURE_SHADOW"/>
+                <enum name="GL_TEXTURE_GATHER"/>
+                <enum name="GL_TEXTURE_GATHER_SHADOW"/>
+                <enum name="GL_SHADER_IMAGE_LOAD"/>
+                <enum name="GL_SHADER_IMAGE_STORE"/>
+                <enum name="GL_SHADER_IMAGE_ATOMIC"/>
+                <enum name="GL_IMAGE_TEXEL_SIZE"/>
+                <enum name="GL_IMAGE_COMPATIBILITY_CLASS"/>
+                <enum name="GL_IMAGE_PIXEL_FORMAT"/>
+                <enum name="GL_IMAGE_PIXEL_TYPE"/>
+                <enum name="GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST"/>
+                <enum name="GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST"/>
+                <enum name="GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE"/>
+                <enum name="GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE"/>
+                <enum name="GL_TEXTURE_COMPRESSED_BLOCK_WIDTH"/>
+                <enum name="GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT"/>
+                <enum name="GL_TEXTURE_COMPRESSED_BLOCK_SIZE"/>
+                <enum name="GL_CLEAR_BUFFER"/>
+                <enum name="GL_TEXTURE_VIEW"/>
+                <enum name="GL_VIEW_COMPATIBILITY_CLASS"/>
+                <enum name="GL_FULL_SUPPORT"/>
+                <enum name="GL_CAVEAT_SUPPORT"/>
+                <enum name="GL_IMAGE_CLASS_4_X_32"/>
+                <enum name="GL_IMAGE_CLASS_2_X_32"/>
+                <enum name="GL_IMAGE_CLASS_1_X_32"/>
+                <enum name="GL_IMAGE_CLASS_4_X_16"/>
+                <enum name="GL_IMAGE_CLASS_2_X_16"/>
+                <enum name="GL_IMAGE_CLASS_1_X_16"/>
+                <enum name="GL_IMAGE_CLASS_4_X_8"/>
+                <enum name="GL_IMAGE_CLASS_2_X_8"/>
+                <enum name="GL_IMAGE_CLASS_1_X_8"/>
+                <enum name="GL_IMAGE_CLASS_11_11_10"/>
+                <enum name="GL_IMAGE_CLASS_10_10_10_2"/>
+                <enum name="GL_VIEW_CLASS_128_BITS"/>
+                <enum name="GL_VIEW_CLASS_96_BITS"/>
+                <enum name="GL_VIEW_CLASS_64_BITS"/>
+                <enum name="GL_VIEW_CLASS_48_BITS"/>
+                <enum name="GL_VIEW_CLASS_32_BITS"/>
+                <enum name="GL_VIEW_CLASS_24_BITS"/>
+                <enum name="GL_VIEW_CLASS_16_BITS"/>
+                <enum name="GL_VIEW_CLASS_8_BITS"/>
+                <enum name="GL_VIEW_CLASS_S3TC_DXT1_RGB"/>
+                <enum name="GL_VIEW_CLASS_S3TC_DXT1_RGBA"/>
+                <enum name="GL_VIEW_CLASS_S3TC_DXT3_RGBA"/>
+                <enum name="GL_VIEW_CLASS_S3TC_DXT5_RGBA"/>
+                <enum name="GL_VIEW_CLASS_RGTC1_RED"/>
+                <enum name="GL_VIEW_CLASS_RGTC2_RG"/>
+                <enum name="GL_VIEW_CLASS_BPTC_UNORM"/>
+                <enum name="GL_VIEW_CLASS_BPTC_FLOAT"/>
+                <command name="glGetInternalformati64v"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_invalidate_subdata" supported="gl|glcore">
+            <require>
+                <command name="glInvalidateTexSubImage"/>
+                <command name="glInvalidateTexImage"/>
+                <command name="glInvalidateBufferSubData"/>
+                <command name="glInvalidateBufferData"/>
+                <command name="glInvalidateFramebuffer"/>
+                <command name="glInvalidateSubFramebuffer"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_map_buffer_alignment" supported="gl|glcore">
+            <require>
+                <enum name="GL_MIN_MAP_BUFFER_ALIGNMENT"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_map_buffer_range" supported="gl|glcore">
+            <require>
+                <enum name="GL_MAP_READ_BIT"/>
+                <enum name="GL_MAP_WRITE_BIT"/>
+                <enum name="GL_MAP_INVALIDATE_RANGE_BIT"/>
+                <enum name="GL_MAP_INVALIDATE_BUFFER_BIT"/>
+                <enum name="GL_MAP_FLUSH_EXPLICIT_BIT"/>
+                <enum name="GL_MAP_UNSYNCHRONIZED_BIT"/>
+                <command name="glMapBufferRange"/>
+                <command name="glFlushMappedBufferRange"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_matrix_palette" supported="gl">
+            <require>
+                <enum name="GL_MATRIX_PALETTE_ARB"/>
+                <enum name="GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB"/>
+                <enum name="GL_MAX_PALETTE_MATRICES_ARB"/>
+                <enum name="GL_CURRENT_PALETTE_MATRIX_ARB"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_ARB"/>
+                <enum name="GL_CURRENT_MATRIX_INDEX_ARB"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_SIZE_ARB"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_TYPE_ARB"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_STRIDE_ARB"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_POINTER_ARB"/>
+                <command name="glCurrentPaletteMatrixARB"/>
+                <command name="glMatrixIndexubvARB"/>
+                <command name="glMatrixIndexusvARB"/>
+                <command name="glMatrixIndexuivARB"/>
+                <command name="glMatrixIndexPointerARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_multi_bind" supported="gl|glcore">
+            <require>
+                <command name="glBindBuffersBase"/>
+                <command name="glBindBuffersRange"/>
+                <command name="glBindTextures"/>
+                <command name="glBindSamplers"/>
+                <command name="glBindImageTextures"/>
+                <command name="glBindVertexBuffers"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_multi_draw_indirect" supported="gl|glcore">
+            <require>
+                <command name="glMultiDrawArraysIndirect"/>
+                <command name="glMultiDrawElementsIndirect"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_multisample" supported="gl">
+            <require>
+                <enum name="GL_MULTISAMPLE_ARB"/>
+                <enum name="GL_SAMPLE_ALPHA_TO_COVERAGE_ARB"/>
+                <enum name="GL_SAMPLE_ALPHA_TO_ONE_ARB"/>
+                <enum name="GL_SAMPLE_COVERAGE_ARB"/>
+                <enum name="GL_SAMPLE_BUFFERS_ARB"/>
+                <enum name="GL_SAMPLES_ARB"/>
+                <enum name="GL_SAMPLE_COVERAGE_VALUE_ARB"/>
+                <enum name="GL_SAMPLE_COVERAGE_INVERT_ARB"/>
+                <enum name="GL_MULTISAMPLE_BIT_ARB"/>
+                <command name="glSampleCoverageARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_multitexture" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE0_ARB"/>
+                <enum name="GL_TEXTURE1_ARB"/>
+                <enum name="GL_TEXTURE2_ARB"/>
+                <enum name="GL_TEXTURE3_ARB"/>
+                <enum name="GL_TEXTURE4_ARB"/>
+                <enum name="GL_TEXTURE5_ARB"/>
+                <enum name="GL_TEXTURE6_ARB"/>
+                <enum name="GL_TEXTURE7_ARB"/>
+                <enum name="GL_TEXTURE8_ARB"/>
+                <enum name="GL_TEXTURE9_ARB"/>
+                <enum name="GL_TEXTURE10_ARB"/>
+                <enum name="GL_TEXTURE11_ARB"/>
+                <enum name="GL_TEXTURE12_ARB"/>
+                <enum name="GL_TEXTURE13_ARB"/>
+                <enum name="GL_TEXTURE14_ARB"/>
+                <enum name="GL_TEXTURE15_ARB"/>
+                <enum name="GL_TEXTURE16_ARB"/>
+                <enum name="GL_TEXTURE17_ARB"/>
+                <enum name="GL_TEXTURE18_ARB"/>
+                <enum name="GL_TEXTURE19_ARB"/>
+                <enum name="GL_TEXTURE20_ARB"/>
+                <enum name="GL_TEXTURE21_ARB"/>
+                <enum name="GL_TEXTURE22_ARB"/>
+                <enum name="GL_TEXTURE23_ARB"/>
+                <enum name="GL_TEXTURE24_ARB"/>
+                <enum name="GL_TEXTURE25_ARB"/>
+                <enum name="GL_TEXTURE26_ARB"/>
+                <enum name="GL_TEXTURE27_ARB"/>
+                <enum name="GL_TEXTURE28_ARB"/>
+                <enum name="GL_TEXTURE29_ARB"/>
+                <enum name="GL_TEXTURE30_ARB"/>
+                <enum name="GL_TEXTURE31_ARB"/>
+                <enum name="GL_ACTIVE_TEXTURE_ARB"/>
+                <enum name="GL_CLIENT_ACTIVE_TEXTURE_ARB"/>
+                <enum name="GL_MAX_TEXTURE_UNITS_ARB"/>
+                <command name="glActiveTextureARB"/>
+                <command name="glClientActiveTextureARB"/>
+                <command name="glMultiTexCoord1dARB"/>
+                <command name="glMultiTexCoord1dvARB"/>
+                <command name="glMultiTexCoord1fARB"/>
+                <command name="glMultiTexCoord1fvARB"/>
+                <command name="glMultiTexCoord1iARB"/>
+                <command name="glMultiTexCoord1ivARB"/>
+                <command name="glMultiTexCoord1sARB"/>
+                <command name="glMultiTexCoord1svARB"/>
+                <command name="glMultiTexCoord2dARB"/>
+                <command name="glMultiTexCoord2dvARB"/>
+                <command name="glMultiTexCoord2fARB"/>
+                <command name="glMultiTexCoord2fvARB"/>
+                <command name="glMultiTexCoord2iARB"/>
+                <command name="glMultiTexCoord2ivARB"/>
+                <command name="glMultiTexCoord2sARB"/>
+                <command name="glMultiTexCoord2svARB"/>
+                <command name="glMultiTexCoord3dARB"/>
+                <command name="glMultiTexCoord3dvARB"/>
+                <command name="glMultiTexCoord3fARB"/>
+                <command name="glMultiTexCoord3fvARB"/>
+                <command name="glMultiTexCoord3iARB"/>
+                <command name="glMultiTexCoord3ivARB"/>
+                <command name="glMultiTexCoord3sARB"/>
+                <command name="glMultiTexCoord3svARB"/>
+                <command name="glMultiTexCoord4dARB"/>
+                <command name="glMultiTexCoord4dvARB"/>
+                <command name="glMultiTexCoord4fARB"/>
+                <command name="glMultiTexCoord4fvARB"/>
+                <command name="glMultiTexCoord4iARB"/>
+                <command name="glMultiTexCoord4ivARB"/>
+                <command name="glMultiTexCoord4sARB"/>
+                <command name="glMultiTexCoord4svARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_occlusion_query" supported="gl">
+            <require>
+                <enum name="GL_QUERY_COUNTER_BITS_ARB"/>
+                <enum name="GL_CURRENT_QUERY_ARB"/>
+                <enum name="GL_QUERY_RESULT_ARB"/>
+                <enum name="GL_QUERY_RESULT_AVAILABLE_ARB"/>
+                <enum name="GL_SAMPLES_PASSED_ARB"/>
+                <command name="glGenQueriesARB"/>
+                <command name="glDeleteQueriesARB"/>
+                <command name="glIsQueryARB"/>
+                <command name="glBeginQueryARB"/>
+                <command name="glEndQueryARB"/>
+                <command name="glGetQueryivARB"/>
+                <command name="glGetQueryObjectivARB"/>
+                <command name="glGetQueryObjectuivARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_occlusion_query2" supported="gl|glcore">
+            <require>
+                <enum name="GL_ANY_SAMPLES_PASSED"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_pixel_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_PACK_BUFFER_ARB"/>
+                <enum name="GL_PIXEL_UNPACK_BUFFER_ARB"/>
+                <enum name="GL_PIXEL_PACK_BUFFER_BINDING_ARB"/>
+                <enum name="GL_PIXEL_UNPACK_BUFFER_BINDING_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_point_parameters" supported="gl">
+            <require>
+                <enum name="GL_POINT_SIZE_MIN_ARB"/>
+                <enum name="GL_POINT_SIZE_MAX_ARB"/>
+                <enum name="GL_POINT_FADE_THRESHOLD_SIZE_ARB"/>
+                <enum name="GL_POINT_DISTANCE_ATTENUATION_ARB"/>
+                <command name="glPointParameterfARB"/>
+                <command name="glPointParameterfvARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_point_sprite" supported="gl">
+            <require>
+                <enum name="GL_POINT_SPRITE_ARB"/>
+                <enum name="GL_COORD_REPLACE_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_program_interface_query" supported="gl|glcore">
+            <require>
+                <enum name="GL_UNIFORM"/>
+                <enum name="GL_UNIFORM_BLOCK"/>
+                <enum name="GL_PROGRAM_INPUT"/>
+                <enum name="GL_PROGRAM_OUTPUT"/>
+                <enum name="GL_BUFFER_VARIABLE"/>
+                <enum name="GL_SHADER_STORAGE_BLOCK"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER"/>
+                <enum name="GL_VERTEX_SUBROUTINE"/>
+                <enum name="GL_TESS_CONTROL_SUBROUTINE"/>
+                <enum name="GL_TESS_EVALUATION_SUBROUTINE"/>
+                <enum name="GL_GEOMETRY_SUBROUTINE"/>
+                <enum name="GL_FRAGMENT_SUBROUTINE"/>
+                <enum name="GL_COMPUTE_SUBROUTINE"/>
+                <enum name="GL_VERTEX_SUBROUTINE_UNIFORM"/>
+                <enum name="GL_TESS_CONTROL_SUBROUTINE_UNIFORM"/>
+                <enum name="GL_TESS_EVALUATION_SUBROUTINE_UNIFORM"/>
+                <enum name="GL_GEOMETRY_SUBROUTINE_UNIFORM"/>
+                <enum name="GL_FRAGMENT_SUBROUTINE_UNIFORM"/>
+                <enum name="GL_COMPUTE_SUBROUTINE_UNIFORM"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_VARYING"/>
+                <enum name="GL_ACTIVE_RESOURCES"/>
+                <enum name="GL_MAX_NAME_LENGTH"/>
+                <enum name="GL_MAX_NUM_ACTIVE_VARIABLES"/>
+                <enum name="GL_MAX_NUM_COMPATIBLE_SUBROUTINES"/>
+                <enum name="GL_NAME_LENGTH"/>
+                <enum name="GL_TYPE"/>
+                <enum name="GL_ARRAY_SIZE"/>
+                <enum name="GL_OFFSET"/>
+                <enum name="GL_BLOCK_INDEX"/>
+                <enum name="GL_ARRAY_STRIDE"/>
+                <enum name="GL_MATRIX_STRIDE"/>
+                <enum name="GL_IS_ROW_MAJOR"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_INDEX"/>
+                <enum name="GL_BUFFER_BINDING"/>
+                <enum name="GL_BUFFER_DATA_SIZE"/>
+                <enum name="GL_NUM_ACTIVE_VARIABLES"/>
+                <enum name="GL_ACTIVE_VARIABLES"/>
+                <enum name="GL_REFERENCED_BY_VERTEX_SHADER"/>
+                <enum name="GL_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+                <enum name="GL_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+                <enum name="GL_REFERENCED_BY_GEOMETRY_SHADER"/>
+                <enum name="GL_REFERENCED_BY_FRAGMENT_SHADER"/>
+                <enum name="GL_REFERENCED_BY_COMPUTE_SHADER"/>
+                <enum name="GL_TOP_LEVEL_ARRAY_SIZE"/>
+                <enum name="GL_TOP_LEVEL_ARRAY_STRIDE"/>
+                <enum name="GL_LOCATION"/>
+                <enum name="GL_LOCATION_INDEX"/>
+                <enum name="GL_IS_PER_PATCH"/>
+                <enum name="GL_NUM_COMPATIBLE_SUBROUTINES"/>
+                <enum name="GL_COMPATIBLE_SUBROUTINES"/>
+                <command name="glGetProgramInterfaceiv"/>
+                <command name="glGetProgramResourceIndex"/>
+                <command name="glGetProgramResourceName"/>
+                <command name="glGetProgramResourceiv"/>
+                <command name="glGetProgramResourceLocation"/>
+                <command name="glGetProgramResourceLocationIndex"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_provoking_vertex" supported="gl|glcore">
+            <require>
+                <enum name="GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION"/>
+                <enum name="GL_FIRST_VERTEX_CONVENTION"/>
+                <enum name="GL_LAST_VERTEX_CONVENTION"/>
+                <enum name="GL_PROVOKING_VERTEX"/>
+                <command name="glProvokingVertex"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_query_buffer_object" supported="gl|glcore">
+            <require>
+                <enum name="GL_QUERY_BUFFER"/>
+                <enum name="GL_QUERY_BUFFER_BARRIER_BIT"/>
+                <enum name="GL_QUERY_BUFFER_BINDING"/>
+                <enum name="GL_QUERY_RESULT_NO_WAIT"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_robust_buffer_access_behavior" supported="gl|glcore"/>
+        <extension name="GL_ARB_robustness" supported="gl|glcore">
+            <require>
+                <enum name="GL_NO_ERROR"/>
+                <enum name="GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB"/>
+                <enum name="GL_LOSE_CONTEXT_ON_RESET_ARB"/>
+                <enum name="GL_GUILTY_CONTEXT_RESET_ARB"/>
+                <enum name="GL_INNOCENT_CONTEXT_RESET_ARB"/>
+                <enum name="GL_UNKNOWN_CONTEXT_RESET_ARB"/>
+                <enum name="GL_RESET_NOTIFICATION_STRATEGY_ARB"/>
+                <enum name="GL_NO_RESET_NOTIFICATION_ARB"/>
+                <command name="glGetGraphicsResetStatusARB"/>
+                <command name="glGetnTexImageARB"/>
+                <command name="glReadnPixelsARB"/>
+                <command name="glGetnCompressedTexImageARB"/>
+                <command name="glGetnUniformfvARB"/>
+                <command name="glGetnUniformivARB"/>
+                <command name="glGetnUniformuivARB"/>
+                <command name="glGetnUniformdvARB"/>
+            </require>
+            <require api="gl" profile="compatibility">
+                <command name="glGetnMapdvARB"/>
+                <command name="glGetnMapfvARB"/>
+                <command name="glGetnMapivARB"/>
+                <command name="glGetnPixelMapfvARB"/>
+                <command name="glGetnPixelMapuivARB"/>
+                <command name="glGetnPixelMapusvARB"/>
+                <command name="glGetnPolygonStippleARB"/>
+                <command name="glGetnColorTableARB"/>
+                <command name="glGetnConvolutionFilterARB"/>
+                <command name="glGetnSeparableFilterARB"/>
+                <command name="glGetnHistogramARB"/>
+                <command name="glGetnMinmaxARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_robustness_isolation" supported="gl|glcore"/>
+        <extension name="GL_ARB_sample_shading" supported="gl|glcore">
+            <require>
+                <enum name="GL_SAMPLE_SHADING_ARB"/>
+                <enum name="GL_MIN_SAMPLE_SHADING_VALUE_ARB"/>
+                <command name="glMinSampleShadingARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_sampler_objects" supported="gl|glcore">
+            <require>
+                <enum name="GL_SAMPLER_BINDING"/>
+                <command name="glGenSamplers"/>
+                <command name="glDeleteSamplers"/>
+                <command name="glIsSampler"/>
+                <command name="glBindSampler"/>
+                <command name="glSamplerParameteri"/>
+                <command name="glSamplerParameteriv"/>
+                <command name="glSamplerParameterf"/>
+                <command name="glSamplerParameterfv"/>
+                <command name="glSamplerParameterIiv"/>
+                <command name="glSamplerParameterIuiv"/>
+                <command name="glGetSamplerParameteriv"/>
+                <command name="glGetSamplerParameterIiv"/>
+                <command name="glGetSamplerParameterfv"/>
+                <command name="glGetSamplerParameterIuiv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_seamless_cube_map" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_CUBE_MAP_SEAMLESS"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_seamless_cubemap_per_texture" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_CUBE_MAP_SEAMLESS"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_separate_shader_objects" supported="gl|glcore">
+            <require>
+                <enum name="GL_VERTEX_SHADER_BIT"/>
+                <enum name="GL_FRAGMENT_SHADER_BIT"/>
+                <enum name="GL_GEOMETRY_SHADER_BIT"/>
+                <enum name="GL_TESS_CONTROL_SHADER_BIT"/>
+                <enum name="GL_TESS_EVALUATION_SHADER_BIT"/>
+                <enum name="GL_ALL_SHADER_BITS"/>
+                <enum name="GL_PROGRAM_SEPARABLE"/>
+                <enum name="GL_ACTIVE_PROGRAM"/>
+                <enum name="GL_PROGRAM_PIPELINE_BINDING"/>
+                <command name="glUseProgramStages"/>
+                <command name="glActiveShaderProgram"/>
+                <command name="glCreateShaderProgramv"/>
+                <command name="glBindProgramPipeline"/>
+                <command name="glDeleteProgramPipelines"/>
+                <command name="glGenProgramPipelines"/>
+                <command name="glIsProgramPipeline"/>
+                <command name="glGetProgramPipelineiv"/>
+                <command name="glProgramUniform1i"/>
+                <command name="glProgramUniform1iv"/>
+                <command name="glProgramUniform1f"/>
+                <command name="glProgramUniform1fv"/>
+                <command name="glProgramUniform1d"/>
+                <command name="glProgramUniform1dv"/>
+                <command name="glProgramUniform1ui"/>
+                <command name="glProgramUniform1uiv"/>
+                <command name="glProgramUniform2i"/>
+                <command name="glProgramUniform2iv"/>
+                <command name="glProgramUniform2f"/>
+                <command name="glProgramUniform2fv"/>
+                <command name="glProgramUniform2d"/>
+                <command name="glProgramUniform2dv"/>
+                <command name="glProgramUniform2ui"/>
+                <command name="glProgramUniform2uiv"/>
+                <command name="glProgramUniform3i"/>
+                <command name="glProgramUniform3iv"/>
+                <command name="glProgramUniform3f"/>
+                <command name="glProgramUniform3fv"/>
+                <command name="glProgramUniform3d"/>
+                <command name="glProgramUniform3dv"/>
+                <command name="glProgramUniform3ui"/>
+                <command name="glProgramUniform3uiv"/>
+                <command name="glProgramUniform4i"/>
+                <command name="glProgramUniform4iv"/>
+                <command name="glProgramUniform4f"/>
+                <command name="glProgramUniform4fv"/>
+                <command name="glProgramUniform4d"/>
+                <command name="glProgramUniform4dv"/>
+                <command name="glProgramUniform4ui"/>
+                <command name="glProgramUniform4uiv"/>
+                <command name="glProgramUniformMatrix2fv"/>
+                <command name="glProgramUniformMatrix3fv"/>
+                <command name="glProgramUniformMatrix4fv"/>
+                <command name="glProgramUniformMatrix2dv"/>
+                <command name="glProgramUniformMatrix3dv"/>
+                <command name="glProgramUniformMatrix4dv"/>
+                <command name="glProgramUniformMatrix2x3fv"/>
+                <command name="glProgramUniformMatrix3x2fv"/>
+                <command name="glProgramUniformMatrix2x4fv"/>
+                <command name="glProgramUniformMatrix4x2fv"/>
+                <command name="glProgramUniformMatrix3x4fv"/>
+                <command name="glProgramUniformMatrix4x3fv"/>
+                <command name="glProgramUniformMatrix2x3dv"/>
+                <command name="glProgramUniformMatrix3x2dv"/>
+                <command name="glProgramUniformMatrix2x4dv"/>
+                <command name="glProgramUniformMatrix4x2dv"/>
+                <command name="glProgramUniformMatrix3x4dv"/>
+                <command name="glProgramUniformMatrix4x3dv"/>
+                <command name="glValidateProgramPipeline"/>
+                <command name="glGetProgramPipelineInfoLog"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shader_atomic_counters" supported="gl|glcore">
+            <require>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_BINDING"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_START"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_SIZE"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER"/>
+                <enum name="GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER"/>
+                <enum name="GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_MAX_VERTEX_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_GEOMETRY_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_FRAGMENT_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_COMBINED_ATOMIC_COUNTERS"/>
+                <enum name="GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE"/>
+                <enum name="GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS"/>
+                <enum name="GL_ACTIVE_ATOMIC_COUNTER_BUFFERS"/>
+                <enum name="GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX"/>
+                <enum name="GL_UNSIGNED_INT_ATOMIC_COUNTER"/>
+                <command name="glGetActiveAtomicCounterBufferiv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shader_bit_encoding" supported="gl|glcore"/>
+        <extension name="GL_ARB_shader_draw_parameters" supported="gl|glcore"/>
+        <extension name="GL_ARB_shader_group_vote" supported="gl|glcore"/>
+        <extension name="GL_ARB_shader_image_load_store" supported="gl|glcore">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT"/>
+                <enum name="GL_ELEMENT_ARRAY_BARRIER_BIT"/>
+                <enum name="GL_UNIFORM_BARRIER_BIT"/>
+                <enum name="GL_TEXTURE_FETCH_BARRIER_BIT"/>
+                <enum name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT"/>
+                <enum name="GL_COMMAND_BARRIER_BIT"/>
+                <enum name="GL_PIXEL_BUFFER_BARRIER_BIT"/>
+                <enum name="GL_TEXTURE_UPDATE_BARRIER_BIT"/>
+                <enum name="GL_BUFFER_UPDATE_BARRIER_BIT"/>
+                <enum name="GL_FRAMEBUFFER_BARRIER_BIT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT"/>
+                <enum name="GL_ATOMIC_COUNTER_BARRIER_BIT"/>
+                <enum name="GL_ALL_BARRIER_BITS"/>
+                <enum name="GL_MAX_IMAGE_UNITS"/>
+                <enum name="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS"/>
+                <enum name="GL_IMAGE_BINDING_NAME"/>
+                <enum name="GL_IMAGE_BINDING_LEVEL"/>
+                <enum name="GL_IMAGE_BINDING_LAYERED"/>
+                <enum name="GL_IMAGE_BINDING_LAYER"/>
+                <enum name="GL_IMAGE_BINDING_ACCESS"/>
+                <enum name="GL_IMAGE_1D"/>
+                <enum name="GL_IMAGE_2D"/>
+                <enum name="GL_IMAGE_3D"/>
+                <enum name="GL_IMAGE_2D_RECT"/>
+                <enum name="GL_IMAGE_CUBE"/>
+                <enum name="GL_IMAGE_BUFFER"/>
+                <enum name="GL_IMAGE_1D_ARRAY"/>
+                <enum name="GL_IMAGE_2D_ARRAY"/>
+                <enum name="GL_IMAGE_CUBE_MAP_ARRAY"/>
+                <enum name="GL_IMAGE_2D_MULTISAMPLE"/>
+                <enum name="GL_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_INT_IMAGE_1D"/>
+                <enum name="GL_INT_IMAGE_2D"/>
+                <enum name="GL_INT_IMAGE_3D"/>
+                <enum name="GL_INT_IMAGE_2D_RECT"/>
+                <enum name="GL_INT_IMAGE_CUBE"/>
+                <enum name="GL_INT_IMAGE_BUFFER"/>
+                <enum name="GL_INT_IMAGE_1D_ARRAY"/>
+                <enum name="GL_INT_IMAGE_2D_ARRAY"/>
+                <enum name="GL_INT_IMAGE_CUBE_MAP_ARRAY"/>
+                <enum name="GL_INT_IMAGE_2D_MULTISAMPLE"/>
+                <enum name="GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_1D"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_3D"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_RECT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_CUBE"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_BUFFER"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_1D_ARRAY"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_ARRAY"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_MAX_IMAGE_SAMPLES"/>
+                <enum name="GL_IMAGE_BINDING_FORMAT"/>
+                <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_TYPE"/>
+                <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE"/>
+                <enum name="GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS"/>
+                <enum name="GL_MAX_VERTEX_IMAGE_UNIFORMS"/>
+                <enum name="GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS"/>
+                <enum name="GL_MAX_GEOMETRY_IMAGE_UNIFORMS"/>
+                <enum name="GL_MAX_FRAGMENT_IMAGE_UNIFORMS"/>
+                <enum name="GL_MAX_COMBINED_IMAGE_UNIFORMS"/>
+                <command name="glBindImageTexture"/>
+                <command name="glMemoryBarrier"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shader_image_size" supported="gl|glcore"/>
+        <extension name="GL_ARB_shader_objects" supported="gl">
+            <require>
+                <enum name="GL_PROGRAM_OBJECT_ARB"/>
+                <enum name="GL_SHADER_OBJECT_ARB"/>
+                <enum name="GL_OBJECT_TYPE_ARB"/>
+                <enum name="GL_OBJECT_SUBTYPE_ARB"/>
+                <enum name="GL_FLOAT_VEC2_ARB"/>
+                <enum name="GL_FLOAT_VEC3_ARB"/>
+                <enum name="GL_FLOAT_VEC4_ARB"/>
+                <enum name="GL_INT_VEC2_ARB"/>
+                <enum name="GL_INT_VEC3_ARB"/>
+                <enum name="GL_INT_VEC4_ARB"/>
+                <enum name="GL_BOOL_ARB"/>
+                <enum name="GL_BOOL_VEC2_ARB"/>
+                <enum name="GL_BOOL_VEC3_ARB"/>
+                <enum name="GL_BOOL_VEC4_ARB"/>
+                <enum name="GL_FLOAT_MAT2_ARB"/>
+                <enum name="GL_FLOAT_MAT3_ARB"/>
+                <enum name="GL_FLOAT_MAT4_ARB"/>
+                <enum name="GL_SAMPLER_1D_ARB"/>
+                <enum name="GL_SAMPLER_2D_ARB"/>
+                <enum name="GL_SAMPLER_3D_ARB"/>
+                <enum name="GL_SAMPLER_CUBE_ARB"/>
+                <enum name="GL_SAMPLER_1D_SHADOW_ARB"/>
+                <enum name="GL_SAMPLER_2D_SHADOW_ARB"/>
+                <enum name="GL_SAMPLER_2D_RECT_ARB"/>
+                <enum name="GL_SAMPLER_2D_RECT_SHADOW_ARB"/>
+                <enum name="GL_OBJECT_DELETE_STATUS_ARB"/>
+                <enum name="GL_OBJECT_COMPILE_STATUS_ARB"/>
+                <enum name="GL_OBJECT_LINK_STATUS_ARB"/>
+                <enum name="GL_OBJECT_VALIDATE_STATUS_ARB"/>
+                <enum name="GL_OBJECT_INFO_LOG_LENGTH_ARB"/>
+                <enum name="GL_OBJECT_ATTACHED_OBJECTS_ARB"/>
+                <enum name="GL_OBJECT_ACTIVE_UNIFORMS_ARB"/>
+                <enum name="GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB"/>
+                <enum name="GL_OBJECT_SHADER_SOURCE_LENGTH_ARB"/>
+                <command name="glDeleteObjectARB"/>
+                <command name="glGetHandleARB"/>
+                <command name="glDetachObjectARB"/>
+                <command name="glCreateShaderObjectARB"/>
+                <command name="glShaderSourceARB"/>
+                <command name="glCompileShaderARB"/>
+                <command name="glCreateProgramObjectARB"/>
+                <command name="glAttachObjectARB"/>
+                <command name="glLinkProgramARB"/>
+                <command name="glUseProgramObjectARB"/>
+                <command name="glValidateProgramARB"/>
+                <command name="glUniform1fARB"/>
+                <command name="glUniform2fARB"/>
+                <command name="glUniform3fARB"/>
+                <command name="glUniform4fARB"/>
+                <command name="glUniform1iARB"/>
+                <command name="glUniform2iARB"/>
+                <command name="glUniform3iARB"/>
+                <command name="glUniform4iARB"/>
+                <command name="glUniform1fvARB"/>
+                <command name="glUniform2fvARB"/>
+                <command name="glUniform3fvARB"/>
+                <command name="glUniform4fvARB"/>
+                <command name="glUniform1ivARB"/>
+                <command name="glUniform2ivARB"/>
+                <command name="glUniform3ivARB"/>
+                <command name="glUniform4ivARB"/>
+                <command name="glUniformMatrix2fvARB"/>
+                <command name="glUniformMatrix3fvARB"/>
+                <command name="glUniformMatrix4fvARB"/>
+                <command name="glGetObjectParameterfvARB"/>
+                <command name="glGetObjectParameterivARB"/>
+                <command name="glGetInfoLogARB"/>
+                <command name="glGetAttachedObjectsARB"/>
+                <command name="glGetUniformLocationARB"/>
+                <command name="glGetActiveUniformARB"/>
+                <command name="glGetUniformfvARB"/>
+                <command name="glGetUniformivARB"/>
+                <command name="glGetShaderSourceARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shader_precision" supported="gl|glcore"/>
+        <extension name="GL_ARB_shader_stencil_export" supported="gl|glcore"/>
+        <extension name="GL_ARB_shader_storage_buffer_object" supported="gl|glcore">
+            <require>
+                <enum name="GL_SHADER_STORAGE_BUFFER"/>
+                <enum name="GL_SHADER_STORAGE_BUFFER_BINDING"/>
+                <enum name="GL_SHADER_STORAGE_BUFFER_START"/>
+                <enum name="GL_SHADER_STORAGE_BUFFER_SIZE"/>
+                <enum name="GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS"/>
+                <enum name="GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS"/>
+                <enum name="GL_MAX_SHADER_STORAGE_BLOCK_SIZE"/>
+                <enum name="GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT"/>
+                <enum name="GL_SHADER_STORAGE_BARRIER_BIT"/>
+                <enum name="GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES"/>
+                <enum name="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS"/>
+                <command name="glShaderStorageBlockBinding"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shader_subroutine" supported="gl|glcore">
+            <require>
+                <enum name="GL_ACTIVE_SUBROUTINES"/>
+                <enum name="GL_ACTIVE_SUBROUTINE_UNIFORMS"/>
+                <enum name="GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS"/>
+                <enum name="GL_ACTIVE_SUBROUTINE_MAX_LENGTH"/>
+                <enum name="GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH"/>
+                <enum name="GL_MAX_SUBROUTINES"/>
+                <enum name="GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS"/>
+                <enum name="GL_NUM_COMPATIBLE_SUBROUTINES"/>
+                <enum name="GL_COMPATIBLE_SUBROUTINES"/>
+                <enum name="GL_UNIFORM_SIZE"/>
+                <enum name="GL_UNIFORM_NAME_LENGTH"/>
+                <command name="glGetSubroutineUniformLocation"/>
+                <command name="glGetSubroutineIndex"/>
+                <command name="glGetActiveSubroutineUniformiv"/>
+                <command name="glGetActiveSubroutineUniformName"/>
+                <command name="glGetActiveSubroutineName"/>
+                <command name="glUniformSubroutinesuiv"/>
+                <command name="glGetUniformSubroutineuiv"/>
+                <command name="glGetProgramStageiv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shader_texture_lod" supported="gl"/>
+        <extension name="GL_ARB_shading_language_100" supported="gl">
+            <require>
+                <enum name="GL_SHADING_LANGUAGE_VERSION_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shading_language_420pack" supported="gl|glcore"/>
+        <extension name="GL_ARB_shading_language_include" supported="gl|glcore">
+            <require>
+                <enum name="GL_SHADER_INCLUDE_ARB"/>
+                <enum name="GL_NAMED_STRING_LENGTH_ARB"/>
+                <enum name="GL_NAMED_STRING_TYPE_ARB"/>
+                <command name="glNamedStringARB"/>
+                <command name="glDeleteNamedStringARB"/>
+                <command name="glCompileShaderIncludeARB"/>
+                <command name="glIsNamedStringARB"/>
+                <command name="glGetNamedStringARB"/>
+                <command name="glGetNamedStringivARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shading_language_packing" supported="gl|glcore"/>
+        <extension name="GL_ARB_shadow" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_COMPARE_MODE_ARB"/>
+                <enum name="GL_TEXTURE_COMPARE_FUNC_ARB"/>
+                <enum name="GL_COMPARE_R_TO_TEXTURE_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_shadow_ambient" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_COMPARE_FAIL_VALUE_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_sparse_texture" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_SPARSE_ARB"/>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_INDEX_ARB"/>
+                <enum name="GL_MIN_SPARSE_LEVEL_ARB"/>
+                <enum name="GL_NUM_VIRTUAL_PAGE_SIZES_ARB"/>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_X_ARB"/>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_Y_ARB"/>
+                <enum name="GL_VIRTUAL_PAGE_SIZE_Z_ARB"/>
+                <enum name="GL_MAX_SPARSE_TEXTURE_SIZE_ARB"/>
+                <enum name="GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB"/>
+                <enum name="GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB"/>
+                <enum name="GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB"/>
+                <command name="glTexPageCommitmentARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_stencil_texturing" supported="gl|glcore">
+            <require>
+                <enum name="GL_DEPTH_STENCIL_TEXTURE_MODE"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_sync" supported="gl|glcore">
+            <require>
+                <enum name="GL_MAX_SERVER_WAIT_TIMEOUT"/>
+                <enum name="GL_OBJECT_TYPE"/>
+                <enum name="GL_SYNC_CONDITION"/>
+                <enum name="GL_SYNC_STATUS"/>
+                <enum name="GL_SYNC_FLAGS"/>
+                <enum name="GL_SYNC_FENCE"/>
+                <enum name="GL_SYNC_GPU_COMMANDS_COMPLETE"/>
+                <enum name="GL_UNSIGNALED"/>
+                <enum name="GL_SIGNALED"/>
+                <enum name="GL_ALREADY_SIGNALED"/>
+                <enum name="GL_TIMEOUT_EXPIRED"/>
+                <enum name="GL_CONDITION_SATISFIED"/>
+                <enum name="GL_WAIT_FAILED"/>
+                <enum name="GL_SYNC_FLUSH_COMMANDS_BIT"/>
+                <enum name="GL_TIMEOUT_IGNORED"/>
+                <command name="glFenceSync"/>
+                <command name="glIsSync"/>
+                <command name="glDeleteSync"/>
+                <command name="glClientWaitSync"/>
+                <command name="glWaitSync"/>
+                <command name="glGetInteger64v"/>
+                <command name="glGetSynciv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_tessellation_shader" supported="gl|glcore">
+            <require>
+                <enum name="GL_PATCHES"/>
+                <enum name="GL_PATCH_VERTICES"/>
+                <enum name="GL_PATCH_DEFAULT_INNER_LEVEL"/>
+                <enum name="GL_PATCH_DEFAULT_OUTER_LEVEL"/>
+                <enum name="GL_TESS_CONTROL_OUTPUT_VERTICES"/>
+                <enum name="GL_TESS_GEN_MODE"/>
+                <enum name="GL_TESS_GEN_SPACING"/>
+                <enum name="GL_TESS_GEN_VERTEX_ORDER"/>
+                <enum name="GL_TESS_GEN_POINT_MODE"/>
+                <enum name="GL_TRIANGLES"/>
+                <enum name="GL_ISOLINES"/>
+                <enum name="GL_QUADS"/>
+                <enum name="GL_EQUAL"/>
+                <enum name="GL_FRACTIONAL_ODD"/>
+                <enum name="GL_FRACTIONAL_EVEN"/>
+                <enum name="GL_CCW"/>
+                <enum name="GL_CW"/>
+                <enum name="GL_MAX_PATCH_VERTICES"/>
+                <enum name="GL_MAX_TESS_GEN_LEVEL"/>
+                <enum name="GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS"/>
+                <enum name="GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_PATCH_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_TESS_CONTROL_INPUT_COMPONENTS"/>
+                <enum name="GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS"/>
+                <enum name="GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS"/>
+                <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER"/>
+                <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER"/>
+                <enum name="GL_TESS_EVALUATION_SHADER"/>
+                <enum name="GL_TESS_CONTROL_SHADER"/>
+                <command name="glPatchParameteri"/>
+                <command name="glPatchParameterfv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_border_clamp" supported="gl">
+            <require>
+                <enum name="GL_CLAMP_TO_BORDER_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_BUFFER_ARB"/>
+                <enum name="GL_MAX_TEXTURE_BUFFER_SIZE_ARB"/>
+                <enum name="GL_TEXTURE_BINDING_BUFFER_ARB"/>
+                <enum name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB"/>
+                <enum name="GL_TEXTURE_BUFFER_FORMAT_ARB"/>
+                <command name="glTexBufferARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_buffer_object_rgb32" supported="gl|glcore">
+            <require>
+                <enum name="GL_RGB32F"/>
+                <enum name="GL_RGB32UI"/>
+                <enum name="GL_RGB32I"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_buffer_range" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_BUFFER_OFFSET"/>
+                <enum name="GL_TEXTURE_BUFFER_SIZE"/>
+                <enum name="GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT"/>
+                <command name="glTexBufferRange"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_compression" supported="gl">
+            <require>
+                <enum name="GL_COMPRESSED_ALPHA_ARB"/>
+                <enum name="GL_COMPRESSED_LUMINANCE_ARB"/>
+                <enum name="GL_COMPRESSED_LUMINANCE_ALPHA_ARB"/>
+                <enum name="GL_COMPRESSED_INTENSITY_ARB"/>
+                <enum name="GL_COMPRESSED_RGB_ARB"/>
+                <enum name="GL_COMPRESSED_RGBA_ARB"/>
+                <enum name="GL_TEXTURE_COMPRESSION_HINT_ARB"/>
+                <enum name="GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB"/>
+                <enum name="GL_TEXTURE_COMPRESSED_ARB"/>
+                <enum name="GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB"/>
+                <enum name="GL_COMPRESSED_TEXTURE_FORMATS_ARB"/>
+                <command name="glCompressedTexImage3DARB"/>
+                <command name="glCompressedTexImage2DARB"/>
+                <command name="glCompressedTexImage1DARB"/>
+                <command name="glCompressedTexSubImage3DARB"/>
+                <command name="glCompressedTexSubImage2DARB"/>
+                <command name="glCompressedTexSubImage1DARB"/>
+                <command name="glGetCompressedTexImageARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_compression_bptc" supported="gl|glcore">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_BPTC_UNORM_ARB"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB"/>
+                <enum name="GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB"/>
+                <enum name="GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_compression_rgtc" supported="gl|glcore">
+            <require>
+                <enum name="GL_COMPRESSED_RED_RGTC1"/>
+                <enum name="GL_COMPRESSED_SIGNED_RED_RGTC1"/>
+                <enum name="GL_COMPRESSED_RG_RGTC2"/>
+                <enum name="GL_COMPRESSED_SIGNED_RG_RGTC2"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_cube_map" supported="gl">
+            <require>
+                <enum name="GL_NORMAL_MAP_ARB"/>
+                <enum name="GL_REFLECTION_MAP_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_ARB"/>
+                <enum name="GL_TEXTURE_BINDING_CUBE_MAP_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB"/>
+                <enum name="GL_PROXY_TEXTURE_CUBE_MAP_ARB"/>
+                <enum name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_cube_map_array" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_CUBE_MAP_ARRAY_ARB"/>
+                <enum name="GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB"/>
+                <enum name="GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB"/>
+                <enum name="GL_SAMPLER_CUBE_MAP_ARRAY_ARB"/>
+                <enum name="GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB"/>
+                <enum name="GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_env_add" supported="gl"/>
+        <extension name="GL_ARB_texture_env_combine" supported="gl">
+            <require>
+                <enum name="GL_COMBINE_ARB"/>
+                <enum name="GL_COMBINE_RGB_ARB"/>
+                <enum name="GL_COMBINE_ALPHA_ARB"/>
+                <enum name="GL_SOURCE0_RGB_ARB"/>
+                <enum name="GL_SOURCE1_RGB_ARB"/>
+                <enum name="GL_SOURCE2_RGB_ARB"/>
+                <enum name="GL_SOURCE0_ALPHA_ARB"/>
+                <enum name="GL_SOURCE1_ALPHA_ARB"/>
+                <enum name="GL_SOURCE2_ALPHA_ARB"/>
+                <enum name="GL_OPERAND0_RGB_ARB"/>
+                <enum name="GL_OPERAND1_RGB_ARB"/>
+                <enum name="GL_OPERAND2_RGB_ARB"/>
+                <enum name="GL_OPERAND0_ALPHA_ARB"/>
+                <enum name="GL_OPERAND1_ALPHA_ARB"/>
+                <enum name="GL_OPERAND2_ALPHA_ARB"/>
+                <enum name="GL_RGB_SCALE_ARB"/>
+                <enum name="GL_ADD_SIGNED_ARB"/>
+                <enum name="GL_INTERPOLATE_ARB"/>
+                <enum name="GL_SUBTRACT_ARB"/>
+                <enum name="GL_CONSTANT_ARB"/>
+                <enum name="GL_PRIMARY_COLOR_ARB"/>
+                <enum name="GL_PREVIOUS_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_env_crossbar" supported="gl"/>
+        <extension name="GL_ARB_texture_env_dot3" supported="gl">
+            <require>
+                <enum name="GL_DOT3_RGB_ARB"/>
+                <enum name="GL_DOT3_RGBA_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_float" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_RED_TYPE_ARB"/>
+                <enum name="GL_TEXTURE_GREEN_TYPE_ARB"/>
+                <enum name="GL_TEXTURE_BLUE_TYPE_ARB"/>
+                <enum name="GL_TEXTURE_ALPHA_TYPE_ARB"/>
+                <enum name="GL_TEXTURE_LUMINANCE_TYPE_ARB"/>
+                <enum name="GL_TEXTURE_INTENSITY_TYPE_ARB"/>
+                <enum name="GL_TEXTURE_DEPTH_TYPE_ARB"/>
+                <enum name="GL_UNSIGNED_NORMALIZED_ARB"/>
+                <enum name="GL_RGBA32F_ARB"/>
+                <enum name="GL_RGB32F_ARB"/>
+                <enum name="GL_ALPHA32F_ARB"/>
+                <enum name="GL_INTENSITY32F_ARB"/>
+                <enum name="GL_LUMINANCE32F_ARB"/>
+                <enum name="GL_LUMINANCE_ALPHA32F_ARB"/>
+                <enum name="GL_RGBA16F_ARB"/>
+                <enum name="GL_RGB16F_ARB"/>
+                <enum name="GL_ALPHA16F_ARB"/>
+                <enum name="GL_INTENSITY16F_ARB"/>
+                <enum name="GL_LUMINANCE16F_ARB"/>
+                <enum name="GL_LUMINANCE_ALPHA16F_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_gather" supported="gl|glcore">
+            <require>
+                <enum name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB"/>
+                <enum name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB"/>
+                <enum name="GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_mirror_clamp_to_edge" supported="gl|glcore">
+            <require>
+                <enum name="GL_MIRROR_CLAMP_TO_EDGE"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_mirrored_repeat" supported="gl">
+            <require>
+                <enum name="GL_MIRRORED_REPEAT_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_multisample" supported="gl|glcore">
+            <require>
+                <enum name="GL_SAMPLE_POSITION"/>
+                <enum name="GL_SAMPLE_MASK"/>
+                <enum name="GL_SAMPLE_MASK_VALUE"/>
+                <enum name="GL_MAX_SAMPLE_MASK_WORDS"/>
+                <enum name="GL_TEXTURE_2D_MULTISAMPLE"/>
+                <enum name="GL_PROXY_TEXTURE_2D_MULTISAMPLE"/>
+                <enum name="GL_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_TEXTURE_BINDING_2D_MULTISAMPLE"/>
+                <enum name="GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_TEXTURE_SAMPLES"/>
+                <enum name="GL_TEXTURE_FIXED_SAMPLE_LOCATIONS"/>
+                <enum name="GL_SAMPLER_2D_MULTISAMPLE"/>
+                <enum name="GL_INT_SAMPLER_2D_MULTISAMPLE"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE"/>
+                <enum name="GL_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY"/>
+                <enum name="GL_MAX_COLOR_TEXTURE_SAMPLES"/>
+                <enum name="GL_MAX_DEPTH_TEXTURE_SAMPLES"/>
+                <enum name="GL_MAX_INTEGER_SAMPLES"/>
+                <command name="glTexImage2DMultisample"/>
+                <command name="glTexImage3DMultisample"/>
+                <command name="glGetMultisamplefv"/>
+                <command name="glSampleMaski"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_non_power_of_two" supported="gl"/>
+        <extension name="GL_ARB_texture_query_levels" supported="gl|glcore"/>
+        <extension name="GL_ARB_texture_query_lod" supported="gl|glcore"/>
+        <extension name="GL_ARB_texture_rectangle" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_RECTANGLE_ARB"/>
+                <enum name="GL_TEXTURE_BINDING_RECTANGLE_ARB"/>
+                <enum name="GL_PROXY_TEXTURE_RECTANGLE_ARB"/>
+                <enum name="GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_rg" supported="gl|glcore">
+            <require>
+                <enum name="GL_RG"/>
+                <enum name="GL_RG_INTEGER"/>
+                <enum name="GL_R8"/>
+                <enum name="GL_R16"/>
+                <enum name="GL_RG8"/>
+                <enum name="GL_RG16"/>
+                <enum name="GL_R16F"/>
+                <enum name="GL_R32F"/>
+                <enum name="GL_RG16F"/>
+                <enum name="GL_RG32F"/>
+                <enum name="GL_R8I"/>
+                <enum name="GL_R8UI"/>
+                <enum name="GL_R16I"/>
+                <enum name="GL_R16UI"/>
+                <enum name="GL_R32I"/>
+                <enum name="GL_R32UI"/>
+                <enum name="GL_RG8I"/>
+                <enum name="GL_RG8UI"/>
+                <enum name="GL_RG16I"/>
+                <enum name="GL_RG16UI"/>
+                <enum name="GL_RG32I"/>
+                <enum name="GL_RG32UI"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_rgb10_a2ui" supported="gl|glcore">
+            <require>
+                <enum name="GL_RGB10_A2UI"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_stencil8" supported="gl|glcore">
+            <require>
+                <enum name="GL_STENCIL_INDEX"/>
+                <enum name="GL_STENCIL_INDEX8"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_storage" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_IMMUTABLE_FORMAT"/>
+                <command name="glTexStorage1D"/>
+                <command name="glTexStorage2D"/>
+                <command name="glTexStorage3D"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_storage_multisample" supported="gl|glcore">
+            <require>
+                <command name="glTexStorage2DMultisample"/>
+                <command name="glTexStorage3DMultisample"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_swizzle" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_SWIZZLE_R"/>
+                <enum name="GL_TEXTURE_SWIZZLE_G"/>
+                <enum name="GL_TEXTURE_SWIZZLE_B"/>
+                <enum name="GL_TEXTURE_SWIZZLE_A"/>
+                <enum name="GL_TEXTURE_SWIZZLE_RGBA"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_texture_view" supported="gl|glcore">
+            <require>
+                <enum name="GL_TEXTURE_VIEW_MIN_LEVEL"/>
+                <enum name="GL_TEXTURE_VIEW_NUM_LEVELS"/>
+                <enum name="GL_TEXTURE_VIEW_MIN_LAYER"/>
+                <enum name="GL_TEXTURE_VIEW_NUM_LAYERS"/>
+                <enum name="GL_TEXTURE_IMMUTABLE_LEVELS"/>
+                <command name="glTextureView"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_timer_query" supported="gl|glcore">
+            <require>
+                <enum name="GL_TIME_ELAPSED"/>
+                <enum name="GL_TIMESTAMP"/>
+                <command name="glQueryCounter"/>
+                <command name="glGetQueryObjecti64v"/>
+                <command name="glGetQueryObjectui64v"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_transform_feedback2" supported="gl|glcore">
+            <require>
+                <enum name="GL_TRANSFORM_FEEDBACK"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_PAUSED"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_ACTIVE"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BINDING"/>
+                <command name="glBindTransformFeedback"/>
+                <command name="glDeleteTransformFeedbacks"/>
+                <command name="glGenTransformFeedbacks"/>
+                <command name="glIsTransformFeedback"/>
+                <command name="glPauseTransformFeedback"/>
+                <command name="glResumeTransformFeedback"/>
+                <command name="glDrawTransformFeedback"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_transform_feedback3" supported="gl|glcore">
+            <require>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_BUFFERS"/>
+                <enum name="GL_MAX_VERTEX_STREAMS"/>
+                <command name="glDrawTransformFeedbackStream"/>
+                <command name="glBeginQueryIndexed"/>
+                <command name="glEndQueryIndexed"/>
+                <command name="glGetQueryIndexediv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_transform_feedback_instanced" supported="gl|glcore">
+            <require>
+                <command name="glDrawTransformFeedbackInstanced"/>
+                <command name="glDrawTransformFeedbackStreamInstanced"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_transpose_matrix" supported="gl">
+            <require>
+                <enum name="GL_TRANSPOSE_MODELVIEW_MATRIX_ARB"/>
+                <enum name="GL_TRANSPOSE_PROJECTION_MATRIX_ARB"/>
+                <enum name="GL_TRANSPOSE_TEXTURE_MATRIX_ARB"/>
+                <enum name="GL_TRANSPOSE_COLOR_MATRIX_ARB"/>
+                <command name="glLoadTransposeMatrixfARB"/>
+                <command name="glLoadTransposeMatrixdARB"/>
+                <command name="glMultTransposeMatrixfARB"/>
+                <command name="glMultTransposeMatrixdARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_uniform_buffer_object" supported="gl|glcore">
+            <require>
+                <enum name="GL_UNIFORM_BUFFER"/>
+                <enum name="GL_UNIFORM_BUFFER_BINDING"/>
+                <enum name="GL_UNIFORM_BUFFER_START"/>
+                <enum name="GL_UNIFORM_BUFFER_SIZE"/>
+                <enum name="GL_MAX_VERTEX_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_GEOMETRY_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_FRAGMENT_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_COMBINED_UNIFORM_BLOCKS"/>
+                <enum name="GL_MAX_UNIFORM_BUFFER_BINDINGS"/>
+                <enum name="GL_MAX_UNIFORM_BLOCK_SIZE"/>
+                <enum name="GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS"/>
+                <enum name="GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS"/>
+                <enum name="GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT"/>
+                <enum name="GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH"/>
+                <enum name="GL_ACTIVE_UNIFORM_BLOCKS"/>
+                <enum name="GL_UNIFORM_TYPE"/>
+                <enum name="GL_UNIFORM_SIZE"/>
+                <enum name="GL_UNIFORM_NAME_LENGTH"/>
+                <enum name="GL_UNIFORM_BLOCK_INDEX"/>
+                <enum name="GL_UNIFORM_OFFSET"/>
+                <enum name="GL_UNIFORM_ARRAY_STRIDE"/>
+                <enum name="GL_UNIFORM_MATRIX_STRIDE"/>
+                <enum name="GL_UNIFORM_IS_ROW_MAJOR"/>
+                <enum name="GL_UNIFORM_BLOCK_BINDING"/>
+                <enum name="GL_UNIFORM_BLOCK_DATA_SIZE"/>
+                <enum name="GL_UNIFORM_BLOCK_NAME_LENGTH"/>
+                <enum name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS"/>
+                <enum name="GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES"/>
+                <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER"/>
+                <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER"/>
+                <enum name="GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER"/>
+                <enum name="GL_INVALID_INDEX"/>
+                <command name="glGetUniformIndices"/>
+                <command name="glGetActiveUniformsiv"/>
+                <command name="glGetActiveUniformName"/>
+                <command name="glGetUniformBlockIndex"/>
+                <command name="glGetActiveUniformBlockiv"/>
+                <command name="glGetActiveUniformBlockName"/>
+                <command name="glUniformBlockBinding"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_array_bgra" supported="gl|glcore">
+            <require>
+                <enum name="GL_BGRA"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_array_object" supported="gl|glcore">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_BINDING"/>
+                <command name="glBindVertexArray"/>
+                <command name="glDeleteVertexArrays"/>
+                <command name="glGenVertexArrays"/>
+                <command name="glIsVertexArray"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_attrib_64bit" supported="gl|glcore">
+            <require>
+                <enum name="GL_RGB32I"/>
+                <enum name="GL_DOUBLE_VEC2"/>
+                <enum name="GL_DOUBLE_VEC3"/>
+                <enum name="GL_DOUBLE_VEC4"/>
+                <enum name="GL_DOUBLE_MAT2"/>
+                <enum name="GL_DOUBLE_MAT3"/>
+                <enum name="GL_DOUBLE_MAT4"/>
+                <enum name="GL_DOUBLE_MAT2x3"/>
+                <enum name="GL_DOUBLE_MAT2x4"/>
+                <enum name="GL_DOUBLE_MAT3x2"/>
+                <enum name="GL_DOUBLE_MAT3x4"/>
+                <enum name="GL_DOUBLE_MAT4x2"/>
+                <enum name="GL_DOUBLE_MAT4x3"/>
+                <command name="glVertexAttribL1d"/>
+                <command name="glVertexAttribL2d"/>
+                <command name="glVertexAttribL3d"/>
+                <command name="glVertexAttribL4d"/>
+                <command name="glVertexAttribL1dv"/>
+                <command name="glVertexAttribL2dv"/>
+                <command name="glVertexAttribL3dv"/>
+                <command name="glVertexAttribL4dv"/>
+                <command name="glVertexAttribLPointer"/>
+                <command name="glGetVertexAttribLdv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_attrib_binding" supported="gl|glcore">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_BINDING"/>
+                <enum name="GL_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+                <enum name="GL_VERTEX_BINDING_DIVISOR"/>
+                <enum name="GL_VERTEX_BINDING_OFFSET"/>
+                <enum name="GL_VERTEX_BINDING_STRIDE"/>
+                <enum name="GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET"/>
+                <enum name="GL_MAX_VERTEX_ATTRIB_BINDINGS"/>
+                <command name="glBindVertexBuffer"/>
+                <command name="glVertexAttribFormat"/>
+                <command name="glVertexAttribIFormat"/>
+                <command name="glVertexAttribLFormat"/>
+                <command name="glVertexAttribBinding"/>
+                <command name="glVertexBindingDivisor"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_blend" supported="gl">
+            <require>
+                <enum name="GL_MAX_VERTEX_UNITS_ARB"/>
+                <enum name="GL_ACTIVE_VERTEX_UNITS_ARB"/>
+                <enum name="GL_WEIGHT_SUM_UNITY_ARB"/>
+                <enum name="GL_VERTEX_BLEND_ARB"/>
+                <enum name="GL_CURRENT_WEIGHT_ARB"/>
+                <enum name="GL_WEIGHT_ARRAY_TYPE_ARB"/>
+                <enum name="GL_WEIGHT_ARRAY_STRIDE_ARB"/>
+                <enum name="GL_WEIGHT_ARRAY_SIZE_ARB"/>
+                <enum name="GL_WEIGHT_ARRAY_POINTER_ARB"/>
+                <enum name="GL_WEIGHT_ARRAY_ARB"/>
+                <enum name="GL_MODELVIEW0_ARB"/>
+                <enum name="GL_MODELVIEW1_ARB"/>
+                <enum name="GL_MODELVIEW2_ARB"/>
+                <enum name="GL_MODELVIEW3_ARB"/>
+                <enum name="GL_MODELVIEW4_ARB"/>
+                <enum name="GL_MODELVIEW5_ARB"/>
+                <enum name="GL_MODELVIEW6_ARB"/>
+                <enum name="GL_MODELVIEW7_ARB"/>
+                <enum name="GL_MODELVIEW8_ARB"/>
+                <enum name="GL_MODELVIEW9_ARB"/>
+                <enum name="GL_MODELVIEW10_ARB"/>
+                <enum name="GL_MODELVIEW11_ARB"/>
+                <enum name="GL_MODELVIEW12_ARB"/>
+                <enum name="GL_MODELVIEW13_ARB"/>
+                <enum name="GL_MODELVIEW14_ARB"/>
+                <enum name="GL_MODELVIEW15_ARB"/>
+                <enum name="GL_MODELVIEW16_ARB"/>
+                <enum name="GL_MODELVIEW17_ARB"/>
+                <enum name="GL_MODELVIEW18_ARB"/>
+                <enum name="GL_MODELVIEW19_ARB"/>
+                <enum name="GL_MODELVIEW20_ARB"/>
+                <enum name="GL_MODELVIEW21_ARB"/>
+                <enum name="GL_MODELVIEW22_ARB"/>
+                <enum name="GL_MODELVIEW23_ARB"/>
+                <enum name="GL_MODELVIEW24_ARB"/>
+                <enum name="GL_MODELVIEW25_ARB"/>
+                <enum name="GL_MODELVIEW26_ARB"/>
+                <enum name="GL_MODELVIEW27_ARB"/>
+                <enum name="GL_MODELVIEW28_ARB"/>
+                <enum name="GL_MODELVIEW29_ARB"/>
+                <enum name="GL_MODELVIEW30_ARB"/>
+                <enum name="GL_MODELVIEW31_ARB"/>
+                <command name="glWeightbvARB"/>
+                <command name="glWeightsvARB"/>
+                <command name="glWeightivARB"/>
+                <command name="glWeightfvARB"/>
+                <command name="glWeightdvARB"/>
+                <command name="glWeightubvARB"/>
+                <command name="glWeightusvARB"/>
+                <command name="glWeightuivARB"/>
+                <command name="glWeightPointerARB"/>
+                <command name="glVertexBlendARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_BUFFER_SIZE_ARB"/>
+                <enum name="GL_BUFFER_USAGE_ARB"/>
+                <enum name="GL_ARRAY_BUFFER_ARB"/>
+                <enum name="GL_ELEMENT_ARRAY_BUFFER_ARB"/>
+                <enum name="GL_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_VERTEX_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_NORMAL_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_COLOR_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_INDEX_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB"/>
+                <enum name="GL_READ_ONLY_ARB"/>
+                <enum name="GL_WRITE_ONLY_ARB"/>
+                <enum name="GL_READ_WRITE_ARB"/>
+                <enum name="GL_BUFFER_ACCESS_ARB"/>
+                <enum name="GL_BUFFER_MAPPED_ARB"/>
+                <enum name="GL_BUFFER_MAP_POINTER_ARB"/>
+                <enum name="GL_STREAM_DRAW_ARB"/>
+                <enum name="GL_STREAM_READ_ARB"/>
+                <enum name="GL_STREAM_COPY_ARB"/>
+                <enum name="GL_STATIC_DRAW_ARB"/>
+                <enum name="GL_STATIC_READ_ARB"/>
+                <enum name="GL_STATIC_COPY_ARB"/>
+                <enum name="GL_DYNAMIC_DRAW_ARB"/>
+                <enum name="GL_DYNAMIC_READ_ARB"/>
+                <enum name="GL_DYNAMIC_COPY_ARB"/>
+                <command name="glBindBufferARB"/>
+                <command name="glDeleteBuffersARB"/>
+                <command name="glGenBuffersARB"/>
+                <command name="glIsBufferARB"/>
+                <command name="glBufferDataARB"/>
+                <command name="glBufferSubDataARB"/>
+                <command name="glGetBufferSubDataARB"/>
+                <command name="glMapBufferARB"/>
+                <command name="glUnmapBufferARB"/>
+                <command name="glGetBufferParameterivARB"/>
+                <command name="glGetBufferPointervARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_program" supported="gl">
+            <require>
+                <enum name="GL_COLOR_SUM_ARB"/>
+                <enum name="GL_VERTEX_PROGRAM_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB"/>
+                <enum name="GL_CURRENT_VERTEX_ATTRIB_ARB"/>
+                <enum name="GL_PROGRAM_LENGTH_ARB"/>
+                <enum name="GL_PROGRAM_STRING_ARB"/>
+                <enum name="GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB"/>
+                <enum name="GL_MAX_PROGRAM_MATRICES_ARB"/>
+                <enum name="GL_CURRENT_MATRIX_STACK_DEPTH_ARB"/>
+                <enum name="GL_CURRENT_MATRIX_ARB"/>
+                <enum name="GL_VERTEX_PROGRAM_POINT_SIZE_ARB"/>
+                <enum name="GL_VERTEX_PROGRAM_TWO_SIDE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB"/>
+                <enum name="GL_PROGRAM_ERROR_POSITION_ARB"/>
+                <enum name="GL_PROGRAM_BINDING_ARB"/>
+                <enum name="GL_MAX_VERTEX_ATTRIBS_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB"/>
+                <enum name="GL_PROGRAM_ERROR_STRING_ARB"/>
+                <enum name="GL_PROGRAM_FORMAT_ASCII_ARB"/>
+                <enum name="GL_PROGRAM_FORMAT_ARB"/>
+                <enum name="GL_PROGRAM_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB"/>
+                <enum name="GL_PROGRAM_TEMPORARIES_ARB"/>
+                <enum name="GL_MAX_PROGRAM_TEMPORARIES_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_TEMPORARIES_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB"/>
+                <enum name="GL_PROGRAM_PARAMETERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_PARAMETERS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_PARAMETERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB"/>
+                <enum name="GL_PROGRAM_ATTRIBS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_ATTRIBS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_ATTRIBS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB"/>
+                <enum name="GL_PROGRAM_ADDRESS_REGISTERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB"/>
+                <enum name="GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB"/>
+                <enum name="GL_MAX_PROGRAM_ENV_PARAMETERS_ARB"/>
+                <enum name="GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB"/>
+                <enum name="GL_TRANSPOSE_CURRENT_MATRIX_ARB"/>
+                <enum name="GL_MATRIX0_ARB"/>
+                <enum name="GL_MATRIX1_ARB"/>
+                <enum name="GL_MATRIX2_ARB"/>
+                <enum name="GL_MATRIX3_ARB"/>
+                <enum name="GL_MATRIX4_ARB"/>
+                <enum name="GL_MATRIX5_ARB"/>
+                <enum name="GL_MATRIX6_ARB"/>
+                <enum name="GL_MATRIX7_ARB"/>
+                <enum name="GL_MATRIX8_ARB"/>
+                <enum name="GL_MATRIX9_ARB"/>
+                <enum name="GL_MATRIX10_ARB"/>
+                <enum name="GL_MATRIX11_ARB"/>
+                <enum name="GL_MATRIX12_ARB"/>
+                <enum name="GL_MATRIX13_ARB"/>
+                <enum name="GL_MATRIX14_ARB"/>
+                <enum name="GL_MATRIX15_ARB"/>
+                <enum name="GL_MATRIX16_ARB"/>
+                <enum name="GL_MATRIX17_ARB"/>
+                <enum name="GL_MATRIX18_ARB"/>
+                <enum name="GL_MATRIX19_ARB"/>
+                <enum name="GL_MATRIX20_ARB"/>
+                <enum name="GL_MATRIX21_ARB"/>
+                <enum name="GL_MATRIX22_ARB"/>
+                <enum name="GL_MATRIX23_ARB"/>
+                <enum name="GL_MATRIX24_ARB"/>
+                <enum name="GL_MATRIX25_ARB"/>
+                <enum name="GL_MATRIX26_ARB"/>
+                <enum name="GL_MATRIX27_ARB"/>
+                <enum name="GL_MATRIX28_ARB"/>
+                <enum name="GL_MATRIX29_ARB"/>
+                <enum name="GL_MATRIX30_ARB"/>
+                <enum name="GL_MATRIX31_ARB"/>
+                <command name="glVertexAttrib1dARB"/>
+                <command name="glVertexAttrib1dvARB"/>
+                <command name="glVertexAttrib1fARB"/>
+                <command name="glVertexAttrib1fvARB"/>
+                <command name="glVertexAttrib1sARB"/>
+                <command name="glVertexAttrib1svARB"/>
+                <command name="glVertexAttrib2dARB"/>
+                <command name="glVertexAttrib2dvARB"/>
+                <command name="glVertexAttrib2fARB"/>
+                <command name="glVertexAttrib2fvARB"/>
+                <command name="glVertexAttrib2sARB"/>
+                <command name="glVertexAttrib2svARB"/>
+                <command name="glVertexAttrib3dARB"/>
+                <command name="glVertexAttrib3dvARB"/>
+                <command name="glVertexAttrib3fARB"/>
+                <command name="glVertexAttrib3fvARB"/>
+                <command name="glVertexAttrib3sARB"/>
+                <command name="glVertexAttrib3svARB"/>
+                <command name="glVertexAttrib4NbvARB"/>
+                <command name="glVertexAttrib4NivARB"/>
+                <command name="glVertexAttrib4NsvARB"/>
+                <command name="glVertexAttrib4NubARB"/>
+                <command name="glVertexAttrib4NubvARB"/>
+                <command name="glVertexAttrib4NuivARB"/>
+                <command name="glVertexAttrib4NusvARB"/>
+                <command name="glVertexAttrib4bvARB"/>
+                <command name="glVertexAttrib4dARB"/>
+                <command name="glVertexAttrib4dvARB"/>
+                <command name="glVertexAttrib4fARB"/>
+                <command name="glVertexAttrib4fvARB"/>
+                <command name="glVertexAttrib4ivARB"/>
+                <command name="glVertexAttrib4sARB"/>
+                <command name="glVertexAttrib4svARB"/>
+                <command name="glVertexAttrib4ubvARB"/>
+                <command name="glVertexAttrib4uivARB"/>
+                <command name="glVertexAttrib4usvARB"/>
+                <command name="glVertexAttribPointerARB"/>
+                <command name="glEnableVertexAttribArrayARB"/>
+                <command name="glDisableVertexAttribArrayARB"/>
+                <command name="glProgramStringARB"/>
+                <command name="glBindProgramARB"/>
+                <command name="glDeleteProgramsARB"/>
+                <command name="glGenProgramsARB"/>
+                <command name="glProgramEnvParameter4dARB"/>
+                <command name="glProgramEnvParameter4dvARB"/>
+                <command name="glProgramEnvParameter4fARB"/>
+                <command name="glProgramEnvParameter4fvARB"/>
+                <command name="glProgramLocalParameter4dARB"/>
+                <command name="glProgramLocalParameter4dvARB"/>
+                <command name="glProgramLocalParameter4fARB"/>
+                <command name="glProgramLocalParameter4fvARB"/>
+                <command name="glGetProgramEnvParameterdvARB"/>
+                <command name="glGetProgramEnvParameterfvARB"/>
+                <command name="glGetProgramLocalParameterdvARB"/>
+                <command name="glGetProgramLocalParameterfvARB"/>
+                <command name="glGetProgramivARB"/>
+                <command name="glGetProgramStringARB"/>
+                <command name="glGetVertexAttribdvARB"/>
+                <command name="glGetVertexAttribfvARB"/>
+                <command name="glGetVertexAttribivARB"/>
+                <command name="glGetVertexAttribPointervARB"/>
+                <command name="glIsProgramARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_shader" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_SHADER_ARB"/>
+                <enum name="GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB"/>
+                <enum name="GL_MAX_VARYING_FLOATS_ARB"/>
+                <enum name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB"/>
+                <enum name="GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB"/>
+                <enum name="GL_OBJECT_ACTIVE_ATTRIBUTES_ARB"/>
+                <enum name="GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB"/>
+                <enum name="GL_MAX_VERTEX_ATTRIBS_ARB"/>
+                <enum name="GL_MAX_TEXTURE_IMAGE_UNITS_ARB"/>
+                <enum name="GL_MAX_TEXTURE_COORDS_ARB"/>
+                <enum name="GL_VERTEX_PROGRAM_POINT_SIZE_ARB"/>
+                <enum name="GL_VERTEX_PROGRAM_TWO_SIDE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB"/>
+                <enum name="GL_CURRENT_VERTEX_ATTRIB_ARB"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB"/>
+                <enum name="GL_FLOAT"/>
+                <enum name="GL_FLOAT_VEC2_ARB"/>
+                <enum name="GL_FLOAT_VEC3_ARB"/>
+                <enum name="GL_FLOAT_VEC4_ARB"/>
+                <enum name="GL_FLOAT_MAT2_ARB"/>
+                <enum name="GL_FLOAT_MAT3_ARB"/>
+                <enum name="GL_FLOAT_MAT4_ARB"/>
+                <command name="glVertexAttrib1fARB"/>
+                <command name="glVertexAttrib1sARB"/>
+                <command name="glVertexAttrib1dARB"/>
+                <command name="glVertexAttrib2fARB"/>
+                <command name="glVertexAttrib2sARB"/>
+                <command name="glVertexAttrib2dARB"/>
+                <command name="glVertexAttrib3fARB"/>
+                <command name="glVertexAttrib3sARB"/>
+                <command name="glVertexAttrib3dARB"/>
+                <command name="glVertexAttrib4fARB"/>
+                <command name="glVertexAttrib4sARB"/>
+                <command name="glVertexAttrib4dARB"/>
+                <command name="glVertexAttrib4NubARB"/>
+                <command name="glVertexAttrib1fvARB"/>
+                <command name="glVertexAttrib1svARB"/>
+                <command name="glVertexAttrib1dvARB"/>
+                <command name="glVertexAttrib2fvARB"/>
+                <command name="glVertexAttrib2svARB"/>
+                <command name="glVertexAttrib2dvARB"/>
+                <command name="glVertexAttrib3fvARB"/>
+                <command name="glVertexAttrib3svARB"/>
+                <command name="glVertexAttrib3dvARB"/>
+                <command name="glVertexAttrib4fvARB"/>
+                <command name="glVertexAttrib4svARB"/>
+                <command name="glVertexAttrib4dvARB"/>
+                <command name="glVertexAttrib4ivARB"/>
+                <command name="glVertexAttrib4bvARB"/>
+                <command name="glVertexAttrib4ubvARB"/>
+                <command name="glVertexAttrib4usvARB"/>
+                <command name="glVertexAttrib4uivARB"/>
+                <command name="glVertexAttrib4NbvARB"/>
+                <command name="glVertexAttrib4NsvARB"/>
+                <command name="glVertexAttrib4NivARB"/>
+                <command name="glVertexAttrib4NubvARB"/>
+                <command name="glVertexAttrib4NusvARB"/>
+                <command name="glVertexAttrib4NuivARB"/>
+                <command name="glVertexAttribPointerARB"/>
+                <command name="glEnableVertexAttribArrayARB"/>
+                <command name="glDisableVertexAttribArrayARB"/>
+                <command name="glBindAttribLocationARB"/>
+                <command name="glGetActiveAttribARB"/>
+                <command name="glGetAttribLocationARB"/>
+                <command name="glGetVertexAttribdvARB"/>
+                <command name="glGetVertexAttribfvARB"/>
+                <command name="glGetVertexAttribivARB"/>
+                <command name="glGetVertexAttribPointervARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_type_10f_11f_11f_rev" supported="gl|glcore">
+            <require>
+                <enum name="GL_UNSIGNED_INT_10F_11F_11F_REV"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_vertex_type_2_10_10_10_rev" supported="gl|glcore">
+            <require>
+                <enum name="GL_UNSIGNED_INT_2_10_10_10_REV"/>
+                <enum name="GL_INT_2_10_10_10_REV"/>
+                <command name="glVertexAttribP1ui"/>
+                <command name="glVertexAttribP1uiv"/>
+                <command name="glVertexAttribP2ui"/>
+                <command name="glVertexAttribP2uiv"/>
+                <command name="glVertexAttribP3ui"/>
+                <command name="glVertexAttribP3uiv"/>
+                <command name="glVertexAttribP4ui"/>
+                <command name="glVertexAttribP4uiv"/>
+            </require>
+            <require api="gl" profile="compatibility">
+                <command name="glVertexP2ui"/>
+                <command name="glVertexP2uiv"/>
+                <command name="glVertexP3ui"/>
+                <command name="glVertexP3uiv"/>
+                <command name="glVertexP4ui"/>
+                <command name="glVertexP4uiv"/>
+                <command name="glTexCoordP1ui"/>
+                <command name="glTexCoordP1uiv"/>
+                <command name="glTexCoordP2ui"/>
+                <command name="glTexCoordP2uiv"/>
+                <command name="glTexCoordP3ui"/>
+                <command name="glTexCoordP3uiv"/>
+                <command name="glTexCoordP4ui"/>
+                <command name="glTexCoordP4uiv"/>
+                <command name="glMultiTexCoordP1ui"/>
+                <command name="glMultiTexCoordP1uiv"/>
+                <command name="glMultiTexCoordP2ui"/>
+                <command name="glMultiTexCoordP2uiv"/>
+                <command name="glMultiTexCoordP3ui"/>
+                <command name="glMultiTexCoordP3uiv"/>
+                <command name="glMultiTexCoordP4ui"/>
+                <command name="glMultiTexCoordP4uiv"/>
+                <command name="glNormalP3ui"/>
+                <command name="glNormalP3uiv"/>
+                <command name="glColorP3ui"/>
+                <command name="glColorP3uiv"/>
+                <command name="glColorP4ui"/>
+                <command name="glColorP4uiv"/>
+                <command name="glSecondaryColorP3ui"/>
+                <command name="glSecondaryColorP3uiv"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_viewport_array" supported="gl|glcore">
+            <require>
+                <enum name="GL_SCISSOR_BOX"/>
+                <enum name="GL_VIEWPORT"/>
+                <enum name="GL_DEPTH_RANGE"/>
+                <enum name="GL_SCISSOR_TEST"/>
+                <enum name="GL_MAX_VIEWPORTS"/>
+                <enum name="GL_VIEWPORT_SUBPIXEL_BITS"/>
+                <enum name="GL_VIEWPORT_BOUNDS_RANGE"/>
+                <enum name="GL_LAYER_PROVOKING_VERTEX"/>
+                <enum name="GL_VIEWPORT_INDEX_PROVOKING_VERTEX"/>
+                <enum name="GL_UNDEFINED_VERTEX"/>
+                <enum name="GL_FIRST_VERTEX_CONVENTION"/>
+                <enum name="GL_LAST_VERTEX_CONVENTION"/>
+                <enum name="GL_PROVOKING_VERTEX"/>
+                <command name="glViewportArrayv"/>
+                <command name="glViewportIndexedf"/>
+                <command name="glViewportIndexedfv"/>
+                <command name="glScissorArrayv"/>
+                <command name="glScissorIndexed"/>
+                <command name="glScissorIndexedv"/>
+                <command name="glDepthRangeArrayv"/>
+                <command name="glDepthRangeIndexed"/>
+                <command name="glGetFloati_v"/>
+                <command name="glGetDoublei_v"/>
+            </require>
+        </extension>
+        <extension name="GL_ARB_window_pos" supported="gl">
+            <require>
+                <command name="glWindowPos2dARB"/>
+                <command name="glWindowPos2dvARB"/>
+                <command name="glWindowPos2fARB"/>
+                <command name="glWindowPos2fvARB"/>
+                <command name="glWindowPos2iARB"/>
+                <command name="glWindowPos2ivARB"/>
+                <command name="glWindowPos2sARB"/>
+                <command name="glWindowPos2svARB"/>
+                <command name="glWindowPos3dARB"/>
+                <command name="glWindowPos3dvARB"/>
+                <command name="glWindowPos3fARB"/>
+                <command name="glWindowPos3fvARB"/>
+                <command name="glWindowPos3iARB"/>
+                <command name="glWindowPos3ivARB"/>
+                <command name="glWindowPos3sARB"/>
+                <command name="glWindowPos3svARB"/>
+            </require>
+        </extension>
+        <extension name="GL_ARM_mali_program_binary" supported="gles2">
+            <require>
+                <enum name="GL_MALI_PROGRAM_BINARY_ARM"/>
+            </require>
+        </extension>
+        <extension name="GL_ARM_mali_shader_binary" supported="gles2">
+            <require>
+                <enum name="GL_MALI_SHADER_BINARY_ARM"/>
+            </require>
+        </extension>
+        <extension name="GL_ARM_rgba8" supported="gles1|gles2"/>
+        <extension name="GL_ARM_shader_framebuffer_fetch" supported="gles2">
+            <require>
+                <enum name="GL_FETCH_PER_SAMPLE_ARM"/>
+                <enum name="GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM"/>
+            </require>
+        </extension>
+        <extension name="GL_ARM_shader_framebuffer_fetch_depth_stencil" supported="gles2"/>
+        <extension name="GL_ATI_draw_buffers" supported="gl">
+            <require>
+                <enum name="GL_MAX_DRAW_BUFFERS_ATI"/>
+                <enum name="GL_DRAW_BUFFER0_ATI"/>
+                <enum name="GL_DRAW_BUFFER1_ATI"/>
+                <enum name="GL_DRAW_BUFFER2_ATI"/>
+                <enum name="GL_DRAW_BUFFER3_ATI"/>
+                <enum name="GL_DRAW_BUFFER4_ATI"/>
+                <enum name="GL_DRAW_BUFFER5_ATI"/>
+                <enum name="GL_DRAW_BUFFER6_ATI"/>
+                <enum name="GL_DRAW_BUFFER7_ATI"/>
+                <enum name="GL_DRAW_BUFFER8_ATI"/>
+                <enum name="GL_DRAW_BUFFER9_ATI"/>
+                <enum name="GL_DRAW_BUFFER10_ATI"/>
+                <enum name="GL_DRAW_BUFFER11_ATI"/>
+                <enum name="GL_DRAW_BUFFER12_ATI"/>
+                <enum name="GL_DRAW_BUFFER13_ATI"/>
+                <enum name="GL_DRAW_BUFFER14_ATI"/>
+                <enum name="GL_DRAW_BUFFER15_ATI"/>
+                <command name="glDrawBuffersATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_element_array" supported="gl">
+            <require>
+                <enum name="GL_ELEMENT_ARRAY_ATI"/>
+                <enum name="GL_ELEMENT_ARRAY_TYPE_ATI"/>
+                <enum name="GL_ELEMENT_ARRAY_POINTER_ATI"/>
+                <command name="glElementPointerATI"/>
+                <command name="glDrawElementArrayATI"/>
+                <command name="glDrawRangeElementArrayATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_envmap_bumpmap" supported="gl">
+            <require>
+                <enum name="GL_BUMP_ROT_MATRIX_ATI"/>
+                <enum name="GL_BUMP_ROT_MATRIX_SIZE_ATI"/>
+                <enum name="GL_BUMP_NUM_TEX_UNITS_ATI"/>
+                <enum name="GL_BUMP_TEX_UNITS_ATI"/>
+                <enum name="GL_DUDV_ATI"/>
+                <enum name="GL_DU8DV8_ATI"/>
+                <enum name="GL_BUMP_ENVMAP_ATI"/>
+                <enum name="GL_BUMP_TARGET_ATI"/>
+                <command name="glTexBumpParameterivATI"/>
+                <command name="glTexBumpParameterfvATI"/>
+                <command name="glGetTexBumpParameterivATI"/>
+                <command name="glGetTexBumpParameterfvATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_fragment_shader" supported="gl">
+            <require>
+                <enum name="GL_FRAGMENT_SHADER_ATI"/>
+                <enum name="GL_REG_0_ATI"/>
+                <enum name="GL_REG_1_ATI"/>
+                <enum name="GL_REG_2_ATI"/>
+                <enum name="GL_REG_3_ATI"/>
+                <enum name="GL_REG_4_ATI"/>
+                <enum name="GL_REG_5_ATI"/>
+                <enum name="GL_REG_6_ATI"/>
+                <enum name="GL_REG_7_ATI"/>
+                <enum name="GL_REG_8_ATI"/>
+                <enum name="GL_REG_9_ATI"/>
+                <enum name="GL_REG_10_ATI"/>
+                <enum name="GL_REG_11_ATI"/>
+                <enum name="GL_REG_12_ATI"/>
+                <enum name="GL_REG_13_ATI"/>
+                <enum name="GL_REG_14_ATI"/>
+                <enum name="GL_REG_15_ATI"/>
+                <enum name="GL_REG_16_ATI"/>
+                <enum name="GL_REG_17_ATI"/>
+                <enum name="GL_REG_18_ATI"/>
+                <enum name="GL_REG_19_ATI"/>
+                <enum name="GL_REG_20_ATI"/>
+                <enum name="GL_REG_21_ATI"/>
+                <enum name="GL_REG_22_ATI"/>
+                <enum name="GL_REG_23_ATI"/>
+                <enum name="GL_REG_24_ATI"/>
+                <enum name="GL_REG_25_ATI"/>
+                <enum name="GL_REG_26_ATI"/>
+                <enum name="GL_REG_27_ATI"/>
+                <enum name="GL_REG_28_ATI"/>
+                <enum name="GL_REG_29_ATI"/>
+                <enum name="GL_REG_30_ATI"/>
+                <enum name="GL_REG_31_ATI"/>
+                <enum name="GL_CON_0_ATI"/>
+                <enum name="GL_CON_1_ATI"/>
+                <enum name="GL_CON_2_ATI"/>
+                <enum name="GL_CON_3_ATI"/>
+                <enum name="GL_CON_4_ATI"/>
+                <enum name="GL_CON_5_ATI"/>
+                <enum name="GL_CON_6_ATI"/>
+                <enum name="GL_CON_7_ATI"/>
+                <enum name="GL_CON_8_ATI"/>
+                <enum name="GL_CON_9_ATI"/>
+                <enum name="GL_CON_10_ATI"/>
+                <enum name="GL_CON_11_ATI"/>
+                <enum name="GL_CON_12_ATI"/>
+                <enum name="GL_CON_13_ATI"/>
+                <enum name="GL_CON_14_ATI"/>
+                <enum name="GL_CON_15_ATI"/>
+                <enum name="GL_CON_16_ATI"/>
+                <enum name="GL_CON_17_ATI"/>
+                <enum name="GL_CON_18_ATI"/>
+                <enum name="GL_CON_19_ATI"/>
+                <enum name="GL_CON_20_ATI"/>
+                <enum name="GL_CON_21_ATI"/>
+                <enum name="GL_CON_22_ATI"/>
+                <enum name="GL_CON_23_ATI"/>
+                <enum name="GL_CON_24_ATI"/>
+                <enum name="GL_CON_25_ATI"/>
+                <enum name="GL_CON_26_ATI"/>
+                <enum name="GL_CON_27_ATI"/>
+                <enum name="GL_CON_28_ATI"/>
+                <enum name="GL_CON_29_ATI"/>
+                <enum name="GL_CON_30_ATI"/>
+                <enum name="GL_CON_31_ATI"/>
+                <enum name="GL_MOV_ATI"/>
+                <enum name="GL_ADD_ATI"/>
+                <enum name="GL_MUL_ATI"/>
+                <enum name="GL_SUB_ATI"/>
+                <enum name="GL_DOT3_ATI"/>
+                <enum name="GL_DOT4_ATI"/>
+                <enum name="GL_MAD_ATI"/>
+                <enum name="GL_LERP_ATI"/>
+                <enum name="GL_CND_ATI"/>
+                <enum name="GL_CND0_ATI"/>
+                <enum name="GL_DOT2_ADD_ATI"/>
+                <enum name="GL_SECONDARY_INTERPOLATOR_ATI"/>
+                <enum name="GL_NUM_FRAGMENT_REGISTERS_ATI"/>
+                <enum name="GL_NUM_FRAGMENT_CONSTANTS_ATI"/>
+                <enum name="GL_NUM_PASSES_ATI"/>
+                <enum name="GL_NUM_INSTRUCTIONS_PER_PASS_ATI"/>
+                <enum name="GL_NUM_INSTRUCTIONS_TOTAL_ATI"/>
+                <enum name="GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI"/>
+                <enum name="GL_NUM_LOOPBACK_COMPONENTS_ATI"/>
+                <enum name="GL_COLOR_ALPHA_PAIRING_ATI"/>
+                <enum name="GL_SWIZZLE_STR_ATI"/>
+                <enum name="GL_SWIZZLE_STQ_ATI"/>
+                <enum name="GL_SWIZZLE_STR_DR_ATI"/>
+                <enum name="GL_SWIZZLE_STQ_DQ_ATI"/>
+                <enum name="GL_SWIZZLE_STRQ_ATI"/>
+                <enum name="GL_SWIZZLE_STRQ_DQ_ATI"/>
+                <enum name="GL_RED_BIT_ATI"/>
+                <enum name="GL_GREEN_BIT_ATI"/>
+                <enum name="GL_BLUE_BIT_ATI"/>
+                <enum name="GL_2X_BIT_ATI"/>
+                <enum name="GL_4X_BIT_ATI"/>
+                <enum name="GL_8X_BIT_ATI"/>
+                <enum name="GL_HALF_BIT_ATI"/>
+                <enum name="GL_QUARTER_BIT_ATI"/>
+                <enum name="GL_EIGHTH_BIT_ATI"/>
+                <enum name="GL_SATURATE_BIT_ATI"/>
+                <enum name="GL_COMP_BIT_ATI"/>
+                <enum name="GL_NEGATE_BIT_ATI"/>
+                <enum name="GL_BIAS_BIT_ATI"/>
+                <command name="glGenFragmentShadersATI"/>
+                <command name="glBindFragmentShaderATI"/>
+                <command name="glDeleteFragmentShaderATI"/>
+                <command name="glBeginFragmentShaderATI"/>
+                <command name="glEndFragmentShaderATI"/>
+                <command name="glPassTexCoordATI"/>
+                <command name="glSampleMapATI"/>
+                <command name="glColorFragmentOp1ATI"/>
+                <command name="glColorFragmentOp2ATI"/>
+                <command name="glColorFragmentOp3ATI"/>
+                <command name="glAlphaFragmentOp1ATI"/>
+                <command name="glAlphaFragmentOp2ATI"/>
+                <command name="glAlphaFragmentOp3ATI"/>
+                <command name="glSetFragmentShaderConstantATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_map_object_buffer" supported="gl">
+            <require>
+                <command name="glMapObjectBufferATI"/>
+                <command name="glUnmapObjectBufferATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_meminfo" supported="gl">
+            <require>
+                <enum name="GL_VBO_FREE_MEMORY_ATI"/>
+                <enum name="GL_TEXTURE_FREE_MEMORY_ATI"/>
+                <enum name="GL_RENDERBUFFER_FREE_MEMORY_ATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_pixel_format_float" supported="gl" comment="WGL extension defining some associated GL enums. ATI does not export this extension.">
+            <require>
+                <enum name="GL_RGBA_FLOAT_MODE_ATI"/>
+                <enum name="GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_pn_triangles" supported="gl">
+            <require>
+                <enum name="GL_PN_TRIANGLES_ATI"/>
+                <enum name="GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI"/>
+                <enum name="GL_PN_TRIANGLES_POINT_MODE_ATI"/>
+                <enum name="GL_PN_TRIANGLES_NORMAL_MODE_ATI"/>
+                <enum name="GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI"/>
+                <enum name="GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI"/>
+                <enum name="GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI"/>
+                <enum name="GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI"/>
+                <enum name="GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI"/>
+                <command name="glPNTrianglesiATI"/>
+                <command name="glPNTrianglesfATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_separate_stencil" supported="gl">
+            <require>
+                <enum name="GL_STENCIL_BACK_FUNC_ATI"/>
+                <enum name="GL_STENCIL_BACK_FAIL_ATI"/>
+                <enum name="GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI"/>
+                <enum name="GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI"/>
+                <command name="glStencilOpSeparateATI"/>
+                <command name="glStencilFuncSeparateATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_text_fragment_shader" supported="gl">
+            <require>
+                <enum name="GL_TEXT_FRAGMENT_SHADER_ATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_texture_env_combine3" supported="gl">
+            <require>
+                <enum name="GL_MODULATE_ADD_ATI"/>
+                <enum name="GL_MODULATE_SIGNED_ADD_ATI"/>
+                <enum name="GL_MODULATE_SUBTRACT_ATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_texture_float" supported="gl">
+            <require>
+                <enum name="GL_RGBA_FLOAT32_ATI"/>
+                <enum name="GL_RGB_FLOAT32_ATI"/>
+                <enum name="GL_ALPHA_FLOAT32_ATI"/>
+                <enum name="GL_INTENSITY_FLOAT32_ATI"/>
+                <enum name="GL_LUMINANCE_FLOAT32_ATI"/>
+                <enum name="GL_LUMINANCE_ALPHA_FLOAT32_ATI"/>
+                <enum name="GL_RGBA_FLOAT16_ATI"/>
+                <enum name="GL_RGB_FLOAT16_ATI"/>
+                <enum name="GL_ALPHA_FLOAT16_ATI"/>
+                <enum name="GL_INTENSITY_FLOAT16_ATI"/>
+                <enum name="GL_LUMINANCE_FLOAT16_ATI"/>
+                <enum name="GL_LUMINANCE_ALPHA_FLOAT16_ATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_texture_mirror_once" supported="gl">
+            <require>
+                <enum name="GL_MIRROR_CLAMP_ATI"/>
+                <enum name="GL_MIRROR_CLAMP_TO_EDGE_ATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_vertex_array_object" supported="gl">
+            <require>
+                <enum name="GL_STATIC_ATI"/>
+                <enum name="GL_DYNAMIC_ATI"/>
+                <enum name="GL_PRESERVE_ATI"/>
+                <enum name="GL_DISCARD_ATI"/>
+                <enum name="GL_OBJECT_BUFFER_SIZE_ATI"/>
+                <enum name="GL_OBJECT_BUFFER_USAGE_ATI"/>
+                <enum name="GL_ARRAY_OBJECT_BUFFER_ATI"/>
+                <enum name="GL_ARRAY_OBJECT_OFFSET_ATI"/>
+                <command name="glNewObjectBufferATI"/>
+                <command name="glIsObjectBufferATI"/>
+                <command name="glUpdateObjectBufferATI"/>
+                <command name="glGetObjectBufferfvATI"/>
+                <command name="glGetObjectBufferivATI"/>
+                <command name="glFreeObjectBufferATI"/>
+                <command name="glArrayObjectATI"/>
+                <command name="glGetArrayObjectfvATI"/>
+                <command name="glGetArrayObjectivATI"/>
+                <command name="glVariantArrayObjectATI"/>
+                <command name="glGetVariantArrayObjectfvATI"/>
+                <command name="glGetVariantArrayObjectivATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_vertex_attrib_array_object" supported="gl">
+            <require>
+                <command name="glVertexAttribArrayObjectATI"/>
+                <command name="glGetVertexAttribArrayObjectfvATI"/>
+                <command name="glGetVertexAttribArrayObjectivATI"/>
+            </require>
+        </extension>
+        <extension name="GL_ATI_vertex_streams" supported="gl">
+            <require>
+                <enum name="GL_MAX_VERTEX_STREAMS_ATI"/>
+                <enum name="GL_VERTEX_STREAM0_ATI"/>
+                <enum name="GL_VERTEX_STREAM1_ATI"/>
+                <enum name="GL_VERTEX_STREAM2_ATI"/>
+                <enum name="GL_VERTEX_STREAM3_ATI"/>
+                <enum name="GL_VERTEX_STREAM4_ATI"/>
+                <enum name="GL_VERTEX_STREAM5_ATI"/>
+                <enum name="GL_VERTEX_STREAM6_ATI"/>
+                <enum name="GL_VERTEX_STREAM7_ATI"/>
+                <enum name="GL_VERTEX_SOURCE_ATI"/>
+                <command name="glVertexStream1sATI"/>
+                <command name="glVertexStream1svATI"/>
+                <command name="glVertexStream1iATI"/>
+                <command name="glVertexStream1ivATI"/>
+                <command name="glVertexStream1fATI"/>
+                <command name="glVertexStream1fvATI"/>
+                <command name="glVertexStream1dATI"/>
+                <command name="glVertexStream1dvATI"/>
+                <command name="glVertexStream2sATI"/>
+                <command name="glVertexStream2svATI"/>
+                <command name="glVertexStream2iATI"/>
+                <command name="glVertexStream2ivATI"/>
+                <command name="glVertexStream2fATI"/>
+                <command name="glVertexStream2fvATI"/>
+                <command name="glVertexStream2dATI"/>
+                <command name="glVertexStream2dvATI"/>
+                <command name="glVertexStream3sATI"/>
+                <command name="glVertexStream3svATI"/>
+                <command name="glVertexStream3iATI"/>
+                <command name="glVertexStream3ivATI"/>
+                <command name="glVertexStream3fATI"/>
+                <command name="glVertexStream3fvATI"/>
+                <command name="glVertexStream3dATI"/>
+                <command name="glVertexStream3dvATI"/>
+                <command name="glVertexStream4sATI"/>
+                <command name="glVertexStream4svATI"/>
+                <command name="glVertexStream4iATI"/>
+                <command name="glVertexStream4ivATI"/>
+                <command name="glVertexStream4fATI"/>
+                <command name="glVertexStream4fvATI"/>
+                <command name="glVertexStream4dATI"/>
+                <command name="glVertexStream4dvATI"/>
+                <command name="glNormalStream3bATI"/>
+                <command name="glNormalStream3bvATI"/>
+                <command name="glNormalStream3sATI"/>
+                <command name="glNormalStream3svATI"/>
+                <command name="glNormalStream3iATI"/>
+                <command name="glNormalStream3ivATI"/>
+                <command name="glNormalStream3fATI"/>
+                <command name="glNormalStream3fvATI"/>
+                <command name="glNormalStream3dATI"/>
+                <command name="glNormalStream3dvATI"/>
+                <command name="glClientActiveVertexStreamATI"/>
+                <command name="glVertexBlendEnviATI"/>
+                <command name="glVertexBlendEnvfATI"/>
+            </require>
+        </extension>
+        <extension name="GL_DMP_shader_binary" supported="gles2">
+            <require>
+                <enum name="GL_SHADER_BINARY_DMP"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_422_pixels" supported="gl">
+            <require>
+                <enum name="GL_422_EXT"/>
+                <enum name="GL_422_REV_EXT"/>
+                <enum name="GL_422_AVERAGE_EXT"/>
+                <enum name="GL_422_REV_AVERAGE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_abgr" supported="gl">
+            <require>
+                <enum name="GL_ABGR_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_bgra" supported="gl">
+            <require>
+                <enum name="GL_BGR_EXT"/>
+                <enum name="GL_BGRA_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_bindable_uniform" supported="gl">
+            <require>
+                <enum name="GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT"/>
+                <enum name="GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT"/>
+                <enum name="GL_MAX_BINDABLE_UNIFORM_SIZE_EXT"/>
+                <enum name="GL_UNIFORM_BUFFER_EXT"/>
+                <enum name="GL_UNIFORM_BUFFER_BINDING_EXT"/>
+                <command name="glUniformBufferEXT"/>
+                <command name="glGetUniformBufferSizeEXT"/>
+                <command name="glGetUniformOffsetEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_blend_color" supported="gl">
+            <require>
+                <enum name="GL_CONSTANT_COLOR_EXT"/>
+                <enum name="GL_ONE_MINUS_CONSTANT_COLOR_EXT"/>
+                <enum name="GL_CONSTANT_ALPHA_EXT"/>
+                <enum name="GL_ONE_MINUS_CONSTANT_ALPHA_EXT"/>
+                <enum name="GL_BLEND_COLOR_EXT"/>
+                <command name="glBlendColorEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_blend_equation_separate" supported="gl">
+            <require>
+                <enum name="GL_BLEND_EQUATION_RGB_EXT"/>
+                <enum name="GL_BLEND_EQUATION_ALPHA_EXT"/>
+                <command name="glBlendEquationSeparateEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_blend_func_separate" supported="gl">
+            <require>
+                <enum name="GL_BLEND_DST_RGB_EXT"/>
+                <enum name="GL_BLEND_SRC_RGB_EXT"/>
+                <enum name="GL_BLEND_DST_ALPHA_EXT"/>
+                <enum name="GL_BLEND_SRC_ALPHA_EXT"/>
+                <command name="glBlendFuncSeparateEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_blend_logic_op" supported="gl"/>
+        <extension name="GL_EXT_blend_minmax" supported="gl|gles1|gles2">
+            <require>
+                <enum name="GL_MIN_EXT"/>
+                <enum name="GL_MAX_EXT"/>
+            </require>
+            <require api="gl">
+                <enum name="GL_FUNC_ADD_EXT"/>
+                <enum name="GL_BLEND_EQUATION_EXT"/>
+                <command name="glBlendEquationEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_blend_subtract" supported="gl">
+            <require>
+                <enum name="GL_FUNC_SUBTRACT_EXT"/>
+                <enum name="GL_FUNC_REVERSE_SUBTRACT_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_clip_volume_hint" supported="gl">
+            <require>
+                <enum name="GL_CLIP_VOLUME_CLIPPING_HINT_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_cmyka" supported="gl">
+            <require>
+                <enum name="GL_CMYK_EXT"/>
+                <enum name="GL_CMYKA_EXT"/>
+                <enum name="GL_PACK_CMYK_HINT_EXT"/>
+                <enum name="GL_UNPACK_CMYK_HINT_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_color_buffer_half_float" supported="gles2">
+            <require>
+                <enum name="GL_RGBA16F_EXT"/>
+                <enum name="GL_RGB16F_EXT"/>
+                <enum name="GL_RG16F_EXT"/>
+                <enum name="GL_R16F_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT"/>
+                <enum name="GL_UNSIGNED_NORMALIZED_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_color_subtable" supported="gl">
+            <require>
+                <command name="glColorSubTableEXT"/>
+                <command name="glCopyColorSubTableEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_compiled_vertex_array" supported="gl">
+            <require>
+                <enum name="GL_ARRAY_ELEMENT_LOCK_FIRST_EXT"/>
+                <enum name="GL_ARRAY_ELEMENT_LOCK_COUNT_EXT"/>
+                <command name="glLockArraysEXT"/>
+                <command name="glUnlockArraysEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_convolution" supported="gl">
+            <require>
+                <enum name="GL_CONVOLUTION_1D_EXT"/>
+                <enum name="GL_CONVOLUTION_2D_EXT"/>
+                <enum name="GL_SEPARABLE_2D_EXT"/>
+                <enum name="GL_CONVOLUTION_BORDER_MODE_EXT"/>
+                <enum name="GL_CONVOLUTION_FILTER_SCALE_EXT"/>
+                <enum name="GL_CONVOLUTION_FILTER_BIAS_EXT"/>
+                <enum name="GL_REDUCE_EXT"/>
+                <enum name="GL_CONVOLUTION_FORMAT_EXT"/>
+                <enum name="GL_CONVOLUTION_WIDTH_EXT"/>
+                <enum name="GL_CONVOLUTION_HEIGHT_EXT"/>
+                <enum name="GL_MAX_CONVOLUTION_WIDTH_EXT"/>
+                <enum name="GL_MAX_CONVOLUTION_HEIGHT_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_RED_SCALE_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_GREEN_SCALE_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_BLUE_SCALE_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_ALPHA_SCALE_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_RED_BIAS_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_GREEN_BIAS_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_BLUE_BIAS_EXT"/>
+                <enum name="GL_POST_CONVOLUTION_ALPHA_BIAS_EXT"/>
+                <command name="glConvolutionFilter1DEXT"/>
+                <command name="glConvolutionFilter2DEXT"/>
+                <command name="glConvolutionParameterfEXT"/>
+                <command name="glConvolutionParameterfvEXT"/>
+                <command name="glConvolutionParameteriEXT"/>
+                <command name="glConvolutionParameterivEXT"/>
+                <command name="glCopyConvolutionFilter1DEXT"/>
+                <command name="glCopyConvolutionFilter2DEXT"/>
+                <command name="glGetConvolutionFilterEXT"/>
+                <command name="glGetConvolutionParameterfvEXT"/>
+                <command name="glGetConvolutionParameterivEXT"/>
+                <command name="glGetSeparableFilterEXT"/>
+                <command name="glSeparableFilter2DEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_coordinate_frame" supported="gl">
+            <require>
+                <enum name="GL_TANGENT_ARRAY_EXT"/>
+                <enum name="GL_BINORMAL_ARRAY_EXT"/>
+                <enum name="GL_CURRENT_TANGENT_EXT"/>
+                <enum name="GL_CURRENT_BINORMAL_EXT"/>
+                <enum name="GL_TANGENT_ARRAY_TYPE_EXT"/>
+                <enum name="GL_TANGENT_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_BINORMAL_ARRAY_TYPE_EXT"/>
+                <enum name="GL_BINORMAL_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_TANGENT_ARRAY_POINTER_EXT"/>
+                <enum name="GL_BINORMAL_ARRAY_POINTER_EXT"/>
+                <enum name="GL_MAP1_TANGENT_EXT"/>
+                <enum name="GL_MAP2_TANGENT_EXT"/>
+                <enum name="GL_MAP1_BINORMAL_EXT"/>
+                <enum name="GL_MAP2_BINORMAL_EXT"/>
+                <command name="glTangent3bEXT"/>
+                <command name="glTangent3bvEXT"/>
+                <command name="glTangent3dEXT"/>
+                <command name="glTangent3dvEXT"/>
+                <command name="glTangent3fEXT"/>
+                <command name="glTangent3fvEXT"/>
+                <command name="glTangent3iEXT"/>
+                <command name="glTangent3ivEXT"/>
+                <command name="glTangent3sEXT"/>
+                <command name="glTangent3svEXT"/>
+                <command name="glBinormal3bEXT"/>
+                <command name="glBinormal3bvEXT"/>
+                <command name="glBinormal3dEXT"/>
+                <command name="glBinormal3dvEXT"/>
+                <command name="glBinormal3fEXT"/>
+                <command name="glBinormal3fvEXT"/>
+                <command name="glBinormal3iEXT"/>
+                <command name="glBinormal3ivEXT"/>
+                <command name="glBinormal3sEXT"/>
+                <command name="glBinormal3svEXT"/>
+                <command name="glTangentPointerEXT"/>
+                <command name="glBinormalPointerEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_copy_image" supported="gles2">
+            <require>
+                <command name="glCopyImageSubDataEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_copy_texture" supported="gl">
+            <require>
+                <command name="glCopyTexImage1DEXT"/>
+                <command name="glCopyTexImage2DEXT"/>
+                <command name="glCopyTexSubImage1DEXT"/>
+                <command name="glCopyTexSubImage2DEXT"/>
+                <command name="glCopyTexSubImage3DEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_cull_vertex" supported="gl">
+            <require>
+                <enum name="GL_CULL_VERTEX_EXT"/>
+                <enum name="GL_CULL_VERTEX_EYE_POSITION_EXT"/>
+                <enum name="GL_CULL_VERTEX_OBJECT_POSITION_EXT"/>
+                <command name="glCullParameterdvEXT"/>
+                <command name="glCullParameterfvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_debug_label" supported="gl|gles2">
+            <require>
+                <enum name="GL_PROGRAM_PIPELINE_OBJECT_EXT"/>
+                <enum name="GL_PROGRAM_OBJECT_EXT"/>
+                <enum name="GL_SHADER_OBJECT_EXT"/>
+                <enum name="GL_BUFFER_OBJECT_EXT"/>
+                <enum name="GL_QUERY_OBJECT_EXT"/>
+                <enum name="GL_VERTEX_ARRAY_OBJECT_EXT"/>
+                <command name="glLabelObjectEXT"/>
+                <command name="glGetObjectLabelEXT"/>
+            </require>
+            <require comment="Depends on OpenGL ES 3.0">
+                <enum name="GL_SAMPLER"/>
+                <enum name="GL_TRANSFORM_FEEDBACK"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_debug_marker" supported="gl|gles2">
+            <require>
+                <command name="glInsertEventMarkerEXT"/>
+                <command name="glPushGroupMarkerEXT"/>
+                <command name="glPopGroupMarkerEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_depth_bounds_test" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_BOUNDS_TEST_EXT"/>
+                <enum name="GL_DEPTH_BOUNDS_EXT"/>
+                <command name="glDepthBoundsEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_direct_state_access" supported="gl" comment="DSA extension doesn't identify which interfaces are core profile and keeps getting expanded. This is in sync with revision 34, 2010/09/07">
+            <require>
+                <enum name="GL_PROGRAM_MATRIX_EXT"/>
+                <enum name="GL_TRANSPOSE_PROGRAM_MATRIX_EXT"/>
+                <enum name="GL_PROGRAM_MATRIX_STACK_DEPTH_EXT"/>
+            </require>
+            <require comment="OpenGL 1.0: New matrix commands">
+                <command name="glMatrixLoadfEXT"/>
+                <command name="glMatrixLoaddEXT"/>
+                <command name="glMatrixMultfEXT"/>
+                <command name="glMatrixMultdEXT"/>
+                <command name="glMatrixLoadIdentityEXT"/>
+                <command name="glMatrixRotatefEXT"/>
+                <command name="glMatrixRotatedEXT"/>
+                <command name="glMatrixScalefEXT"/>
+                <command name="glMatrixScaledEXT"/>
+                <command name="glMatrixTranslatefEXT"/>
+                <command name="glMatrixTranslatedEXT"/>
+                <command name="glMatrixFrustumEXT"/>
+                <command name="glMatrixOrthoEXT"/>
+                <command name="glMatrixPopEXT"/>
+                <command name="glMatrixPushEXT"/>
+            </require>
+            <require comment="OpenGL 1.1: New client commands">
+                <command name="glClientAttribDefaultEXT"/>
+                <command name="glPushClientAttribDefaultEXT"/>
+            </require>
+            <require comment="OpenGL 1.1: New texture object commands">
+                <command name="glTextureParameterfEXT"/>
+                <command name="glTextureParameterfvEXT"/>
+                <command name="glTextureParameteriEXT"/>
+                <command name="glTextureParameterivEXT"/>
+                <command name="glTextureImage1DEXT"/>
+                <command name="glTextureImage2DEXT"/>
+                <command name="glTextureSubImage1DEXT"/>
+                <command name="glTextureSubImage2DEXT"/>
+                <command name="glCopyTextureImage1DEXT"/>
+                <command name="glCopyTextureImage2DEXT"/>
+                <command name="glCopyTextureSubImage1DEXT"/>
+                <command name="glCopyTextureSubImage2DEXT"/>
+                <command name="glGetTextureImageEXT"/>
+                <command name="glGetTextureParameterfvEXT"/>
+                <command name="glGetTextureParameterivEXT"/>
+                <command name="glGetTextureLevelParameterfvEXT"/>
+                <command name="glGetTextureLevelParameterivEXT"/>
+            </require>
+            <require comment="OpenGL 1.2: New 3D texture object commands">
+                <command name="glTextureImage3DEXT"/>
+                <command name="glTextureSubImage3DEXT"/>
+                <command name="glCopyTextureSubImage3DEXT"/>
+            </require>
+            <require comment="OpenGL 1.2.1: New multitexture commands">
+                <command name="glBindMultiTextureEXT"/>
+                <command name="glMultiTexCoordPointerEXT"/>
+                <command name="glMultiTexEnvfEXT"/>
+                <command name="glMultiTexEnvfvEXT"/>
+                <command name="glMultiTexEnviEXT"/>
+                <command name="glMultiTexEnvivEXT"/>
+                <command name="glMultiTexGendEXT"/>
+                <command name="glMultiTexGendvEXT"/>
+                <command name="glMultiTexGenfEXT"/>
+                <command name="glMultiTexGenfvEXT"/>
+                <command name="glMultiTexGeniEXT"/>
+                <command name="glMultiTexGenivEXT"/>
+                <command name="glGetMultiTexEnvfvEXT"/>
+                <command name="glGetMultiTexEnvivEXT"/>
+                <command name="glGetMultiTexGendvEXT"/>
+                <command name="glGetMultiTexGenfvEXT"/>
+                <command name="glGetMultiTexGenivEXT"/>
+                <command name="glMultiTexParameteriEXT"/>
+                <command name="glMultiTexParameterivEXT"/>
+                <command name="glMultiTexParameterfEXT"/>
+                <command name="glMultiTexParameterfvEXT"/>
+                <command name="glMultiTexImage1DEXT"/>
+                <command name="glMultiTexImage2DEXT"/>
+                <command name="glMultiTexSubImage1DEXT"/>
+                <command name="glMultiTexSubImage2DEXT"/>
+                <command name="glCopyMultiTexImage1DEXT"/>
+                <command name="glCopyMultiTexImage2DEXT"/>
+                <command name="glCopyMultiTexSubImage1DEXT"/>
+                <command name="glCopyMultiTexSubImage2DEXT"/>
+                <command name="glGetMultiTexImageEXT"/>
+                <command name="glGetMultiTexParameterfvEXT"/>
+                <command name="glGetMultiTexParameterivEXT"/>
+                <command name="glGetMultiTexLevelParameterfvEXT"/>
+                <command name="glGetMultiTexLevelParameterivEXT"/>
+                <command name="glMultiTexImage3DEXT"/>
+                <command name="glMultiTexSubImage3DEXT"/>
+                <command name="glCopyMultiTexSubImage3DEXT"/>
+            </require>
+            <require comment="OpenGL 1.2.1: New indexed texture commands">
+                <command name="glEnableClientStateIndexedEXT"/>
+                <command name="glDisableClientStateIndexedEXT"/>
+            </require>
+            <require comment="OpenGL 1.2.1: New indexed generic queries">
+                <command name="glGetFloatIndexedvEXT"/>
+                <command name="glGetDoubleIndexedvEXT"/>
+                <command name="glGetPointerIndexedvEXT"/>
+            </require>
+            <require comment="OpenGL 1.2.1: Extend EXT_draw_buffers2 commands">
+                <command name="glEnableIndexedEXT"/>
+                <command name="glDisableIndexedEXT"/>
+                <command name="glIsEnabledIndexedEXT"/>
+                <command name="glGetIntegerIndexedvEXT"/>
+                <command name="glGetBooleanIndexedvEXT"/>
+            </require>
+            <require comment="OpenGL 1.3: New compressed texture object commands">
+                <command name="glCompressedTextureImage3DEXT"/>
+                <command name="glCompressedTextureImage2DEXT"/>
+                <command name="glCompressedTextureImage1DEXT"/>
+                <command name="glCompressedTextureSubImage3DEXT"/>
+                <command name="glCompressedTextureSubImage2DEXT"/>
+                <command name="glCompressedTextureSubImage1DEXT"/>
+                <command name="glGetCompressedTextureImageEXT"/>
+            </require>
+            <require comment="OpenGL 1.3: New multitexture compressed texture commands">
+                <command name="glCompressedMultiTexImage3DEXT"/>
+                <command name="glCompressedMultiTexImage2DEXT"/>
+                <command name="glCompressedMultiTexImage1DEXT"/>
+                <command name="glCompressedMultiTexSubImage3DEXT"/>
+                <command name="glCompressedMultiTexSubImage2DEXT"/>
+                <command name="glCompressedMultiTexSubImage1DEXT"/>
+                <command name="glGetCompressedMultiTexImageEXT"/>
+            </require>
+            <require comment="OpenGL 1.3: New transpose matrix commands">
+                <command name="glMatrixLoadTransposefEXT"/>
+                <command name="glMatrixLoadTransposedEXT"/>
+                <command name="glMatrixMultTransposefEXT"/>
+                <command name="glMatrixMultTransposedEXT"/>
+            </require>
+            <require comment="OpenGL 1.5: New buffer commands">
+                <command name="glNamedBufferDataEXT"/>
+                <command name="glNamedBufferSubDataEXT"/>
+                <command name="glMapNamedBufferEXT"/>
+                <command name="glUnmapNamedBufferEXT"/>
+                <command name="glGetNamedBufferParameterivEXT"/>
+                <command name="glGetNamedBufferPointervEXT"/>
+                <command name="glGetNamedBufferSubDataEXT"/>
+            </require>
+            <require comment="OpenGL 2.0: New uniform commands">
+                <command name="glProgramUniform1fEXT"/>
+                <command name="glProgramUniform2fEXT"/>
+                <command name="glProgramUniform3fEXT"/>
+                <command name="glProgramUniform4fEXT"/>
+                <command name="glProgramUniform1iEXT"/>
+                <command name="glProgramUniform2iEXT"/>
+                <command name="glProgramUniform3iEXT"/>
+                <command name="glProgramUniform4iEXT"/>
+                <command name="glProgramUniform1fvEXT"/>
+                <command name="glProgramUniform2fvEXT"/>
+                <command name="glProgramUniform3fvEXT"/>
+                <command name="glProgramUniform4fvEXT"/>
+                <command name="glProgramUniform1ivEXT"/>
+                <command name="glProgramUniform2ivEXT"/>
+                <command name="glProgramUniform3ivEXT"/>
+                <command name="glProgramUniform4ivEXT"/>
+                <command name="glProgramUniformMatrix2fvEXT"/>
+                <command name="glProgramUniformMatrix3fvEXT"/>
+                <command name="glProgramUniformMatrix4fvEXT"/>
+            </require>
+            <require comment="OpenGL 2.1: New uniform matrix commands">
+                <command name="glProgramUniformMatrix2x3fvEXT"/>
+                <command name="glProgramUniformMatrix3x2fvEXT"/>
+                <command name="glProgramUniformMatrix2x4fvEXT"/>
+                <command name="glProgramUniformMatrix4x2fvEXT"/>
+                <command name="glProgramUniformMatrix3x4fvEXT"/>
+                <command name="glProgramUniformMatrix4x3fvEXT"/>
+            </require>
+            <require comment="Extend EXT_texture_buffer_object commands">
+                <command name="glTextureBufferEXT"/>
+                <command name="glMultiTexBufferEXT"/>
+            </require>
+            <require comment="Extend EXT_texture_integer commands">
+                <command name="glTextureParameterIivEXT"/>
+                <command name="glTextureParameterIuivEXT"/>
+                <command name="glGetTextureParameterIivEXT"/>
+                <command name="glGetTextureParameterIuivEXT"/>
+                <command name="glMultiTexParameterIivEXT"/>
+                <command name="glMultiTexParameterIuivEXT"/>
+                <command name="glGetMultiTexParameterIivEXT"/>
+                <command name="glGetMultiTexParameterIuivEXT"/>
+            </require>
+            <require comment="Extend EXT_gpu_shader4 commands">
+                <command name="glProgramUniform1uiEXT"/>
+                <command name="glProgramUniform2uiEXT"/>
+                <command name="glProgramUniform3uiEXT"/>
+                <command name="glProgramUniform4uiEXT"/>
+                <command name="glProgramUniform1uivEXT"/>
+                <command name="glProgramUniform2uivEXT"/>
+                <command name="glProgramUniform3uivEXT"/>
+                <command name="glProgramUniform4uivEXT"/>
+            </require>
+            <require comment="Extend EXT_gpu_program_parameters commands">
+                <command name="glNamedProgramLocalParameters4fvEXT"/>
+            </require>
+            <require comment="Extend NV_gpu_program4 commands">
+                <command name="glNamedProgramLocalParameterI4iEXT"/>
+                <command name="glNamedProgramLocalParameterI4ivEXT"/>
+                <command name="glNamedProgramLocalParametersI4ivEXT"/>
+                <command name="glNamedProgramLocalParameterI4uiEXT"/>
+                <command name="glNamedProgramLocalParameterI4uivEXT"/>
+                <command name="glNamedProgramLocalParametersI4uivEXT"/>
+                <command name="glGetNamedProgramLocalParameterIivEXT"/>
+                <command name="glGetNamedProgramLocalParameterIuivEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New indexed texture commands">
+                <command name="glEnableClientStateiEXT"/>
+                <command name="glDisableClientStateiEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New indexed generic queries">
+                <command name="glGetFloati_vEXT"/>
+                <command name="glGetDoublei_vEXT"/>
+                <command name="glGetPointeri_vEXT"/>
+            </require>
+            <require comment="Extend GL_ARB_vertex_program commands">
+                <command name="glNamedProgramStringEXT"/>
+                <command name="glNamedProgramLocalParameter4dEXT"/>
+                <command name="glNamedProgramLocalParameter4dvEXT"/>
+                <command name="glNamedProgramLocalParameter4fEXT"/>
+                <command name="glNamedProgramLocalParameter4fvEXT"/>
+                <command name="glGetNamedProgramLocalParameterdvEXT"/>
+                <command name="glGetNamedProgramLocalParameterfvEXT"/>
+                <command name="glGetNamedProgramivEXT"/>
+                <command name="glGetNamedProgramStringEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New renderbuffer commands">
+                <command name="glNamedRenderbufferStorageEXT"/>
+                <command name="glGetNamedRenderbufferParameterivEXT"/>
+                <command name="glNamedRenderbufferStorageMultisampleEXT"/>
+            </require>
+            <require comment="Extend NV_framebuffer_multisample_coverage">
+                <command name="glNamedRenderbufferStorageMultisampleCoverageEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New framebuffer commands">
+                <command name="glCheckNamedFramebufferStatusEXT"/>
+                <command name="glNamedFramebufferTexture1DEXT"/>
+                <command name="glNamedFramebufferTexture2DEXT"/>
+                <command name="glNamedFramebufferTexture3DEXT"/>
+                <command name="glNamedFramebufferRenderbufferEXT"/>
+                <command name="glGetNamedFramebufferAttachmentParameterivEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New texture commands">
+                <command name="glGenerateTextureMipmapEXT"/>
+                <command name="glGenerateMultiTexMipmapEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New framebuffer commands">
+                <command name="glFramebufferDrawBufferEXT"/>
+                <command name="glFramebufferDrawBuffersEXT"/>
+                <command name="glFramebufferReadBufferEXT"/>
+                <command name="glGetFramebufferParameterivEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New buffer data copy command">
+                <command name="glNamedCopyBufferSubDataEXT"/>
+            </require>
+            <require comment="Extend EXT_geometry_shader4 or NV_gpu_program4">
+                <command name="glNamedFramebufferTextureEXT"/>
+                <command name="glNamedFramebufferTextureLayerEXT"/>
+                <command name="glNamedFramebufferTextureFaceEXT"/>
+            </require>
+            <require comment="Extend NV_explicit_multisample">
+                <command name="glTextureRenderbufferEXT"/>
+                <command name="glMultiTexRenderbufferEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New vertex array specification commands for VAO">
+                <command name="glVertexArrayVertexOffsetEXT"/>
+                <command name="glVertexArrayColorOffsetEXT"/>
+                <command name="glVertexArrayEdgeFlagOffsetEXT"/>
+                <command name="glVertexArrayIndexOffsetEXT"/>
+                <command name="glVertexArrayNormalOffsetEXT"/>
+                <command name="glVertexArrayTexCoordOffsetEXT"/>
+                <command name="glVertexArrayMultiTexCoordOffsetEXT"/>
+                <command name="glVertexArrayFogCoordOffsetEXT"/>
+                <command name="glVertexArraySecondaryColorOffsetEXT"/>
+                <command name="glVertexArrayVertexAttribOffsetEXT"/>
+                <command name="glVertexArrayVertexAttribIOffsetEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New vertex array enable commands for VAO">
+                <command name="glEnableVertexArrayEXT"/>
+                <command name="glDisableVertexArrayEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New vertex attrib array enable commands for VAO">
+                <command name="glEnableVertexArrayAttribEXT"/>
+                <command name="glDisableVertexArrayAttribEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New queries for VAO">
+                <command name="glGetVertexArrayIntegervEXT"/>
+                <command name="glGetVertexArrayPointervEXT"/>
+                <command name="glGetVertexArrayIntegeri_vEXT"/>
+                <command name="glGetVertexArrayPointeri_vEXT"/>
+            </require>
+            <require comment="OpenGL 3.0: New buffer commands">
+                <command name="glMapNamedBufferRangeEXT"/>
+                <command name="glFlushMappedNamedBufferRangeEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_buffer_storage">
+                <command name="glNamedBufferStorageEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_clear_buffer_object">
+                <command name="glClearNamedBufferDataEXT"/>
+                <command name="glClearNamedBufferSubDataEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_framebuffer_no_attachments">
+                <command name="glNamedFramebufferParameteriEXT"/>
+                <command name="glGetNamedFramebufferParameterivEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_gpu_shader_fp64">
+                <command name="glProgramUniform1dEXT"/>
+                <command name="glProgramUniform2dEXT"/>
+                <command name="glProgramUniform3dEXT"/>
+                <command name="glProgramUniform4dEXT"/>
+                <command name="glProgramUniform1dvEXT"/>
+                <command name="glProgramUniform2dvEXT"/>
+                <command name="glProgramUniform3dvEXT"/>
+                <command name="glProgramUniform4dvEXT"/>
+                <command name="glProgramUniformMatrix2dvEXT"/>
+                <command name="glProgramUniformMatrix3dvEXT"/>
+                <command name="glProgramUniformMatrix4dvEXT"/>
+                <command name="glProgramUniformMatrix2x3dvEXT"/>
+                <command name="glProgramUniformMatrix2x4dvEXT"/>
+                <command name="glProgramUniformMatrix3x2dvEXT"/>
+                <command name="glProgramUniformMatrix3x4dvEXT"/>
+                <command name="glProgramUniformMatrix4x2dvEXT"/>
+                <command name="glProgramUniformMatrix4x3dvEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_texture_buffer_range">
+                <command name="glTextureBufferRangeEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_texture_storage">
+                <command name="glTextureStorage1DEXT"/>
+                <command name="glTextureStorage2DEXT"/>
+                <command name="glTextureStorage3DEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_texture_storage_multisample">
+                <command name="glTextureStorage2DMultisampleEXT"/>
+                <command name="glTextureStorage3DMultisampleEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_vertex_attrib_binding">
+                <command name="glVertexArrayBindVertexBufferEXT"/>
+                <command name="glVertexArrayVertexAttribFormatEXT"/>
+                <command name="glVertexArrayVertexAttribIFormatEXT"/>
+                <command name="glVertexArrayVertexAttribLFormatEXT"/>
+                <command name="glVertexArrayVertexAttribBindingEXT"/>
+                <command name="glVertexArrayVertexBindingDivisorEXT"/>
+            </require>
+            <require comment="Extended by GL_EXT_vertex_attrib_64bit">
+                <command name="glVertexArrayVertexAttribLOffsetEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_sparse_texture">
+                <command name="glTexturePageCommitmentEXT"/>
+            </require>
+            <require comment="Extended by GL_ARB_instanced_arrays">
+                <command name="glVertexArrayVertexAttribDivisorEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_discard_framebuffer" supported="gles1|gles2">
+            <require>
+                <enum name="GL_COLOR_EXT"/>
+                <enum name="GL_DEPTH_EXT"/>
+                <enum name="GL_STENCIL_EXT"/>
+                <command name="glDiscardFramebufferEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_disjoint_timer_query" supported="gles2">
+            <require>
+                <enum name="GL_QUERY_COUNTER_BITS_EXT"/>
+                <enum name="GL_CURRENT_QUERY_EXT"/>
+                <enum name="GL_QUERY_RESULT_EXT"/>
+                <enum name="GL_QUERY_RESULT_AVAILABLE_EXT"/>
+                <enum name="GL_TIME_ELAPSED_EXT"/>
+                <enum name="GL_TIMESTAMP_EXT"/>
+                <enum name="GL_GPU_DISJOINT_EXT"/>
+                <command name="glGenQueriesEXT"/>
+                <command name="glDeleteQueriesEXT"/>
+                <command name="glIsQueryEXT"/>
+                <command name="glBeginQueryEXT"/>
+                <command name="glEndQueryEXT"/>
+                <command name="glQueryCounterEXT"/>
+                <command name="glGetQueryivEXT"/>
+                <command name="glGetQueryObjectivEXT"/>
+                <command name="glGetQueryObjectuivEXT"/>
+                <command name="glGetQueryObjecti64vEXT"/>
+                <command name="glGetQueryObjectui64vEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_draw_buffers" supported="gles2">
+            <require>
+                <enum name="GL_MAX_COLOR_ATTACHMENTS_EXT"/>
+                <enum name="GL_MAX_DRAW_BUFFERS_EXT"/>
+                <enum name="GL_DRAW_BUFFER0_EXT"/>
+                <enum name="GL_DRAW_BUFFER1_EXT"/>
+                <enum name="GL_DRAW_BUFFER2_EXT"/>
+                <enum name="GL_DRAW_BUFFER3_EXT"/>
+                <enum name="GL_DRAW_BUFFER4_EXT"/>
+                <enum name="GL_DRAW_BUFFER5_EXT"/>
+                <enum name="GL_DRAW_BUFFER6_EXT"/>
+                <enum name="GL_DRAW_BUFFER7_EXT"/>
+                <enum name="GL_DRAW_BUFFER8_EXT"/>
+                <enum name="GL_DRAW_BUFFER9_EXT"/>
+                <enum name="GL_DRAW_BUFFER10_EXT"/>
+                <enum name="GL_DRAW_BUFFER11_EXT"/>
+                <enum name="GL_DRAW_BUFFER12_EXT"/>
+                <enum name="GL_DRAW_BUFFER13_EXT"/>
+                <enum name="GL_DRAW_BUFFER14_EXT"/>
+                <enum name="GL_DRAW_BUFFER15_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT0_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT1_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT2_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT3_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT4_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT5_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT6_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT7_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT8_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT9_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT10_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT11_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT12_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT13_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT14_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT15_EXT"/>
+                <command name="glDrawBuffersEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_draw_buffers2" supported="gl">
+            <require>
+                <command name="glColorMaskIndexedEXT"/>
+                <command name="glGetBooleanIndexedvEXT"/>
+                <command name="glGetIntegerIndexedvEXT"/>
+                <command name="glEnableIndexedEXT"/>
+                <command name="glDisableIndexedEXT"/>
+                <command name="glIsEnabledIndexedEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_draw_buffers_indexed" supported="gles2">
+            <require>
+                <enum name="GL_BLEND_EQUATION_RGB"/>
+                <enum name="GL_BLEND_EQUATION_ALPHA"/>
+                <enum name="GL_BLEND_SRC_RGB"/>
+                <enum name="GL_BLEND_SRC_ALPHA"/>
+                <enum name="GL_BLEND_DST_RGB"/>
+                <enum name="GL_BLEND_DST_ALPHA"/>
+                <enum name="GL_COLOR_WRITEMASK"/>
+                <enum name="GL_BLEND"/>
+                <enum name="GL_FUNC_ADD"/>
+                <enum name="GL_FUNC_SUBTRACT"/>
+                <enum name="GL_FUNC_REVERSE_SUBTRACT"/>
+                <enum name="GL_MIN"/>
+                <enum name="GL_MAX"/>
+                <enum name="GL_ZERO"/>
+                <enum name="GL_ONE"/>
+                <enum name="GL_SRC_COLOR"/>
+                <enum name="GL_ONE_MINUS_SRC_COLOR"/>
+                <enum name="GL_DST_COLOR"/>
+                <enum name="GL_ONE_MINUS_DST_COLOR"/>
+                <enum name="GL_SRC_ALPHA"/>
+                <enum name="GL_ONE_MINUS_SRC_ALPHA"/>
+                <enum name="GL_DST_ALPHA"/>
+                <enum name="GL_ONE_MINUS_DST_ALPHA"/>
+                <enum name="GL_CONSTANT_COLOR"/>
+                <enum name="GL_ONE_MINUS_CONSTANT_COLOR"/>
+                <enum name="GL_CONSTANT_ALPHA"/>
+                <enum name="GL_ONE_MINUS_CONSTANT_ALPHA"/>
+                <enum name="GL_SRC_ALPHA_SATURATE"/>
+                <command name="glEnableiEXT"/>
+                <command name="glDisableiEXT"/>
+                <command name="glBlendEquationiEXT"/>
+                <command name="glBlendEquationSeparateiEXT"/>
+                <command name="glBlendFunciEXT"/>
+                <command name="glBlendFuncSeparateiEXT"/>
+                <command name="glColorMaskiEXT"/>
+                <command name="glIsEnablediEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_draw_instanced" supported="gl|gles2">
+            <require>
+                <command name="glDrawArraysInstancedEXT"/>
+                <command name="glDrawElementsInstancedEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_draw_range_elements" supported="gl">
+            <require>
+                <enum name="GL_MAX_ELEMENTS_VERTICES_EXT"/>
+                <enum name="GL_MAX_ELEMENTS_INDICES_EXT"/>
+                <command name="glDrawRangeElementsEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_fog_coord" supported="gl">
+            <require>
+                <enum name="GL_FOG_COORDINATE_SOURCE_EXT"/>
+                <enum name="GL_FOG_COORDINATE_EXT"/>
+                <enum name="GL_FRAGMENT_DEPTH_EXT"/>
+                <enum name="GL_CURRENT_FOG_COORDINATE_EXT"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_TYPE_EXT"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_POINTER_EXT"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_EXT"/>
+                <command name="glFogCoordfEXT"/>
+                <command name="glFogCoordfvEXT"/>
+                <command name="glFogCoorddEXT"/>
+                <command name="glFogCoorddvEXT"/>
+                <command name="glFogCoordPointerEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_framebuffer_blit" supported="gl">
+            <require>
+                <enum name="GL_READ_FRAMEBUFFER_EXT"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_EXT"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_BINDING_EXT"/>
+                <enum name="GL_READ_FRAMEBUFFER_BINDING_EXT"/>
+                <command name="glBlitFramebufferEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_framebuffer_multisample" supported="gl">
+            <require>
+                <enum name="GL_RENDERBUFFER_SAMPLES_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT"/>
+                <enum name="GL_MAX_SAMPLES_EXT"/>
+                <command name="glRenderbufferStorageMultisampleEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_framebuffer_multisample_blit_scaled" supported="gl">
+            <require>
+                <enum name="GL_SCALED_RESOLVE_FASTEST_EXT"/>
+                <enum name="GL_SCALED_RESOLVE_NICEST_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_framebuffer_object" supported="gl">
+            <require>
+                <enum name="GL_INVALID_FRAMEBUFFER_OPERATION_EXT"/>
+                <enum name="GL_MAX_RENDERBUFFER_SIZE_EXT"/>
+                <enum name="GL_FRAMEBUFFER_BINDING_EXT"/>
+                <enum name="GL_RENDERBUFFER_BINDING_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT"/>
+                <enum name="GL_FRAMEBUFFER_COMPLETE_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT"/>
+                <enum name="GL_FRAMEBUFFER_UNSUPPORTED_EXT"/>
+                <enum name="GL_MAX_COLOR_ATTACHMENTS_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT0_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT1_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT2_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT3_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT4_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT5_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT6_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT7_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT8_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT9_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT10_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT11_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT12_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT13_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT14_EXT"/>
+                <enum name="GL_COLOR_ATTACHMENT15_EXT"/>
+                <enum name="GL_DEPTH_ATTACHMENT_EXT"/>
+                <enum name="GL_STENCIL_ATTACHMENT_EXT"/>
+                <enum name="GL_FRAMEBUFFER_EXT"/>
+                <enum name="GL_RENDERBUFFER_EXT"/>
+                <enum name="GL_RENDERBUFFER_WIDTH_EXT"/>
+                <enum name="GL_RENDERBUFFER_HEIGHT_EXT"/>
+                <enum name="GL_RENDERBUFFER_INTERNAL_FORMAT_EXT"/>
+                <enum name="GL_STENCIL_INDEX1_EXT"/>
+                <enum name="GL_STENCIL_INDEX4_EXT"/>
+                <enum name="GL_STENCIL_INDEX8_EXT"/>
+                <enum name="GL_STENCIL_INDEX16_EXT"/>
+                <enum name="GL_RENDERBUFFER_RED_SIZE_EXT"/>
+                <enum name="GL_RENDERBUFFER_GREEN_SIZE_EXT"/>
+                <enum name="GL_RENDERBUFFER_BLUE_SIZE_EXT"/>
+                <enum name="GL_RENDERBUFFER_ALPHA_SIZE_EXT"/>
+                <enum name="GL_RENDERBUFFER_DEPTH_SIZE_EXT"/>
+                <enum name="GL_RENDERBUFFER_STENCIL_SIZE_EXT"/>
+                <command name="glIsRenderbufferEXT"/>
+                <command name="glBindRenderbufferEXT"/>
+                <command name="glDeleteRenderbuffersEXT"/>
+                <command name="glGenRenderbuffersEXT"/>
+                <command name="glRenderbufferStorageEXT"/>
+                <command name="glGetRenderbufferParameterivEXT"/>
+                <command name="glIsFramebufferEXT"/>
+                <command name="glBindFramebufferEXT"/>
+                <command name="glDeleteFramebuffersEXT"/>
+                <command name="glGenFramebuffersEXT"/>
+                <command name="glCheckFramebufferStatusEXT"/>
+                <command name="glFramebufferTexture1DEXT"/>
+                <command name="glFramebufferTexture2DEXT"/>
+                <command name="glFramebufferTexture3DEXT"/>
+                <command name="glFramebufferRenderbufferEXT"/>
+                <command name="glGetFramebufferAttachmentParameterivEXT"/>
+                <command name="glGenerateMipmapEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_framebuffer_sRGB" supported="gl">
+            <require>
+                <enum name="GL_FRAMEBUFFER_SRGB_EXT"/>
+                <enum name="GL_FRAMEBUFFER_SRGB_CAPABLE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_geometry_shader" supported="gles2">
+            <require>
+                <enum name="GL_GEOMETRY_SHADER_EXT"/>
+                <enum name="GL_GEOMETRY_SHADER_BIT_EXT"/>
+                <enum name="GL_GEOMETRY_LINKED_VERTICES_OUT_EXT"/>
+                <enum name="GL_GEOMETRY_LINKED_INPUT_TYPE_EXT"/>
+                <enum name="GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT"/>
+                <enum name="GL_GEOMETRY_SHADER_INVOCATIONS_EXT"/>
+                <enum name="GL_LAYER_PROVOKING_VERTEX_EXT"/>
+                <enum name="GL_LINES_ADJACENCY_EXT"/>
+                <enum name="GL_LINE_STRIP_ADJACENCY_EXT"/>
+                <enum name="GL_TRIANGLES_ADJACENCY_EXT"/>
+                <enum name="GL_TRIANGLE_STRIP_ADJACENCY_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT"/>
+                <enum name="GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT"/>
+                <enum name="GL_FIRST_VERTEX_CONVENTION_EXT"/>
+                <enum name="GL_LAST_VERTEX_CONVENTION_EXT"/>
+                <enum name="GL_UNDEFINED_VERTEX_EXT"/>
+                <enum name="GL_PRIMITIVES_GENERATED_EXT"/>
+                <enum name="GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT"/>
+                <enum name="GL_MAX_FRAMEBUFFER_LAYERS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT"/>
+                <enum name="GL_REFERENCED_BY_GEOMETRY_SHADER_EXT"/>
+                <command name="glFramebufferTextureEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_geometry_shader4" supported="gl">
+            <require>
+                <enum name="GL_GEOMETRY_SHADER_EXT"/>
+                <enum name="GL_GEOMETRY_VERTICES_OUT_EXT"/>
+                <enum name="GL_GEOMETRY_INPUT_TYPE_EXT"/>
+                <enum name="GL_GEOMETRY_OUTPUT_TYPE_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_VERTEX_VARYING_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_VARYING_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT"/>
+                <enum name="GL_LINES_ADJACENCY_EXT"/>
+                <enum name="GL_LINE_STRIP_ADJACENCY_EXT"/>
+                <enum name="GL_TRIANGLES_ADJACENCY_EXT"/>
+                <enum name="GL_TRIANGLE_STRIP_ADJACENCY_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT"/>
+                <enum name="GL_PROGRAM_POINT_SIZE_EXT"/>
+                <command name="glProgramParameteriEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_gpu_program_parameters" supported="gl">
+            <require>
+                <command name="glProgramEnvParameters4fvEXT"/>
+                <command name="glProgramLocalParameters4fvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_gpu_shader4" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT"/>
+                <enum name="GL_SAMPLER_1D_ARRAY_EXT"/>
+                <enum name="GL_SAMPLER_2D_ARRAY_EXT"/>
+                <enum name="GL_SAMPLER_BUFFER_EXT"/>
+                <enum name="GL_SAMPLER_1D_ARRAY_SHADOW_EXT"/>
+                <enum name="GL_SAMPLER_2D_ARRAY_SHADOW_EXT"/>
+                <enum name="GL_SAMPLER_CUBE_SHADOW_EXT"/>
+                <enum name="GL_UNSIGNED_INT_VEC2_EXT"/>
+                <enum name="GL_UNSIGNED_INT_VEC3_EXT"/>
+                <enum name="GL_UNSIGNED_INT_VEC4_EXT"/>
+                <enum name="GL_INT_SAMPLER_1D_EXT"/>
+                <enum name="GL_INT_SAMPLER_2D_EXT"/>
+                <enum name="GL_INT_SAMPLER_3D_EXT"/>
+                <enum name="GL_INT_SAMPLER_CUBE_EXT"/>
+                <enum name="GL_INT_SAMPLER_2D_RECT_EXT"/>
+                <enum name="GL_INT_SAMPLER_1D_ARRAY_EXT"/>
+                <enum name="GL_INT_SAMPLER_2D_ARRAY_EXT"/>
+                <enum name="GL_INT_SAMPLER_BUFFER_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_1D_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_2D_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_3D_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_CUBE_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT"/>
+                <enum name="GL_MIN_PROGRAM_TEXEL_OFFSET_EXT"/>
+                <enum name="GL_MAX_PROGRAM_TEXEL_OFFSET_EXT"/>
+                <command name="glGetUniformuivEXT"/>
+                <command name="glBindFragDataLocationEXT"/>
+                <command name="glGetFragDataLocationEXT"/>
+                <command name="glUniform1uiEXT"/>
+                <command name="glUniform2uiEXT"/>
+                <command name="glUniform3uiEXT"/>
+                <command name="glUniform4uiEXT"/>
+                <command name="glUniform1uivEXT"/>
+                <command name="glUniform2uivEXT"/>
+                <command name="glUniform3uivEXT"/>
+                <command name="glUniform4uivEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_gpu_shader5" supported="gles2">
+            <require/>
+        </extension>
+        <extension name="GL_EXT_histogram" supported="gl">
+            <require>
+                <enum name="GL_HISTOGRAM_EXT"/>
+                <enum name="GL_PROXY_HISTOGRAM_EXT"/>
+                <enum name="GL_HISTOGRAM_WIDTH_EXT"/>
+                <enum name="GL_HISTOGRAM_FORMAT_EXT"/>
+                <enum name="GL_HISTOGRAM_RED_SIZE_EXT"/>
+                <enum name="GL_HISTOGRAM_GREEN_SIZE_EXT"/>
+                <enum name="GL_HISTOGRAM_BLUE_SIZE_EXT"/>
+                <enum name="GL_HISTOGRAM_ALPHA_SIZE_EXT"/>
+                <enum name="GL_HISTOGRAM_LUMINANCE_SIZE_EXT"/>
+                <enum name="GL_HISTOGRAM_SINK_EXT"/>
+                <enum name="GL_MINMAX_EXT"/>
+                <enum name="GL_MINMAX_FORMAT_EXT"/>
+                <enum name="GL_MINMAX_SINK_EXT"/>
+                <enum name="GL_TABLE_TOO_LARGE_EXT"/>
+                <command name="glGetHistogramEXT"/>
+                <command name="glGetHistogramParameterfvEXT"/>
+                <command name="glGetHistogramParameterivEXT"/>
+                <command name="glGetMinmaxEXT"/>
+                <command name="glGetMinmaxParameterfvEXT"/>
+                <command name="glGetMinmaxParameterivEXT"/>
+                <command name="glHistogramEXT"/>
+                <command name="glMinmaxEXT"/>
+                <command name="glResetHistogramEXT"/>
+                <command name="glResetMinmaxEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_index_array_formats" supported="gl">
+            <require>
+                <enum name="GL_IUI_V2F_EXT"/>
+                <enum name="GL_IUI_V3F_EXT"/>
+                <enum name="GL_IUI_N3F_V2F_EXT"/>
+                <enum name="GL_IUI_N3F_V3F_EXT"/>
+                <enum name="GL_T2F_IUI_V2F_EXT"/>
+                <enum name="GL_T2F_IUI_V3F_EXT"/>
+                <enum name="GL_T2F_IUI_N3F_V2F_EXT"/>
+                <enum name="GL_T2F_IUI_N3F_V3F_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_index_func" supported="gl">
+            <require>
+                <enum name="GL_INDEX_TEST_EXT"/>
+                <enum name="GL_INDEX_TEST_FUNC_EXT"/>
+                <enum name="GL_INDEX_TEST_REF_EXT"/>
+                <command name="glIndexFuncEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_index_material" supported="gl">
+            <require>
+                <enum name="GL_INDEX_MATERIAL_EXT"/>
+                <enum name="GL_INDEX_MATERIAL_PARAMETER_EXT"/>
+                <enum name="GL_INDEX_MATERIAL_FACE_EXT"/>
+                <command name="glIndexMaterialEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_index_texture" supported="gl"/>
+        <extension name="GL_EXT_instanced_arrays" supported="gles2">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT"/>
+                <command name="glDrawArraysInstancedEXT"/>
+                <command name="glDrawElementsInstancedEXT"/>
+                <command name="glVertexAttribDivisorEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_light_texture" supported="gl">
+            <require>
+                <enum name="GL_FRAGMENT_MATERIAL_EXT"/>
+                <enum name="GL_FRAGMENT_NORMAL_EXT"/>
+                <enum name="GL_FRAGMENT_COLOR_EXT"/>
+                <enum name="GL_ATTENUATION_EXT"/>
+                <enum name="GL_SHADOW_ATTENUATION_EXT"/>
+                <enum name="GL_TEXTURE_APPLICATION_MODE_EXT"/>
+                <enum name="GL_TEXTURE_LIGHT_EXT"/>
+                <enum name="GL_TEXTURE_MATERIAL_FACE_EXT"/>
+                <enum name="GL_TEXTURE_MATERIAL_PARAMETER_EXT"/>
+                <enum name="GL_FRAGMENT_DEPTH_EXT"/>
+                <command name="glApplyTextureEXT"/>
+                <command name="glTextureLightEXT"/>
+                <command name="glTextureMaterialEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_map_buffer_range" supported="gles1|gles2">
+            <require>
+                <enum name="GL_MAP_READ_BIT_EXT"/>
+                <enum name="GL_MAP_WRITE_BIT_EXT"/>
+                <enum name="GL_MAP_INVALIDATE_RANGE_BIT_EXT"/>
+                <enum name="GL_MAP_INVALIDATE_BUFFER_BIT_EXT"/>
+                <enum name="GL_MAP_FLUSH_EXPLICIT_BIT_EXT"/>
+                <enum name="GL_MAP_UNSYNCHRONIZED_BIT_EXT"/>
+                <command name="glMapBufferRangeEXT"/>
+                <command name="glFlushMappedBufferRangeEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_misc_attribute" supported="gl"/>
+        <extension name="GL_EXT_multi_draw_arrays" supported="gl|gles1|gles2">
+            <require>
+                <command name="glMultiDrawArraysEXT"/>
+                <command name="glMultiDrawElementsEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_multisample" supported="gl">
+            <require>
+                <enum name="GL_MULTISAMPLE_EXT"/>
+                <enum name="GL_SAMPLE_ALPHA_TO_MASK_EXT"/>
+                <enum name="GL_SAMPLE_ALPHA_TO_ONE_EXT"/>
+                <enum name="GL_SAMPLE_MASK_EXT"/>
+                <enum name="GL_1PASS_EXT"/>
+                <enum name="GL_2PASS_0_EXT"/>
+                <enum name="GL_2PASS_1_EXT"/>
+                <enum name="GL_4PASS_0_EXT"/>
+                <enum name="GL_4PASS_1_EXT"/>
+                <enum name="GL_4PASS_2_EXT"/>
+                <enum name="GL_4PASS_3_EXT"/>
+                <enum name="GL_SAMPLE_BUFFERS_EXT"/>
+                <enum name="GL_SAMPLES_EXT"/>
+                <enum name="GL_SAMPLE_MASK_VALUE_EXT"/>
+                <enum name="GL_SAMPLE_MASK_INVERT_EXT"/>
+                <enum name="GL_SAMPLE_PATTERN_EXT"/>
+                <enum name="GL_MULTISAMPLE_BIT_EXT"/>
+                <command name="glSampleMaskEXT"/>
+                <command name="glSamplePatternEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_multisampled_render_to_texture" supported="gles1|gles2">
+            <require>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT"/>
+                <enum name="GL_RENDERBUFFER_SAMPLES_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT"/>
+                <enum name="GL_MAX_SAMPLES_EXT"/>
+                <command name="glRenderbufferStorageMultisampleEXT"/>
+                <command name="glFramebufferTexture2DMultisampleEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_multiview_draw_buffers" supported="gles2">
+            <require>
+                <enum name="GL_COLOR_ATTACHMENT_EXT"/>
+                <enum name="GL_MULTIVIEW_EXT"/>
+                <enum name="GL_DRAW_BUFFER_EXT"/>
+                <enum name="GL_READ_BUFFER_EXT"/>
+                <enum name="GL_MAX_MULTIVIEW_BUFFERS_EXT"/>
+                <command name="glReadBufferIndexedEXT"/>
+                <command name="glDrawBuffersIndexedEXT"/>
+                <command name="glGetIntegeri_vEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_occlusion_query_boolean" supported="gles2">
+            <require>
+                <enum name="GL_ANY_SAMPLES_PASSED_EXT"/>
+                <enum name="GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT"/>
+                <enum name="GL_CURRENT_QUERY_EXT"/>
+                <enum name="GL_QUERY_RESULT_EXT"/>
+                <enum name="GL_QUERY_RESULT_AVAILABLE_EXT"/>
+                <command name="glGenQueriesEXT"/>
+                <command name="glDeleteQueriesEXT"/>
+                <command name="glIsQueryEXT"/>
+                <command name="glBeginQueryEXT"/>
+                <command name="glEndQueryEXT"/>
+                <command name="glGetQueryivEXT"/>
+                <command name="glGetQueryObjectuivEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_packed_depth_stencil" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_STENCIL_EXT"/>
+                <enum name="GL_UNSIGNED_INT_24_8_EXT"/>
+                <enum name="GL_DEPTH24_STENCIL8_EXT"/>
+                <enum name="GL_TEXTURE_STENCIL_SIZE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_packed_float" supported="gl">
+            <require>
+                <enum name="GL_R11F_G11F_B10F_EXT"/>
+                <enum name="GL_UNSIGNED_INT_10F_11F_11F_REV_EXT"/>
+                <enum name="GL_RGBA_SIGNED_COMPONENTS_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_packed_pixels" supported="gl">
+            <require>
+                <enum name="GL_UNSIGNED_BYTE_3_3_2_EXT"/>
+                <enum name="GL_UNSIGNED_SHORT_4_4_4_4_EXT"/>
+                <enum name="GL_UNSIGNED_SHORT_5_5_5_1_EXT"/>
+                <enum name="GL_UNSIGNED_INT_8_8_8_8_EXT"/>
+                <enum name="GL_UNSIGNED_INT_10_10_10_2_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_paletted_texture" supported="gl">
+            <require>
+                <enum name="GL_COLOR_INDEX1_EXT"/>
+                <enum name="GL_COLOR_INDEX2_EXT"/>
+                <enum name="GL_COLOR_INDEX4_EXT"/>
+                <enum name="GL_COLOR_INDEX8_EXT"/>
+                <enum name="GL_COLOR_INDEX12_EXT"/>
+                <enum name="GL_COLOR_INDEX16_EXT"/>
+                <enum name="GL_TEXTURE_INDEX_SIZE_EXT"/>
+                <command name="glColorTableEXT"/>
+                <command name="glGetColorTableEXT"/>
+                <command name="glGetColorTableParameterivEXT"/>
+                <command name="glGetColorTableParameterfvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_pixel_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_PACK_BUFFER_EXT"/>
+                <enum name="GL_PIXEL_UNPACK_BUFFER_EXT"/>
+                <enum name="GL_PIXEL_PACK_BUFFER_BINDING_EXT"/>
+                <enum name="GL_PIXEL_UNPACK_BUFFER_BINDING_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_pixel_transform" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_TRANSFORM_2D_EXT"/>
+                <enum name="GL_PIXEL_MAG_FILTER_EXT"/>
+                <enum name="GL_PIXEL_MIN_FILTER_EXT"/>
+                <enum name="GL_PIXEL_CUBIC_WEIGHT_EXT"/>
+                <enum name="GL_CUBIC_EXT"/>
+                <enum name="GL_AVERAGE_EXT"/>
+                <enum name="GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT"/>
+                <enum name="GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT"/>
+                <enum name="GL_PIXEL_TRANSFORM_2D_MATRIX_EXT"/>
+                <command name="glPixelTransformParameteriEXT"/>
+                <command name="glPixelTransformParameterfEXT"/>
+                <command name="glPixelTransformParameterivEXT"/>
+                <command name="glPixelTransformParameterfvEXT"/>
+                <command name="glGetPixelTransformParameterivEXT"/>
+                <command name="glGetPixelTransformParameterfvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_pixel_transform_color_table" supported="gl"/>
+        <extension name="GL_EXT_point_parameters" supported="gl">
+            <require>
+                <enum name="GL_POINT_SIZE_MIN_EXT"/>
+                <enum name="GL_POINT_SIZE_MAX_EXT"/>
+                <enum name="GL_POINT_FADE_THRESHOLD_SIZE_EXT"/>
+                <enum name="GL_DISTANCE_ATTENUATION_EXT"/>
+                <command name="glPointParameterfEXT"/>
+                <command name="glPointParameterfvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_polygon_offset" supported="gl">
+            <require>
+                <enum name="GL_POLYGON_OFFSET_EXT"/>
+                <enum name="GL_POLYGON_OFFSET_FACTOR_EXT"/>
+                <enum name="GL_POLYGON_OFFSET_BIAS_EXT"/>
+                <command name="glPolygonOffsetEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_primitive_bounding_box" supported="gles2">
+            <require>
+                <enum name="GL_PRIMITIVE_BOUNDING_BOX_EXT"/>
+                <command name="glPrimitiveBoundingBoxEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_provoking_vertex" supported="gl">
+            <require>
+                <enum name="GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT"/>
+                <enum name="GL_FIRST_VERTEX_CONVENTION_EXT"/>
+                <enum name="GL_LAST_VERTEX_CONVENTION_EXT"/>
+                <enum name="GL_PROVOKING_VERTEX_EXT"/>
+                <command name="glProvokingVertexEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_pvrtc_sRGB" supported="gles2">
+            <require>
+                <enum name="GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_read_format_bgra" supported="gles1|gles2">
+            <require>
+                <enum name="GL_BGRA_EXT"/>
+                <enum name="GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT"/>
+                <enum name="GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_rescale_normal" supported="gl">
+            <require>
+                <enum name="GL_RESCALE_NORMAL_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_robustness" supported="gles1|gles2">
+            <require>
+                <enum name="GL_NO_ERROR"/>
+                <enum name="GL_GUILTY_CONTEXT_RESET_EXT"/>
+                <enum name="GL_INNOCENT_CONTEXT_RESET_EXT"/>
+                <enum name="GL_UNKNOWN_CONTEXT_RESET_EXT"/>
+                <enum name="GL_CONTEXT_ROBUST_ACCESS_EXT"/>
+                <enum name="GL_RESET_NOTIFICATION_STRATEGY_EXT"/>
+                <enum name="GL_LOSE_CONTEXT_ON_RESET_EXT"/>
+                <enum name="GL_NO_RESET_NOTIFICATION_EXT"/>
+                <command name="glGetGraphicsResetStatusEXT"/>
+                <command name="glReadnPixelsEXT"/>
+                <command name="glGetnUniformfvEXT"/>
+                <command name="glGetnUniformivEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_sRGB" supported="gles1|gles2">
+            <require>
+                <enum name="GL_SRGB_EXT"/>
+                <enum name="GL_SRGB_ALPHA_EXT"/>
+                <enum name="GL_SRGB8_ALPHA8_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_sRGB_write_control" supported="gles2">
+            <require>
+                <enum name="GL_FRAMEBUFFER_SRGB_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_secondary_color" supported="gl">
+            <require>
+                <enum name="GL_COLOR_SUM_EXT"/>
+                <enum name="GL_CURRENT_SECONDARY_COLOR_EXT"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_SIZE_EXT"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_TYPE_EXT"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_POINTER_EXT"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_EXT"/>
+                <command name="glSecondaryColor3bEXT"/>
+                <command name="glSecondaryColor3bvEXT"/>
+                <command name="glSecondaryColor3dEXT"/>
+                <command name="glSecondaryColor3dvEXT"/>
+                <command name="glSecondaryColor3fEXT"/>
+                <command name="glSecondaryColor3fvEXT"/>
+                <command name="glSecondaryColor3iEXT"/>
+                <command name="glSecondaryColor3ivEXT"/>
+                <command name="glSecondaryColor3sEXT"/>
+                <command name="glSecondaryColor3svEXT"/>
+                <command name="glSecondaryColor3ubEXT"/>
+                <command name="glSecondaryColor3ubvEXT"/>
+                <command name="glSecondaryColor3uiEXT"/>
+                <command name="glSecondaryColor3uivEXT"/>
+                <command name="glSecondaryColor3usEXT"/>
+                <command name="glSecondaryColor3usvEXT"/>
+                <command name="glSecondaryColorPointerEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_separate_shader_objects" supported="gl|gles2">
+            <require api="gl" comment="The OpenGL version of this extension is completely unrelated to the OpenGL ES version">
+                <enum name="GL_ACTIVE_PROGRAM_EXT"/>
+                <command name="glUseShaderProgramEXT"/>
+                <command name="glActiveProgramEXT"/>
+                <command name="glCreateShaderProgramEXT"/>
+            </require>
+            <require api="gles2" comment="The OpenGL ES version of this extension is completely unrelated to the OpenGL version">
+                <enum name="GL_VERTEX_SHADER_BIT_EXT"/>
+                <enum name="GL_FRAGMENT_SHADER_BIT_EXT"/>
+                <enum name="GL_ALL_SHADER_BITS_EXT"/>
+                <enum name="GL_PROGRAM_SEPARABLE_EXT"/>
+                <enum name="GL_ACTIVE_PROGRAM_EXT"/>
+                <enum name="GL_PROGRAM_PIPELINE_BINDING_EXT"/>
+                <command name="glActiveShaderProgramEXT"/>
+                <command name="glBindProgramPipelineEXT"/>
+                <command name="glCreateShaderProgramvEXT"/>
+                <command name="glDeleteProgramPipelinesEXT"/>
+                <command name="glGenProgramPipelinesEXT"/>
+                <command name="glGetProgramPipelineInfoLogEXT"/>
+                <command name="glGetProgramPipelineivEXT"/>
+                <command name="glIsProgramPipelineEXT"/>
+                <command name="glProgramParameteriEXT"/>
+                <command name="glProgramUniform1fEXT"/>
+                <command name="glProgramUniform1fvEXT"/>
+                <command name="glProgramUniform1iEXT"/>
+                <command name="glProgramUniform1ivEXT"/>
+                <command name="glProgramUniform2fEXT"/>
+                <command name="glProgramUniform2fvEXT"/>
+                <command name="glProgramUniform2iEXT"/>
+                <command name="glProgramUniform2ivEXT"/>
+                <command name="glProgramUniform3fEXT"/>
+                <command name="glProgramUniform3fvEXT"/>
+                <command name="glProgramUniform3iEXT"/>
+                <command name="glProgramUniform3ivEXT"/>
+                <command name="glProgramUniform4fEXT"/>
+                <command name="glProgramUniform4fvEXT"/>
+                <command name="glProgramUniform4iEXT"/>
+                <command name="glProgramUniform4ivEXT"/>
+                <command name="glProgramUniformMatrix2fvEXT"/>
+                <command name="glProgramUniformMatrix3fvEXT"/>
+                <command name="glProgramUniformMatrix4fvEXT"/>
+                <command name="glUseProgramStagesEXT"/>
+                <command name="glValidateProgramPipelineEXT"/>
+            </require>
+            <require api="gles2" comment="Depends on OpenGL ES 3.0 or GL_NV_non_square_matrices">
+                <command name="glProgramUniform1uiEXT"/>
+                <command name="glProgramUniform2uiEXT"/>
+                <command name="glProgramUniform3uiEXT"/>
+                <command name="glProgramUniform4uiEXT"/>
+                <command name="glProgramUniform1uivEXT"/>
+                <command name="glProgramUniform2uivEXT"/>
+                <command name="glProgramUniform3uivEXT"/>
+                <command name="glProgramUniform4uivEXT"/>
+                <command name="glProgramUniformMatrix4fvEXT"/>
+                <command name="glProgramUniformMatrix2x3fvEXT"/>
+                <command name="glProgramUniformMatrix3x2fvEXT"/>
+                <command name="glProgramUniformMatrix2x4fvEXT"/>
+                <command name="glProgramUniformMatrix4x2fvEXT"/>
+                <command name="glProgramUniformMatrix3x4fvEXT"/>
+                <command name="glProgramUniformMatrix4x3fvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_separate_specular_color" supported="gl">
+            <require>
+                <enum name="GL_LIGHT_MODEL_COLOR_CONTROL_EXT"/>
+                <enum name="GL_SINGLE_COLOR_EXT"/>
+                <enum name="GL_SEPARATE_SPECULAR_COLOR_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_shader_framebuffer_fetch" supported="gles2">
+            <require>
+                <enum name="GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_shader_image_load_store" supported="gl">
+            <require>
+                <enum name="GL_MAX_IMAGE_UNITS_EXT"/>
+                <enum name="GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT"/>
+                <enum name="GL_IMAGE_BINDING_NAME_EXT"/>
+                <enum name="GL_IMAGE_BINDING_LEVEL_EXT"/>
+                <enum name="GL_IMAGE_BINDING_LAYERED_EXT"/>
+                <enum name="GL_IMAGE_BINDING_LAYER_EXT"/>
+                <enum name="GL_IMAGE_BINDING_ACCESS_EXT"/>
+                <enum name="GL_IMAGE_1D_EXT"/>
+                <enum name="GL_IMAGE_2D_EXT"/>
+                <enum name="GL_IMAGE_3D_EXT"/>
+                <enum name="GL_IMAGE_2D_RECT_EXT"/>
+                <enum name="GL_IMAGE_CUBE_EXT"/>
+                <enum name="GL_IMAGE_BUFFER_EXT"/>
+                <enum name="GL_IMAGE_1D_ARRAY_EXT"/>
+                <enum name="GL_IMAGE_2D_ARRAY_EXT"/>
+                <enum name="GL_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_IMAGE_2D_MULTISAMPLE_EXT"/>
+                <enum name="GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT"/>
+                <enum name="GL_INT_IMAGE_1D_EXT"/>
+                <enum name="GL_INT_IMAGE_2D_EXT"/>
+                <enum name="GL_INT_IMAGE_3D_EXT"/>
+                <enum name="GL_INT_IMAGE_2D_RECT_EXT"/>
+                <enum name="GL_INT_IMAGE_CUBE_EXT"/>
+                <enum name="GL_INT_IMAGE_BUFFER_EXT"/>
+                <enum name="GL_INT_IMAGE_1D_ARRAY_EXT"/>
+                <enum name="GL_INT_IMAGE_2D_ARRAY_EXT"/>
+                <enum name="GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_INT_IMAGE_2D_MULTISAMPLE_EXT"/>
+                <enum name="GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_1D_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_3D_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_CUBE_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_BUFFER_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT"/>
+                <enum name="GL_MAX_IMAGE_SAMPLES_EXT"/>
+                <enum name="GL_IMAGE_BINDING_FORMAT_EXT"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT"/>
+                <enum name="GL_ELEMENT_ARRAY_BARRIER_BIT_EXT"/>
+                <enum name="GL_UNIFORM_BARRIER_BIT_EXT"/>
+                <enum name="GL_TEXTURE_FETCH_BARRIER_BIT_EXT"/>
+                <enum name="GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT"/>
+                <enum name="GL_COMMAND_BARRIER_BIT_EXT"/>
+                <enum name="GL_PIXEL_BUFFER_BARRIER_BIT_EXT"/>
+                <enum name="GL_TEXTURE_UPDATE_BARRIER_BIT_EXT"/>
+                <enum name="GL_BUFFER_UPDATE_BARRIER_BIT_EXT"/>
+                <enum name="GL_FRAMEBUFFER_BARRIER_BIT_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT"/>
+                <enum name="GL_ATOMIC_COUNTER_BARRIER_BIT_EXT"/>
+                <enum name="GL_ALL_BARRIER_BITS_EXT"/>
+                <command name="glBindImageTextureEXT"/>
+                <command name="glMemoryBarrierEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_shader_implicit_conversions" supported="gles2"/>
+        <extension name="GL_EXT_shader_integer_mix" supported="gl|gles2"/>
+        <extension name="GL_EXT_shader_io_blocks" supported="gles2"/>
+        <extension name="GL_EXT_shader_pixel_local_storage" supported="gles2">
+            <require>
+                <enum name="GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT"/>
+                <enum name="GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT"/>
+                <enum name="GL_SHADER_PIXEL_LOCAL_STORAGE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_shader_texture_lod" supported="gles2"/>
+        <extension name="GL_EXT_shadow_funcs" supported="gl"/>
+        <extension name="GL_EXT_shadow_samplers" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_COMPARE_MODE_EXT"/>
+                <enum name="GL_TEXTURE_COMPARE_FUNC_EXT"/>
+                <enum name="GL_COMPARE_REF_TO_TEXTURE_EXT"/>
+                <enum name="GL_SAMPLER_2D_SHADOW_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_shared_texture_palette" supported="gl">
+            <require>
+                <enum name="GL_SHARED_TEXTURE_PALETTE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_stencil_clear_tag" supported="gl">
+            <require>
+                <enum name="GL_STENCIL_TAG_BITS_EXT"/>
+                <enum name="GL_STENCIL_CLEAR_TAG_VALUE_EXT"/>
+                <command name="glStencilClearTagEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_stencil_two_side" supported="gl">
+            <require>
+                <enum name="GL_STENCIL_TEST_TWO_SIDE_EXT"/>
+                <enum name="GL_ACTIVE_STENCIL_FACE_EXT"/>
+                <command name="glActiveStencilFaceEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_stencil_wrap" supported="gl">
+            <require>
+                <enum name="GL_INCR_WRAP_EXT"/>
+                <enum name="GL_DECR_WRAP_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_subtexture" supported="gl">
+            <require>
+                <command name="glTexSubImage1DEXT"/>
+                <command name="glTexSubImage2DEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_tessellation_shader" supported="gles2">
+            <require>
+                <enum name="GL_PATCHES_EXT"/>
+                <enum name="GL_PATCH_VERTICES_EXT"/>
+                <enum name="GL_TESS_CONTROL_OUTPUT_VERTICES_EXT"/>
+                <enum name="GL_TESS_GEN_MODE_EXT"/>
+                <enum name="GL_TESS_GEN_SPACING_EXT"/>
+                <enum name="GL_TESS_GEN_VERTEX_ORDER_EXT"/>
+                <enum name="GL_TESS_GEN_POINT_MODE_EXT"/>
+                <enum name="GL_TRIANGLES"/>                         
+                <enum name="GL_ISOLINES_EXT"/>
+                <enum name="GL_QUADS_EXT"/>
+                <enum name="GL_EQUAL"/>
+                <enum name="GL_FRACTIONAL_ODD_EXT"/>
+                <enum name="GL_FRACTIONAL_EVEN_EXT"/>
+                <enum name="GL_CCW"/>
+                <enum name="GL_CW"/>
+                <enum name="GL_MAX_PATCH_VERTICES_EXT"/>
+                <enum name="GL_MAX_TESS_GEN_LEVEL_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_PATCH_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT"/>
+                <enum name="GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT"/>
+                <enum name="GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT"/>
+                <enum name="GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED"/>
+                <enum name="GL_IS_PER_PATCH_EXT"/>
+                <enum name="GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT"/>
+                <enum name="GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT"/>
+                <enum name="GL_TESS_CONTROL_SHADER_EXT"/>
+                <enum name="GL_TESS_EVALUATION_SHADER_EXT"/>
+                <enum name="GL_TESS_CONTROL_SHADER_BIT_EXT"/>
+                <enum name="GL_TESS_EVALUATION_SHADER_BIT_EXT"/>
+                <command name="glPatchParameteriEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture" supported="gl">
+            <require>
+                <enum name="GL_ALPHA4_EXT"/>
+                <enum name="GL_ALPHA8_EXT"/>
+                <enum name="GL_ALPHA12_EXT"/>
+                <enum name="GL_ALPHA16_EXT"/>
+                <enum name="GL_LUMINANCE4_EXT"/>
+                <enum name="GL_LUMINANCE8_EXT"/>
+                <enum name="GL_LUMINANCE12_EXT"/>
+                <enum name="GL_LUMINANCE16_EXT"/>
+                <enum name="GL_LUMINANCE4_ALPHA4_EXT"/>
+                <enum name="GL_LUMINANCE6_ALPHA2_EXT"/>
+                <enum name="GL_LUMINANCE8_ALPHA8_EXT"/>
+                <enum name="GL_LUMINANCE12_ALPHA4_EXT"/>
+                <enum name="GL_LUMINANCE12_ALPHA12_EXT"/>
+                <enum name="GL_LUMINANCE16_ALPHA16_EXT"/>
+                <enum name="GL_INTENSITY_EXT"/>
+                <enum name="GL_INTENSITY4_EXT"/>
+                <enum name="GL_INTENSITY8_EXT"/>
+                <enum name="GL_INTENSITY12_EXT"/>
+                <enum name="GL_INTENSITY16_EXT"/>
+                <enum name="GL_RGB2_EXT"/>
+                <enum name="GL_RGB4_EXT"/>
+                <enum name="GL_RGB5_EXT"/>
+                <enum name="GL_RGB8_EXT"/>
+                <enum name="GL_RGB10_EXT"/>
+                <enum name="GL_RGB12_EXT"/>
+                <enum name="GL_RGB16_EXT"/>
+                <enum name="GL_RGBA2_EXT"/>
+                <enum name="GL_RGBA4_EXT"/>
+                <enum name="GL_RGB5_A1_EXT"/>
+                <enum name="GL_RGBA8_EXT"/>
+                <enum name="GL_RGB10_A2_EXT"/>
+                <enum name="GL_RGBA12_EXT"/>
+                <enum name="GL_RGBA16_EXT"/>
+                <enum name="GL_TEXTURE_RED_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_GREEN_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_BLUE_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_ALPHA_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_LUMINANCE_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_INTENSITY_SIZE_EXT"/>
+                <enum name="GL_REPLACE_EXT"/>
+                <enum name="GL_PROXY_TEXTURE_1D_EXT"/>
+                <enum name="GL_PROXY_TEXTURE_2D_EXT"/>
+                <enum name="GL_TEXTURE_TOO_LARGE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture3D" supported="gl">
+            <require>
+                <enum name="GL_PACK_SKIP_IMAGES_EXT"/>
+                <enum name="GL_PACK_IMAGE_HEIGHT_EXT"/>
+                <enum name="GL_UNPACK_SKIP_IMAGES_EXT"/>
+                <enum name="GL_UNPACK_IMAGE_HEIGHT_EXT"/>
+                <enum name="GL_TEXTURE_3D_EXT"/>
+                <enum name="GL_PROXY_TEXTURE_3D_EXT"/>
+                <enum name="GL_TEXTURE_DEPTH_EXT"/>
+                <enum name="GL_TEXTURE_WRAP_R_EXT"/>
+                <enum name="GL_MAX_3D_TEXTURE_SIZE_EXT"/>
+                <command name="glTexImage3DEXT"/>
+                <command name="glTexSubImage3DEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_array" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_1D_ARRAY_EXT"/>
+                <enum name="GL_PROXY_TEXTURE_1D_ARRAY_EXT"/>
+                <enum name="GL_TEXTURE_2D_ARRAY_EXT"/>
+                <enum name="GL_PROXY_TEXTURE_2D_ARRAY_EXT"/>
+                <enum name="GL_TEXTURE_BINDING_1D_ARRAY_EXT"/>
+                <enum name="GL_TEXTURE_BINDING_2D_ARRAY_EXT"/>
+                <enum name="GL_MAX_ARRAY_TEXTURE_LAYERS_EXT"/>
+                <enum name="GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_border_clamp" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_BORDER_COLOR_EXT"/>
+                <enum name="GL_CLAMP_TO_BORDER_EXT"/>
+                <command name="glTexParameterIivEXT"/>
+                <command name="glTexParameterIuivEXT"/>
+                <command name="glGetTexParameterIivEXT"/>
+                <command name="glGetTexParameterIuivEXT"/>
+                <command name="glSamplerParameterIivEXT"/>
+                <command name="glSamplerParameterIuivEXT"/>
+                <command name="glGetSamplerParameterIivEXT"/>
+                <command name="glGetSamplerParameterIuivEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_buffer" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_BUFFER_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_BINDING_EXT"/>
+                <enum name="GL_MAX_TEXTURE_BUFFER_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_BINDING_BUFFER_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT"/>
+                <enum name="GL_SAMPLER_BUFFER_EXT"/>
+                <enum name="GL_INT_SAMPLER_BUFFER_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT"/>
+                <enum name="GL_IMAGE_BUFFER_EXT"/>
+                <enum name="GL_INT_IMAGE_BUFFER_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_BUFFER_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_OFFSET_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_SIZE_EXT"/>
+                <command name="glTexBufferEXT"/>
+                <command name="glTexBufferRangeEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_BUFFER_EXT"/>
+                <enum name="GL_MAX_TEXTURE_BUFFER_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_BINDING_BUFFER_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT"/>
+                <enum name="GL_TEXTURE_BUFFER_FORMAT_EXT"/>
+                <command name="glTexBufferEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_compression_dxt1" supported="gles1|gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT"/>
+                <enum name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_compression_latc" supported="gl">
+            <require>
+                <enum name="GL_COMPRESSED_LUMINANCE_LATC1_EXT"/>
+                <enum name="GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT"/>
+                <enum name="GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT"/>
+                <enum name="GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_compression_rgtc" supported="gl">
+            <require>
+                <enum name="GL_COMPRESSED_RED_RGTC1_EXT"/>
+                <enum name="GL_COMPRESSED_SIGNED_RED_RGTC1_EXT"/>
+                <enum name="GL_COMPRESSED_RED_GREEN_RGTC2_EXT"/>
+                <enum name="GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_compression_s3tc" supported="gl|gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT"/>
+                <enum name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT"/>
+                <enum name="GL_COMPRESSED_RGBA_S3TC_DXT3_EXT"/>
+                <enum name="GL_COMPRESSED_RGBA_S3TC_DXT5_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_cube_map" supported="gl" comment="Replaced by ARB_texture_cube_map, but was apparently shipped anyway?">
+            <require>
+                <enum name="GL_NORMAL_MAP_EXT"/>
+                <enum name="GL_REFLECTION_MAP_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_EXT"/>
+                <enum name="GL_TEXTURE_BINDING_CUBE_MAP_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT"/>
+                <enum name="GL_PROXY_TEXTURE_CUBE_MAP_EXT"/>
+                <enum name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_cube_map_array" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_SAMPLER_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT"/>
+                <enum name="GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+                <enum name="GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_env_add" supported="gl"/>
+        <extension name="GL_EXT_texture_env_combine" supported="gl">
+            <require>
+                <enum name="GL_COMBINE_EXT"/>
+                <enum name="GL_COMBINE_RGB_EXT"/>
+                <enum name="GL_COMBINE_ALPHA_EXT"/>
+                <enum name="GL_RGB_SCALE_EXT"/>
+                <enum name="GL_ADD_SIGNED_EXT"/>
+                <enum name="GL_INTERPOLATE_EXT"/>
+                <enum name="GL_CONSTANT_EXT"/>
+                <enum name="GL_PRIMARY_COLOR_EXT"/>
+                <enum name="GL_PREVIOUS_EXT"/>
+                <enum name="GL_SOURCE0_RGB_EXT"/>
+                <enum name="GL_SOURCE1_RGB_EXT"/>
+                <enum name="GL_SOURCE2_RGB_EXT"/>
+                <enum name="GL_SOURCE0_ALPHA_EXT"/>
+                <enum name="GL_SOURCE1_ALPHA_EXT"/>
+                <enum name="GL_SOURCE2_ALPHA_EXT"/>
+                <enum name="GL_OPERAND0_RGB_EXT"/>
+                <enum name="GL_OPERAND1_RGB_EXT"/>
+                <enum name="GL_OPERAND2_RGB_EXT"/>
+                <enum name="GL_OPERAND0_ALPHA_EXT"/>
+                <enum name="GL_OPERAND1_ALPHA_EXT"/>
+                <enum name="GL_OPERAND2_ALPHA_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_env_dot3" supported="gl">
+            <require>
+                <enum name="GL_DOT3_RGB_EXT"/>
+                <enum name="GL_DOT3_RGBA_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_filter_anisotropic" supported="gl|gles1|gles2">
+            <require>
+                <enum name="GL_TEXTURE_MAX_ANISOTROPY_EXT"/>
+                <enum name="GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_format_BGRA8888" supported="gles1|gles2">
+            <require>
+                <enum name="GL_BGRA_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_integer" supported="gl">
+            <require>
+                <enum name="GL_RGBA32UI_EXT"/>
+                <enum name="GL_RGB32UI_EXT"/>
+                <enum name="GL_ALPHA32UI_EXT"/>
+                <enum name="GL_INTENSITY32UI_EXT"/>
+                <enum name="GL_LUMINANCE32UI_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA32UI_EXT"/>
+                <enum name="GL_RGBA16UI_EXT"/>
+                <enum name="GL_RGB16UI_EXT"/>
+                <enum name="GL_ALPHA16UI_EXT"/>
+                <enum name="GL_INTENSITY16UI_EXT"/>
+                <enum name="GL_LUMINANCE16UI_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA16UI_EXT"/>
+                <enum name="GL_RGBA8UI_EXT"/>
+                <enum name="GL_RGB8UI_EXT"/>
+                <enum name="GL_ALPHA8UI_EXT"/>
+                <enum name="GL_INTENSITY8UI_EXT"/>
+                <enum name="GL_LUMINANCE8UI_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA8UI_EXT"/>
+                <enum name="GL_RGBA32I_EXT"/>
+                <enum name="GL_RGB32I_EXT"/>
+                <enum name="GL_ALPHA32I_EXT"/>
+                <enum name="GL_INTENSITY32I_EXT"/>
+                <enum name="GL_LUMINANCE32I_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA32I_EXT"/>
+                <enum name="GL_RGBA16I_EXT"/>
+                <enum name="GL_RGB16I_EXT"/>
+                <enum name="GL_ALPHA16I_EXT"/>
+                <enum name="GL_INTENSITY16I_EXT"/>
+                <enum name="GL_LUMINANCE16I_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA16I_EXT"/>
+                <enum name="GL_RGBA8I_EXT"/>
+                <enum name="GL_RGB8I_EXT"/>
+                <enum name="GL_ALPHA8I_EXT"/>
+                <enum name="GL_INTENSITY8I_EXT"/>
+                <enum name="GL_LUMINANCE8I_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA8I_EXT"/>
+                <enum name="GL_RED_INTEGER_EXT"/>
+                <enum name="GL_GREEN_INTEGER_EXT"/>
+                <enum name="GL_BLUE_INTEGER_EXT"/>
+                <enum name="GL_ALPHA_INTEGER_EXT"/>
+                <enum name="GL_RGB_INTEGER_EXT"/>
+                <enum name="GL_RGBA_INTEGER_EXT"/>
+                <enum name="GL_BGR_INTEGER_EXT"/>
+                <enum name="GL_BGRA_INTEGER_EXT"/>
+                <enum name="GL_LUMINANCE_INTEGER_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA_INTEGER_EXT"/>
+                <enum name="GL_RGBA_INTEGER_MODE_EXT"/>
+                <command name="glTexParameterIivEXT"/>
+                <command name="glTexParameterIuivEXT"/>
+                <command name="glGetTexParameterIivEXT"/>
+                <command name="glGetTexParameterIuivEXT"/>
+                <command name="glClearColorIiEXT"/>
+                <command name="glClearColorIuiEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_lod_bias" supported="gl|gles1">
+            <require>
+                <enum name="GL_MAX_TEXTURE_LOD_BIAS_EXT"/>
+                <enum name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+                <enum name="GL_TEXTURE_LOD_BIAS_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_mirror_clamp" supported="gl">
+            <require>
+                <enum name="GL_MIRROR_CLAMP_EXT"/>
+                <enum name="GL_MIRROR_CLAMP_TO_EDGE_EXT"/>
+                <enum name="GL_MIRROR_CLAMP_TO_BORDER_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_object" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_PRIORITY_EXT"/>
+                <enum name="GL_TEXTURE_RESIDENT_EXT"/>
+                <enum name="GL_TEXTURE_1D_BINDING_EXT"/>
+                <enum name="GL_TEXTURE_2D_BINDING_EXT"/>
+                <enum name="GL_TEXTURE_3D_BINDING_EXT"/>
+                <command name="glAreTexturesResidentEXT"/>
+                <command name="glBindTextureEXT"/>
+                <command name="glDeleteTexturesEXT"/>
+                <command name="glGenTexturesEXT"/>
+                <command name="glIsTextureEXT"/>
+                <command name="glPrioritizeTexturesEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_perturb_normal" supported="gl">
+            <require>
+                <enum name="GL_PERTURB_EXT"/>
+                <enum name="GL_TEXTURE_NORMAL_EXT"/>
+                <command name="glTextureNormalEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_rg" supported="gles2">
+            <require>
+                <enum name="GL_RED_EXT"/>
+                <enum name="GL_RG_EXT"/>
+                <enum name="GL_R8_EXT"/>
+                <enum name="GL_RG8_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_sRGB" supported="gl">
+            <require>
+                <enum name="GL_SRGB_EXT"/>
+                <enum name="GL_SRGB8_EXT"/>
+                <enum name="GL_SRGB_ALPHA_EXT"/>
+                <enum name="GL_SRGB8_ALPHA8_EXT"/>
+                <enum name="GL_SLUMINANCE_ALPHA_EXT"/>
+                <enum name="GL_SLUMINANCE8_ALPHA8_EXT"/>
+                <enum name="GL_SLUMINANCE_EXT"/>
+                <enum name="GL_SLUMINANCE8_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_EXT"/>
+                <enum name="GL_COMPRESSED_SLUMINANCE_EXT"/>
+                <enum name="GL_COMPRESSED_SLUMINANCE_ALPHA_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_S3TC_DXT1_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_sRGB_decode" supported="gl|gles2">
+            <require>
+                <enum name="GL_TEXTURE_SRGB_DECODE_EXT"/>
+                <enum name="GL_DECODE_EXT"/>
+                <enum name="GL_SKIP_DECODE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_shared_exponent" supported="gl">
+            <require>
+                <enum name="GL_RGB9_E5_EXT"/>
+                <enum name="GL_UNSIGNED_INT_5_9_9_9_REV_EXT"/>
+                <enum name="GL_TEXTURE_SHARED_SIZE_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_snorm" supported="gl">
+            <require>
+                <enum name="GL_ALPHA_SNORM"/>
+                <enum name="GL_LUMINANCE_SNORM"/>
+                <enum name="GL_LUMINANCE_ALPHA_SNORM"/>
+                <enum name="GL_INTENSITY_SNORM"/>
+                <enum name="GL_ALPHA8_SNORM"/>
+                <enum name="GL_LUMINANCE8_SNORM"/>
+                <enum name="GL_LUMINANCE8_ALPHA8_SNORM"/>
+                <enum name="GL_INTENSITY8_SNORM"/>
+                <enum name="GL_ALPHA16_SNORM"/>
+                <enum name="GL_LUMINANCE16_SNORM"/>
+                <enum name="GL_LUMINANCE16_ALPHA16_SNORM"/>
+                <enum name="GL_INTENSITY16_SNORM"/>
+                <enum name="GL_RED_SNORM"/>
+                <enum name="GL_RG_SNORM"/>
+                <enum name="GL_RGB_SNORM"/>
+                <enum name="GL_RGBA_SNORM"/>
+                <enum name="GL_R8_SNORM"/>
+                <enum name="GL_RG8_SNORM"/>
+                <enum name="GL_RGB8_SNORM"/>
+                <enum name="GL_RGBA8_SNORM"/>
+                <enum name="GL_R16_SNORM"/>
+                <enum name="GL_RG16_SNORM"/>
+                <enum name="GL_RGB16_SNORM"/>
+                <enum name="GL_RGBA16_SNORM"/>
+                <enum name="GL_SIGNED_NORMALIZED"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_storage" supported="gles1|gles2">
+            <require comment="Not clear all of these enums should be here for OpenGL ES. Many are only defined if other extensions also requiring them are supported">
+                <enum name="GL_TEXTURE_IMMUTABLE_FORMAT_EXT"/>
+                <enum name="GL_ALPHA8_EXT"/>
+                <enum name="GL_LUMINANCE8_EXT"/>
+                <enum name="GL_LUMINANCE8_ALPHA8_EXT"/>
+                <enum name="GL_RGBA32F_EXT"/>
+                <enum name="GL_RGB32F_EXT"/>
+                <enum name="GL_ALPHA32F_EXT"/>
+                <enum name="GL_LUMINANCE32F_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA32F_EXT"/>
+                <enum name="GL_RGBA16F_EXT"/>
+                <enum name="GL_RGB16F_EXT"/>
+                <enum name="GL_ALPHA16F_EXT"/>
+                <enum name="GL_LUMINANCE16F_EXT"/>
+                <enum name="GL_LUMINANCE_ALPHA16F_EXT"/>
+                <enum name="GL_RGB10_A2_EXT"/>
+                <enum name="GL_RGB10_EXT"/>
+                <enum name="GL_BGRA8_EXT"/>
+                <enum name="GL_R8_EXT"/>
+                <enum name="GL_RG8_EXT"/>
+                <enum name="GL_R32F_EXT"/>
+                <enum name="GL_RG32F_EXT"/>
+                <enum name="GL_R16F_EXT"/>
+                <enum name="GL_RG16F_EXT"/>
+                <command name="glTexStorage1DEXT"/>
+                <command name="glTexStorage2DEXT"/>
+                <command name="glTexStorage3DEXT"/>
+            </require>
+            <require comment="Supported only if GL_EXT_direct_state_access is supported">
+                <command name="glTextureStorage1DEXT"/>
+                <command name="glTextureStorage2DEXT"/>
+                <command name="glTextureStorage3DEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_swizzle" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_SWIZZLE_R_EXT"/>
+                <enum name="GL_TEXTURE_SWIZZLE_G_EXT"/>
+                <enum name="GL_TEXTURE_SWIZZLE_B_EXT"/>
+                <enum name="GL_TEXTURE_SWIZZLE_A_EXT"/>
+                <enum name="GL_TEXTURE_SWIZZLE_RGBA_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_type_2_10_10_10_REV" supported="gles2">
+            <require>
+                <enum name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_texture_view" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_VIEW_MIN_LEVEL_EXT"/>
+                <enum name="GL_TEXTURE_VIEW_NUM_LEVELS_EXT"/>
+                <enum name="GL_TEXTURE_VIEW_MIN_LAYER_EXT"/>
+                <enum name="GL_TEXTURE_VIEW_NUM_LAYERS_EXT"/>
+                <enum name="GL_TEXTURE_IMMUTABLE_LEVELS"/>
+                <command name="glTextureViewEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_timer_query" supported="gl">
+            <require>
+                <enum name="GL_TIME_ELAPSED_EXT"/>
+                <command name="glGetQueryObjecti64vEXT"/>
+                <command name="glGetQueryObjectui64vEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_transform_feedback" supported="gl">
+            <require>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT"/>
+                <enum name="GL_INTERLEAVED_ATTRIBS_EXT"/>
+                <enum name="GL_SEPARATE_ATTRIBS_EXT"/>
+                <enum name="GL_PRIMITIVES_GENERATED_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT"/>
+                <enum name="GL_RASTERIZER_DISCARD_EXT"/>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT"/>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT"/>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_VARYINGS_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT"/>
+                <command name="glBeginTransformFeedbackEXT"/>
+                <command name="glEndTransformFeedbackEXT"/>
+                <command name="glBindBufferRangeEXT"/>
+                <command name="glBindBufferOffsetEXT"/>
+                <command name="glBindBufferBaseEXT"/>
+                <command name="glTransformFeedbackVaryingsEXT"/>
+                <command name="glGetTransformFeedbackVaryingEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_unpack_subimage" supported="gles2">
+            <require>
+                <enum name="GL_UNPACK_ROW_LENGTH_EXT"/>
+                <enum name="GL_UNPACK_SKIP_ROWS_EXT"/>
+                <enum name="GL_UNPACK_SKIP_PIXELS_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_vertex_array" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_EXT"/>
+                <enum name="GL_NORMAL_ARRAY_EXT"/>
+                <enum name="GL_COLOR_ARRAY_EXT"/>
+                <enum name="GL_INDEX_ARRAY_EXT"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_EXT"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_EXT"/>
+                <enum name="GL_VERTEX_ARRAY_SIZE_EXT"/>
+                <enum name="GL_VERTEX_ARRAY_TYPE_EXT"/>
+                <enum name="GL_VERTEX_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_VERTEX_ARRAY_COUNT_EXT"/>
+                <enum name="GL_NORMAL_ARRAY_TYPE_EXT"/>
+                <enum name="GL_NORMAL_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_NORMAL_ARRAY_COUNT_EXT"/>
+                <enum name="GL_COLOR_ARRAY_SIZE_EXT"/>
+                <enum name="GL_COLOR_ARRAY_TYPE_EXT"/>
+                <enum name="GL_COLOR_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_COLOR_ARRAY_COUNT_EXT"/>
+                <enum name="GL_INDEX_ARRAY_TYPE_EXT"/>
+                <enum name="GL_INDEX_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_INDEX_ARRAY_COUNT_EXT"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_SIZE_EXT"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_TYPE_EXT"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_COUNT_EXT"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_COUNT_EXT"/>
+                <enum name="GL_VERTEX_ARRAY_POINTER_EXT"/>
+                <enum name="GL_NORMAL_ARRAY_POINTER_EXT"/>
+                <enum name="GL_COLOR_ARRAY_POINTER_EXT"/>
+                <enum name="GL_INDEX_ARRAY_POINTER_EXT"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_POINTER_EXT"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_POINTER_EXT"/>
+                <command name="glArrayElementEXT"/>
+                <command name="glColorPointerEXT"/>
+                <command name="glDrawArraysEXT"/>
+                <command name="glEdgeFlagPointerEXT"/>
+                <command name="glGetPointervEXT"/>
+                <command name="glIndexPointerEXT"/>
+                <command name="glNormalPointerEXT"/>
+                <command name="glTexCoordPointerEXT"/>
+                <command name="glVertexPointerEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_vertex_array_bgra" supported="gl">
+            <require>
+                <enum name="GL_BGRA"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_vertex_attrib_64bit" supported="gl">
+            <require>
+                <enum name="GL_DOUBLE"/>
+                <enum name="GL_DOUBLE_VEC2_EXT"/>
+                <enum name="GL_DOUBLE_VEC3_EXT"/>
+                <enum name="GL_DOUBLE_VEC4_EXT"/>
+                <enum name="GL_DOUBLE_MAT2_EXT"/>
+                <enum name="GL_DOUBLE_MAT3_EXT"/>
+                <enum name="GL_DOUBLE_MAT4_EXT"/>
+                <enum name="GL_DOUBLE_MAT2x3_EXT"/>
+                <enum name="GL_DOUBLE_MAT2x4_EXT"/>
+                <enum name="GL_DOUBLE_MAT3x2_EXT"/>
+                <enum name="GL_DOUBLE_MAT3x4_EXT"/>
+                <enum name="GL_DOUBLE_MAT4x2_EXT"/>
+                <enum name="GL_DOUBLE_MAT4x3_EXT"/>
+                <command name="glVertexAttribL1dEXT"/>
+                <command name="glVertexAttribL2dEXT"/>
+                <command name="glVertexAttribL3dEXT"/>
+                <command name="glVertexAttribL4dEXT"/>
+                <command name="glVertexAttribL1dvEXT"/>
+                <command name="glVertexAttribL2dvEXT"/>
+                <command name="glVertexAttribL3dvEXT"/>
+                <command name="glVertexAttribL4dvEXT"/>
+                <command name="glVertexAttribLPointerEXT"/>
+                <command name="glGetVertexAttribLdvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_vertex_shader" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_SHADER_EXT"/>
+                <enum name="GL_VERTEX_SHADER_BINDING_EXT"/>
+                <enum name="GL_OP_INDEX_EXT"/>
+                <enum name="GL_OP_NEGATE_EXT"/>
+                <enum name="GL_OP_DOT3_EXT"/>
+                <enum name="GL_OP_DOT4_EXT"/>
+                <enum name="GL_OP_MUL_EXT"/>
+                <enum name="GL_OP_ADD_EXT"/>
+                <enum name="GL_OP_MADD_EXT"/>
+                <enum name="GL_OP_FRAC_EXT"/>
+                <enum name="GL_OP_MAX_EXT"/>
+                <enum name="GL_OP_MIN_EXT"/>
+                <enum name="GL_OP_SET_GE_EXT"/>
+                <enum name="GL_OP_SET_LT_EXT"/>
+                <enum name="GL_OP_CLAMP_EXT"/>
+                <enum name="GL_OP_FLOOR_EXT"/>
+                <enum name="GL_OP_ROUND_EXT"/>
+                <enum name="GL_OP_EXP_BASE_2_EXT"/>
+                <enum name="GL_OP_LOG_BASE_2_EXT"/>
+                <enum name="GL_OP_POWER_EXT"/>
+                <enum name="GL_OP_RECIP_EXT"/>
+                <enum name="GL_OP_RECIP_SQRT_EXT"/>
+                <enum name="GL_OP_SUB_EXT"/>
+                <enum name="GL_OP_CROSS_PRODUCT_EXT"/>
+                <enum name="GL_OP_MULTIPLY_MATRIX_EXT"/>
+                <enum name="GL_OP_MOV_EXT"/>
+                <enum name="GL_OUTPUT_VERTEX_EXT"/>
+                <enum name="GL_OUTPUT_COLOR0_EXT"/>
+                <enum name="GL_OUTPUT_COLOR1_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD0_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD1_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD2_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD3_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD4_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD5_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD6_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD7_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD8_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD9_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD10_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD11_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD12_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD13_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD14_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD15_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD16_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD17_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD18_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD19_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD20_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD21_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD22_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD23_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD24_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD25_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD26_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD27_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD28_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD29_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD30_EXT"/>
+                <enum name="GL_OUTPUT_TEXTURE_COORD31_EXT"/>
+                <enum name="GL_OUTPUT_FOG_EXT"/>
+                <enum name="GL_SCALAR_EXT"/>
+                <enum name="GL_VECTOR_EXT"/>
+                <enum name="GL_MATRIX_EXT"/>
+                <enum name="GL_VARIANT_EXT"/>
+                <enum name="GL_INVARIANT_EXT"/>
+                <enum name="GL_LOCAL_CONSTANT_EXT"/>
+                <enum name="GL_LOCAL_EXT"/>
+                <enum name="GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT"/>
+                <enum name="GL_MAX_VERTEX_SHADER_VARIANTS_EXT"/>
+                <enum name="GL_MAX_VERTEX_SHADER_INVARIANTS_EXT"/>
+                <enum name="GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT"/>
+                <enum name="GL_MAX_VERTEX_SHADER_LOCALS_EXT"/>
+                <enum name="GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT"/>
+                <enum name="GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT"/>
+                <enum name="GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT"/>
+                <enum name="GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT"/>
+                <enum name="GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT"/>
+                <enum name="GL_VERTEX_SHADER_INSTRUCTIONS_EXT"/>
+                <enum name="GL_VERTEX_SHADER_VARIANTS_EXT"/>
+                <enum name="GL_VERTEX_SHADER_INVARIANTS_EXT"/>
+                <enum name="GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT"/>
+                <enum name="GL_VERTEX_SHADER_LOCALS_EXT"/>
+                <enum name="GL_VERTEX_SHADER_OPTIMIZED_EXT"/>
+                <enum name="GL_X_EXT"/>
+                <enum name="GL_Y_EXT"/>
+                <enum name="GL_Z_EXT"/>
+                <enum name="GL_W_EXT"/>
+                <enum name="GL_NEGATIVE_X_EXT"/>
+                <enum name="GL_NEGATIVE_Y_EXT"/>
+                <enum name="GL_NEGATIVE_Z_EXT"/>
+                <enum name="GL_NEGATIVE_W_EXT"/>
+                <enum name="GL_ZERO_EXT"/>
+                <enum name="GL_ONE_EXT"/>
+                <enum name="GL_NEGATIVE_ONE_EXT"/>
+                <enum name="GL_NORMALIZED_RANGE_EXT"/>
+                <enum name="GL_FULL_RANGE_EXT"/>
+                <enum name="GL_CURRENT_VERTEX_EXT"/>
+                <enum name="GL_MVP_MATRIX_EXT"/>
+                <enum name="GL_VARIANT_VALUE_EXT"/>
+                <enum name="GL_VARIANT_DATATYPE_EXT"/>
+                <enum name="GL_VARIANT_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_VARIANT_ARRAY_TYPE_EXT"/>
+                <enum name="GL_VARIANT_ARRAY_EXT"/>
+                <enum name="GL_VARIANT_ARRAY_POINTER_EXT"/>
+                <enum name="GL_INVARIANT_VALUE_EXT"/>
+                <enum name="GL_INVARIANT_DATATYPE_EXT"/>
+                <enum name="GL_LOCAL_CONSTANT_VALUE_EXT"/>
+                <enum name="GL_LOCAL_CONSTANT_DATATYPE_EXT"/>
+                <command name="glBeginVertexShaderEXT"/>
+                <command name="glEndVertexShaderEXT"/>
+                <command name="glBindVertexShaderEXT"/>
+                <command name="glGenVertexShadersEXT"/>
+                <command name="glDeleteVertexShaderEXT"/>
+                <command name="glShaderOp1EXT"/>
+                <command name="glShaderOp2EXT"/>
+                <command name="glShaderOp3EXT"/>
+                <command name="glSwizzleEXT"/>
+                <command name="glWriteMaskEXT"/>
+                <command name="glInsertComponentEXT"/>
+                <command name="glExtractComponentEXT"/>
+                <command name="glGenSymbolsEXT"/>
+                <command name="glSetInvariantEXT"/>
+                <command name="glSetLocalConstantEXT"/>
+                <command name="glVariantbvEXT"/>
+                <command name="glVariantsvEXT"/>
+                <command name="glVariantivEXT"/>
+                <command name="glVariantfvEXT"/>
+                <command name="glVariantdvEXT"/>
+                <command name="glVariantubvEXT"/>
+                <command name="glVariantusvEXT"/>
+                <command name="glVariantuivEXT"/>
+                <command name="glVariantPointerEXT"/>
+                <command name="glEnableVariantClientStateEXT"/>
+                <command name="glDisableVariantClientStateEXT"/>
+                <command name="glBindLightParameterEXT"/>
+                <command name="glBindMaterialParameterEXT"/>
+                <command name="glBindTexGenParameterEXT"/>
+                <command name="glBindTextureUnitParameterEXT"/>
+                <command name="glBindParameterEXT"/>
+                <command name="glIsVariantEnabledEXT"/>
+                <command name="glGetVariantBooleanvEXT"/>
+                <command name="glGetVariantIntegervEXT"/>
+                <command name="glGetVariantFloatvEXT"/>
+                <command name="glGetVariantPointervEXT"/>
+                <command name="glGetInvariantBooleanvEXT"/>
+                <command name="glGetInvariantIntegervEXT"/>
+                <command name="glGetInvariantFloatvEXT"/>
+                <command name="glGetLocalConstantBooleanvEXT"/>
+                <command name="glGetLocalConstantIntegervEXT"/>
+                <command name="glGetLocalConstantFloatvEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_vertex_weighting" supported="gl">
+            <require>
+                <enum name="GL_MODELVIEW0_STACK_DEPTH_EXT"/>
+                <enum name="GL_MODELVIEW1_STACK_DEPTH_EXT"/>
+                <enum name="GL_MODELVIEW0_MATRIX_EXT"/>
+                <enum name="GL_MODELVIEW1_MATRIX_EXT"/>
+                <enum name="GL_VERTEX_WEIGHTING_EXT"/>
+                <enum name="GL_MODELVIEW0_EXT"/>
+                <enum name="GL_MODELVIEW1_EXT"/>
+                <enum name="GL_CURRENT_VERTEX_WEIGHT_EXT"/>
+                <enum name="GL_VERTEX_WEIGHT_ARRAY_EXT"/>
+                <enum name="GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT"/>
+                <enum name="GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT"/>
+                <enum name="GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT"/>
+                <enum name="GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT"/>
+                <command name="glVertexWeightfEXT"/>
+                <command name="glVertexWeightfvEXT"/>
+                <command name="glVertexWeightPointerEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_EXT_x11_sync_object" supported="gl">
+            <require>
+                <enum name="GL_SYNC_X11_FENCE_EXT"/>
+                <command name="glImportSyncEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_FJ_shader_binary_GCCSO" supported="gles2">
+            <require>
+                <enum name="GL_GCCSO_SHADER_BINARY_FJ"/>
+            </require>
+        </extension>
+        <extension name="GL_GREMEDY_frame_terminator" supported="gl">
+            <require>
+                <command name="glFrameTerminatorGREMEDY"/>
+            </require>
+        </extension>
+        <extension name="GL_GREMEDY_string_marker" supported="gl">
+            <require>
+                <command name="glStringMarkerGREMEDY"/>
+            </require>
+        </extension>
+        <extension name="GL_HP_convolution_border_modes" supported="gl">
+            <require>
+                <enum name="GL_IGNORE_BORDER_HP"/>
+                <enum name="GL_CONSTANT_BORDER_HP"/>
+                <enum name="GL_REPLICATE_BORDER_HP"/>
+                <enum name="GL_CONVOLUTION_BORDER_COLOR_HP"/>
+            </require>
+        </extension>
+        <extension name="GL_HP_image_transform" supported="gl">
+            <require>
+                <enum name="GL_IMAGE_SCALE_X_HP"/>
+                <enum name="GL_IMAGE_SCALE_Y_HP"/>
+                <enum name="GL_IMAGE_TRANSLATE_X_HP"/>
+                <enum name="GL_IMAGE_TRANSLATE_Y_HP"/>
+                <enum name="GL_IMAGE_ROTATE_ANGLE_HP"/>
+                <enum name="GL_IMAGE_ROTATE_ORIGIN_X_HP"/>
+                <enum name="GL_IMAGE_ROTATE_ORIGIN_Y_HP"/>
+                <enum name="GL_IMAGE_MAG_FILTER_HP"/>
+                <enum name="GL_IMAGE_MIN_FILTER_HP"/>
+                <enum name="GL_IMAGE_CUBIC_WEIGHT_HP"/>
+                <enum name="GL_CUBIC_HP"/>
+                <enum name="GL_AVERAGE_HP"/>
+                <enum name="GL_IMAGE_TRANSFORM_2D_HP"/>
+                <enum name="GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP"/>
+                <enum name="GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP"/>
+                <command name="glImageTransformParameteriHP"/>
+                <command name="glImageTransformParameterfHP"/>
+                <command name="glImageTransformParameterivHP"/>
+                <command name="glImageTransformParameterfvHP"/>
+                <command name="glGetImageTransformParameterivHP"/>
+                <command name="glGetImageTransformParameterfvHP"/>
+            </require>
+        </extension>
+        <extension name="GL_HP_occlusion_test" supported="gl">
+            <require>
+                <enum name="GL_OCCLUSION_TEST_HP"/>
+                <enum name="GL_OCCLUSION_TEST_RESULT_HP"/>
+            </require>
+        </extension>
+        <extension name="GL_HP_texture_lighting" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_LIGHTING_MODE_HP"/>
+                <enum name="GL_TEXTURE_POST_SPECULAR_HP"/>
+                <enum name="GL_TEXTURE_PRE_SPECULAR_HP"/>
+            </require>
+        </extension>
+        <extension name="GL_IBM_cull_vertex" supported="gl">
+            <require>
+                <enum name="GL_CULL_VERTEX_IBM"/>
+            </require>
+        </extension>
+        <extension name="GL_IBM_multimode_draw_arrays" supported="gl">
+            <require>
+                <command name="glMultiModeDrawArraysIBM"/>
+                <command name="glMultiModeDrawElementsIBM"/>
+            </require>
+        </extension>
+        <extension name="GL_IBM_rasterpos_clip" supported="gl">
+            <require>
+                <enum name="GL_RASTER_POSITION_UNCLIPPED_IBM"/>
+            </require>
+        </extension>
+        <extension name="GL_IBM_static_data" supported="gl">
+            <require>
+                <enum name="GL_ALL_STATIC_DATA_IBM"/>
+                <enum name="GL_STATIC_VERTEX_ARRAY_IBM"/>
+                <command name="glFlushStaticDataIBM"/>
+            </require>
+        </extension>
+        <extension name="GL_IBM_texture_mirrored_repeat" supported="gl">
+            <require>
+                <enum name="GL_MIRRORED_REPEAT_IBM"/>
+            </require>
+        </extension>
+        <extension name="GL_IBM_vertex_array_lists" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_LIST_IBM"/>
+                <enum name="GL_NORMAL_ARRAY_LIST_IBM"/>
+                <enum name="GL_COLOR_ARRAY_LIST_IBM"/>
+                <enum name="GL_INDEX_ARRAY_LIST_IBM"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_LIST_IBM"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_LIST_IBM"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_LIST_IBM"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_LIST_IBM"/>
+                <enum name="GL_VERTEX_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_NORMAL_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_COLOR_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_INDEX_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM"/>
+                <command name="glColorPointerListIBM"/>
+                <command name="glSecondaryColorPointerListIBM"/>
+                <command name="glEdgeFlagPointerListIBM"/>
+                <command name="glFogCoordPointerListIBM"/>
+                <command name="glIndexPointerListIBM"/>
+                <command name="glNormalPointerListIBM"/>
+                <command name="glTexCoordPointerListIBM"/>
+                <command name="glVertexPointerListIBM"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_multisampled_render_to_texture" supported="gles1|gles2">
+            <require>
+                <enum name="GL_RENDERBUFFER_SAMPLES_IMG"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG"/>
+                <enum name="GL_MAX_SAMPLES_IMG"/>
+                <enum name="GL_TEXTURE_SAMPLES_IMG"/>
+                <command name="glRenderbufferStorageMultisampleIMG"/>
+                <command name="glFramebufferTexture2DMultisampleIMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_program_binary" supported="gles2">
+            <require>
+                <enum name="GL_SGX_PROGRAM_BINARY_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_read_format" supported="gles1|gles2">
+            <require>
+                <enum name="GL_BGRA_IMG"/>
+                <enum name="GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_shader_binary" supported="gles2">
+            <require>
+                <enum name="GL_SGX_BINARY_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_texture_compression_pvrtc" supported="gles1|gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG"/>
+                <enum name="GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG"/>
+                <enum name="GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG"/>
+                <enum name="GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_texture_compression_pvrtc2" supported="gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG"/>
+                <enum name="GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_texture_env_enhanced_fixed_function" supported="gles1">
+            <require>
+                <enum name="GL_MODULATE_COLOR_IMG"/>
+                <enum name="GL_RECIP_ADD_SIGNED_ALPHA_IMG"/>
+                <enum name="GL_TEXTURE_ALPHA_MODULATE_IMG"/>
+                <enum name="GL_FACTOR_ALPHA_MODULATE_IMG"/>
+                <enum name="GL_FRAGMENT_ALPHA_MODULATE_IMG"/>
+                <enum name="GL_ADD_BLEND_IMG"/>
+                <enum name="GL_DOT3_RGBA_IMG"/>
+            </require>
+        </extension>
+        <extension name="GL_IMG_user_clip_plane" supported="gles1">
+            <require>
+                <enum name="GL_CLIP_PLANE0_IMG"/>
+                <enum name="GL_CLIP_PLANE1_IMG"/>
+                <enum name="GL_CLIP_PLANE2_IMG"/>
+                <enum name="GL_CLIP_PLANE3_IMG"/>
+                <enum name="GL_CLIP_PLANE4_IMG"/>
+                <enum name="GL_CLIP_PLANE5_IMG"/>
+                <enum name="GL_MAX_CLIP_PLANES_IMG"/>
+                <command name="glClipPlanefIMG"/>
+                <command name="glClipPlanexIMG"/>
+            </require>
+        </extension>
+        <extension name="GL_INGR_blend_func_separate" supported="gl">
+            <require>
+                <command name="glBlendFuncSeparateINGR"/>
+            </require>
+        </extension>
+        <extension name="GL_INGR_color_clamp" supported="gl">
+            <require>
+                <enum name="GL_RED_MIN_CLAMP_INGR"/>
+                <enum name="GL_GREEN_MIN_CLAMP_INGR"/>
+                <enum name="GL_BLUE_MIN_CLAMP_INGR"/>
+                <enum name="GL_ALPHA_MIN_CLAMP_INGR"/>
+                <enum name="GL_RED_MAX_CLAMP_INGR"/>
+                <enum name="GL_GREEN_MAX_CLAMP_INGR"/>
+                <enum name="GL_BLUE_MAX_CLAMP_INGR"/>
+                <enum name="GL_ALPHA_MAX_CLAMP_INGR"/>
+            </require>
+        </extension>
+        <extension name="GL_INGR_interlace_read" supported="gl">
+            <require>
+                <enum name="GL_INTERLACE_READ_INGR"/>
+            </require>
+        </extension>
+        <extension name="GL_INTEL_fragment_shader_ordering" supported="gl"/>
+        <extension name="GL_INTEL_map_texture" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_MEMORY_LAYOUT_INTEL"/>
+                <enum name="GL_LAYOUT_DEFAULT_INTEL"/>
+                <enum name="GL_LAYOUT_LINEAR_INTEL"/>
+                <enum name="GL_LAYOUT_LINEAR_CPU_CACHED_INTEL"/>
+                <command name="glSyncTextureINTEL"/>
+                <command name="glUnmapTexture2DINTEL"/>
+                <command name="glMapTexture2DINTEL"/>
+            </require>
+        </extension>
+        <extension name="GL_INTEL_parallel_arrays" supported="gl">
+            <require>
+                <enum name="GL_PARALLEL_ARRAYS_INTEL"/>
+                <enum name="GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL"/>
+                <enum name="GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL"/>
+                <enum name="GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL"/>
+                <command name="glVertexPointervINTEL"/>
+                <command name="glNormalPointervINTEL"/>
+                <command name="glColorPointervINTEL"/>
+                <command name="glTexCoordPointervINTEL"/>
+            </require>
+        </extension>
+        <extension name="GL_INTEL_performance_query" supported="gl|gles2">
+            <require>
+                <enum name="GL_PERFQUERY_SINGLE_CONTEXT_INTEL"/>
+                <enum name="GL_PERFQUERY_GLOBAL_CONTEXT_INTEL"/>
+                <enum name="GL_PERFQUERY_WAIT_INTEL"/>
+                <enum name="GL_PERFQUERY_FLUSH_INTEL"/>
+                <enum name="GL_PERFQUERY_DONOT_FLUSH_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_EVENT_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_RAW_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL"/>
+                <enum name="GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL"/>
+                <enum name="GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL"/>
+                <enum name="GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL"/>
+                <command name="glBeginPerfQueryINTEL"/>
+                <command name="glCreatePerfQueryINTEL"/>
+                <command name="glDeletePerfQueryINTEL"/>
+                <command name="glEndPerfQueryINTEL"/>
+                <command name="glGetFirstPerfQueryIdINTEL"/>
+                <command name="glGetNextPerfQueryIdINTEL"/>
+                <command name="glGetPerfCounterInfoINTEL"/>
+                <command name="glGetPerfQueryDataINTEL"/>
+                <command name="glGetPerfQueryIdByNameINTEL"/>
+                <command name="glGetPerfQueryInfoINTEL"/>
+            </require>
+        </extension>
+        <extension name="GL_KHR_blend_equation_advanced" supported="gles2">
+            <require>
+                <command name="glBlendBarrierKHR"/>                                         
+                <enum name="GL_BLEND_ADVANCED_COHERENT_KHR"/>                               
+                <enum name="GL_MULTIPLY_KHR"/>                                              
+                <enum name="GL_SCREEN_KHR"/>                                                
+                <enum name="GL_OVERLAY_KHR"/>                                               
+                <enum name="GL_DARKEN_KHR"/>                                                
+                <enum name="GL_LIGHTEN_KHR"/>                                               
+                <enum name="GL_COLORDODGE_KHR"/>                                            
+                <enum name="GL_COLORBURN_KHR"/>                                             
+                <enum name="GL_HARDLIGHT_KHR"/>                                             
+                <enum name="GL_SOFTLIGHT_KHR"/>                                             
+                <enum name="GL_DIFFERENCE_KHR"/>                                            
+                <enum name="GL_EXCLUSION_KHR"/>                                             
+                <enum name="GL_HSL_HUE_KHR"/>                                               
+                <enum name="GL_HSL_SATURATION_KHR"/>                                        
+                <enum name="GL_HSL_COLOR_KHR"/>                                             
+                <enum name="GL_HSL_LUMINOSITY_KHR"/>                                        
+            </require>
+        </extension>
+        <extension name="GL_KHR_debug" supported="gl|glcore|gles2">
+            <require api="gl" comment="KHR extensions *mandate* suffixes for ES, unlike for GL">
+                <enum name="GL_DEBUG_OUTPUT_SYNCHRONOUS"/>
+                <enum name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH"/>
+                <enum name="GL_DEBUG_CALLBACK_FUNCTION"/>
+                <enum name="GL_DEBUG_CALLBACK_USER_PARAM"/>
+                <enum name="GL_DEBUG_SOURCE_API"/>
+                <enum name="GL_DEBUG_SOURCE_WINDOW_SYSTEM"/>
+                <enum name="GL_DEBUG_SOURCE_SHADER_COMPILER"/>
+                <enum name="GL_DEBUG_SOURCE_THIRD_PARTY"/>
+                <enum name="GL_DEBUG_SOURCE_APPLICATION"/>
+                <enum name="GL_DEBUG_SOURCE_OTHER"/>
+                <enum name="GL_DEBUG_TYPE_ERROR"/>
+                <enum name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR"/>
+                <enum name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR"/>
+                <enum name="GL_DEBUG_TYPE_PORTABILITY"/>
+                <enum name="GL_DEBUG_TYPE_PERFORMANCE"/>
+                <enum name="GL_DEBUG_TYPE_OTHER"/>
+                <enum name="GL_DEBUG_TYPE_MARKER"/>
+                <enum name="GL_DEBUG_TYPE_PUSH_GROUP"/>
+                <enum name="GL_DEBUG_TYPE_POP_GROUP"/>
+                <enum name="GL_DEBUG_SEVERITY_NOTIFICATION"/>
+                <enum name="GL_MAX_DEBUG_GROUP_STACK_DEPTH"/>
+                <enum name="GL_DEBUG_GROUP_STACK_DEPTH"/>
+                <enum name="GL_BUFFER"/>
+                <enum name="GL_SHADER"/>
+                <enum name="GL_PROGRAM"/>
+                <enum name="GL_VERTEX_ARRAY"/>
+                <enum name="GL_QUERY"/>
+                <enum name="GL_SAMPLER"/>
+                <enum name="GL_MAX_LABEL_LENGTH"/>
+                <enum name="GL_MAX_DEBUG_MESSAGE_LENGTH"/>
+                <enum name="GL_MAX_DEBUG_LOGGED_MESSAGES"/>
+                <enum name="GL_DEBUG_LOGGED_MESSAGES"/>
+                <enum name="GL_DEBUG_SEVERITY_HIGH"/>
+                <enum name="GL_DEBUG_SEVERITY_MEDIUM"/>
+                <enum name="GL_DEBUG_SEVERITY_LOW"/>
+                <enum name="GL_DEBUG_OUTPUT"/>
+                <enum name="GL_CONTEXT_FLAG_DEBUG_BIT"/>
+                <enum name="GL_STACK_OVERFLOW"/>
+                <enum name="GL_STACK_UNDERFLOW"/>
+                <command name="glDebugMessageControl"/>
+                <command name="glDebugMessageInsert"/>
+                <command name="glDebugMessageCallback"/>
+                <command name="glGetDebugMessageLog"/>
+                <command name="glPushDebugGroup"/>
+                <command name="glPopDebugGroup"/>
+                <command name="glObjectLabel"/>
+                <command name="glGetObjectLabel"/>
+                <command name="glObjectPtrLabel"/>
+                <command name="glGetObjectPtrLabel"/>
+                <command name="glGetPointerv"/>
+            </require>
+            <require api="gles2">
+                <enum name="GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR"/>
+                <enum name="GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR"/>
+                <enum name="GL_DEBUG_CALLBACK_FUNCTION_KHR"/>
+                <enum name="GL_DEBUG_CALLBACK_USER_PARAM_KHR"/>
+                <enum name="GL_DEBUG_SOURCE_API_KHR"/>
+                <enum name="GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR"/>
+                <enum name="GL_DEBUG_SOURCE_SHADER_COMPILER_KHR"/>
+                <enum name="GL_DEBUG_SOURCE_THIRD_PARTY_KHR"/>
+                <enum name="GL_DEBUG_SOURCE_APPLICATION_KHR"/>
+                <enum name="GL_DEBUG_SOURCE_OTHER_KHR"/>
+                <enum name="GL_DEBUG_TYPE_ERROR_KHR"/>
+                <enum name="GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR"/>
+                <enum name="GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR"/>
+                <enum name="GL_DEBUG_TYPE_PORTABILITY_KHR"/>
+                <enum name="GL_DEBUG_TYPE_PERFORMANCE_KHR"/>
+                <enum name="GL_DEBUG_TYPE_OTHER_KHR"/>
+                <enum name="GL_DEBUG_TYPE_MARKER_KHR"/>
+                <enum name="GL_DEBUG_TYPE_PUSH_GROUP_KHR"/>
+                <enum name="GL_DEBUG_TYPE_POP_GROUP_KHR"/>
+                <enum name="GL_DEBUG_SEVERITY_NOTIFICATION_KHR"/>
+                <enum name="GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR"/>
+                <enum name="GL_DEBUG_GROUP_STACK_DEPTH_KHR"/>
+                <enum name="GL_BUFFER_KHR"/>
+                <enum name="GL_SHADER_KHR"/>
+                <enum name="GL_PROGRAM_KHR"/>
+                <enum name="GL_VERTEX_ARRAY_KHR"/>
+                <enum name="GL_QUERY_KHR"/>
+                <enum name="GL_SAMPLER_KHR"/>
+                <enum name="GL_MAX_LABEL_LENGTH_KHR"/>
+                <enum name="GL_MAX_DEBUG_MESSAGE_LENGTH_KHR"/>
+                <enum name="GL_MAX_DEBUG_LOGGED_MESSAGES_KHR"/>
+                <enum name="GL_DEBUG_LOGGED_MESSAGES_KHR"/>
+                <enum name="GL_DEBUG_SEVERITY_HIGH_KHR"/>
+                <enum name="GL_DEBUG_SEVERITY_MEDIUM_KHR"/>
+                <enum name="GL_DEBUG_SEVERITY_LOW_KHR"/>
+                <enum name="GL_DEBUG_OUTPUT_KHR"/>
+                <enum name="GL_CONTEXT_FLAG_DEBUG_BIT_KHR"/>
+                <enum name="GL_STACK_OVERFLOW_KHR"/>
+                <enum name="GL_STACK_UNDERFLOW_KHR"/>
+                <command name="glDebugMessageControlKHR"/>
+                <command name="glDebugMessageInsertKHR"/>
+                <command name="glDebugMessageCallbackKHR"/>
+                <command name="glGetDebugMessageLogKHR"/>
+                <command name="glPushDebugGroupKHR"/>
+                <command name="glPopDebugGroupKHR"/>
+                <command name="glObjectLabelKHR"/>
+                <command name="glGetObjectLabelKHR"/>
+                <command name="glObjectPtrLabelKHR"/>
+                <command name="glGetObjectPtrLabelKHR"/>
+                <command name="glGetPointervKHR"/>
+            </require>
+            <require api="gl" comment="Could benefit from api/profile attributes at enum tag level">
+                <enum name="GL_PROGRAM_PIPELINE"/>
+            </require>
+            <require api="gl" profile="compatibility">
+                <enum name="GL_DISPLAY_LIST"/>
+            </require>
+        </extension>
+        <extension name="GL_KHR_texture_compression_astc_hdr" supported="gl|glcore|gles2">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_4x4_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x4_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x8_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x8_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x10_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_12x10_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_12x12_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"/>
+            </require>
+        </extension>
+        <extension name="GL_KHR_texture_compression_astc_ldr" supported="gl|glcore|gles2" comment="API is identical to GL_KHR_texture_compression_astc_hdr extension">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_4x4_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x4_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x8_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x8_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x10_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_12x10_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_12x12_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"/>
+            </require>
+        </extension>
+        <extension name="GL_MESAX_texture_stack" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_1D_STACK_MESAX"/>
+                <enum name="GL_TEXTURE_2D_STACK_MESAX"/>
+                <enum name="GL_PROXY_TEXTURE_1D_STACK_MESAX"/>
+                <enum name="GL_PROXY_TEXTURE_2D_STACK_MESAX"/>
+                <enum name="GL_TEXTURE_1D_STACK_BINDING_MESAX"/>
+                <enum name="GL_TEXTURE_2D_STACK_BINDING_MESAX"/>
+            </require>
+        </extension>
+        <extension name="GL_MESA_pack_invert" supported="gl">
+            <require>
+                <enum name="GL_PACK_INVERT_MESA"/>
+            </require>
+        </extension>
+        <extension name="GL_MESA_resize_buffers" supported="gl">
+            <require>
+                <command name="glResizeBuffersMESA"/>
+            </require>
+        </extension>
+        <extension name="GL_MESA_window_pos" supported="gl">
+            <require>
+                <command name="glWindowPos2dMESA"/>
+                <command name="glWindowPos2dvMESA"/>
+                <command name="glWindowPos2fMESA"/>
+                <command name="glWindowPos2fvMESA"/>
+                <command name="glWindowPos2iMESA"/>
+                <command name="glWindowPos2ivMESA"/>
+                <command name="glWindowPos2sMESA"/>
+                <command name="glWindowPos2svMESA"/>
+                <command name="glWindowPos3dMESA"/>
+                <command name="glWindowPos3dvMESA"/>
+                <command name="glWindowPos3fMESA"/>
+                <command name="glWindowPos3fvMESA"/>
+                <command name="glWindowPos3iMESA"/>
+                <command name="glWindowPos3ivMESA"/>
+                <command name="glWindowPos3sMESA"/>
+                <command name="glWindowPos3svMESA"/>
+                <command name="glWindowPos4dMESA"/>
+                <command name="glWindowPos4dvMESA"/>
+                <command name="glWindowPos4fMESA"/>
+                <command name="glWindowPos4fvMESA"/>
+                <command name="glWindowPos4iMESA"/>
+                <command name="glWindowPos4ivMESA"/>
+                <command name="glWindowPos4sMESA"/>
+                <command name="glWindowPos4svMESA"/>
+            </require>
+        </extension>
+        <extension name="GL_MESA_ycbcr_texture" supported="gl">
+            <require>
+                <enum name="GL_UNSIGNED_SHORT_8_8_MESA"/>
+                <enum name="GL_UNSIGNED_SHORT_8_8_REV_MESA"/>
+                <enum name="GL_YCBCR_MESA"/>
+            </require>
+        </extension>
+        <extension name="GL_NVX_conditional_render" supported="gl">
+            <require>
+                <command name="glBeginConditionalRenderNVX"/>
+                <command name="glEndConditionalRenderNVX"/>
+            </require>
+        </extension>
+        <extension name="GL_NVX_gpu_memory_info" supported="gl">
+            <require>
+                <enum name="GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX"/>
+                <enum name="GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX"/>
+                <enum name="GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX"/>
+                <enum name="GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX"/>
+                <enum name="GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_bindless_multi_draw_indirect" supported="gl">
+            <require>
+                <command name="glMultiDrawArraysIndirectBindlessNV"/>
+                <command name="glMultiDrawElementsIndirectBindlessNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_bindless_texture" supported="gl">
+            <require>
+                <command name="glGetTextureHandleNV"/>
+                <command name="glGetTextureSamplerHandleNV"/>
+                <command name="glMakeTextureHandleResidentNV"/>
+                <command name="glMakeTextureHandleNonResidentNV"/>
+                <command name="glGetImageHandleNV"/>
+                <command name="glMakeImageHandleResidentNV"/>
+                <command name="glMakeImageHandleNonResidentNV"/>
+                <command name="glUniformHandleui64NV"/>
+                <command name="glUniformHandleui64vNV"/>
+                <command name="glProgramUniformHandleui64NV"/>
+                <command name="glProgramUniformHandleui64vNV"/>
+                <command name="glIsTextureHandleResidentNV"/>
+                <command name="glIsImageHandleResidentNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_blend_equation_advanced" supported="gl|gles2">
+            <require>
+                <enum name="GL_BLEND_OVERLAP_NV"/>
+                <enum name="GL_BLEND_PREMULTIPLIED_SRC_NV"/>
+                <enum name="GL_BLUE_NV"/>
+                <enum name="GL_COLORBURN_NV"/>
+                <enum name="GL_COLORDODGE_NV"/>
+                <enum name="GL_CONJOINT_NV"/>
+                <enum name="GL_CONTRAST_NV"/>
+                <enum name="GL_DARKEN_NV"/>
+                <enum name="GL_DIFFERENCE_NV"/>
+                <enum name="GL_DISJOINT_NV"/>
+                <enum name="GL_DST_ATOP_NV"/>
+                <enum name="GL_DST_IN_NV"/>
+                <enum name="GL_DST_NV"/>
+                <enum name="GL_DST_OUT_NV"/>
+                <enum name="GL_DST_OVER_NV"/>
+                <enum name="GL_EXCLUSION_NV"/>
+                <enum name="GL_GREEN_NV"/>
+                <enum name="GL_HARDLIGHT_NV"/>
+                <enum name="GL_HARDMIX_NV"/>
+                <enum name="GL_HSL_COLOR_NV"/>
+                <enum name="GL_HSL_HUE_NV"/>
+                <enum name="GL_HSL_LUMINOSITY_NV"/>
+                <enum name="GL_HSL_SATURATION_NV"/>
+                <enum name="GL_INVERT"/>
+                <enum name="GL_INVERT_OVG_NV"/>
+                <enum name="GL_INVERT_RGB_NV"/>
+                <enum name="GL_LIGHTEN_NV"/>
+                <enum name="GL_LINEARBURN_NV"/>
+                <enum name="GL_LINEARDODGE_NV"/>
+                <enum name="GL_LINEARLIGHT_NV"/>
+                <enum name="GL_MINUS_CLAMPED_NV"/>
+                <enum name="GL_MINUS_NV"/>
+                <enum name="GL_MULTIPLY_NV"/>
+                <enum name="GL_OVERLAY_NV"/>
+                <enum name="GL_PINLIGHT_NV"/>
+                <enum name="GL_PLUS_CLAMPED_ALPHA_NV"/>
+                <enum name="GL_PLUS_CLAMPED_NV"/>
+                <enum name="GL_PLUS_DARKER_NV"/>
+                <enum name="GL_PLUS_NV"/>
+                <enum name="GL_RED_NV"/>
+                <enum name="GL_SCREEN_NV"/>
+                <enum name="GL_SOFTLIGHT_NV"/>
+                <enum name="GL_SRC_ATOP_NV"/>
+                <enum name="GL_SRC_IN_NV"/>
+                <enum name="GL_SRC_NV"/>
+                <enum name="GL_SRC_OUT_NV"/>
+                <enum name="GL_SRC_OVER_NV"/>
+                <enum name="GL_UNCORRELATED_NV"/>
+                <enum name="GL_VIVIDLIGHT_NV"/>
+                <enum name="GL_XOR_NV"/>
+                <enum name="GL_ZERO"/>
+                <command name="glBlendParameteriNV"/>
+                <command name="glBlendBarrierNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_blend_equation_advanced_coherent" supported="gl|gles2">
+            <require comment="Otherwise identical to GL_NV_blend_equation_advanced, just different semantic behavior">
+                <enum name="GL_BLEND_ADVANCED_COHERENT_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_blend_square" supported="gl"/>
+        <extension name="GL_NV_compute_program5" supported="gl">
+            <require>
+                <enum name="GL_COMPUTE_PROGRAM_NV"/>
+                <enum name="GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_conditional_render" supported="gl">
+            <require>
+                <enum name="GL_QUERY_WAIT_NV"/>
+                <enum name="GL_QUERY_NO_WAIT_NV"/>
+                <enum name="GL_QUERY_BY_REGION_WAIT_NV"/>
+                <enum name="GL_QUERY_BY_REGION_NO_WAIT_NV"/>
+                <command name="glBeginConditionalRenderNV"/>
+                <command name="glEndConditionalRenderNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_copy_buffer" supported="gles2">
+            <require>
+                <enum name="GL_COPY_READ_BUFFER_NV"/>
+                <enum name="GL_COPY_WRITE_BUFFER_NV"/>
+                <command name="glCopyBufferSubDataNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_copy_depth_to_color" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_STENCIL_TO_RGBA_NV"/>
+                <enum name="GL_DEPTH_STENCIL_TO_BGRA_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_copy_image" supported="gl">
+            <require>
+                <command name="glCopyImageSubDataNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_coverage_sample" supported="gles2">
+            <require>
+                <enum name="GL_COVERAGE_COMPONENT_NV"/>
+                <enum name="GL_COVERAGE_COMPONENT4_NV"/>
+                <enum name="GL_COVERAGE_ATTACHMENT_NV"/>
+                <enum name="GL_COVERAGE_BUFFERS_NV"/>
+                <enum name="GL_COVERAGE_SAMPLES_NV"/>
+                <enum name="GL_COVERAGE_ALL_FRAGMENTS_NV"/>
+                <enum name="GL_COVERAGE_EDGE_FRAGMENTS_NV"/>
+                <enum name="GL_COVERAGE_AUTOMATIC_NV"/>
+                <enum name="GL_COVERAGE_BUFFER_BIT_NV"/>
+                <command name="glCoverageMaskNV"/>
+                <command name="glCoverageOperationNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_deep_texture3D" supported="gl">
+            <require>
+                <enum name="GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV"/>
+                <enum name="GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_depth_buffer_float" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT32F_NV"/>
+                <enum name="GL_DEPTH32F_STENCIL8_NV"/>
+                <enum name="GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV"/>
+                <enum name="GL_DEPTH_BUFFER_FLOAT_MODE_NV"/>
+                <command name="glDepthRangedNV"/>
+                <command name="glClearDepthdNV"/>
+                <command name="glDepthBoundsdNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_depth_clamp" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_CLAMP_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_depth_nonlinear" supported="gles2">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT16_NONLINEAR_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_draw_buffers" supported="gles2">
+            <require>
+                <enum name="GL_MAX_DRAW_BUFFERS_NV"/>
+                <enum name="GL_DRAW_BUFFER0_NV"/>
+                <enum name="GL_DRAW_BUFFER1_NV"/>
+                <enum name="GL_DRAW_BUFFER2_NV"/>
+                <enum name="GL_DRAW_BUFFER3_NV"/>
+                <enum name="GL_DRAW_BUFFER4_NV"/>
+                <enum name="GL_DRAW_BUFFER5_NV"/>
+                <enum name="GL_DRAW_BUFFER6_NV"/>
+                <enum name="GL_DRAW_BUFFER7_NV"/>
+                <enum name="GL_DRAW_BUFFER8_NV"/>
+                <enum name="GL_DRAW_BUFFER9_NV"/>
+                <enum name="GL_DRAW_BUFFER10_NV"/>
+                <enum name="GL_DRAW_BUFFER11_NV"/>
+                <enum name="GL_DRAW_BUFFER12_NV"/>
+                <enum name="GL_DRAW_BUFFER13_NV"/>
+                <enum name="GL_DRAW_BUFFER14_NV"/>
+                <enum name="GL_DRAW_BUFFER15_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT0_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT1_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT2_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT3_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT4_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT5_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT6_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT7_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT8_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT9_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT10_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT11_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT12_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT13_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT14_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT15_NV"/>
+                <command name="glDrawBuffersNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_draw_instanced" supported="gles2">
+            <require>
+                <command name="glDrawArraysInstancedNV"/>
+                <command name="glDrawElementsInstancedNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_draw_texture" supported="gl">
+            <require>
+                <command name="glDrawTextureNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_evaluators" supported="gl">
+            <require>
+                <enum name="GL_EVAL_2D_NV"/>
+                <enum name="GL_EVAL_TRIANGULAR_2D_NV"/>
+                <enum name="GL_MAP_TESSELLATION_NV"/>
+                <enum name="GL_MAP_ATTRIB_U_ORDER_NV"/>
+                <enum name="GL_MAP_ATTRIB_V_ORDER_NV"/>
+                <enum name="GL_EVAL_FRACTIONAL_TESSELLATION_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB0_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB1_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB2_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB3_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB4_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB5_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB6_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB7_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB8_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB9_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB10_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB11_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB12_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB13_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB14_NV"/>
+                <enum name="GL_EVAL_VERTEX_ATTRIB15_NV"/>
+                <enum name="GL_MAX_MAP_TESSELLATION_NV"/>
+                <enum name="GL_MAX_RATIONAL_EVAL_ORDER_NV"/>
+                <command name="glMapControlPointsNV"/>
+                <command name="glMapParameterivNV"/>
+                <command name="glMapParameterfvNV"/>
+                <command name="glGetMapControlPointsNV"/>
+                <command name="glGetMapParameterivNV"/>
+                <command name="glGetMapParameterfvNV"/>
+                <command name="glGetMapAttribParameterivNV"/>
+                <command name="glGetMapAttribParameterfvNV"/>
+                <command name="glEvalMapsNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_explicit_attrib_location" supported="gles2"/>
+        <extension name="GL_NV_explicit_multisample" supported="gl">
+            <require>
+                <enum name="GL_SAMPLE_POSITION_NV"/>
+                <enum name="GL_SAMPLE_MASK_NV"/>
+                <enum name="GL_SAMPLE_MASK_VALUE_NV"/>
+                <enum name="GL_TEXTURE_BINDING_RENDERBUFFER_NV"/>
+                <enum name="GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV"/>
+                <enum name="GL_TEXTURE_RENDERBUFFER_NV"/>
+                <enum name="GL_SAMPLER_RENDERBUFFER_NV"/>
+                <enum name="GL_INT_SAMPLER_RENDERBUFFER_NV"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV"/>
+                <enum name="GL_MAX_SAMPLE_MASK_WORDS_NV"/>
+                <command name="glGetMultisamplefvNV"/>
+                <command name="glSampleMaskIndexedNV"/>
+                <command name="glTexRenderbufferNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_fbo_color_attachments" supported="gles2">
+            <require>
+                <enum name="GL_MAX_COLOR_ATTACHMENTS_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT0_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT1_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT2_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT3_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT4_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT5_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT6_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT7_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT8_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT9_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT10_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT11_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT12_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT13_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT14_NV"/>
+                <enum name="GL_COLOR_ATTACHMENT15_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_fence" supported="gl|gles1|gles2">
+            <require>
+                <enum name="GL_ALL_COMPLETED_NV"/>
+                <enum name="GL_FENCE_STATUS_NV"/>
+                <enum name="GL_FENCE_CONDITION_NV"/>
+                <command name="glDeleteFencesNV"/>
+                <command name="glGenFencesNV"/>
+                <command name="glIsFenceNV"/>
+                <command name="glTestFenceNV"/>
+                <command name="glGetFenceivNV"/>
+                <command name="glFinishFenceNV"/>
+                <command name="glSetFenceNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_float_buffer" supported="gl">
+            <require>
+                <enum name="GL_FLOAT_R_NV"/>
+                <enum name="GL_FLOAT_RG_NV"/>
+                <enum name="GL_FLOAT_RGB_NV"/>
+                <enum name="GL_FLOAT_RGBA_NV"/>
+                <enum name="GL_FLOAT_R16_NV"/>
+                <enum name="GL_FLOAT_R32_NV"/>
+                <enum name="GL_FLOAT_RG16_NV"/>
+                <enum name="GL_FLOAT_RG32_NV"/>
+                <enum name="GL_FLOAT_RGB16_NV"/>
+                <enum name="GL_FLOAT_RGB32_NV"/>
+                <enum name="GL_FLOAT_RGBA16_NV"/>
+                <enum name="GL_FLOAT_RGBA32_NV"/>
+                <enum name="GL_TEXTURE_FLOAT_COMPONENTS_NV"/>
+                <enum name="GL_FLOAT_CLEAR_COLOR_VALUE_NV"/>
+                <enum name="GL_FLOAT_RGBA_MODE_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_fog_distance" supported="gl">
+            <require>
+                <enum name="GL_FOG_DISTANCE_MODE_NV"/>
+                <enum name="GL_EYE_RADIAL_NV"/>
+                <enum name="GL_EYE_PLANE_ABSOLUTE_NV"/>
+                <enum name="GL_EYE_PLANE"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_fragment_program" supported="gl">
+            <require>
+                <enum name="GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV"/>
+                <enum name="GL_FRAGMENT_PROGRAM_NV"/>
+                <enum name="GL_MAX_TEXTURE_COORDS_NV"/>
+                <enum name="GL_MAX_TEXTURE_IMAGE_UNITS_NV"/>
+                <enum name="GL_FRAGMENT_PROGRAM_BINDING_NV"/>
+                <enum name="GL_PROGRAM_ERROR_STRING_NV"/>
+            </require>
+            <require comment="Some NV_fragment_program entry points are shared with ARB_vertex_program">
+                <command name="glProgramNamedParameter4fNV"/>
+                <command name="glProgramNamedParameter4fvNV"/>
+                <command name="glProgramNamedParameter4dNV"/>
+                <command name="glProgramNamedParameter4dvNV"/>
+                <command name="glGetProgramNamedParameterfvNV"/>
+                <command name="glGetProgramNamedParameterdvNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_fragment_program2" supported="gl">
+            <require>
+                <enum name="GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV"/>
+                <enum name="GL_MAX_PROGRAM_CALL_DEPTH_NV"/>
+                <enum name="GL_MAX_PROGRAM_IF_DEPTH_NV"/>
+                <enum name="GL_MAX_PROGRAM_LOOP_DEPTH_NV"/>
+                <enum name="GL_MAX_PROGRAM_LOOP_COUNT_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_fragment_program4" supported="gl"/>
+        <extension name="GL_NV_fragment_program_option" supported="gl"/>
+        <extension name="GL_NV_framebuffer_blit" supported="gles2">
+            <require>
+                <enum name="GL_READ_FRAMEBUFFER_NV"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_NV"/>
+                <enum name="GL_DRAW_FRAMEBUFFER_BINDING_NV"/>
+                <enum name="GL_READ_FRAMEBUFFER_BINDING_NV"/>
+                <command name="glBlitFramebufferNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_framebuffer_multisample" supported="gles2">
+            <require>
+                <enum name="GL_RENDERBUFFER_SAMPLES_NV"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV"/>
+                <enum name="GL_MAX_SAMPLES_NV"/>
+                <command name="glRenderbufferStorageMultisampleNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_framebuffer_multisample_coverage" supported="gl">
+            <require>
+                <enum name="GL_RENDERBUFFER_COVERAGE_SAMPLES_NV"/>
+                <enum name="GL_RENDERBUFFER_COLOR_SAMPLES_NV"/>
+                <enum name="GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV"/>
+                <enum name="GL_MULTISAMPLE_COVERAGE_MODES_NV"/>
+                <command name="glRenderbufferStorageMultisampleCoverageNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_generate_mipmap_sRGB" supported="gles2"/>
+        <extension name="GL_NV_geometry_program4" supported="gl">
+            <require>
+                <enum name="GL_LINES_ADJACENCY_EXT"/>
+                <enum name="GL_LINE_STRIP_ADJACENCY_EXT"/>
+                <enum name="GL_TRIANGLES_ADJACENCY_EXT"/>
+                <enum name="GL_TRIANGLE_STRIP_ADJACENCY_EXT"/>
+                <enum name="GL_GEOMETRY_PROGRAM_NV"/>
+                <enum name="GL_MAX_PROGRAM_OUTPUT_VERTICES_NV"/>
+                <enum name="GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV"/>
+                <enum name="GL_GEOMETRY_VERTICES_OUT_EXT"/>
+                <enum name="GL_GEOMETRY_INPUT_TYPE_EXT"/>
+                <enum name="GL_GEOMETRY_OUTPUT_TYPE_EXT"/>
+                <enum name="GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT"/>
+                <enum name="GL_PROGRAM_POINT_SIZE_EXT"/>
+                <command name="glProgramVertexLimitNV"/>
+                <command name="glFramebufferTextureEXT"/>
+                <command name="glFramebufferTextureLayerEXT"/>
+                <command name="glFramebufferTextureFaceEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_geometry_shader4" supported="gl"/>
+        <extension name="GL_NV_gpu_program4" supported="gl">
+            <require>
+                <enum name="GL_MIN_PROGRAM_TEXEL_OFFSET_NV"/>
+                <enum name="GL_MAX_PROGRAM_TEXEL_OFFSET_NV"/>
+                <enum name="GL_PROGRAM_ATTRIB_COMPONENTS_NV"/>
+                <enum name="GL_PROGRAM_RESULT_COMPONENTS_NV"/>
+                <enum name="GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV"/>
+                <enum name="GL_MAX_PROGRAM_RESULT_COMPONENTS_NV"/>
+                <enum name="GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV"/>
+                <enum name="GL_MAX_PROGRAM_GENERIC_RESULTS_NV"/>
+                <command name="glProgramLocalParameterI4iNV"/>
+                <command name="glProgramLocalParameterI4ivNV"/>
+                <command name="glProgramLocalParametersI4ivNV"/>
+                <command name="glProgramLocalParameterI4uiNV"/>
+                <command name="glProgramLocalParameterI4uivNV"/>
+                <command name="glProgramLocalParametersI4uivNV"/>
+                <command name="glProgramEnvParameterI4iNV"/>
+                <command name="glProgramEnvParameterI4ivNV"/>
+                <command name="glProgramEnvParametersI4ivNV"/>
+                <command name="glProgramEnvParameterI4uiNV"/>
+                <command name="glProgramEnvParameterI4uivNV"/>
+                <command name="glProgramEnvParametersI4uivNV"/>
+                <command name="glGetProgramLocalParameterIivNV"/>
+                <command name="glGetProgramLocalParameterIuivNV"/>
+                <command name="glGetProgramEnvParameterIivNV"/>
+                <command name="glGetProgramEnvParameterIuivNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_gpu_program5" supported="gl">
+            <require>
+                <enum name="GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV"/>
+                <enum name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV"/>
+                <enum name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV"/>
+                <enum name="GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV"/>
+                <enum name="GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV"/>
+                <enum name="GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV"/>
+                <enum name="GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV"/>
+                <enum name="GL_MAX_PROGRAM_SUBROUTINE_NUM_NV"/>
+                <command name="glProgramSubroutineParametersuivNV"/>
+                <command name="glGetProgramSubroutineParameteruivNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_gpu_program5_mem_extended" supported="gl"/>
+        <extension name="GL_NV_gpu_shader5" supported="gl">
+            <require>
+                <enum name="GL_INT64_NV"/>
+                <enum name="GL_UNSIGNED_INT64_NV"/>
+                <enum name="GL_INT8_NV"/>
+                <enum name="GL_INT8_VEC2_NV"/>
+                <enum name="GL_INT8_VEC3_NV"/>
+                <enum name="GL_INT8_VEC4_NV"/>
+                <enum name="GL_INT16_NV"/>
+                <enum name="GL_INT16_VEC2_NV"/>
+                <enum name="GL_INT16_VEC3_NV"/>
+                <enum name="GL_INT16_VEC4_NV"/>
+                <enum name="GL_INT64_VEC2_NV"/>
+                <enum name="GL_INT64_VEC3_NV"/>
+                <enum name="GL_INT64_VEC4_NV"/>
+                <enum name="GL_UNSIGNED_INT8_NV"/>
+                <enum name="GL_UNSIGNED_INT8_VEC2_NV"/>
+                <enum name="GL_UNSIGNED_INT8_VEC3_NV"/>
+                <enum name="GL_UNSIGNED_INT8_VEC4_NV"/>
+                <enum name="GL_UNSIGNED_INT16_NV"/>
+                <enum name="GL_UNSIGNED_INT16_VEC2_NV"/>
+                <enum name="GL_UNSIGNED_INT16_VEC3_NV"/>
+                <enum name="GL_UNSIGNED_INT16_VEC4_NV"/>
+                <enum name="GL_UNSIGNED_INT64_VEC2_NV"/>
+                <enum name="GL_UNSIGNED_INT64_VEC3_NV"/>
+                <enum name="GL_UNSIGNED_INT64_VEC4_NV"/>
+                <enum name="GL_FLOAT16_NV"/>
+                <enum name="GL_FLOAT16_VEC2_NV"/>
+                <enum name="GL_FLOAT16_VEC3_NV"/>
+                <enum name="GL_FLOAT16_VEC4_NV"/>
+                <enum name="GL_PATCHES"/>
+                <command name="glUniform1i64NV"/>
+                <command name="glUniform2i64NV"/>
+                <command name="glUniform3i64NV"/>
+                <command name="glUniform4i64NV"/>
+                <command name="glUniform1i64vNV"/>
+                <command name="glUniform2i64vNV"/>
+                <command name="glUniform3i64vNV"/>
+                <command name="glUniform4i64vNV"/>
+                <command name="glUniform1ui64NV"/>
+                <command name="glUniform2ui64NV"/>
+                <command name="glUniform3ui64NV"/>
+                <command name="glUniform4ui64NV"/>
+                <command name="glUniform1ui64vNV"/>
+                <command name="glUniform2ui64vNV"/>
+                <command name="glUniform3ui64vNV"/>
+                <command name="glUniform4ui64vNV"/>
+                <command name="glGetUniformi64vNV"/>
+            </require>
+            <require comment="Supported only if GL_EXT_direct_state_access is supported">
+                <command name="glProgramUniform1i64NV"/>
+                <command name="glProgramUniform2i64NV"/>
+                <command name="glProgramUniform3i64NV"/>
+                <command name="glProgramUniform4i64NV"/>
+                <command name="glProgramUniform1i64vNV"/>
+                <command name="glProgramUniform2i64vNV"/>
+                <command name="glProgramUniform3i64vNV"/>
+                <command name="glProgramUniform4i64vNV"/>
+                <command name="glProgramUniform1ui64NV"/>
+                <command name="glProgramUniform2ui64NV"/>
+                <command name="glProgramUniform3ui64NV"/>
+                <command name="glProgramUniform4ui64NV"/>
+                <command name="glProgramUniform1ui64vNV"/>
+                <command name="glProgramUniform2ui64vNV"/>
+                <command name="glProgramUniform3ui64vNV"/>
+                <command name="glProgramUniform4ui64vNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_half_float" supported="gl">
+            <require>
+                <enum name="GL_HALF_FLOAT_NV"/>
+                <command name="glVertex2hNV"/>
+                <command name="glVertex2hvNV"/>
+                <command name="glVertex3hNV"/>
+                <command name="glVertex3hvNV"/>
+                <command name="glVertex4hNV"/>
+                <command name="glVertex4hvNV"/>
+                <command name="glNormal3hNV"/>
+                <command name="glNormal3hvNV"/>
+                <command name="glColor3hNV"/>
+                <command name="glColor3hvNV"/>
+                <command name="glColor4hNV"/>
+                <command name="glColor4hvNV"/>
+                <command name="glTexCoord1hNV"/>
+                <command name="glTexCoord1hvNV"/>
+                <command name="glTexCoord2hNV"/>
+                <command name="glTexCoord2hvNV"/>
+                <command name="glTexCoord3hNV"/>
+                <command name="glTexCoord3hvNV"/>
+                <command name="glTexCoord4hNV"/>
+                <command name="glTexCoord4hvNV"/>
+                <command name="glMultiTexCoord1hNV"/>
+                <command name="glMultiTexCoord1hvNV"/>
+                <command name="glMultiTexCoord2hNV"/>
+                <command name="glMultiTexCoord2hvNV"/>
+                <command name="glMultiTexCoord3hNV"/>
+                <command name="glMultiTexCoord3hvNV"/>
+                <command name="glMultiTexCoord4hNV"/>
+                <command name="glMultiTexCoord4hvNV"/>
+                <command name="glFogCoordhNV"/>
+                <command name="glFogCoordhvNV"/>
+                <command name="glSecondaryColor3hNV"/>
+                <command name="glSecondaryColor3hvNV"/>
+                <command name="glVertexWeighthNV"/>
+                <command name="glVertexWeighthvNV"/>
+                <command name="glVertexAttrib1hNV"/>
+                <command name="glVertexAttrib1hvNV"/>
+                <command name="glVertexAttrib2hNV"/>
+                <command name="glVertexAttrib2hvNV"/>
+                <command name="glVertexAttrib3hNV"/>
+                <command name="glVertexAttrib3hvNV"/>
+                <command name="glVertexAttrib4hNV"/>
+                <command name="glVertexAttrib4hvNV"/>
+                <command name="glVertexAttribs1hvNV"/>
+                <command name="glVertexAttribs2hvNV"/>
+                <command name="glVertexAttribs3hvNV"/>
+                <command name="glVertexAttribs4hvNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_instanced_arrays" supported="gles2">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV"/>
+                <command name="glVertexAttribDivisorNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_light_max_exponent" supported="gl">
+            <require>
+                <enum name="GL_MAX_SHININESS_NV"/>
+                <enum name="GL_MAX_SPOT_EXPONENT_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_multisample_coverage" supported="gl">
+            <require>
+                <enum name="GL_SAMPLES_ARB"/>
+                <enum name="GL_COLOR_SAMPLES_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_multisample_filter_hint" supported="gl">
+            <require>
+                <enum name="GL_MULTISAMPLE_FILTER_HINT_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_non_square_matrices" supported="gles2">
+            <require>
+                <enum name="GL_FLOAT_MAT2x3_NV"/>
+                <enum name="GL_FLOAT_MAT2x4_NV"/>
+                <enum name="GL_FLOAT_MAT3x2_NV"/>
+                <enum name="GL_FLOAT_MAT3x4_NV"/>
+                <enum name="GL_FLOAT_MAT4x2_NV"/>
+                <enum name="GL_FLOAT_MAT4x3_NV"/>
+                <command name="glUniformMatrix2x3fvNV"/>
+                <command name="glUniformMatrix3x2fvNV"/>
+                <command name="glUniformMatrix2x4fvNV"/>
+                <command name="glUniformMatrix4x2fvNV"/>
+                <command name="glUniformMatrix3x4fvNV"/>
+                <command name="glUniformMatrix4x3fvNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_occlusion_query" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_COUNTER_BITS_NV"/>
+                <enum name="GL_CURRENT_OCCLUSION_QUERY_ID_NV"/>
+                <enum name="GL_PIXEL_COUNT_NV"/>
+                <enum name="GL_PIXEL_COUNT_AVAILABLE_NV"/>
+                <command name="glGenOcclusionQueriesNV"/>
+                <command name="glDeleteOcclusionQueriesNV"/>
+                <command name="glIsOcclusionQueryNV"/>
+                <command name="glBeginOcclusionQueryNV"/>
+                <command name="glEndOcclusionQueryNV"/>
+                <command name="glGetOcclusionQueryivNV"/>
+                <command name="glGetOcclusionQueryuivNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_packed_depth_stencil" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_STENCIL_NV"/>
+                <enum name="GL_UNSIGNED_INT_24_8_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_parameter_buffer_object" supported="gl">
+            <require>
+                <enum name="GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV"/>
+                <enum name="GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV"/>
+                <enum name="GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV"/>
+                <enum name="GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV"/>
+                <enum name="GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV"/>
+                <command name="glProgramBufferParametersfvNV"/>
+                <command name="glProgramBufferParametersIivNV"/>
+                <command name="glProgramBufferParametersIuivNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_parameter_buffer_object2" supported="gl"/>
+        <extension name="GL_NV_path_rendering" supported="gl">
+            <require>
+                <enum name="GL_PATH_FORMAT_SVG_NV"/>
+                <enum name="GL_PATH_FORMAT_PS_NV"/>
+                <enum name="GL_STANDARD_FONT_NAME_NV"/>
+                <enum name="GL_SYSTEM_FONT_NAME_NV"/>
+                <enum name="GL_FILE_NAME_NV"/>
+                <enum name="GL_PATH_STROKE_WIDTH_NV"/>
+                <enum name="GL_PATH_END_CAPS_NV"/>
+                <enum name="GL_PATH_INITIAL_END_CAP_NV"/>
+                <enum name="GL_PATH_TERMINAL_END_CAP_NV"/>
+                <enum name="GL_PATH_JOIN_STYLE_NV"/>
+                <enum name="GL_PATH_MITER_LIMIT_NV"/>
+                <enum name="GL_PATH_DASH_CAPS_NV"/>
+                <enum name="GL_PATH_INITIAL_DASH_CAP_NV"/>
+                <enum name="GL_PATH_TERMINAL_DASH_CAP_NV"/>
+                <enum name="GL_PATH_DASH_OFFSET_NV"/>
+                <enum name="GL_PATH_CLIENT_LENGTH_NV"/>
+                <enum name="GL_PATH_FILL_MODE_NV"/>
+                <enum name="GL_PATH_FILL_MASK_NV"/>
+                <enum name="GL_PATH_FILL_COVER_MODE_NV"/>
+                <enum name="GL_PATH_STROKE_COVER_MODE_NV"/>
+                <enum name="GL_PATH_STROKE_MASK_NV"/>
+                <enum name="GL_COUNT_UP_NV"/>
+                <enum name="GL_COUNT_DOWN_NV"/>
+                <enum name="GL_PATH_OBJECT_BOUNDING_BOX_NV"/>
+                <enum name="GL_CONVEX_HULL_NV"/>
+                <enum name="GL_BOUNDING_BOX_NV"/>
+                <enum name="GL_TRANSLATE_X_NV"/>
+                <enum name="GL_TRANSLATE_Y_NV"/>
+                <enum name="GL_TRANSLATE_2D_NV"/>
+                <enum name="GL_TRANSLATE_3D_NV"/>
+                <enum name="GL_AFFINE_2D_NV"/>
+                <enum name="GL_AFFINE_3D_NV"/>
+                <enum name="GL_TRANSPOSE_AFFINE_2D_NV"/>
+                <enum name="GL_TRANSPOSE_AFFINE_3D_NV"/>
+                <enum name="GL_UTF8_NV"/>
+                <enum name="GL_UTF16_NV"/>
+                <enum name="GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV"/>
+                <enum name="GL_PATH_COMMAND_COUNT_NV"/>
+                <enum name="GL_PATH_COORD_COUNT_NV"/>
+                <enum name="GL_PATH_DASH_ARRAY_COUNT_NV"/>
+                <enum name="GL_PATH_COMPUTED_LENGTH_NV"/>
+                <enum name="GL_PATH_FILL_BOUNDING_BOX_NV"/>
+                <enum name="GL_PATH_STROKE_BOUNDING_BOX_NV"/>
+                <enum name="GL_SQUARE_NV"/>
+                <enum name="GL_ROUND_NV"/>
+                <enum name="GL_TRIANGULAR_NV"/>
+                <enum name="GL_BEVEL_NV"/>
+                <enum name="GL_MITER_REVERT_NV"/>
+                <enum name="GL_MITER_TRUNCATE_NV"/>
+                <enum name="GL_SKIP_MISSING_GLYPH_NV"/>
+                <enum name="GL_USE_MISSING_GLYPH_NV"/>
+                <enum name="GL_PATH_ERROR_POSITION_NV"/>
+                <enum name="GL_PATH_FOG_GEN_MODE_NV"/>
+                <enum name="GL_ACCUM_ADJACENT_PAIRS_NV"/>
+                <enum name="GL_ADJACENT_PAIRS_NV"/>
+                <enum name="GL_FIRST_TO_REST_NV"/>
+                <enum name="GL_PATH_GEN_MODE_NV"/>
+                <enum name="GL_PATH_GEN_COEFF_NV"/>
+                <enum name="GL_PATH_GEN_COLOR_FORMAT_NV"/>
+                <enum name="GL_PATH_GEN_COMPONENTS_NV"/>
+                <enum name="GL_PATH_STENCIL_FUNC_NV"/>
+                <enum name="GL_PATH_STENCIL_REF_NV"/>
+                <enum name="GL_PATH_STENCIL_VALUE_MASK_NV"/>
+                <enum name="GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV"/>
+                <enum name="GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV"/>
+                <enum name="GL_PATH_COVER_DEPTH_FUNC_NV"/>
+                <enum name="GL_PATH_DASH_OFFSET_RESET_NV"/>
+                <enum name="GL_MOVE_TO_RESETS_NV"/>
+                <enum name="GL_MOVE_TO_CONTINUES_NV"/>
+                <enum name="GL_CLOSE_PATH_NV"/>
+                <enum name="GL_MOVE_TO_NV"/>
+                <enum name="GL_RELATIVE_MOVE_TO_NV"/>
+                <enum name="GL_LINE_TO_NV"/>
+                <enum name="GL_RELATIVE_LINE_TO_NV"/>
+                <enum name="GL_HORIZONTAL_LINE_TO_NV"/>
+                <enum name="GL_RELATIVE_HORIZONTAL_LINE_TO_NV"/>
+                <enum name="GL_VERTICAL_LINE_TO_NV"/>
+                <enum name="GL_RELATIVE_VERTICAL_LINE_TO_NV"/>
+                <enum name="GL_QUADRATIC_CURVE_TO_NV"/>
+                <enum name="GL_RELATIVE_QUADRATIC_CURVE_TO_NV"/>
+                <enum name="GL_CUBIC_CURVE_TO_NV"/>
+                <enum name="GL_RELATIVE_CUBIC_CURVE_TO_NV"/>
+                <enum name="GL_SMOOTH_QUADRATIC_CURVE_TO_NV"/>
+                <enum name="GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV"/>
+                <enum name="GL_SMOOTH_CUBIC_CURVE_TO_NV"/>
+                <enum name="GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV"/>
+                <enum name="GL_SMALL_CCW_ARC_TO_NV"/>
+                <enum name="GL_RELATIVE_SMALL_CCW_ARC_TO_NV"/>
+                <enum name="GL_SMALL_CW_ARC_TO_NV"/>
+                <enum name="GL_RELATIVE_SMALL_CW_ARC_TO_NV"/>
+                <enum name="GL_LARGE_CCW_ARC_TO_NV"/>
+                <enum name="GL_RELATIVE_LARGE_CCW_ARC_TO_NV"/>
+                <enum name="GL_LARGE_CW_ARC_TO_NV"/>
+                <enum name="GL_RELATIVE_LARGE_CW_ARC_TO_NV"/>
+                <enum name="GL_RESTART_PATH_NV"/>
+                <enum name="GL_DUP_FIRST_CUBIC_CURVE_TO_NV"/>
+                <enum name="GL_DUP_LAST_CUBIC_CURVE_TO_NV"/>
+                <enum name="GL_RECT_NV"/>
+                <enum name="GL_CIRCULAR_CCW_ARC_TO_NV"/>
+                <enum name="GL_CIRCULAR_CW_ARC_TO_NV"/>
+                <enum name="GL_CIRCULAR_TANGENT_ARC_TO_NV"/>
+                <enum name="GL_ARC_TO_NV"/>
+                <enum name="GL_RELATIVE_ARC_TO_NV"/>
+                <enum name="GL_BOLD_BIT_NV"/>
+                <enum name="GL_ITALIC_BIT_NV"/>
+                <enum name="GL_GLYPH_WIDTH_BIT_NV"/>
+                <enum name="GL_GLYPH_HEIGHT_BIT_NV"/>
+                <enum name="GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV"/>
+                <enum name="GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV"/>
+                <enum name="GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV"/>
+                <enum name="GL_GLYPH_VERTICAL_BEARING_X_BIT_NV"/>
+                <enum name="GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV"/>
+                <enum name="GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV"/>
+                <enum name="GL_GLYPH_HAS_KERNING_BIT_NV"/>
+                <enum name="GL_FONT_X_MIN_BOUNDS_BIT_NV"/>
+                <enum name="GL_FONT_Y_MIN_BOUNDS_BIT_NV"/>
+                <enum name="GL_FONT_X_MAX_BOUNDS_BIT_NV"/>
+                <enum name="GL_FONT_Y_MAX_BOUNDS_BIT_NV"/>
+                <enum name="GL_FONT_UNITS_PER_EM_BIT_NV"/>
+                <enum name="GL_FONT_ASCENDER_BIT_NV"/>
+                <enum name="GL_FONT_DESCENDER_BIT_NV"/>
+                <enum name="GL_FONT_HEIGHT_BIT_NV"/>
+                <enum name="GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV"/>
+                <enum name="GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV"/>
+                <enum name="GL_FONT_UNDERLINE_POSITION_BIT_NV"/>
+                <enum name="GL_FONT_UNDERLINE_THICKNESS_BIT_NV"/>
+                <enum name="GL_FONT_HAS_KERNING_BIT_NV"/>
+                <enum name="GL_PRIMARY_COLOR"/>
+                <enum name="GL_PRIMARY_COLOR_NV"/>
+                <enum name="GL_SECONDARY_COLOR_NV"/>
+                <command name="glGenPathsNV"/>
+                <command name="glDeletePathsNV"/>
+                <command name="glIsPathNV"/>
+                <command name="glPathCommandsNV"/>
+                <command name="glPathCoordsNV"/>
+                <command name="glPathSubCommandsNV"/>
+                <command name="glPathSubCoordsNV"/>
+                <command name="glPathStringNV"/>
+                <command name="glPathGlyphsNV"/>
+                <command name="glPathGlyphRangeNV"/>
+                <command name="glWeightPathsNV"/>
+                <command name="glCopyPathNV"/>
+                <command name="glInterpolatePathsNV"/>
+                <command name="glTransformPathNV"/>
+                <command name="glPathParameterivNV"/>
+                <command name="glPathParameteriNV"/>
+                <command name="glPathParameterfvNV"/>
+                <command name="glPathParameterfNV"/>
+                <command name="glPathDashArrayNV"/>
+                <command name="glPathStencilFuncNV"/>
+                <command name="glPathStencilDepthOffsetNV"/>
+                <command name="glStencilFillPathNV"/>
+                <command name="glStencilStrokePathNV"/>
+                <command name="glStencilFillPathInstancedNV"/>
+                <command name="glStencilStrokePathInstancedNV"/>
+                <command name="glPathCoverDepthFuncNV"/>
+                <command name="glPathColorGenNV"/>
+                <command name="glPathTexGenNV"/>
+                <command name="glPathFogGenNV"/>
+                <command name="glCoverFillPathNV"/>
+                <command name="glCoverStrokePathNV"/>
+                <command name="glCoverFillPathInstancedNV"/>
+                <command name="glCoverStrokePathInstancedNV"/>
+                <command name="glGetPathParameterivNV"/>
+                <command name="glGetPathParameterfvNV"/>
+                <command name="glGetPathCommandsNV"/>
+                <command name="glGetPathCoordsNV"/>
+                <command name="glGetPathDashArrayNV"/>
+                <command name="glGetPathMetricsNV"/>
+                <command name="glGetPathMetricRangeNV"/>
+                <command name="glGetPathSpacingNV"/>
+                <command name="glGetPathColorGenivNV"/>
+                <command name="glGetPathColorGenfvNV"/>
+                <command name="glGetPathTexGenivNV"/>
+                <command name="glGetPathTexGenfvNV"/>
+                <command name="glIsPointInFillPathNV"/>
+                <command name="glIsPointInStrokePathNV"/>
+                <command name="glGetPathLengthNV"/>
+                <command name="glPointAlongPathNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_pixel_data_range" supported="gl">
+            <require>
+                <enum name="GL_WRITE_PIXEL_DATA_RANGE_NV"/>
+                <enum name="GL_READ_PIXEL_DATA_RANGE_NV"/>
+                <enum name="GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV"/>
+                <enum name="GL_READ_PIXEL_DATA_RANGE_LENGTH_NV"/>
+                <enum name="GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV"/>
+                <enum name="GL_READ_PIXEL_DATA_RANGE_POINTER_NV"/>
+                <command name="glPixelDataRangeNV"/>
+                <command name="glFlushPixelDataRangeNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_point_sprite" supported="gl">
+            <require>
+                <enum name="GL_POINT_SPRITE_NV"/>
+                <enum name="GL_COORD_REPLACE_NV"/>
+                <enum name="GL_POINT_SPRITE_R_MODE_NV"/>
+                <command name="glPointParameteriNV"/>
+                <command name="glPointParameterivNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_present_video" supported="gl">
+            <require>
+                <enum name="GL_FRAME_NV"/>
+                <enum name="GL_FIELDS_NV"/>
+                <enum name="GL_CURRENT_TIME_NV"/>
+                <enum name="GL_NUM_FILL_STREAMS_NV"/>
+                <enum name="GL_PRESENT_TIME_NV"/>
+                <enum name="GL_PRESENT_DURATION_NV"/>
+                <command name="glPresentFrameKeyedNV"/>
+                <command name="glPresentFrameDualFillNV"/>
+                <command name="glGetVideoivNV"/>
+                <command name="glGetVideouivNV"/>
+                <command name="glGetVideoi64vNV"/>
+                <command name="glGetVideoui64vNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_primitive_restart" supported="gl">
+            <require>
+                <enum name="GL_PRIMITIVE_RESTART_NV"/>
+                <enum name="GL_PRIMITIVE_RESTART_INDEX_NV"/>
+                <command name="glPrimitiveRestartNV"/>
+                <command name="glPrimitiveRestartIndexNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_read_buffer" supported="gles2">
+            <require>
+                <enum name="GL_READ_BUFFER_NV"/>
+                <command name="glReadBufferNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_read_buffer_front" supported="gles2"/>
+        <extension name="GL_NV_read_depth" supported="gles2"/>
+        <extension name="GL_NV_read_depth_stencil" supported="gles2"/>
+        <extension name="GL_NV_read_stencil" supported="gles2"/>
+        <extension name="GL_NV_register_combiners" supported="gl">
+            <require>
+                <enum name="GL_REGISTER_COMBINERS_NV"/>
+                <enum name="GL_VARIABLE_A_NV"/>
+                <enum name="GL_VARIABLE_B_NV"/>
+                <enum name="GL_VARIABLE_C_NV"/>
+                <enum name="GL_VARIABLE_D_NV"/>
+                <enum name="GL_VARIABLE_E_NV"/>
+                <enum name="GL_VARIABLE_F_NV"/>
+                <enum name="GL_VARIABLE_G_NV"/>
+                <enum name="GL_CONSTANT_COLOR0_NV"/>
+                <enum name="GL_CONSTANT_COLOR1_NV"/>
+                <enum name="GL_PRIMARY_COLOR_NV"/>
+                <enum name="GL_SECONDARY_COLOR_NV"/>
+                <enum name="GL_SPARE0_NV"/>
+                <enum name="GL_SPARE1_NV"/>
+                <enum name="GL_DISCARD_NV"/>
+                <enum name="GL_E_TIMES_F_NV"/>
+                <enum name="GL_SPARE0_PLUS_SECONDARY_COLOR_NV"/>
+                <enum name="GL_UNSIGNED_IDENTITY_NV"/>
+                <enum name="GL_UNSIGNED_INVERT_NV"/>
+                <enum name="GL_EXPAND_NORMAL_NV"/>
+                <enum name="GL_EXPAND_NEGATE_NV"/>
+                <enum name="GL_HALF_BIAS_NORMAL_NV"/>
+                <enum name="GL_HALF_BIAS_NEGATE_NV"/>
+                <enum name="GL_SIGNED_IDENTITY_NV"/>
+                <enum name="GL_SIGNED_NEGATE_NV"/>
+                <enum name="GL_SCALE_BY_TWO_NV"/>
+                <enum name="GL_SCALE_BY_FOUR_NV"/>
+                <enum name="GL_SCALE_BY_ONE_HALF_NV"/>
+                <enum name="GL_BIAS_BY_NEGATIVE_ONE_HALF_NV"/>
+                <enum name="GL_COMBINER_INPUT_NV"/>
+                <enum name="GL_COMBINER_MAPPING_NV"/>
+                <enum name="GL_COMBINER_COMPONENT_USAGE_NV"/>
+                <enum name="GL_COMBINER_AB_DOT_PRODUCT_NV"/>
+                <enum name="GL_COMBINER_CD_DOT_PRODUCT_NV"/>
+                <enum name="GL_COMBINER_MUX_SUM_NV"/>
+                <enum name="GL_COMBINER_SCALE_NV"/>
+                <enum name="GL_COMBINER_BIAS_NV"/>
+                <enum name="GL_COMBINER_AB_OUTPUT_NV"/>
+                <enum name="GL_COMBINER_CD_OUTPUT_NV"/>
+                <enum name="GL_COMBINER_SUM_OUTPUT_NV"/>
+                <enum name="GL_MAX_GENERAL_COMBINERS_NV"/>
+                <enum name="GL_NUM_GENERAL_COMBINERS_NV"/>
+                <enum name="GL_COLOR_SUM_CLAMP_NV"/>
+                <enum name="GL_COMBINER0_NV"/>
+                <enum name="GL_COMBINER1_NV"/>
+                <enum name="GL_COMBINER2_NV"/>
+                <enum name="GL_COMBINER3_NV"/>
+                <enum name="GL_COMBINER4_NV"/>
+                <enum name="GL_COMBINER5_NV"/>
+                <enum name="GL_COMBINER6_NV"/>
+                <enum name="GL_COMBINER7_NV"/>
+                <enum name="GL_TEXTURE0_ARB"/>
+                <enum name="GL_TEXTURE1_ARB"/>
+                <enum name="GL_ZERO"/>
+                <enum name="GL_NONE"/>
+                <enum name="GL_FOG"/>
+                <command name="glCombinerParameterfvNV"/>
+                <command name="glCombinerParameterfNV"/>
+                <command name="glCombinerParameterivNV"/>
+                <command name="glCombinerParameteriNV"/>
+                <command name="glCombinerInputNV"/>
+                <command name="glCombinerOutputNV"/>
+                <command name="glFinalCombinerInputNV"/>
+                <command name="glGetCombinerInputParameterfvNV"/>
+                <command name="glGetCombinerInputParameterivNV"/>
+                <command name="glGetCombinerOutputParameterfvNV"/>
+                <command name="glGetCombinerOutputParameterivNV"/>
+                <command name="glGetFinalCombinerInputParameterfvNV"/>
+                <command name="glGetFinalCombinerInputParameterivNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_register_combiners2" supported="gl">
+            <require>
+                <enum name="GL_PER_STAGE_CONSTANTS_NV"/>
+                <command name="glCombinerStageParameterfvNV"/>
+                <command name="glGetCombinerStageParameterfvNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_sRGB_formats" supported="gles2">
+            <require>
+                <enum name="GL_SLUMINANCE_NV"/>
+                <enum name="GL_SLUMINANCE_ALPHA_NV"/>
+                <enum name="GL_SRGB8_NV"/>
+                <enum name="GL_SLUMINANCE8_NV"/>
+                <enum name="GL_SLUMINANCE8_ALPHA8_NV"/>
+                <enum name="GL_COMPRESSED_SRGB_S3TC_DXT1_NV"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV"/>
+                <enum name="GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV"/>
+                <enum name="GL_ETC1_SRGB8_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_shader_atomic_counters" supported="gl"/>
+        <extension name="GL_NV_shader_atomic_float" supported="gl"/>
+        <extension name="GL_NV_shader_buffer_load" supported="gl">
+            <require>
+                <enum name="GL_BUFFER_GPU_ADDRESS_NV"/>
+                <enum name="GL_GPU_ADDRESS_NV"/>
+                <enum name="GL_MAX_SHADER_BUFFER_ADDRESS_NV"/>
+                <command name="glMakeBufferResidentNV"/>
+                <command name="glMakeBufferNonResidentNV"/>
+                <command name="glIsBufferResidentNV"/>
+                <command name="glMakeNamedBufferResidentNV"/>
+                <command name="glMakeNamedBufferNonResidentNV"/>
+                <command name="glIsNamedBufferResidentNV"/>
+                <command name="glGetBufferParameterui64vNV"/>
+                <command name="glGetNamedBufferParameterui64vNV"/>
+                <command name="glGetIntegerui64vNV"/>
+                <command name="glUniformui64NV"/>
+                <command name="glUniformui64vNV"/>
+                <command name="glGetUniformui64vNV"/>
+                <command name="glProgramUniformui64NV"/>
+                <command name="glProgramUniformui64vNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_shader_buffer_store" supported="gl">
+            <require>
+                <enum name="GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV"/>
+                <enum name="GL_READ_WRITE"/>
+                <enum name="GL_WRITE_ONLY"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_shader_storage_buffer_object" supported="gl"/>
+        <extension name="GL_NV_shader_thread_group" supported="gl">
+            <require>
+                <enum name="GL_WARP_SIZE_NV"/>
+                <enum name="GL_WARPS_PER_SM_NV"/>
+                <enum name="GL_SM_COUNT_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_shader_thread_shuffle" supported="gl"/>
+        <extension name="GL_EXT_shader_image_load_formatted" supported="gl"/>
+        <extension name="GL_NV_shadow_samplers_array" supported="gles2">
+            <require>
+                <enum name="GL_SAMPLER_2D_ARRAY_SHADOW_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_shadow_samplers_cube" supported="gles2">
+            <require>
+                <enum name="GL_SAMPLER_CUBE_SHADOW_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_tessellation_program5" supported="gl">
+            <require>
+                <enum name="GL_MAX_PROGRAM_PATCH_ATTRIBS_NV"/>
+                <enum name="GL_TESS_CONTROL_PROGRAM_NV"/>
+                <enum name="GL_TESS_EVALUATION_PROGRAM_NV"/>
+                <enum name="GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV"/>
+                <enum name="GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texgen_emboss" supported="gl">
+            <require>
+                <enum name="GL_EMBOSS_LIGHT_NV"/>
+                <enum name="GL_EMBOSS_CONSTANT_NV"/>
+                <enum name="GL_EMBOSS_MAP_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texgen_reflection" supported="gl">
+            <require>
+                <enum name="GL_NORMAL_MAP_NV"/>
+                <enum name="GL_REFLECTION_MAP_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_barrier" supported="gl">
+            <require>
+                <command name="glTextureBarrierNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_border_clamp" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_BORDER_COLOR_NV"/>
+                <enum name="GL_CLAMP_TO_BORDER_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_compression_s3tc_update" supported="gles2"/>
+        <extension name="GL_NV_texture_compression_vtc" supported="gl"/>
+        <extension name="GL_NV_texture_env_combine4" supported="gl">
+            <require>
+                <enum name="GL_COMBINE4_NV"/>
+                <enum name="GL_SOURCE3_RGB_NV"/>
+                <enum name="GL_SOURCE3_ALPHA_NV"/>
+                <enum name="GL_OPERAND3_RGB_NV"/>
+                <enum name="GL_OPERAND3_ALPHA_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_expand_normal" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_UNSIGNED_REMAP_MODE_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_multisample" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_COVERAGE_SAMPLES_NV"/>
+                <enum name="GL_TEXTURE_COLOR_SAMPLES_NV"/>
+                <command name="glTexImage2DMultisampleCoverageNV"/>
+                <command name="glTexImage3DMultisampleCoverageNV"/>
+            </require>
+            <require comment="Supported only if GL_EXT_direct_state_access is supported">
+                <command name="glTextureImage2DMultisampleNV"/>
+                <command name="glTextureImage3DMultisampleNV"/>
+                <command name="glTextureImage2DMultisampleCoverageNV"/>
+                <command name="glTextureImage3DMultisampleCoverageNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_npot_2D_mipmap" supported="gles2"/>
+        <extension name="GL_NV_texture_rectangle" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_TEXTURE_BINDING_RECTANGLE_NV"/>
+                <enum name="GL_PROXY_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_MAX_RECTANGLE_TEXTURE_SIZE_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_shader" supported="gl">
+            <require>
+                <enum name="GL_OFFSET_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV"/>
+                <enum name="GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV"/>
+                <enum name="GL_UNSIGNED_INT_S8_S8_8_8_NV"/>
+                <enum name="GL_UNSIGNED_INT_8_8_S8_S8_REV_NV"/>
+                <enum name="GL_DSDT_MAG_INTENSITY_NV"/>
+                <enum name="GL_SHADER_CONSISTENT_NV"/>
+                <enum name="GL_TEXTURE_SHADER_NV"/>
+                <enum name="GL_SHADER_OPERATION_NV"/>
+                <enum name="GL_CULL_MODES_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_MATRIX_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_SCALE_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_BIAS_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_2D_MATRIX_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_2D_SCALE_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_2D_BIAS_NV"/>
+                <enum name="GL_PREVIOUS_TEXTURE_INPUT_NV"/>
+                <enum name="GL_CONST_EYE_NV"/>
+                <enum name="GL_PASS_THROUGH_NV"/>
+                <enum name="GL_CULL_FRAGMENT_NV"/>
+                <enum name="GL_OFFSET_TEXTURE_2D_NV"/>
+                <enum name="GL_DEPENDENT_AR_TEXTURE_2D_NV"/>
+                <enum name="GL_DEPENDENT_GB_TEXTURE_2D_NV"/>
+                <enum name="GL_DOT_PRODUCT_NV"/>
+                <enum name="GL_DOT_PRODUCT_DEPTH_REPLACE_NV"/>
+                <enum name="GL_DOT_PRODUCT_TEXTURE_2D_NV"/>
+                <enum name="GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV"/>
+                <enum name="GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV"/>
+                <enum name="GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV"/>
+                <enum name="GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV"/>
+                <enum name="GL_HILO_NV"/>
+                <enum name="GL_DSDT_NV"/>
+                <enum name="GL_DSDT_MAG_NV"/>
+                <enum name="GL_DSDT_MAG_VIB_NV"/>
+                <enum name="GL_HILO16_NV"/>
+                <enum name="GL_SIGNED_HILO_NV"/>
+                <enum name="GL_SIGNED_HILO16_NV"/>
+                <enum name="GL_SIGNED_RGBA_NV"/>
+                <enum name="GL_SIGNED_RGBA8_NV"/>
+                <enum name="GL_SIGNED_RGB_NV"/>
+                <enum name="GL_SIGNED_RGB8_NV"/>
+                <enum name="GL_SIGNED_LUMINANCE_NV"/>
+                <enum name="GL_SIGNED_LUMINANCE8_NV"/>
+                <enum name="GL_SIGNED_LUMINANCE_ALPHA_NV"/>
+                <enum name="GL_SIGNED_LUMINANCE8_ALPHA8_NV"/>
+                <enum name="GL_SIGNED_ALPHA_NV"/>
+                <enum name="GL_SIGNED_ALPHA8_NV"/>
+                <enum name="GL_SIGNED_INTENSITY_NV"/>
+                <enum name="GL_SIGNED_INTENSITY8_NV"/>
+                <enum name="GL_DSDT8_NV"/>
+                <enum name="GL_DSDT8_MAG8_NV"/>
+                <enum name="GL_DSDT8_MAG8_INTENSITY8_NV"/>
+                <enum name="GL_SIGNED_RGB_UNSIGNED_ALPHA_NV"/>
+                <enum name="GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV"/>
+                <enum name="GL_HI_SCALE_NV"/>
+                <enum name="GL_LO_SCALE_NV"/>
+                <enum name="GL_DS_SCALE_NV"/>
+                <enum name="GL_DT_SCALE_NV"/>
+                <enum name="GL_MAGNITUDE_SCALE_NV"/>
+                <enum name="GL_VIBRANCE_SCALE_NV"/>
+                <enum name="GL_HI_BIAS_NV"/>
+                <enum name="GL_LO_BIAS_NV"/>
+                <enum name="GL_DS_BIAS_NV"/>
+                <enum name="GL_DT_BIAS_NV"/>
+                <enum name="GL_MAGNITUDE_BIAS_NV"/>
+                <enum name="GL_VIBRANCE_BIAS_NV"/>
+                <enum name="GL_TEXTURE_BORDER_VALUES_NV"/>
+                <enum name="GL_TEXTURE_HI_SIZE_NV"/>
+                <enum name="GL_TEXTURE_LO_SIZE_NV"/>
+                <enum name="GL_TEXTURE_DS_SIZE_NV"/>
+                <enum name="GL_TEXTURE_DT_SIZE_NV"/>
+                <enum name="GL_TEXTURE_MAG_SIZE_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_shader2" supported="gl">
+            <require>
+                <enum name="GL_DOT_PRODUCT_TEXTURE_3D_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_texture_shader3" supported="gl">
+            <require>
+                <enum name="GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV"/>
+                <enum name="GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV"/>
+                <enum name="GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV"/>
+                <enum name="GL_OFFSET_HILO_TEXTURE_2D_NV"/>
+                <enum name="GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV"/>
+                <enum name="GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV"/>
+                <enum name="GL_DEPENDENT_HILO_TEXTURE_2D_NV"/>
+                <enum name="GL_DEPENDENT_RGB_TEXTURE_3D_NV"/>
+                <enum name="GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV"/>
+                <enum name="GL_DOT_PRODUCT_PASS_THROUGH_NV"/>
+                <enum name="GL_DOT_PRODUCT_TEXTURE_1D_NV"/>
+                <enum name="GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV"/>
+                <enum name="GL_HILO8_NV"/>
+                <enum name="GL_SIGNED_HILO8_NV"/>
+                <enum name="GL_FORCE_BLUE_TO_ONE_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_transform_feedback" supported="gl">
+            <require>
+                <enum name="GL_BACK_PRIMARY_COLOR_NV"/>
+                <enum name="GL_BACK_SECONDARY_COLOR_NV"/>
+                <enum name="GL_TEXTURE_COORD_NV"/>
+                <enum name="GL_CLIP_DISTANCE_NV"/>
+                <enum name="GL_VERTEX_ID_NV"/>
+                <enum name="GL_PRIMITIVE_ID_NV"/>
+                <enum name="GL_GENERIC_ATTRIB_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_ATTRIBS_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV"/>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV"/>
+                <enum name="GL_ACTIVE_VARYINGS_NV"/>
+                <enum name="GL_ACTIVE_VARYING_MAX_LENGTH_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_VARYINGS_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_START_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_RECORD_NV"/>
+                <enum name="GL_PRIMITIVES_GENERATED_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV"/>
+                <enum name="GL_RASTERIZER_DISCARD_NV"/>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV"/>
+                <enum name="GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV"/>
+                <enum name="GL_INTERLEAVED_ATTRIBS_NV"/>
+                <enum name="GL_SEPARATE_ATTRIBS_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV"/>
+                <enum name="GL_LAYER_NV"/>
+                <command name="glBeginTransformFeedbackNV"/>
+                <command name="glEndTransformFeedbackNV"/>
+                <command name="glTransformFeedbackAttribsNV"/>
+                <command name="glBindBufferRangeNV"/>
+                <command name="glBindBufferOffsetNV"/>
+                <command name="glBindBufferBaseNV"/>
+                <command name="glTransformFeedbackVaryingsNV"/>
+                <command name="glActiveVaryingNV"/>
+                <command name="glGetVaryingLocationNV"/>
+                <command name="glGetActiveVaryingNV"/>
+                <command name="glGetTransformFeedbackVaryingNV"/>
+            </require>
+            <require comment="Extended by GL_ARB_transform_feedback3">
+                <enum name="GL_NEXT_BUFFER_NV"/>
+                <enum name="GL_SKIP_COMPONENTS4_NV"/>
+                <enum name="GL_SKIP_COMPONENTS3_NV"/>
+                <enum name="GL_SKIP_COMPONENTS2_NV"/>
+                <enum name="GL_SKIP_COMPONENTS1_NV"/>
+                <command name="glTransformFeedbackStreamAttribsNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_transform_feedback2" supported="gl">
+            <require>
+                <enum name="GL_TRANSFORM_FEEDBACK_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV"/>
+                <enum name="GL_TRANSFORM_FEEDBACK_BINDING_NV"/>
+                <command name="glBindTransformFeedbackNV"/>
+                <command name="glDeleteTransformFeedbacksNV"/>
+                <command name="glGenTransformFeedbacksNV"/>
+                <command name="glIsTransformFeedbackNV"/>
+                <command name="glPauseTransformFeedbackNV"/>
+                <command name="glResumeTransformFeedbackNV"/>
+                <command name="glDrawTransformFeedbackNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vdpau_interop" supported="gl">
+            <require>
+                <enum name="GL_SURFACE_STATE_NV"/>
+                <enum name="GL_SURFACE_REGISTERED_NV"/>
+                <enum name="GL_SURFACE_MAPPED_NV"/>
+                <enum name="GL_WRITE_DISCARD_NV"/>
+                <command name="glVDPAUInitNV"/>
+                <command name="glVDPAUFiniNV"/>
+                <command name="glVDPAURegisterVideoSurfaceNV"/>
+                <command name="glVDPAURegisterOutputSurfaceNV"/>
+                <command name="glVDPAUIsSurfaceNV"/>
+                <command name="glVDPAUUnregisterSurfaceNV"/>
+                <command name="glVDPAUGetSurfaceivNV"/>
+                <command name="glVDPAUSurfaceAccessNV"/>
+                <command name="glVDPAUMapSurfacesNV"/>
+                <command name="glVDPAUUnmapSurfacesNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_array_range" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_RANGE_NV"/>
+                <enum name="GL_VERTEX_ARRAY_RANGE_LENGTH_NV"/>
+                <enum name="GL_VERTEX_ARRAY_RANGE_VALID_NV"/>
+                <enum name="GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV"/>
+                <enum name="GL_VERTEX_ARRAY_RANGE_POINTER_NV"/>
+                <command name="glFlushVertexArrayRangeNV"/>
+                <command name="glVertexArrayRangeNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_array_range2" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_attrib_integer_64bit" supported="gl">
+            <require>
+                <enum name="GL_INT64_NV"/>
+                <enum name="GL_UNSIGNED_INT64_NV"/>
+                <command name="glVertexAttribL1i64NV"/>
+                <command name="glVertexAttribL2i64NV"/>
+                <command name="glVertexAttribL3i64NV"/>
+                <command name="glVertexAttribL4i64NV"/>
+                <command name="glVertexAttribL1i64vNV"/>
+                <command name="glVertexAttribL2i64vNV"/>
+                <command name="glVertexAttribL3i64vNV"/>
+                <command name="glVertexAttribL4i64vNV"/>
+                <command name="glVertexAttribL1ui64NV"/>
+                <command name="glVertexAttribL2ui64NV"/>
+                <command name="glVertexAttribL3ui64NV"/>
+                <command name="glVertexAttribL4ui64NV"/>
+                <command name="glVertexAttribL1ui64vNV"/>
+                <command name="glVertexAttribL2ui64vNV"/>
+                <command name="glVertexAttribL3ui64vNV"/>
+                <command name="glVertexAttribL4ui64vNV"/>
+                <command name="glGetVertexAttribLi64vNV"/>
+                <command name="glGetVertexAttribLui64vNV"/>
+                <command name="glVertexAttribLFormatNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_buffer_unified_memory" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV"/>
+                <enum name="GL_ELEMENT_ARRAY_UNIFIED_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_VERTEX_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_NORMAL_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_COLOR_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_INDEX_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_FOG_COORD_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_ELEMENT_ARRAY_ADDRESS_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV"/>
+                <enum name="GL_VERTEX_ARRAY_LENGTH_NV"/>
+                <enum name="GL_NORMAL_ARRAY_LENGTH_NV"/>
+                <enum name="GL_COLOR_ARRAY_LENGTH_NV"/>
+                <enum name="GL_INDEX_ARRAY_LENGTH_NV"/>
+                <enum name="GL_TEXTURE_COORD_ARRAY_LENGTH_NV"/>
+                <enum name="GL_EDGE_FLAG_ARRAY_LENGTH_NV"/>
+                <enum name="GL_SECONDARY_COLOR_ARRAY_LENGTH_NV"/>
+                <enum name="GL_FOG_COORD_ARRAY_LENGTH_NV"/>
+                <enum name="GL_ELEMENT_ARRAY_LENGTH_NV"/>
+                <enum name="GL_DRAW_INDIRECT_UNIFIED_NV"/>
+                <enum name="GL_DRAW_INDIRECT_ADDRESS_NV"/>
+                <enum name="GL_DRAW_INDIRECT_LENGTH_NV"/>
+                <command name="glBufferAddressRangeNV"/>
+                <command name="glVertexFormatNV"/>
+                <command name="glNormalFormatNV"/>
+                <command name="glColorFormatNV"/>
+                <command name="glIndexFormatNV"/>
+                <command name="glTexCoordFormatNV"/>
+                <command name="glEdgeFlagFormatNV"/>
+                <command name="glSecondaryColorFormatNV"/>
+                <command name="glFogCoordFormatNV"/>
+                <command name="glVertexAttribFormatNV"/>
+                <command name="glVertexAttribIFormatNV"/>
+                <command name="glGetIntegerui64i_vNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_program" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_PROGRAM_NV"/>
+                <enum name="GL_VERTEX_STATE_PROGRAM_NV"/>
+                <enum name="GL_ATTRIB_ARRAY_SIZE_NV"/>
+                <enum name="GL_ATTRIB_ARRAY_STRIDE_NV"/>
+                <enum name="GL_ATTRIB_ARRAY_TYPE_NV"/>
+                <enum name="GL_CURRENT_ATTRIB_NV"/>
+                <enum name="GL_PROGRAM_LENGTH_NV"/>
+                <enum name="GL_PROGRAM_STRING_NV"/>
+                <enum name="GL_MODELVIEW_PROJECTION_NV"/>
+                <enum name="GL_IDENTITY_NV"/>
+                <enum name="GL_INVERSE_NV"/>
+                <enum name="GL_TRANSPOSE_NV"/>
+                <enum name="GL_INVERSE_TRANSPOSE_NV"/>
+                <enum name="GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV"/>
+                <enum name="GL_MAX_TRACK_MATRICES_NV"/>
+                <enum name="GL_MATRIX0_NV"/>
+                <enum name="GL_MATRIX1_NV"/>
+                <enum name="GL_MATRIX2_NV"/>
+                <enum name="GL_MATRIX3_NV"/>
+                <enum name="GL_MATRIX4_NV"/>
+                <enum name="GL_MATRIX5_NV"/>
+                <enum name="GL_MATRIX6_NV"/>
+                <enum name="GL_MATRIX7_NV"/>
+                <enum name="GL_CURRENT_MATRIX_STACK_DEPTH_NV"/>
+                <enum name="GL_CURRENT_MATRIX_NV"/>
+                <enum name="GL_VERTEX_PROGRAM_POINT_SIZE_NV"/>
+                <enum name="GL_VERTEX_PROGRAM_TWO_SIDE_NV"/>
+                <enum name="GL_PROGRAM_PARAMETER_NV"/>
+                <enum name="GL_ATTRIB_ARRAY_POINTER_NV"/>
+                <enum name="GL_PROGRAM_TARGET_NV"/>
+                <enum name="GL_PROGRAM_RESIDENT_NV"/>
+                <enum name="GL_TRACK_MATRIX_NV"/>
+                <enum name="GL_TRACK_MATRIX_TRANSFORM_NV"/>
+                <enum name="GL_VERTEX_PROGRAM_BINDING_NV"/>
+                <enum name="GL_PROGRAM_ERROR_POSITION_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY0_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY1_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY2_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY3_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY4_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY5_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY6_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY7_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY8_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY9_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY10_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY11_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY12_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY13_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY14_NV"/>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY15_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB0_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB1_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB2_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB3_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB4_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB5_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB6_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB7_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB8_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB9_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB10_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB11_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB12_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB13_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB14_4_NV"/>
+                <enum name="GL_MAP1_VERTEX_ATTRIB15_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB0_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB1_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB2_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB3_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB4_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB5_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB6_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB7_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB8_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB9_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB10_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB11_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB12_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB13_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB14_4_NV"/>
+                <enum name="GL_MAP2_VERTEX_ATTRIB15_4_NV"/>
+                <command name="glAreProgramsResidentNV"/>
+                <command name="glBindProgramNV"/>
+                <command name="glDeleteProgramsNV"/>
+                <command name="glExecuteProgramNV"/>
+                <command name="glGenProgramsNV"/>
+                <command name="glGetProgramParameterdvNV"/>
+                <command name="glGetProgramParameterfvNV"/>
+                <command name="glGetProgramivNV"/>
+                <command name="glGetProgramStringNV"/>
+                <command name="glGetTrackMatrixivNV"/>
+                <command name="glGetVertexAttribdvNV"/>
+                <command name="glGetVertexAttribfvNV"/>
+                <command name="glGetVertexAttribivNV"/>
+                <command name="glGetVertexAttribPointervNV"/>
+                <command name="glIsProgramNV"/>
+                <command name="glLoadProgramNV"/>
+                <command name="glProgramParameter4dNV"/>
+                <command name="glProgramParameter4dvNV"/>
+                <command name="glProgramParameter4fNV"/>
+                <command name="glProgramParameter4fvNV"/>
+                <command name="glProgramParameters4dvNV"/>
+                <command name="glProgramParameters4fvNV"/>
+                <command name="glRequestResidentProgramsNV"/>
+                <command name="glTrackMatrixNV"/>
+                <command name="glVertexAttribPointerNV"/>
+                <command name="glVertexAttrib1dNV"/>
+                <command name="glVertexAttrib1dvNV"/>
+                <command name="glVertexAttrib1fNV"/>
+                <command name="glVertexAttrib1fvNV"/>
+                <command name="glVertexAttrib1sNV"/>
+                <command name="glVertexAttrib1svNV"/>
+                <command name="glVertexAttrib2dNV"/>
+                <command name="glVertexAttrib2dvNV"/>
+                <command name="glVertexAttrib2fNV"/>
+                <command name="glVertexAttrib2fvNV"/>
+                <command name="glVertexAttrib2sNV"/>
+                <command name="glVertexAttrib2svNV"/>
+                <command name="glVertexAttrib3dNV"/>
+                <command name="glVertexAttrib3dvNV"/>
+                <command name="glVertexAttrib3fNV"/>
+                <command name="glVertexAttrib3fvNV"/>
+                <command name="glVertexAttrib3sNV"/>
+                <command name="glVertexAttrib3svNV"/>
+                <command name="glVertexAttrib4dNV"/>
+                <command name="glVertexAttrib4dvNV"/>
+                <command name="glVertexAttrib4fNV"/>
+                <command name="glVertexAttrib4fvNV"/>
+                <command name="glVertexAttrib4sNV"/>
+                <command name="glVertexAttrib4svNV"/>
+                <command name="glVertexAttrib4ubNV"/>
+                <command name="glVertexAttrib4ubvNV"/>
+                <command name="glVertexAttribs1dvNV"/>
+                <command name="glVertexAttribs1fvNV"/>
+                <command name="glVertexAttribs1svNV"/>
+                <command name="glVertexAttribs2dvNV"/>
+                <command name="glVertexAttribs2fvNV"/>
+                <command name="glVertexAttribs2svNV"/>
+                <command name="glVertexAttribs3dvNV"/>
+                <command name="glVertexAttribs3fvNV"/>
+                <command name="glVertexAttribs3svNV"/>
+                <command name="glVertexAttribs4dvNV"/>
+                <command name="glVertexAttribs4fvNV"/>
+                <command name="glVertexAttribs4svNV"/>
+                <command name="glVertexAttribs4ubvNV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_program1_1" supported="gl"/>
+        <extension name="GL_NV_vertex_program2" supported="gl"/>
+        <extension name="GL_NV_vertex_program2_option" supported="gl">
+            <require>
+                <enum name="GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV"/>
+                <enum name="GL_MAX_PROGRAM_CALL_DEPTH_NV"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_program3" supported="gl">
+            <require>
+                <enum name="GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_vertex_program4" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV"/>
+                <command name="glVertexAttribI1iEXT"/>
+                <command name="glVertexAttribI2iEXT"/>
+                <command name="glVertexAttribI3iEXT"/>
+                <command name="glVertexAttribI4iEXT"/>
+                <command name="glVertexAttribI1uiEXT"/>
+                <command name="glVertexAttribI2uiEXT"/>
+                <command name="glVertexAttribI3uiEXT"/>
+                <command name="glVertexAttribI4uiEXT"/>
+                <command name="glVertexAttribI1ivEXT"/>
+                <command name="glVertexAttribI2ivEXT"/>
+                <command name="glVertexAttribI3ivEXT"/>
+                <command name="glVertexAttribI4ivEXT"/>
+                <command name="glVertexAttribI1uivEXT"/>
+                <command name="glVertexAttribI2uivEXT"/>
+                <command name="glVertexAttribI3uivEXT"/>
+                <command name="glVertexAttribI4uivEXT"/>
+                <command name="glVertexAttribI4bvEXT"/>
+                <command name="glVertexAttribI4svEXT"/>
+                <command name="glVertexAttribI4ubvEXT"/>
+                <command name="glVertexAttribI4usvEXT"/>
+                <command name="glVertexAttribIPointerEXT"/>
+                <command name="glGetVertexAttribIivEXT"/>
+                <command name="glGetVertexAttribIuivEXT"/>
+            </require>
+        </extension>
+        <extension name="GL_NV_video_capture" supported="gl">
+            <require>
+                <enum name="GL_VIDEO_BUFFER_NV"/>
+                <enum name="GL_VIDEO_BUFFER_BINDING_NV"/>
+                <enum name="GL_FIELD_UPPER_NV"/>
+                <enum name="GL_FIELD_LOWER_NV"/>
+                <enum name="GL_NUM_VIDEO_CAPTURE_STREAMS_NV"/>
+                <enum name="GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV"/>
+                <enum name="GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV"/>
+                <enum name="GL_LAST_VIDEO_CAPTURE_STATUS_NV"/>
+                <enum name="GL_VIDEO_BUFFER_PITCH_NV"/>
+                <enum name="GL_VIDEO_COLOR_CONVERSION_MATRIX_NV"/>
+                <enum name="GL_VIDEO_COLOR_CONVERSION_MAX_NV"/>
+                <enum name="GL_VIDEO_COLOR_CONVERSION_MIN_NV"/>
+                <enum name="GL_VIDEO_COLOR_CONVERSION_OFFSET_NV"/>
+                <enum name="GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV"/>
+                <enum name="GL_PARTIAL_SUCCESS_NV"/>
+                <enum name="GL_SUCCESS_NV"/>
+                <enum name="GL_FAILURE_NV"/>
+                <enum name="GL_YCBYCR8_422_NV"/>
+                <enum name="GL_YCBAYCR8A_4224_NV"/>
+                <enum name="GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV"/>
+                <enum name="GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV"/>
+                <enum name="GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV"/>
+                <enum name="GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV"/>
+                <enum name="GL_Z4Y12Z4CB12Z4CR12_444_NV"/>
+                <enum name="GL_VIDEO_CAPTURE_FRAME_WIDTH_NV"/>
+                <enum name="GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV"/>
+                <enum name="GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV"/>
+                <enum name="GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV"/>
+                <enum name="GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV"/>
+                <command name="glBeginVideoCaptureNV"/>
+                <command name="glBindVideoCaptureStreamBufferNV"/>
+                <command name="glBindVideoCaptureStreamTextureNV"/>
+                <command name="glEndVideoCaptureNV"/>
+                <command name="glGetVideoCaptureivNV"/>
+                <command name="glGetVideoCaptureStreamivNV"/>
+                <command name="glGetVideoCaptureStreamfvNV"/>
+                <command name="glGetVideoCaptureStreamdvNV"/>
+                <command name="glVideoCaptureNV"/>
+                <command name="glVideoCaptureStreamParameterivNV"/>
+                <command name="glVideoCaptureStreamParameterfvNV"/>
+                <command name="glVideoCaptureStreamParameterdvNV"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_EGL_image" supported="gles1|gles2">
+            <require>
+                <type name="GLeglImageOES"/>
+                <command name="glEGLImageTargetTexture2DOES"/>
+                <command name="glEGLImageTargetRenderbufferStorageOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_EGL_image_external" supported="gles1|gles2">
+            <require>
+                <type name="GLeglImageOES"/>
+                <enum name="GL_TEXTURE_EXTERNAL_OES"/>
+                <enum name="GL_TEXTURE_BINDING_EXTERNAL_OES"/>
+                <enum name="GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES"/>
+            </require>
+            <require api="gles2">
+                <enum name="GL_SAMPLER_EXTERNAL_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_blend_equation_separate" supported="gles1">
+            <require>
+                <enum name="GL_BLEND_EQUATION_RGB_OES"/>
+                <enum name="GL_BLEND_EQUATION_ALPHA_OES"/>
+                <command name="glBlendEquationSeparateOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_blend_func_separate" supported="gles1">
+            <require>
+                <enum name="GL_BLEND_DST_RGB_OES"/>
+                <enum name="GL_BLEND_SRC_RGB_OES"/>
+                <enum name="GL_BLEND_DST_ALPHA_OES"/>
+                <enum name="GL_BLEND_SRC_ALPHA_OES"/>
+                <command name="glBlendFuncSeparateOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_blend_subtract" supported="gles1">
+            <require>
+                <enum name="GL_BLEND_EQUATION_OES"/>
+                <enum name="GL_FUNC_ADD_OES"/>
+                <enum name="GL_FUNC_SUBTRACT_OES"/>
+                <enum name="GL_FUNC_REVERSE_SUBTRACT_OES"/>
+                <command name="glBlendEquationOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_byte_coordinates" supported="gl|gles1">
+            <require>
+                <command name="glMultiTexCoord1bOES"/>
+                <command name="glMultiTexCoord1bvOES"/>
+                <command name="glMultiTexCoord2bOES"/>
+                <command name="glMultiTexCoord2bvOES"/>
+                <command name="glMultiTexCoord3bOES"/>
+                <command name="glMultiTexCoord3bvOES"/>
+                <command name="glMultiTexCoord4bOES"/>
+                <command name="glMultiTexCoord4bvOES"/>
+                <command name="glTexCoord1bOES"/>
+                <command name="glTexCoord1bvOES"/>
+                <command name="glTexCoord2bOES"/>
+                <command name="glTexCoord2bvOES"/>
+                <command name="glTexCoord3bOES"/>
+                <command name="glTexCoord3bvOES"/>
+                <command name="glTexCoord4bOES"/>
+                <command name="glTexCoord4bvOES"/>
+                <command name="glVertex2bOES"/>
+                <command name="glVertex2bvOES"/>
+                <command name="glVertex3bOES"/>
+                <command name="glVertex3bvOES"/>
+                <command name="glVertex4bOES"/>
+                <command name="glVertex4bvOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_compressed_ETC1_RGB8_texture" supported="gles1|gles2">
+            <require>
+                <enum name="GL_ETC1_RGB8_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_compressed_paletted_texture" supported="gl|gles1|gles2">
+            <require>
+                <enum name="GL_PALETTE4_RGB8_OES"/>
+                <enum name="GL_PALETTE4_RGBA8_OES"/>
+                <enum name="GL_PALETTE4_R5_G6_B5_OES"/>
+                <enum name="GL_PALETTE4_RGBA4_OES"/>
+                <enum name="GL_PALETTE4_RGB5_A1_OES"/>
+                <enum name="GL_PALETTE8_RGB8_OES"/>
+                <enum name="GL_PALETTE8_RGBA8_OES"/>
+                <enum name="GL_PALETTE8_R5_G6_B5_OES"/>
+                <enum name="GL_PALETTE8_RGBA4_OES"/>
+                <enum name="GL_PALETTE8_RGB5_A1_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_depth24" supported="gles1|gles2">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT24_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_depth32" supported="gles1|gles2">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT32_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_depth_texture" supported="gles2">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT"/>
+                <enum name="GL_UNSIGNED_SHORT"/>
+                <enum name="GL_UNSIGNED_INT"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_draw_texture" supported="gles1">
+            <require>
+                <enum name="GL_TEXTURE_CROP_RECT_OES"/>
+                <command name="glDrawTexsOES"/>
+                <command name="glDrawTexiOES"/>
+                <command name="glDrawTexxOES"/>
+                <command name="glDrawTexsvOES"/>
+                <command name="glDrawTexivOES"/>
+                <command name="glDrawTexxvOES"/>
+                <command name="glDrawTexfOES"/>
+                <command name="glDrawTexfvOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_element_index_uint" supported="gles1|gles2">
+            <require>
+                <enum name="GL_UNSIGNED_INT"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_extended_matrix_palette" supported="gles1"/>
+        <extension name="GL_OES_fbo_render_mipmap" supported="gles1|gles2"/>
+        <extension name="GL_OES_fixed_point" supported="gl|gles1">
+            <require>
+                <enum name="GL_FIXED_OES"/>
+                <command name="glAlphaFuncxOES"/>
+                <command name="glClearColorxOES"/>
+                <command name="glClearDepthxOES"/>
+                <command name="glClipPlanexOES"/>
+                <command name="glColor4xOES"/>
+                <command name="glDepthRangexOES"/>
+                <command name="glFogxOES"/>
+                <command name="glFogxvOES"/>
+                <command name="glFrustumxOES"/>
+                <command name="glGetClipPlanexOES"/>
+                <command name="glGetFixedvOES"/>
+                <command name="glGetTexEnvxvOES"/>
+                <command name="glGetTexParameterxvOES"/>
+                <command name="glLightModelxOES"/>
+                <command name="glLightModelxvOES"/>
+                <command name="glLightxOES"/>
+                <command name="glLightxvOES"/>
+                <command name="glLineWidthxOES"/>
+                <command name="glLoadMatrixxOES"/>
+                <command name="glMaterialxOES"/>
+                <command name="glMaterialxvOES"/>
+                <command name="glMultMatrixxOES"/>
+                <command name="glMultiTexCoord4xOES"/>
+                <command name="glNormal3xOES"/>
+                <command name="glOrthoxOES"/>
+                <command name="glPointParameterxvOES"/>
+                <command name="glPointSizexOES"/>
+                <command name="glPolygonOffsetxOES"/>
+                <command name="glRotatexOES"/>
+                <command name="glSampleCoverageOES"/>
+                <command name="glScalexOES"/>
+                <command name="glTexEnvxOES"/>
+                <command name="glTexEnvxvOES"/>
+                <command name="glTexParameterxOES"/>
+                <command name="glTexParameterxvOES"/>
+                <command name="glTranslatexOES"/>
+            </require>
+            <require api="gles1" comment="Entry points not in the extension spec, but in the Khronos glext.h. Included for backward compatibility.">
+                <command name="glGetLightxvOES"/>
+                <command name="glGetMaterialxvOES"/>
+                <command name="glPointParameterxOES"/>
+                <command name="glSampleCoveragexOES"/>
+            </require>
+            <require api="gl" comment="Entry points in the extension spec, but not the Khronos glext.h. Correspond to GL-only features it's unlikely were ever implemented against ES 1.x.">
+                <command name="glAccumxOES"/>
+                <command name="glBitmapxOES"/>
+                <command name="glBlendColorxOES"/>
+                <command name="glClearAccumxOES"/>
+                <command name="glColor3xOES"/>
+                <command name="glColor3xvOES"/>
+                <command name="glColor4xvOES"/>
+                <command name="glConvolutionParameterxOES"/>
+                <command name="glConvolutionParameterxvOES"/>
+                <command name="glEvalCoord1xOES"/>
+                <command name="glEvalCoord1xvOES"/>
+                <command name="glEvalCoord2xOES"/>
+                <command name="glEvalCoord2xvOES"/>
+                <command name="glFeedbackBufferxOES"/>
+                <command name="glGetConvolutionParameterxvOES"/>
+                <command name="glGetHistogramParameterxvOES"/>
+                <command name="glGetLightxOES"/>
+                <command name="glGetMapxvOES"/>
+                <command name="glGetMaterialxOES"/>
+                <command name="glGetPixelMapxv"/>
+                <command name="glGetTexGenxvOES"/>
+                <command name="glGetTexLevelParameterxvOES"/>
+                <command name="glIndexxOES"/>
+                <command name="glIndexxvOES"/>
+                <command name="glLoadTransposeMatrixxOES"/>
+                <command name="glMap1xOES"/>
+                <command name="glMap2xOES"/>
+                <command name="glMapGrid1xOES"/>
+                <command name="glMapGrid2xOES"/>
+                <command name="glMultTransposeMatrixxOES"/>
+                <command name="glMultiTexCoord1xOES"/>
+                <command name="glMultiTexCoord1xvOES"/>
+                <command name="glMultiTexCoord2xOES"/>
+                <command name="glMultiTexCoord2xvOES"/>
+                <command name="glMultiTexCoord3xOES"/>
+                <command name="glMultiTexCoord3xvOES"/>
+                <command name="glMultiTexCoord4xvOES"/>
+                <command name="glNormal3xvOES"/>
+                <command name="glPassThroughxOES"/>
+                <command name="glPixelMapx"/>
+                <command name="glPixelStorex"/>
+                <command name="glPixelTransferxOES"/>
+                <command name="glPixelZoomxOES"/>
+                <command name="glPrioritizeTexturesxOES"/>
+                <command name="glRasterPos2xOES"/>
+                <command name="glRasterPos2xvOES"/>
+                <command name="glRasterPos3xOES"/>
+                <command name="glRasterPos3xvOES"/>
+                <command name="glRasterPos4xOES"/>
+                <command name="glRasterPos4xvOES"/>
+                <command name="glRectxOES"/>
+                <command name="glRectxvOES"/>
+                <command name="glTexCoord1xOES"/>
+                <command name="glTexCoord1xvOES"/>
+                <command name="glTexCoord2xOES"/>
+                <command name="glTexCoord2xvOES"/>
+                <command name="glTexCoord3xOES"/>
+                <command name="glTexCoord3xvOES"/>
+                <command name="glTexCoord4xOES"/>
+                <command name="glTexCoord4xvOES"/>
+                <command name="glTexGenxOES"/>
+                <command name="glTexGenxvOES"/>
+                <command name="glVertex2xOES"/>
+                <command name="glVertex2xvOES"/>
+                <command name="glVertex3xOES"/>
+                <command name="glVertex3xvOES"/>
+                <command name="glVertex4xOES"/>
+                <command name="glVertex4xvOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_fragment_precision_high" supported="gles2">
+            <require>
+            </require>
+        </extension>
+        <extension name="GL_OES_framebuffer_object" supported="gles1">
+            <require>
+                <enum name="GL_NONE_OES"/>
+                <enum name="GL_FRAMEBUFFER_OES"/>
+                <enum name="GL_RENDERBUFFER_OES"/>
+                <enum name="GL_RGBA4_OES"/>
+                <enum name="GL_RGB5_A1_OES"/>
+                <enum name="GL_RGB565_OES"/>
+                <enum name="GL_DEPTH_COMPONENT16_OES"/>
+                <enum name="GL_RENDERBUFFER_WIDTH_OES"/>
+                <enum name="GL_RENDERBUFFER_HEIGHT_OES"/>
+                <enum name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"/>
+                <enum name="GL_RENDERBUFFER_RED_SIZE_OES"/>
+                <enum name="GL_RENDERBUFFER_GREEN_SIZE_OES"/>
+                <enum name="GL_RENDERBUFFER_BLUE_SIZE_OES"/>
+                <enum name="GL_RENDERBUFFER_ALPHA_SIZE_OES"/>
+                <enum name="GL_RENDERBUFFER_DEPTH_SIZE_OES"/>
+                <enum name="GL_RENDERBUFFER_STENCIL_SIZE_OES"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES"/>
+                <enum name="GL_COLOR_ATTACHMENT0_OES"/>
+                <enum name="GL_DEPTH_ATTACHMENT_OES"/>
+                <enum name="GL_STENCIL_ATTACHMENT_OES"/>
+                <enum name="GL_FRAMEBUFFER_COMPLETE_OES"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES"/>
+                <enum name="GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES"/>
+                <enum name="GL_FRAMEBUFFER_UNSUPPORTED_OES"/>
+                <enum name="GL_FRAMEBUFFER_BINDING_OES"/>
+                <enum name="GL_RENDERBUFFER_BINDING_OES"/>
+                <enum name="GL_MAX_RENDERBUFFER_SIZE_OES"/>
+                <enum name="GL_INVALID_FRAMEBUFFER_OPERATION_OES"/>
+                <command name="glIsRenderbufferOES"/>
+                <command name="glBindRenderbufferOES"/>
+                <command name="glDeleteRenderbuffersOES"/>
+                <command name="glGenRenderbuffersOES"/>
+                <command name="glRenderbufferStorageOES"/>
+                <command name="glGetRenderbufferParameterivOES"/>
+                <command name="glIsFramebufferOES"/>
+                <command name="glBindFramebufferOES"/>
+                <command name="glDeleteFramebuffersOES"/>
+                <command name="glGenFramebuffersOES"/>
+                <command name="glCheckFramebufferStatusOES"/>
+                <command name="glFramebufferRenderbufferOES"/>
+                <command name="glFramebufferTexture2DOES"/>
+                <command name="glGetFramebufferAttachmentParameterivOES"/>
+                <command name="glGenerateMipmapOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_get_program_binary" supported="gles2">
+            <require>
+                <enum name="GL_PROGRAM_BINARY_LENGTH_OES"/>
+                <enum name="GL_NUM_PROGRAM_BINARY_FORMATS_OES"/>
+                <enum name="GL_PROGRAM_BINARY_FORMATS_OES"/>
+                <command name="glGetProgramBinaryOES"/>
+                <command name="glProgramBinaryOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_mapbuffer" supported="gles1|gles2">
+            <require>
+                <enum name="GL_WRITE_ONLY_OES"/>
+                <enum name="GL_BUFFER_ACCESS_OES"/>
+                <enum name="GL_BUFFER_MAPPED_OES"/>
+                <enum name="GL_BUFFER_MAP_POINTER_OES"/>
+                <command name="glMapBufferOES"/>
+                <command name="glUnmapBufferOES"/>
+                <command name="glGetBufferPointervOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_matrix_get" supported="gles1">
+            <require>
+                <enum name="GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES"/>
+                <enum name="GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES"/>
+                <enum name="GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_matrix_palette" supported="gles1">
+            <require>
+                <enum name="GL_MAX_VERTEX_UNITS_OES"/>
+                <enum name="GL_MAX_PALETTE_MATRICES_OES"/>
+                <enum name="GL_MATRIX_PALETTE_OES"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_OES"/>
+                <enum name="GL_WEIGHT_ARRAY_OES"/>
+                <enum name="GL_CURRENT_PALETTE_MATRIX_OES"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_SIZE_OES"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_TYPE_OES"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_STRIDE_OES"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_POINTER_OES"/>
+                <enum name="GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES"/>
+                <enum name="GL_WEIGHT_ARRAY_SIZE_OES"/>
+                <enum name="GL_WEIGHT_ARRAY_TYPE_OES"/>
+                <enum name="GL_WEIGHT_ARRAY_STRIDE_OES"/>
+                <enum name="GL_WEIGHT_ARRAY_POINTER_OES"/>
+                <enum name="GL_WEIGHT_ARRAY_BUFFER_BINDING_OES"/>
+                <command name="glCurrentPaletteMatrixOES"/>
+                <command name="glLoadPaletteFromModelViewMatrixOES"/>
+                <command name="glMatrixIndexPointerOES"/>
+                <command name="glWeightPointerOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_packed_depth_stencil" supported="gles1|gles2">
+            <require>
+                <enum name="GL_DEPTH_STENCIL_OES"/>
+                <enum name="GL_UNSIGNED_INT_24_8_OES"/>
+                <enum name="GL_DEPTH24_STENCIL8_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_point_size_array" supported="gles1">
+            <require>
+                <enum name="GL_POINT_SIZE_ARRAY_OES"/>
+                <enum name="GL_POINT_SIZE_ARRAY_TYPE_OES"/>
+                <enum name="GL_POINT_SIZE_ARRAY_STRIDE_OES"/>
+                <enum name="GL_POINT_SIZE_ARRAY_POINTER_OES"/>
+                <enum name="GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES"/>
+                <command name="glPointSizePointerOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_point_sprite" supported="gles1">
+            <require>
+                <enum name="GL_POINT_SPRITE_OES"/>
+                <enum name="GL_COORD_REPLACE_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_query_matrix" supported="gl|gles1">
+            <require>
+                <command name="glQueryMatrixxOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_read_format" supported="gl|gles1">
+            <require>
+                <enum name="GL_IMPLEMENTATION_COLOR_READ_TYPE_OES"/>
+                <enum name="GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_required_internalformat" supported="gles1|gles2">
+            <require>
+                <enum name="GL_ALPHA8_OES"/>
+                <enum name="GL_DEPTH_COMPONENT16_OES"/>
+                <enum name="GL_DEPTH_COMPONENT24_OES"/>
+                <enum name="GL_DEPTH24_STENCIL8_OES"/>
+                <enum name="GL_DEPTH_COMPONENT32_OES"/>
+                <enum name="GL_LUMINANCE4_ALPHA4_OES"/>
+                <enum name="GL_LUMINANCE8_ALPHA8_OES"/>
+                <enum name="GL_LUMINANCE8_OES"/>
+                <enum name="GL_RGBA4_OES"/>
+                <enum name="GL_RGB5_A1_OES"/>
+                <enum name="GL_RGB565_OES"/>
+                <enum name="GL_RGB8_OES"/>
+                <enum name="GL_RGBA8_OES"/>
+                <enum name="GL_RGB10_EXT"/>
+                <enum name="GL_RGB10_A2_EXT"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_rgb8_rgba8" supported="gles1|gles2">
+            <require>
+                <enum name="GL_RGB8_OES"/>
+                <enum name="GL_RGBA8_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_sample_shading" supported="gles2">
+            <require>
+                <command name="glMinSampleShadingOES"/>                                     
+                <enum name="GL_SAMPLE_SHADING_OES"/>                                        
+                <enum name="GL_MIN_SAMPLE_SHADING_VALUE_OES"/>                              
+            </require>
+        </extension>
+        <extension name="GL_OES_sample_variables" supported="gles2"/>
+        <extension name="GL_OES_shader_image_atomic" supported="gles2"/>
+        <extension name="GL_OES_shader_multisample_interpolation" supported="gles2">
+            <require>
+                <enum name="GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES"/>                     
+                <enum name="GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES"/>                     
+                <enum name="GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES"/>                    
+            </require>
+        </extension>
+        <extension name="GL_OES_single_precision" supported="gl|gles1">
+            <require>
+                <command name="glClearDepthfOES"/>
+                <command name="glClipPlanefOES"/>
+                <command name="glDepthRangefOES"/>
+                <command name="glFrustumfOES"/>
+                <command name="glGetClipPlanefOES"/>
+                <command name="glOrthofOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_standard_derivatives" supported="gles2">
+            <require>
+                <enum name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_stencil1" supported="gles1|gles2">
+            <require>
+                <enum name="GL_STENCIL_INDEX1_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_stencil4" supported="gles1|gles2">
+            <require>
+                <enum name="GL_STENCIL_INDEX4_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_stencil8" supported="gles1">
+            <require>
+                <enum name="GL_STENCIL_INDEX8_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_stencil_wrap" supported="gles1">
+            <require>
+                <enum name="GL_INCR_WRAP_OES"/>
+                <enum name="GL_DECR_WRAP_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_surfaceless_context" supported="gles2">
+            <require>
+                <enum name="GL_FRAMEBUFFER_UNDEFINED_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_3D" supported="gles2">
+            <require>
+                <enum name="GL_TEXTURE_WRAP_R_OES"/>
+                <enum name="GL_TEXTURE_3D_OES"/>
+                <enum name="GL_TEXTURE_BINDING_3D_OES"/>
+                <enum name="GL_MAX_3D_TEXTURE_SIZE_OES"/>
+                <enum name="GL_SAMPLER_3D_OES"/>
+                <enum name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES"/>
+                <command name="glTexImage3DOES"/>
+                <command name="glTexSubImage3DOES"/>
+                <command name="glCopyTexSubImage3DOES"/>
+                <command name="glCompressedTexImage3DOES"/>
+                <command name="glCompressedTexSubImage3DOES"/>
+                <command name="glFramebufferTexture3DOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_compression_astc" supported="gles2" comment="API is identical to GL_KHR_texture_compression_astc_hdr extension">
+            <require>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_4x4_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x4_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_8x8_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x5_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x6_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x8_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_10x10_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_12x10_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_12x12_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_3x3x3_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_4x3x3_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_4x4x3_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_4x4x4_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x4x4_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x5x4_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_5x5x5_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x5x5_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x6x5_OES"/>
+                <enum name="GL_COMPRESSED_RGBA_ASTC_6x6x6_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES"/>
+                <enum name="GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_cube_map" supported="gles1">
+            <require>
+                <enum name="GL_NORMAL_MAP_OES"/>
+                <enum name="GL_REFLECTION_MAP_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_OES"/>
+                <enum name="GL_TEXTURE_BINDING_CUBE_MAP_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES"/>
+                <enum name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES"/>
+                <enum name="GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES"/>
+                <enum name="GL_TEXTURE_GEN_MODE_OES"/>
+                <enum name="GL_TEXTURE_GEN_STR_OES"/>
+                <command name="glTexGenfOES"/>
+                <command name="glTexGenfvOES"/>
+                <command name="glTexGeniOES"/>
+                <command name="glTexGenivOES"/>
+                <command name="glTexGenxOES"/>
+                <command name="glTexGenxvOES"/>
+                <command name="glGetTexGenfvOES"/>
+                <command name="glGetTexGenivOES"/>
+                <command name="glGetTexGenxvOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_env_crossbar" supported="gles1"/>
+        <extension name="GL_OES_texture_float" supported="gles2">
+            <require>
+                <enum name="GL_FLOAT"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_float_linear" supported="gles2"/>
+        <extension name="GL_OES_texture_half_float" supported="gles2">
+            <require>
+                <enum name="GL_HALF_FLOAT_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_half_float_linear" supported="gles2"/>
+        <extension name="GL_OES_texture_mirrored_repeat" supported="gles1">
+            <require>
+                <enum name="GL_MIRRORED_REPEAT_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_npot" supported="gles2"/>
+        <extension name="GL_OES_texture_stencil8" supported="gles2">
+            <require>
+                <enum name="GL_STENCIL_INDEX_OES"/>                                         
+                <enum name="GL_STENCIL_INDEX8_OES"/>                                        
+            </require>
+        </extension>
+        <extension name="GL_OES_texture_storage_multisample_2d_array" supported="gles2">
+            <require>
+                <command name="glTexStorage3DMultisampleOES"/>
+                <enum name="GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES"/>
+                <enum name="GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES"/>
+                <enum name="GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES"/>
+                <enum name="GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES"/>
+                <enum name="GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_vertex_array_object" supported="gles1|gles2">
+            <require>
+                <enum name="GL_VERTEX_ARRAY_BINDING_OES"/>
+                <command name="glBindVertexArrayOES"/>
+                <command name="glDeleteVertexArraysOES"/>
+                <command name="glGenVertexArraysOES"/>
+                <command name="glIsVertexArrayOES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_vertex_half_float" supported="gles2">
+            <require>
+                <enum name="GL_HALF_FLOAT_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OES_vertex_type_10_10_10_2" supported="gles2">
+            <require>
+                <enum name="GL_UNSIGNED_INT_10_10_10_2_OES"/>
+                <enum name="GL_INT_10_10_10_2_OES"/>
+            </require>
+        </extension>
+        <extension name="GL_OML_interlace" supported="gl">
+            <require>
+                <enum name="GL_INTERLACE_OML"/>
+                <enum name="GL_INTERLACE_READ_OML"/>
+            </require>
+        </extension>
+        <extension name="GL_OML_resample" supported="gl">
+            <require>
+                <enum name="GL_PACK_RESAMPLE_OML"/>
+                <enum name="GL_UNPACK_RESAMPLE_OML"/>
+                <enum name="GL_RESAMPLE_REPLICATE_OML"/>
+                <enum name="GL_RESAMPLE_ZERO_FILL_OML"/>
+                <enum name="GL_RESAMPLE_AVERAGE_OML"/>
+                <enum name="GL_RESAMPLE_DECIMATE_OML"/>
+            </require>
+        </extension>
+        <extension name="GL_OML_subsample" supported="gl">
+            <require>
+                <enum name="GL_FORMAT_SUBSAMPLE_24_24_OML"/>
+                <enum name="GL_FORMAT_SUBSAMPLE_244_244_OML"/>
+            </require>
+        </extension>
+        <extension name="GL_PGI_misc_hints" supported="gl">
+            <require>
+                <enum name="GL_PREFER_DOUBLEBUFFER_HINT_PGI"/>
+                <enum name="GL_CONSERVE_MEMORY_HINT_PGI"/>
+                <enum name="GL_RECLAIM_MEMORY_HINT_PGI"/>
+                <enum name="GL_NATIVE_GRAPHICS_HANDLE_PGI"/>
+                <enum name="GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI"/>
+                <enum name="GL_NATIVE_GRAPHICS_END_HINT_PGI"/>
+                <enum name="GL_ALWAYS_FAST_HINT_PGI"/>
+                <enum name="GL_ALWAYS_SOFT_HINT_PGI"/>
+                <enum name="GL_ALLOW_DRAW_OBJ_HINT_PGI"/>
+                <enum name="GL_ALLOW_DRAW_WIN_HINT_PGI"/>
+                <enum name="GL_ALLOW_DRAW_FRG_HINT_PGI"/>
+                <enum name="GL_ALLOW_DRAW_MEM_HINT_PGI"/>
+                <enum name="GL_STRICT_DEPTHFUNC_HINT_PGI"/>
+                <enum name="GL_STRICT_LIGHTING_HINT_PGI"/>
+                <enum name="GL_STRICT_SCISSOR_HINT_PGI"/>
+                <enum name="GL_FULL_STIPPLE_HINT_PGI"/>
+                <enum name="GL_CLIP_NEAR_HINT_PGI"/>
+                <enum name="GL_CLIP_FAR_HINT_PGI"/>
+                <enum name="GL_WIDE_LINE_HINT_PGI"/>
+                <enum name="GL_BACK_NORMALS_HINT_PGI"/>
+                <command name="glHintPGI"/>
+            </require>
+        </extension>
+        <extension name="GL_PGI_vertex_hints" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_DATA_HINT_PGI"/>
+                <enum name="GL_VERTEX_CONSISTENT_HINT_PGI"/>
+                <enum name="GL_MATERIAL_SIDE_HINT_PGI"/>
+                <enum name="GL_MAX_VERTEX_HINT_PGI"/>
+                <enum name="GL_COLOR3_BIT_PGI"/>
+                <enum name="GL_COLOR4_BIT_PGI"/>
+                <enum name="GL_EDGEFLAG_BIT_PGI"/>
+                <enum name="GL_INDEX_BIT_PGI"/>
+                <enum name="GL_MAT_AMBIENT_BIT_PGI"/>
+                <enum name="GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI"/>
+                <enum name="GL_MAT_DIFFUSE_BIT_PGI"/>
+                <enum name="GL_MAT_EMISSION_BIT_PGI"/>
+                <enum name="GL_MAT_COLOR_INDEXES_BIT_PGI"/>
+                <enum name="GL_MAT_SHININESS_BIT_PGI"/>
+                <enum name="GL_MAT_SPECULAR_BIT_PGI"/>
+                <enum name="GL_NORMAL_BIT_PGI"/>
+                <enum name="GL_TEXCOORD1_BIT_PGI"/>
+                <enum name="GL_TEXCOORD2_BIT_PGI"/>
+                <enum name="GL_TEXCOORD3_BIT_PGI"/>
+                <enum name="GL_TEXCOORD4_BIT_PGI"/>
+                <enum name="GL_VERTEX23_BIT_PGI"/>
+                <enum name="GL_VERTEX4_BIT_PGI"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_alpha_test" supported="gles2">
+            <require>
+                <enum name="GL_ALPHA_TEST_QCOM"/>
+                <enum name="GL_ALPHA_TEST_FUNC_QCOM"/>
+                <enum name="GL_ALPHA_TEST_REF_QCOM"/>
+                <command name="glAlphaFuncQCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_binning_control" supported="gles2">
+            <require>
+                <enum name="GL_BINNING_CONTROL_HINT_QCOM"/>
+                <enum name="GL_CPU_OPTIMIZED_QCOM"/>
+                <enum name="GL_GPU_OPTIMIZED_QCOM"/>
+                <enum name="GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_driver_control" supported="gles1|gles2">
+            <require>
+                <command name="glGetDriverControlsQCOM"/>
+                <command name="glGetDriverControlStringQCOM"/>
+                <command name="glEnableDriverControlQCOM"/>
+                <command name="glDisableDriverControlQCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_extended_get" supported="gles1|gles2">
+            <require>
+                <enum name="GL_TEXTURE_WIDTH_QCOM"/>
+                <enum name="GL_TEXTURE_HEIGHT_QCOM"/>
+                <enum name="GL_TEXTURE_DEPTH_QCOM"/>
+                <enum name="GL_TEXTURE_INTERNAL_FORMAT_QCOM"/>
+                <enum name="GL_TEXTURE_FORMAT_QCOM"/>
+                <enum name="GL_TEXTURE_TYPE_QCOM"/>
+                <enum name="GL_TEXTURE_IMAGE_VALID_QCOM"/>
+                <enum name="GL_TEXTURE_NUM_LEVELS_QCOM"/>
+                <enum name="GL_TEXTURE_TARGET_QCOM"/>
+                <enum name="GL_TEXTURE_OBJECT_VALID_QCOM"/>
+                <enum name="GL_STATE_RESTORE"/>
+                <command name="glExtGetTexturesQCOM"/>
+                <command name="glExtGetBuffersQCOM"/>
+                <command name="glExtGetRenderbuffersQCOM"/>
+                <command name="glExtGetFramebuffersQCOM"/>
+                <command name="glExtGetTexLevelParameterivQCOM"/>
+                <command name="glExtTexObjectStateOverrideiQCOM"/>
+                <command name="glExtGetTexSubImageQCOM"/>
+                <command name="glExtGetBufferPointervQCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_extended_get2" supported="gles1|gles2">
+            <require>
+                <command name="glExtGetShadersQCOM"/>
+                <command name="glExtGetProgramsQCOM"/>
+                <command name="glExtIsProgramBinaryQCOM"/>
+                <command name="glExtGetProgramBinarySourceQCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_perfmon_global_mode" supported="gles1|gles2">
+            <require>
+                <enum name="GL_PERFMON_GLOBAL_MODE_QCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_tiled_rendering" supported="gles1|gles2">
+            <require>
+                <enum name="GL_COLOR_BUFFER_BIT0_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT1_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT2_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT3_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT4_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT5_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT6_QCOM"/>
+                <enum name="GL_COLOR_BUFFER_BIT7_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT0_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT1_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT2_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT3_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT4_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT5_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT6_QCOM"/>
+                <enum name="GL_DEPTH_BUFFER_BIT7_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT0_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT1_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT2_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT3_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT4_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT5_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT6_QCOM"/>
+                <enum name="GL_STENCIL_BUFFER_BIT7_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT0_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT1_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT2_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT3_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT4_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT5_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT6_QCOM"/>
+                <enum name="GL_MULTISAMPLE_BUFFER_BIT7_QCOM"/>
+                <command name="glStartTilingQCOM"/>
+                <command name="glEndTilingQCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_QCOM_writeonly_rendering" supported="gles1|gles2">
+            <require>
+                <enum name="GL_WRITEONLY_RENDERING_QCOM"/>
+            </require>
+        </extension>
+        <extension name="GL_REND_screen_coordinates" supported="gl">
+            <require>
+                <enum name="GL_SCREEN_COORDINATES_REND"/>
+                <enum name="GL_INVERTED_SCREEN_W_REND"/>
+            </require>
+        </extension>
+        <extension name="GL_S3_s3tc" supported="gl">
+            <require>
+                <enum name="GL_RGB_S3TC"/>
+                <enum name="GL_RGB4_S3TC"/>
+                <enum name="GL_RGBA_S3TC"/>
+                <enum name="GL_RGBA4_S3TC"/>
+                <enum name="GL_RGBA_DXT5_S3TC"/>
+                <enum name="GL_RGBA4_DXT5_S3TC"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_detail_texture" supported="gl">
+            <require>
+                <enum name="GL_DETAIL_TEXTURE_2D_SGIS"/>
+                <enum name="GL_DETAIL_TEXTURE_2D_BINDING_SGIS"/>
+                <enum name="GL_LINEAR_DETAIL_SGIS"/>
+                <enum name="GL_LINEAR_DETAIL_ALPHA_SGIS"/>
+                <enum name="GL_LINEAR_DETAIL_COLOR_SGIS"/>
+                <enum name="GL_DETAIL_TEXTURE_LEVEL_SGIS"/>
+                <enum name="GL_DETAIL_TEXTURE_MODE_SGIS"/>
+                <enum name="GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS"/>
+                <command name="glDetailTexFuncSGIS"/>
+                <command name="glGetDetailTexFuncSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_fog_function" supported="gl">
+            <require>
+                <enum name="GL_FOG_FUNC_SGIS"/>
+                <enum name="GL_FOG_FUNC_POINTS_SGIS"/>
+                <enum name="GL_MAX_FOG_FUNC_POINTS_SGIS"/>
+                <command name="glFogFuncSGIS"/>
+                <command name="glGetFogFuncSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_generate_mipmap" supported="gl">
+            <require>
+                <enum name="GL_GENERATE_MIPMAP_SGIS"/>
+                <enum name="GL_GENERATE_MIPMAP_HINT_SGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_multisample" supported="gl">
+            <require>
+                <enum name="GL_MULTISAMPLE_SGIS"/>
+                <enum name="GL_SAMPLE_ALPHA_TO_MASK_SGIS"/>
+                <enum name="GL_SAMPLE_ALPHA_TO_ONE_SGIS"/>
+                <enum name="GL_SAMPLE_MASK_SGIS"/>
+                <enum name="GL_1PASS_SGIS"/>
+                <enum name="GL_2PASS_0_SGIS"/>
+                <enum name="GL_2PASS_1_SGIS"/>
+                <enum name="GL_4PASS_0_SGIS"/>
+                <enum name="GL_4PASS_1_SGIS"/>
+                <enum name="GL_4PASS_2_SGIS"/>
+                <enum name="GL_4PASS_3_SGIS"/>
+                <enum name="GL_SAMPLE_BUFFERS_SGIS"/>
+                <enum name="GL_SAMPLES_SGIS"/>
+                <enum name="GL_SAMPLE_MASK_VALUE_SGIS"/>
+                <enum name="GL_SAMPLE_MASK_INVERT_SGIS"/>
+                <enum name="GL_SAMPLE_PATTERN_SGIS"/>
+                <command name="glSampleMaskSGIS"/>
+                <command name="glSamplePatternSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_pixel_texture" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_TEXTURE_SGIS"/>
+                <enum name="GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS"/>
+                <enum name="GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS"/>
+                <enum name="GL_PIXEL_GROUP_COLOR_SGIS"/>
+                <command name="glPixelTexGenParameteriSGIS"/>
+                <command name="glPixelTexGenParameterivSGIS"/>
+                <command name="glPixelTexGenParameterfSGIS"/>
+                <command name="glPixelTexGenParameterfvSGIS"/>
+                <command name="glGetPixelTexGenParameterivSGIS"/>
+                <command name="glGetPixelTexGenParameterfvSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_point_line_texgen" supported="gl">
+            <require>
+                <enum name="GL_EYE_DISTANCE_TO_POINT_SGIS"/>
+                <enum name="GL_OBJECT_DISTANCE_TO_POINT_SGIS"/>
+                <enum name="GL_EYE_DISTANCE_TO_LINE_SGIS"/>
+                <enum name="GL_OBJECT_DISTANCE_TO_LINE_SGIS"/>
+                <enum name="GL_EYE_POINT_SGIS"/>
+                <enum name="GL_OBJECT_POINT_SGIS"/>
+                <enum name="GL_EYE_LINE_SGIS"/>
+                <enum name="GL_OBJECT_LINE_SGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_point_parameters" supported="gl">
+            <require>
+                <enum name="GL_POINT_SIZE_MIN_SGIS"/>
+                <enum name="GL_POINT_SIZE_MAX_SGIS"/>
+                <enum name="GL_POINT_FADE_THRESHOLD_SIZE_SGIS"/>
+                <enum name="GL_DISTANCE_ATTENUATION_SGIS"/>
+                <command name="glPointParameterfSGIS"/>
+                <command name="glPointParameterfvSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_sharpen_texture" supported="gl">
+            <require>
+                <enum name="GL_LINEAR_SHARPEN_SGIS"/>
+                <enum name="GL_LINEAR_SHARPEN_ALPHA_SGIS"/>
+                <enum name="GL_LINEAR_SHARPEN_COLOR_SGIS"/>
+                <enum name="GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS"/>
+                <command name="glSharpenTexFuncSGIS"/>
+                <command name="glGetSharpenTexFuncSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture4D" supported="gl">
+            <require>
+                <enum name="GL_PACK_SKIP_VOLUMES_SGIS"/>
+                <enum name="GL_PACK_IMAGE_DEPTH_SGIS"/>
+                <enum name="GL_UNPACK_SKIP_VOLUMES_SGIS"/>
+                <enum name="GL_UNPACK_IMAGE_DEPTH_SGIS"/>
+                <enum name="GL_TEXTURE_4D_SGIS"/>
+                <enum name="GL_PROXY_TEXTURE_4D_SGIS"/>
+                <enum name="GL_TEXTURE_4DSIZE_SGIS"/>
+                <enum name="GL_TEXTURE_WRAP_Q_SGIS"/>
+                <enum name="GL_MAX_4D_TEXTURE_SIZE_SGIS"/>
+                <enum name="GL_TEXTURE_4D_BINDING_SGIS"/>
+                <command name="glTexImage4DSGIS"/>
+                <command name="glTexSubImage4DSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture_border_clamp" supported="gl">
+            <require>
+                <enum name="GL_CLAMP_TO_BORDER_SGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture_color_mask" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_COLOR_WRITEMASK_SGIS"/>
+                <command name="glTextureColorMaskSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture_edge_clamp" supported="gl">
+            <require>
+                <enum name="GL_CLAMP_TO_EDGE_SGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture_filter4" supported="gl">
+            <require>
+                <enum name="GL_FILTER4_SGIS"/>
+                <enum name="GL_TEXTURE_FILTER4_SIZE_SGIS"/>
+                <command name="glGetTexFilterFuncSGIS"/>
+                <command name="glTexFilterFuncSGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture_lod" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_MIN_LOD_SGIS"/>
+                <enum name="GL_TEXTURE_MAX_LOD_SGIS"/>
+                <enum name="GL_TEXTURE_BASE_LEVEL_SGIS"/>
+                <enum name="GL_TEXTURE_MAX_LEVEL_SGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIS_texture_select" supported="gl">
+            <require>
+                <enum name="GL_DUAL_ALPHA4_SGIS"/>
+                <enum name="GL_DUAL_ALPHA8_SGIS"/>
+                <enum name="GL_DUAL_ALPHA12_SGIS"/>
+                <enum name="GL_DUAL_ALPHA16_SGIS"/>
+                <enum name="GL_DUAL_LUMINANCE4_SGIS"/>
+                <enum name="GL_DUAL_LUMINANCE8_SGIS"/>
+                <enum name="GL_DUAL_LUMINANCE12_SGIS"/>
+                <enum name="GL_DUAL_LUMINANCE16_SGIS"/>
+                <enum name="GL_DUAL_INTENSITY4_SGIS"/>
+                <enum name="GL_DUAL_INTENSITY8_SGIS"/>
+                <enum name="GL_DUAL_INTENSITY12_SGIS"/>
+                <enum name="GL_DUAL_INTENSITY16_SGIS"/>
+                <enum name="GL_DUAL_LUMINANCE_ALPHA4_SGIS"/>
+                <enum name="GL_DUAL_LUMINANCE_ALPHA8_SGIS"/>
+                <enum name="GL_QUAD_ALPHA4_SGIS"/>
+                <enum name="GL_QUAD_ALPHA8_SGIS"/>
+                <enum name="GL_QUAD_LUMINANCE4_SGIS"/>
+                <enum name="GL_QUAD_LUMINANCE8_SGIS"/>
+                <enum name="GL_QUAD_INTENSITY4_SGIS"/>
+                <enum name="GL_QUAD_INTENSITY8_SGIS"/>
+                <enum name="GL_DUAL_TEXTURE_SELECT_SGIS"/>
+                <enum name="GL_QUAD_TEXTURE_SELECT_SGIS"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_async" supported="gl">
+            <require>
+                <enum name="GL_ASYNC_MARKER_SGIX"/>
+                <command name="glAsyncMarkerSGIX"/>
+                <command name="glFinishAsyncSGIX"/>
+                <command name="glPollAsyncSGIX"/>
+                <command name="glGenAsyncMarkersSGIX"/>
+                <command name="glDeleteAsyncMarkersSGIX"/>
+                <command name="glIsAsyncMarkerSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_async_histogram" supported="gl">
+            <require>
+                <enum name="GL_ASYNC_HISTOGRAM_SGIX"/>
+                <enum name="GL_MAX_ASYNC_HISTOGRAM_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_async_pixel" supported="gl">
+            <require>
+                <enum name="GL_ASYNC_TEX_IMAGE_SGIX"/>
+                <enum name="GL_ASYNC_DRAW_PIXELS_SGIX"/>
+                <enum name="GL_ASYNC_READ_PIXELS_SGIX"/>
+                <enum name="GL_MAX_ASYNC_TEX_IMAGE_SGIX"/>
+                <enum name="GL_MAX_ASYNC_DRAW_PIXELS_SGIX"/>
+                <enum name="GL_MAX_ASYNC_READ_PIXELS_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_blend_alpha_minmax" supported="gl">
+            <require>
+                <enum name="GL_ALPHA_MIN_SGIX"/>
+                <enum name="GL_ALPHA_MAX_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_calligraphic_fragment" supported="gl">
+            <require>
+                <enum name="GL_CALLIGRAPHIC_FRAGMENT_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_clipmap" supported="gl">
+            <require>
+                <enum name="GL_LINEAR_CLIPMAP_LINEAR_SGIX"/>
+                <enum name="GL_TEXTURE_CLIPMAP_CENTER_SGIX"/>
+                <enum name="GL_TEXTURE_CLIPMAP_FRAME_SGIX"/>
+                <enum name="GL_TEXTURE_CLIPMAP_OFFSET_SGIX"/>
+                <enum name="GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+                <enum name="GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX"/>
+                <enum name="GL_TEXTURE_CLIPMAP_DEPTH_SGIX"/>
+                <enum name="GL_MAX_CLIPMAP_DEPTH_SGIX"/>
+                <enum name="GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX"/>
+                <enum name="GL_NEAREST_CLIPMAP_NEAREST_SGIX"/>
+                <enum name="GL_NEAREST_CLIPMAP_LINEAR_SGIX"/>
+                <enum name="GL_LINEAR_CLIPMAP_NEAREST_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_convolution_accuracy" supported="gl">
+            <require>
+                <enum name="GL_CONVOLUTION_HINT_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_depth_pass_instrument" supported="gl"/>
+        <extension name="GL_SGIX_depth_texture" supported="gl">
+            <require>
+                <enum name="GL_DEPTH_COMPONENT16_SGIX"/>
+                <enum name="GL_DEPTH_COMPONENT24_SGIX"/>
+                <enum name="GL_DEPTH_COMPONENT32_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_flush_raster" supported="gl">
+            <require>
+                <command name="glFlushRasterSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_fog_offset" supported="gl">
+            <require>
+                <enum name="GL_FOG_OFFSET_SGIX"/>
+                <enum name="GL_FOG_OFFSET_VALUE_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_fragment_lighting" supported="gl" comment="Incomplete extension">
+            <require>
+                <enum name="GL_FRAGMENT_LIGHTING_SGIX"/>
+                <enum name="GL_FRAGMENT_COLOR_MATERIAL_SGIX"/>
+                <enum name="GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX"/>
+                <enum name="GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX"/>
+                <enum name="GL_MAX_FRAGMENT_LIGHTS_SGIX"/>
+                <enum name="GL_MAX_ACTIVE_LIGHTS_SGIX"/>
+                <enum name="GL_CURRENT_RASTER_NORMAL_SGIX"/>
+                <enum name="GL_LIGHT_ENV_MODE_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT0_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT1_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT2_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT3_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT4_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT5_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT6_SGIX"/>
+                <enum name="GL_FRAGMENT_LIGHT7_SGIX"/>
+                <command name="glFragmentColorMaterialSGIX"/>
+                <command name="glFragmentLightfSGIX"/>
+                <command name="glFragmentLightfvSGIX"/>
+                <command name="glFragmentLightiSGIX"/>
+                <command name="glFragmentLightivSGIX"/>
+                <command name="glFragmentLightModelfSGIX"/>
+                <command name="glFragmentLightModelfvSGIX"/>
+                <command name="glFragmentLightModeliSGIX"/>
+                <command name="glFragmentLightModelivSGIX"/>
+                <command name="glFragmentMaterialfSGIX"/>
+                <command name="glFragmentMaterialfvSGIX"/>
+                <command name="glFragmentMaterialiSGIX"/>
+                <command name="glFragmentMaterialivSGIX"/>
+                <command name="glGetFragmentLightfvSGIX"/>
+                <command name="glGetFragmentLightivSGIX"/>
+                <command name="glGetFragmentMaterialfvSGIX"/>
+                <command name="glGetFragmentMaterialivSGIX"/>
+                <command name="glLightEnviSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_framezoom" supported="gl">
+            <require>
+                <enum name="GL_FRAMEZOOM_SGIX"/>
+                <enum name="GL_FRAMEZOOM_FACTOR_SGIX"/>
+                <enum name="GL_MAX_FRAMEZOOM_FACTOR_SGIX"/>
+                <command name="glFrameZoomSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_igloo_interface" supported="gl">
+            <require>
+                <command name="glIglooInterfaceSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_instruments" supported="gl">
+            <require>
+                <enum name="GL_INSTRUMENT_BUFFER_POINTER_SGIX"/>
+                <enum name="GL_INSTRUMENT_MEASUREMENTS_SGIX"/>
+                <command name="glGetInstrumentsSGIX"/>
+                <command name="glInstrumentsBufferSGIX"/>
+                <command name="glPollInstrumentsSGIX"/>
+                <command name="glReadInstrumentsSGIX"/>
+                <command name="glStartInstrumentsSGIX"/>
+                <command name="glStopInstrumentsSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_interlace" supported="gl">
+            <require>
+                <enum name="GL_INTERLACE_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_ir_instrument1" supported="gl">
+            <require>
+                <enum name="GL_IR_INSTRUMENT1_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_list_priority" supported="gl">
+            <require>
+                <enum name="GL_LIST_PRIORITY_SGIX"/>
+                <command name="glGetListParameterfvSGIX"/>
+                <command name="glGetListParameterivSGIX"/>
+                <command name="glListParameterfSGIX"/>
+                <command name="glListParameterfvSGIX"/>
+                <command name="glListParameteriSGIX"/>
+                <command name="glListParameterivSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_pixel_texture" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_TEX_GEN_SGIX"/>
+                <enum name="GL_PIXEL_TEX_GEN_MODE_SGIX"/>
+                <command name="glPixelTexGenSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_pixel_tiles" supported="gl">
+            <require>
+                <enum name="GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX"/>
+                <enum name="GL_PIXEL_TILE_CACHE_INCREMENT_SGIX"/>
+                <enum name="GL_PIXEL_TILE_WIDTH_SGIX"/>
+                <enum name="GL_PIXEL_TILE_HEIGHT_SGIX"/>
+                <enum name="GL_PIXEL_TILE_GRID_WIDTH_SGIX"/>
+                <enum name="GL_PIXEL_TILE_GRID_HEIGHT_SGIX"/>
+                <enum name="GL_PIXEL_TILE_GRID_DEPTH_SGIX"/>
+                <enum name="GL_PIXEL_TILE_CACHE_SIZE_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_polynomial_ffd" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_DEFORMATION_BIT_SGIX"/>
+                <enum name="GL_GEOMETRY_DEFORMATION_BIT_SGIX"/>
+                <enum name="GL_GEOMETRY_DEFORMATION_SGIX"/>
+                <enum name="GL_TEXTURE_DEFORMATION_SGIX"/>
+                <enum name="GL_DEFORMATIONS_MASK_SGIX"/>
+                <enum name="GL_MAX_DEFORMATION_ORDER_SGIX"/>
+                <command name="glDeformationMap3dSGIX"/>
+                <command name="glDeformationMap3fSGIX"/>
+                <command name="glDeformSGIX"/>
+                <command name="glLoadIdentityDeformationMapSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_reference_plane" supported="gl">
+            <require>
+                <enum name="GL_REFERENCE_PLANE_SGIX"/>
+                <enum name="GL_REFERENCE_PLANE_EQUATION_SGIX"/>
+                <command name="glReferencePlaneSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_resample" supported="gl">
+            <require>
+                <enum name="GL_PACK_RESAMPLE_SGIX"/>
+                <enum name="GL_UNPACK_RESAMPLE_SGIX"/>
+                <enum name="GL_RESAMPLE_REPLICATE_SGIX"/>
+                <enum name="GL_RESAMPLE_ZERO_FILL_SGIX"/>
+                <enum name="GL_RESAMPLE_DECIMATE_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_scalebias_hint" supported="gl">
+            <require>
+                <enum name="GL_SCALEBIAS_HINT_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_shadow" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_COMPARE_SGIX"/>
+                <enum name="GL_TEXTURE_COMPARE_OPERATOR_SGIX"/>
+                <enum name="GL_TEXTURE_LEQUAL_R_SGIX"/>
+                <enum name="GL_TEXTURE_GEQUAL_R_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_shadow_ambient" supported="gl">
+            <require>
+                <enum name="GL_SHADOW_AMBIENT_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_sprite" supported="gl">
+            <require>
+                <enum name="GL_SPRITE_SGIX"/>
+                <enum name="GL_SPRITE_MODE_SGIX"/>
+                <enum name="GL_SPRITE_AXIS_SGIX"/>
+                <enum name="GL_SPRITE_TRANSLATION_SGIX"/>
+                <enum name="GL_SPRITE_AXIAL_SGIX"/>
+                <enum name="GL_SPRITE_OBJECT_ALIGNED_SGIX"/>
+                <enum name="GL_SPRITE_EYE_ALIGNED_SGIX"/>
+                <command name="glSpriteParameterfSGIX"/>
+                <command name="glSpriteParameterfvSGIX"/>
+                <command name="glSpriteParameteriSGIX"/>
+                <command name="glSpriteParameterivSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_subsample" supported="gl">
+            <require>
+                <enum name="GL_PACK_SUBSAMPLE_RATE_SGIX"/>
+                <enum name="GL_UNPACK_SUBSAMPLE_RATE_SGIX"/>
+                <enum name="GL_PIXEL_SUBSAMPLE_4444_SGIX"/>
+                <enum name="GL_PIXEL_SUBSAMPLE_2424_SGIX"/>
+                <enum name="GL_PIXEL_SUBSAMPLE_4242_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_tag_sample_buffer" supported="gl">
+            <require>
+                <command name="glTagSampleBufferSGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_texture_add_env" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_ENV_BIAS_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_texture_coordinate_clamp" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_MAX_CLAMP_S_SGIX"/>
+                <enum name="GL_TEXTURE_MAX_CLAMP_T_SGIX"/>
+                <enum name="GL_TEXTURE_MAX_CLAMP_R_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_texture_lod_bias" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_LOD_BIAS_S_SGIX"/>
+                <enum name="GL_TEXTURE_LOD_BIAS_T_SGIX"/>
+                <enum name="GL_TEXTURE_LOD_BIAS_R_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_texture_multi_buffer" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_MULTI_BUFFER_HINT_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_texture_scale_bias" supported="gl">
+            <require>
+                <enum name="GL_POST_TEXTURE_FILTER_BIAS_SGIX"/>
+                <enum name="GL_POST_TEXTURE_FILTER_SCALE_SGIX"/>
+                <enum name="GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX"/>
+                <enum name="GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_vertex_preclip" supported="gl">
+            <require>
+                <enum name="GL_VERTEX_PRECLIP_SGIX"/>
+                <enum name="GL_VERTEX_PRECLIP_HINT_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_ycrcb" supported="gl">
+            <require>
+                <enum name="GL_YCRCB_422_SGIX"/>
+                <enum name="GL_YCRCB_444_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGIX_ycrcb_subsample" supported="gl"/>
+        <extension name="GL_SGIX_ycrcba" supported="gl">
+            <require>
+                <enum name="GL_YCRCB_SGIX"/>
+                <enum name="GL_YCRCBA_SGIX"/>
+            </require>
+        </extension>
+        <extension name="GL_SGI_color_matrix" supported="gl">
+            <require>
+                <enum name="GL_COLOR_MATRIX_SGI"/>
+                <enum name="GL_COLOR_MATRIX_STACK_DEPTH_SGI"/>
+                <enum name="GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_RED_SCALE_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_RED_BIAS_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI"/>
+            </require>
+        </extension>
+        <extension name="GL_SGI_color_table" supported="gl">
+            <require>
+                <enum name="GL_COLOR_TABLE_SGI"/>
+                <enum name="GL_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+                <enum name="GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+                <enum name="GL_PROXY_COLOR_TABLE_SGI"/>
+                <enum name="GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI"/>
+                <enum name="GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI"/>
+                <enum name="GL_COLOR_TABLE_SCALE_SGI"/>
+                <enum name="GL_COLOR_TABLE_BIAS_SGI"/>
+                <enum name="GL_COLOR_TABLE_FORMAT_SGI"/>
+                <enum name="GL_COLOR_TABLE_WIDTH_SGI"/>
+                <enum name="GL_COLOR_TABLE_RED_SIZE_SGI"/>
+                <enum name="GL_COLOR_TABLE_GREEN_SIZE_SGI"/>
+                <enum name="GL_COLOR_TABLE_BLUE_SIZE_SGI"/>
+                <enum name="GL_COLOR_TABLE_ALPHA_SIZE_SGI"/>
+                <enum name="GL_COLOR_TABLE_LUMINANCE_SIZE_SGI"/>
+                <enum name="GL_COLOR_TABLE_INTENSITY_SIZE_SGI"/>
+                <command name="glColorTableSGI"/>
+                <command name="glColorTableParameterfvSGI"/>
+                <command name="glColorTableParameterivSGI"/>
+                <command name="glCopyColorTableSGI"/>
+                <command name="glGetColorTableSGI"/>
+                <command name="glGetColorTableParameterfvSGI"/>
+                <command name="glGetColorTableParameterivSGI"/>
+            </require>
+        </extension>
+        <extension name="GL_SGI_texture_color_table" supported="gl">
+            <require>
+                <enum name="GL_TEXTURE_COLOR_TABLE_SGI"/>
+                <enum name="GL_PROXY_TEXTURE_COLOR_TABLE_SGI"/>
+            </require>
+        </extension>
+        <extension name="GL_SUNX_constant_data" supported="gl">
+            <require>
+                <enum name="GL_UNPACK_CONSTANT_DATA_SUNX"/>
+                <enum name="GL_TEXTURE_CONSTANT_DATA_SUNX"/>
+                <command name="glFinishTextureSUNX"/>
+            </require>
+        </extension>
+        <extension name="GL_SUN_convolution_border_modes" supported="gl">
+            <require>
+                <enum name="GL_WRAP_BORDER_SUN"/>
+            </require>
+        </extension>
+        <extension name="GL_SUN_global_alpha" supported="gl">
+            <require>
+                <enum name="GL_GLOBAL_ALPHA_SUN"/>
+                <enum name="GL_GLOBAL_ALPHA_FACTOR_SUN"/>
+                <command name="glGlobalAlphaFactorbSUN"/>
+                <command name="glGlobalAlphaFactorsSUN"/>
+                <command name="glGlobalAlphaFactoriSUN"/>
+                <command name="glGlobalAlphaFactorfSUN"/>
+                <command name="glGlobalAlphaFactordSUN"/>
+                <command name="glGlobalAlphaFactorubSUN"/>
+                <command name="glGlobalAlphaFactorusSUN"/>
+                <command name="glGlobalAlphaFactoruiSUN"/>
+            </require>
+        </extension>
+        <extension name="GL_SUN_mesh_array" supported="gl">
+            <require>
+                <enum name="GL_QUAD_MESH_SUN"/>
+                <enum name="GL_TRIANGLE_MESH_SUN"/>
+                <command name="glDrawMeshArraysSUN"/>
+            </require>
+        </extension>
+        <extension name="GL_SUN_slice_accum" supported="gl">
+            <require>
+                <enum name="GL_SLICE_ACCUM_SUN"/>
+            </require>
+        </extension>
+        <extension name="GL_SUN_triangle_list" supported="gl">
+            <require>
+                <enum name="GL_RESTART_SUN"/>
+                <enum name="GL_REPLACE_MIDDLE_SUN"/>
+                <enum name="GL_REPLACE_OLDEST_SUN"/>
+                <enum name="GL_TRIANGLE_LIST_SUN"/>
+                <enum name="GL_REPLACEMENT_CODE_SUN"/>
+                <enum name="GL_REPLACEMENT_CODE_ARRAY_SUN"/>
+                <enum name="GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN"/>
+                <enum name="GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN"/>
+                <enum name="GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN"/>
+                <enum name="GL_R1UI_V3F_SUN"/>
+                <enum name="GL_R1UI_C4UB_V3F_SUN"/>
+                <enum name="GL_R1UI_C3F_V3F_SUN"/>
+                <enum name="GL_R1UI_N3F_V3F_SUN"/>
+                <enum name="GL_R1UI_C4F_N3F_V3F_SUN"/>
+                <enum name="GL_R1UI_T2F_V3F_SUN"/>
+                <enum name="GL_R1UI_T2F_N3F_V3F_SUN"/>
+                <enum name="GL_R1UI_T2F_C4F_N3F_V3F_SUN"/>
+                <command name="glReplacementCodeuiSUN"/>
+                <command name="glReplacementCodeusSUN"/>
+                <command name="glReplacementCodeubSUN"/>
+                <command name="glReplacementCodeuivSUN"/>
+                <command name="glReplacementCodeusvSUN"/>
+                <command name="glReplacementCodeubvSUN"/>
+                <command name="glReplacementCodePointerSUN"/>
+            </require>
+        </extension>
+        <extension name="GL_SUN_vertex" supported="gl">
+            <require>
+                <command name="glColor4ubVertex2fSUN"/>
+                <command name="glColor4ubVertex2fvSUN"/>
+                <command name="glColor4ubVertex3fSUN"/>
+                <command name="glColor4ubVertex3fvSUN"/>
+                <command name="glColor3fVertex3fSUN"/>
+                <command name="glColor3fVertex3fvSUN"/>
+                <command name="glNormal3fVertex3fSUN"/>
+                <command name="glNormal3fVertex3fvSUN"/>
+                <command name="glColor4fNormal3fVertex3fSUN"/>
+                <command name="glColor4fNormal3fVertex3fvSUN"/>
+                <command name="glTexCoord2fVertex3fSUN"/>
+                <command name="glTexCoord2fVertex3fvSUN"/>
+                <command name="glTexCoord4fVertex4fSUN"/>
+                <command name="glTexCoord4fVertex4fvSUN"/>
+                <command name="glTexCoord2fColor4ubVertex3fSUN"/>
+                <command name="glTexCoord2fColor4ubVertex3fvSUN"/>
+                <command name="glTexCoord2fColor3fVertex3fSUN"/>
+                <command name="glTexCoord2fColor3fVertex3fvSUN"/>
+                <command name="glTexCoord2fNormal3fVertex3fSUN"/>
+                <command name="glTexCoord2fNormal3fVertex3fvSUN"/>
+                <command name="glTexCoord2fColor4fNormal3fVertex3fSUN"/>
+                <command name="glTexCoord2fColor4fNormal3fVertex3fvSUN"/>
+                <command name="glTexCoord4fColor4fNormal3fVertex4fSUN"/>
+                <command name="glTexCoord4fColor4fNormal3fVertex4fvSUN"/>
+                <command name="glReplacementCodeuiVertex3fSUN"/>
+                <command name="glReplacementCodeuiVertex3fvSUN"/>
+                <command name="glReplacementCodeuiColor4ubVertex3fSUN"/>
+                <command name="glReplacementCodeuiColor4ubVertex3fvSUN"/>
+                <command name="glReplacementCodeuiColor3fVertex3fSUN"/>
+                <command name="glReplacementCodeuiColor3fVertex3fvSUN"/>
+                <command name="glReplacementCodeuiNormal3fVertex3fSUN"/>
+                <command name="glReplacementCodeuiNormal3fVertex3fvSUN"/>
+                <command name="glReplacementCodeuiColor4fNormal3fVertex3fSUN"/>
+                <command name="glReplacementCodeuiColor4fNormal3fVertex3fvSUN"/>
+                <command name="glReplacementCodeuiTexCoord2fVertex3fSUN"/>
+                <command name="glReplacementCodeuiTexCoord2fVertex3fvSUN"/>
+                <command name="glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN"/>
+                <command name="glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN"/>
+                <command name="glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN"/>
+                <command name="glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN"/>
+            </require>
+        </extension>
+        <extension name="GL_VIV_shader_binary" supported="gles2">
+            <require>
+                <enum name="GL_SHADER_BINARY_VIV"/>
+            </require>
+        </extension>
+        <extension name="GL_WIN_phong_shading" supported="gl">
+            <require>
+                <enum name="GL_PHONG_WIN"/>
+                <enum name="GL_PHONG_HINT_WIN"/>
+            </require>
+        </extension>
+        <extension name="GL_WIN_specular_fog" supported="gl">
+            <require>
+                <enum name="GL_FOG_SPECULAR_TEXTURE_WIN"/>
+            </require>
+        </extension>
+    </extensions>
+</registry>
diff --git a/opengl/tools/glgen2/registry/reg.py b/opengl/tools/glgen2/registry/reg.py
new file mode 100755
index 0000000..1bbe0a0
--- /dev/null
+++ b/opengl/tools/glgen2/registry/reg.py
@@ -0,0 +1,1162 @@
+#!/usr/bin/python3 -i
+#
+# Copyright (c) 2013-2014 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.
+
+import io,os,re,string,sys
+from lxml import etree
+
+def write( *args, **kwargs ):
+    file = kwargs.pop('file',sys.stdout)
+    end = kwargs.pop( 'end','\n')
+    file.write( ' '.join([str(arg) for arg in args]) )
+    file.write( end )
+
+# noneStr - returns string argument, or "" if argument is None.
+# Used in converting lxml Elements into text.
+#   str - string to convert
+def noneStr(str):
+    if (str):
+        return str
+    else:
+        return ""
+
+# matchAPIProfile - returns whether an API and profile
+#   being generated matches an element's profile
+# api - string naming the API to match
+# profile - string naming the profile to match
+# elem - Element which (may) have 'api' and 'profile'
+#   attributes to match to.
+# If a tag is not present in the Element, the corresponding API
+#   or profile always matches.
+# Otherwise, the tag must exactly match the API or profile.
+# Thus, if 'profile' = core:
+#   <remove> with no attribute will match
+#   <remove profile='core'> will match
+#   <remove profile='compatibility'> will not match
+# Possible match conditions:
+#   Requested   Element
+#   Profile     Profile
+#   ---------   --------
+#   None        None        Always matches
+#   'string'    None        Always matches
+#   None        'string'    Does not match. Can't generate multiple APIs
+#                           or profiles, so if an API/profile constraint
+#                           is present, it must be asked for explicitly.
+#   'string'    'string'    Strings must match
+#
+#   ** In the future, we will allow regexes for the attributes,
+#   not just strings, so that api="^(gl|gles2)" will match. Even
+#   this isn't really quite enough, we might prefer something
+#   like "gl(core)|gles1(common-lite)".
+def matchAPIProfile(api, profile, elem):
+    """Match a requested API & profile name to a api & profile attributes of an Element"""
+    match = True
+    # Match 'api', if present
+    if ('api' in elem.attrib):
+        if (api == None):
+            raise UserWarning("No API requested, but 'api' attribute is present with value '" +
+                              elem.get('api') + "'")
+        elif (api != elem.get('api')):
+            # Requested API doesn't match attribute
+            return False
+    if ('profile' in elem.attrib):
+        if (profile == None):
+            raise UserWarning("No profile requested, but 'profile' attribute is present with value '" +
+                elem.get('profile') + "'")
+        elif (profile != elem.get('profile')):
+            # Requested profile doesn't match attribute
+            return False
+    return True
+
+# BaseInfo - base class for information about a registry feature
+# (type/group/enum/command/API/extension).
+#   required - should this feature be defined during header generation
+#     (has it been removed by a profile or version)?
+#   declared - has this feature been defined already?
+#   elem - lxml.etree Element for this feature
+#   resetState() - reset required/declared to initial values. Used
+#     prior to generating a new API interface.
+class BaseInfo:
+    """Represents the state of a registry feature, used during API generation"""
+    def __init__(self, elem):
+        self.required = False
+        self.declared = False
+        self.elem = elem
+    def resetState(self):
+        self.required = False
+        self.declared = False
+
+# TypeInfo - registry information about a type. No additional state
+#   beyond BaseInfo is required.
+class TypeInfo(BaseInfo):
+    """Represents the state of a registry type"""
+    def __init__(self, elem):
+        BaseInfo.__init__(self, elem)
+
+# GroupInfo - registry information about a group of related enums.
+#   enums - dictionary of enum names which are in the group
+class GroupInfo(BaseInfo):
+    """Represents the state of a registry enumerant group"""
+    def __init__(self, elem):
+        BaseInfo.__init__(self, elem)
+        self.enums = {}
+
+# EnumInfo - registry information about an enum
+#   type - numeric type of the value of the <enum> tag
+#     ( '' for GLint, 'u' for GLuint, 'ull' for GLuint64 )
+class EnumInfo(BaseInfo):
+    """Represents the state of a registry enum"""
+    def __init__(self, elem):
+        BaseInfo.__init__(self, elem)
+        self.type = elem.get('type')
+        if (self.type == None):
+            self.type = ''
+
+# CmdInfo - registry information about a command
+#   glxtype - type of GLX protocol { None, 'render', 'single', 'vendor' }
+#   glxopcode - GLX protocol opcode { None, number }
+#   glxequiv - equivalent command at GLX dispatch level { None, string }
+#   vecequiv - equivalent vector form of a command taking multiple scalar args
+#     { None, string }
+class CmdInfo(BaseInfo):
+    """Represents the state of a registry command"""
+    def __init__(self, elem):
+        BaseInfo.__init__(self, elem)
+        self.glxtype = None
+        self.glxopcode = None
+        self.glxequiv = None
+        self.vecequiv = None
+
+# FeatureInfo - registry information about an API <feature>
+# or <extension>
+#   name - feature name string (e.g. 'GL_ARB_multitexture')
+#   number - feature version number (e.g. 1.2). <extension>
+#     features are unversioned and assigned version number 0.
+#   category - category, e.g. VERSION or ARB/KHR/OES/ETC/vendor
+#   emit - has this feature been defined already?
+class FeatureInfo(BaseInfo):
+    """Represents the state of an API feature (version/extension)"""
+    def __init__(self, elem):
+        BaseInfo.__init__(self, elem)
+        self.name = elem.get('name')
+        # Determine element category (vendor). Only works
+        # for <extension> elements.
+        if (elem.tag == 'feature'):
+            self.category = 'VERSION'
+            self.number = elem.get('number')
+        else:
+            self.category = self.name.split('_', 2)[1]
+            self.number = "0"
+        self.emit = False
+
+# Primary sort key for regSortFeatures.
+# Sorts by category of the feature name string:
+#   Core API features (those defined with a <feature> tag)
+#   ARB/KHR/OES (Khronos extensions)
+#   other       (EXT/vendor extensions)
+def regSortCategoryKey(feature):
+    if (feature.elem.tag == 'feature'):
+        return 0
+    elif (feature.category == 'ARB' or
+          feature.category == 'KHR' or
+          feature.category == 'OES'):
+        return 1
+    else:
+        return 2
+
+# Secondary sort key for regSortFeatures.
+# Sorts by extension name.
+def regSortNameKey(feature):
+    return feature.name
+
+# Tertiary sort key for regSortFeatures.
+# Sorts by feature version number. <extension>
+# elements all have version number "0"
+def regSortNumberKey(feature):
+    return feature.number
+
+# regSortFeatures - default sort procedure for features.
+# Sorts by primary key of feature category,
+# then by feature name within the category,
+# then by version number
+def regSortFeatures(featureList):
+    featureList.sort(key = regSortNumberKey)
+    featureList.sort(key = regSortNameKey)
+    featureList.sort(key = regSortCategoryKey)
+
+# GeneratorOptions - base class for options used during header production
+# These options are target language independent, and used by
+# Registry.apiGen() and by base OutputGenerator objects.
+#
+# Members
+#   filename - name of file to generate, or None to write to stdout.
+#   apiname - string matching <api> 'apiname' attribute, e.g. 'gl'.
+#   profile - string specifying API profile , e.g. 'core', or None.
+#   versions - regex matching API versions to process interfaces for.
+#     Normally '.*' or '[0-9]\.[0-9]' to match all defined versions.
+#   emitversions - regex matching API versions to actually emit
+#    interfaces for (though all requested versions are considered
+#    when deciding which interfaces to generate). For GL 4.3 glext.h,
+#     this might be '1\.[2-5]|[2-4]\.[0-9]'.
+#   defaultExtensions - If not None, a string which must in its
+#     entirety match the pattern in the "supported" attribute of
+#     the <extension>. Defaults to None. Usually the same as apiname.
+#   addExtensions - regex matching names of additional extensions
+#     to include. Defaults to None.
+#   removeExtenions - regex matching names of extensions to
+#     remove (after defaultExtensions and addExtensions). Defaults
+#     to None.
+#   sortProcedure - takes a list of FeatureInfo objects and sorts
+#     them in place to a preferred order in the generated output.
+#     Default is core API versions, ARB/KHR/OES extensions, all
+#     other extensions, alphabetically within each group.
+# The regex patterns can be None or empty, in which case they match
+#   nothing.
+class GeneratorOptions:
+    """Represents options during header production from an API registry"""
+    def __init__(self,
+                 filename = None,
+                 apiname = None,
+                 profile = None,
+                 versions = '.*',
+                 emitversions = '.*',
+                 defaultExtensions = None,
+                 addExtensions = None,
+                 removeExtensions = None,
+                 sortProcedure = regSortFeatures):
+        self.filename          = filename
+        self.apiname           = apiname
+        self.profile           = profile
+        self.versions          = self.emptyRegex(versions)
+        self.emitversions      = self.emptyRegex(emitversions)
+        self.defaultExtensions = defaultExtensions
+        self.addExtensions     = self.emptyRegex(addExtensions)
+        self.removeExtensions  = self.emptyRegex(removeExtensions)
+        self.sortProcedure     = sortProcedure
+    #
+    # Substitute a regular expression which matches no version
+    # or extension names for None or the empty string.
+    def emptyRegex(self,pat):
+        if (pat == None or pat == ''):
+            return '_nomatch_^'
+        else:
+            return pat
+
+# CGeneratorOptions - subclass of GeneratorOptions.
+#
+# Adds options used by COutputGenerator objects during C language header
+# generation.
+#
+# Additional members
+#   prefixText - list of strings to prefix generated header with
+#     (usually a copyright statement + calling convention macros).
+#   protectFile - True if multiple inclusion protection should be
+#     generated (based on the filename) around the entire header.
+#   protectFeature - True if #ifndef..#endif protection should be
+#     generated around a feature interface in the header file.
+#   genFuncPointers - True if function pointer typedefs should be
+#     generated
+#   protectProto - True if #ifdef..#endif protection should be
+#     generated around prototype declarations
+#   protectProtoStr - #ifdef symbol to use around prototype
+#     declarations, if protected
+#   apicall - string to use for the function declaration prefix,
+#     such as APICALL on Windows.
+#   apientry - string to use for the calling convention macro,
+#     in typedefs, such as APIENTRY.
+#   apientryp - string to use for the calling convention macro
+#     in function pointer typedefs, such as APIENTRYP.
+class CGeneratorOptions(GeneratorOptions):
+    """Represents options during C header production from an API registry"""
+    def __init__(self,
+                 filename = None,
+                 apiname = None,
+                 profile = None,
+                 versions = '.*',
+                 emitversions = '.*',
+                 defaultExtensions = None,
+                 addExtensions = None,
+                 removeExtensions = None,
+                 sortProcedure = regSortFeatures,
+                 prefixText = "",
+                 genFuncPointers = True,
+                 protectFile = True,
+                 protectFeature = True,
+                 protectProto = True,
+                 protectProtoStr = True,
+                 apicall = '',
+                 apientry = '',
+                 apientryp = ''):
+        GeneratorOptions.__init__(self, filename, apiname, profile,
+                                  versions, emitversions, defaultExtensions,
+                                  addExtensions, removeExtensions, sortProcedure)
+        self.prefixText      = prefixText
+        self.genFuncPointers = genFuncPointers
+        self.protectFile     = protectFile
+        self.protectFeature  = protectFeature
+        self.protectProto    = protectProto
+        self.protectProtoStr = protectProtoStr
+        self.apicall         = apicall
+        self.apientry        = apientry
+        self.apientryp       = apientryp
+
+# OutputGenerator - base class for generating API interfaces.
+# Manages basic logic, logging, and output file control
+# Derived classes actually generate formatted output.
+#
+# ---- methods ----
+# OutputGenerator(errFile, warnFile, diagFile)
+#   errFile, warnFile, diagFile - file handles to write errors,
+#     warnings, diagnostics to. May be None to not write.
+# logMsg(level, *args) - log messages of different categories
+#   level - 'error', 'warn', or 'diag'. 'error' will also
+#     raise a UserWarning exception
+#   *args - print()-style arguments
+# beginFile(genOpts) - start a new interface file
+#   genOpts - GeneratorOptions controlling what's generated and how
+# endFile() - finish an interface file, closing it when done
+# beginFeature(interface, emit) - write interface for a feature
+# and tag generated features as having been done.
+#   interface - element for the <version> / <extension> to generate
+#   emit - actually write to the header only when True
+# endFeature() - finish an interface.
+# genType(typeinfo,name) - generate interface for a type
+#   typeinfo - TypeInfo for a type
+# genEnum(enuminfo, name) - generate interface for an enum
+#   enuminfo - EnumInfo for an enum
+#   name - enum name
+# genCmd(cmdinfo) - generate interface for a command
+#   cmdinfo - CmdInfo for a command
+class OutputGenerator:
+    """Generate specified API interfaces in a specific style, such as a C header"""
+    def __init__(self,
+                 errFile = sys.stderr,
+                 warnFile = sys.stderr,
+                 diagFile = sys.stdout):
+        self.outFile = None
+        self.errFile = errFile
+        self.warnFile = warnFile
+        self.diagFile = diagFile
+        # Internal state
+        self.featureName = None
+        self.genOpts = None
+    #
+    # logMsg - write a message of different categories to different
+    #   destinations.
+    # level -
+    #   'diag' (diagnostic, voluminous)
+    #   'warn' (warning)
+    #   'error' (fatal error - raises exception after logging)
+    # *args - print()-style arguments to direct to corresponding log
+    def logMsg(self, level, *args):
+        """Log a message at the given level. Can be ignored or log to a file"""
+        if (level == 'error'):
+            strfile = io.StringIO()
+            write('ERROR:', *args, file=strfile)
+            if (self.errFile != None):
+                write(strfile.getvalue(), file=self.errFile)
+            raise UserWarning(strfile.getvalue())
+        elif (level == 'warn'):
+            if (self.warnFile != None):
+                write('WARNING:', *args, file=self.warnFile)
+        elif (level == 'diag'):
+            if (self.diagFile != None):
+                write('DIAG:', *args, file=self.diagFile)
+        else:
+            raise UserWarning(
+                '*** FATAL ERROR in Generator.logMsg: unknown level:' + level)
+    #
+    def beginFile(self, genOpts):
+        self.genOpts = genOpts
+        #
+        # Open specified output file. Not done in constructor since a
+        # Generator can be used without writing to a file.
+        if (self.genOpts.filename != None):
+            self.outFile = open(self.genOpts.filename, 'w')
+        else:
+            self.outFile = sys.stdout
+    def endFile(self):
+        self.errFile and self.errFile.flush()
+        self.warnFile and self.warnFile.flush()
+        self.diagFile and self.diagFile.flush()
+        self.outFile.flush()
+        if (self.outFile != sys.stdout and self.outFile != sys.stderr):
+            self.outFile.close()
+        self.genOpts = None
+    #
+    def beginFeature(self, interface, emit):
+        self.emit = emit
+        self.featureName = interface.get('name')
+        # If there's an additional 'protect' attribute in the feature, save it
+        self.featureExtraProtect = interface.get('protect')
+    def endFeature(self):
+        # Derived classes responsible for emitting feature
+        self.featureName = None
+        self.featureExtraProtect = None
+    #
+    # Type generation
+    def genType(self, typeinfo, name):
+        if (self.featureName == None):
+            raise UserWarning('Attempt to generate type', name,
+                    'when not in feature')
+    #
+    # Enumerant generation
+    def genEnum(self, enuminfo, name):
+        if (self.featureName == None):
+            raise UserWarning('Attempt to generate enum', name,
+                    'when not in feature')
+    #
+    # Command generation
+    def genCmd(self, cmd, name):
+        if (self.featureName == None):
+            raise UserWarning('Attempt to generate command', name,
+                    'when not in feature')
+
+# COutputGenerator - subclass of OutputGenerator.
+# Generates C-language API interfaces.
+#
+# ---- methods ----
+# COutputGenerator(errFile, warnFile, diagFile) - args as for
+#   OutputGenerator. Defines additional internal state.
+# makeCDecls(cmd) - return C prototype and function pointer typedef for a
+#     <command> Element, as a list of two strings
+#   cmd - Element for the <command>
+# newline() - print a newline to the output file (utility function)
+# ---- methods overriding base class ----
+# beginFile(genOpts)
+# endFile()
+# beginFeature(interface, emit)
+# endFeature()
+# genType(typeinfo,name) - generate interface for a type
+# genEnum(enuminfo, name)
+# genCmd(cmdinfo)
+class COutputGenerator(OutputGenerator):
+    """Generate specified API interfaces in a specific style, such as a C header"""
+    def __init__(self,
+                 errFile = sys.stderr,
+                 warnFile = sys.stderr,
+                 diagFile = sys.stdout):
+        OutputGenerator.__init__(self, errFile, warnFile, diagFile)
+        # Internal state - accumulators for different inner block text
+        self.typeBody = ''
+        self.enumBody = ''
+        self.cmdBody = ''
+    #
+    # makeCDecls - return C prototype and function pointer typedef for a
+    #   command, as a two-element list of strings.
+    # cmd - Element containing a <command> tag
+    def makeCDecls(self, cmd):
+        """Generate C function pointer typedef for <command> Element"""
+        proto = cmd.find('proto')
+        params = cmd.findall('param')
+        # Begin accumulating prototype and typedef strings
+        pdecl = self.genOpts.apicall
+        tdecl = 'typedef '
+        #
+        # Insert the function return type/name.
+        # For prototypes, add APIENTRY macro before the name
+        # For typedefs, add (APIENTRYP <name>) around the name and
+        #   use the PFNGLCMDNAMEPROC nameng convention.
+        # Done by walking the tree for <proto> element by element.
+        # lxml.etree has elem.text followed by (elem[i], elem[i].tail)
+        #   for each child element and any following text
+        # Leading text
+        pdecl += noneStr(proto.text)
+        tdecl += noneStr(proto.text)
+        # For each child element, if it's a <name> wrap in appropriate
+        # declaration. Otherwise append its contents and tail contents.
+        for elem in proto:
+            text = noneStr(elem.text)
+            tail = noneStr(elem.tail)
+            if (elem.tag == 'name'):
+                pdecl += self.genOpts.apientry + text + tail
+                tdecl += '(' + self.genOpts.apientryp + 'PFN' + text.upper() + 'PROC' + tail + ')'
+            else:
+                pdecl += text + tail
+                tdecl += text + tail
+        # Now add the parameter declaration list, which is identical
+        # for prototypes and typedefs. Concatenate all the text from
+        # a <param> node without the tags. No tree walking required
+        # since all tags are ignored.
+        n = len(params)
+        paramdecl = ' ('
+        if n > 0:
+            for i in range(0,n):
+                paramdecl += ''.join([t for t in params[i].itertext()])
+                if (i < n - 1):
+                    paramdecl += ', '
+        else:
+            paramdecl += 'void'
+        paramdecl += ");\n";
+        return [ pdecl + paramdecl, tdecl + paramdecl ]
+    #
+    def newline(self):
+        write('', file=self.outFile)
+    #
+    def beginFile(self, genOpts):
+        OutputGenerator.beginFile(self, genOpts)
+        # C-specific
+        #
+        # Multiple inclusion protection & C++ wrappers.
+        if (genOpts.protectFile and self.genOpts.filename):
+            headerSym = '__' + re.sub('\.h', '_h_', os.path.basename(self.genOpts.filename))
+            write('#ifndef', headerSym, file=self.outFile)
+            write('#define', headerSym, '1', file=self.outFile)
+            self.newline()
+        write('#ifdef __cplusplus', file=self.outFile)
+        write('extern "C" {', file=self.outFile)
+        write('#endif', file=self.outFile)
+        self.newline()
+        #
+        # User-supplied prefix text, if any (list of strings)
+        if (genOpts.prefixText):
+            for s in genOpts.prefixText:
+                write(s, file=self.outFile)
+        #
+        # Some boilerplate describing what was generated - this
+        # will probably be removed later since the extensions
+        # pattern may be very long.
+        write('/* Generated C header for:', file=self.outFile)
+        write(' * API:', genOpts.apiname, file=self.outFile)
+        if (genOpts.profile):
+            write(' * Profile:', genOpts.profile, file=self.outFile)
+        write(' * Versions considered:', genOpts.versions, file=self.outFile)
+        write(' * Versions emitted:', genOpts.emitversions, file=self.outFile)
+        write(' * Default extensions included:', genOpts.defaultExtensions, file=self.outFile)
+        write(' * Additional extensions included:', genOpts.addExtensions, file=self.outFile)
+        write(' * Extensions removed:', genOpts.removeExtensions, file=self.outFile)
+        write(' */', file=self.outFile)
+    def endFile(self):
+        # C-specific
+        # Finish C++ wrapper and multiple inclusion protection
+        self.newline()
+        write('#ifdef __cplusplus', file=self.outFile)
+        write('}', file=self.outFile)
+        write('#endif', file=self.outFile)
+        if (self.genOpts.protectFile and self.genOpts.filename):
+            self.newline()
+            write('#endif', file=self.outFile)
+        # Finish processing in superclass
+        OutputGenerator.endFile(self)
+    def beginFeature(self, interface, emit):
+        # Start processing in superclass
+        OutputGenerator.beginFeature(self, interface, emit)
+        # C-specific
+        # Accumulate types, enums, function pointer typedefs, end function
+        # prototypes separately for this feature. They're only printed in
+        # endFeature().
+        self.typeBody = ''
+        self.enumBody = ''
+        self.cmdPointerBody = ''
+        self.cmdBody = ''
+    def endFeature(self):
+        # C-specific
+        # Actually write the interface to the output file.
+        if (self.emit):
+            self.newline()
+            if (self.genOpts.protectFeature):
+                write('#ifndef', self.featureName, file=self.outFile)
+            write('#define', self.featureName, '1', file=self.outFile)
+            if (self.typeBody != ''):
+                write(self.typeBody, end='', file=self.outFile)
+            #
+            # Don't add additional protection for derived type declarations,
+            # which may be needed by other features later on.
+            if (self.featureExtraProtect != None):
+                write('#ifdef', self.featureExtraProtect, file=self.outFile)
+            if (self.enumBody != ''):
+                write(self.enumBody, end='', file=self.outFile)
+            if (self.genOpts.genFuncPointers and self.cmdPointerBody != ''):
+                write(self.cmdPointerBody, end='', file=self.outFile)
+            if (self.cmdBody != ''):
+                if (self.genOpts.protectProto):
+                    write('#ifdef', self.genOpts.protectProtoStr, file=self.outFile)
+                write(self.cmdBody, end='', file=self.outFile)
+                if (self.genOpts.protectProto):
+                    write('#endif', file=self.outFile)
+            if (self.featureExtraProtect != None):
+                write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
+            if (self.genOpts.protectFeature):
+                write('#endif /*', self.featureName, '*/', file=self.outFile)
+        # Finish processing in superclass
+        OutputGenerator.endFeature(self)
+    #
+    # Type generation
+    def genType(self, typeinfo, name):
+        OutputGenerator.genType(self, typeinfo, name)
+        #
+        # Replace <apientry /> tags with an APIENTRY-style string
+        # (from self.genOpts). Copy other text through unchanged.
+        # If the resulting text is an empty string, don't emit it.
+        typeElem = typeinfo.elem
+        s = noneStr(typeElem.text)
+        for elem in typeElem:
+            if (elem.tag == 'apientry'):
+                s += self.genOpts.apientry + noneStr(elem.tail)
+            else:
+                s += noneStr(elem.text) + noneStr(elem.tail)
+        if (len(s) > 0):
+            self.typeBody += s + "\n"
+    #
+    # Enumerant generation
+    def genEnum(self, enuminfo, name):
+        OutputGenerator.genEnum(self, enuminfo, name)
+        #
+        # EnumInfo.type is a C value suffix (e.g. u, ull)
+        self.enumBody += '#define ' + name.ljust(33) + ' ' + enuminfo.elem.get('value')
+        #
+        # Handle non-integer 'type' fields by using it as the C value suffix
+        t = enuminfo.elem.get('type')
+        if (t != '' and t != 'i'):
+            self.enumBody += enuminfo.type
+        self.enumBody += "\n"
+    #
+    # Command generation
+    def genCmd(self, cmdinfo, name):
+        OutputGenerator.genCmd(self, cmdinfo, name)
+        #
+        decls = self.makeCDecls(cmdinfo.elem)
+        self.cmdBody += decls[0]
+        if (self.genOpts.genFuncPointers):
+            self.cmdPointerBody += decls[1]
+
+# Registry - object representing an API registry, loaded from an XML file
+# Members
+#   tree - ElementTree containing the root <registry>
+#   typedict - dictionary of TypeInfo objects keyed by type name
+#   groupdict - dictionary of GroupInfo objects keyed by group name
+#   enumdict - dictionary of EnumInfo objects keyed by enum name
+#   cmddict - dictionary of CmdInfo objects keyed by command name
+#   apidict - dictionary of <api> Elements keyed by API name
+#   extensions - list of <extension> Elements
+#   extdict - dictionary of <extension> Elements keyed by extension name
+#   gen - OutputGenerator object used to write headers / messages
+#   genOpts - GeneratorOptions object used to control which
+#     fetures to write and how to format them
+#   emitFeatures - True to actually emit features for a version / extension,
+#     or False to just treat them as emitted
+# Public methods
+#   loadElementTree(etree) - load registry from specified ElementTree
+#   loadFile(filename) - load registry from XML file
+#   setGenerator(gen) - OutputGenerator to use
+#   parseTree() - parse the registry once loaded & create dictionaries
+#   dumpReg(maxlen, filehandle) - diagnostic to dump the dictionaries
+#     to specified file handle (default stdout). Truncates type /
+#     enum / command elements to maxlen characters (default 80)
+#   generator(g) - specify the output generator object
+#   apiGen(apiname, genOpts) - generate API headers for the API type
+#     and profile specified in genOpts, but only for the versions and
+#     extensions specified there.
+#   apiReset() - call between calls to apiGen() to reset internal state
+#   validateGroups() - call to verify that each <proto> or <param>
+#     with a 'group' attribute matches an actual existing group.
+# Private methods
+#   addElementInfo(elem,info,infoName,dictionary) - add feature info to dict
+#   lookupElementInfo(fname,dictionary) - lookup feature info in dict
+class Registry:
+    """Represents an API registry loaded from XML"""
+    def __init__(self):
+        self.tree         = None
+        self.typedict     = {}
+        self.groupdict    = {}
+        self.enumdict     = {}
+        self.cmddict      = {}
+        self.apidict      = {}
+        self.extensions   = []
+        self.extdict      = {}
+        # A default output generator, so commands prior to apiGen can report
+        # errors via the generator object.
+        self.gen          = OutputGenerator()
+        self.genOpts      = None
+        self.emitFeatures = False
+    def loadElementTree(self, tree):
+        """Load ElementTree into a Registry object and parse it"""
+        self.tree = tree
+        self.parseTree()
+    def loadFile(self, file):
+        """Load an API registry XML file into a Registry object and parse it"""
+        self.tree = etree.parse(file)
+        self.parseTree()
+    def setGenerator(self, gen):
+        """Specify output generator object. None restores the default generator"""
+        self.gen = gen
+    # addElementInfo - add information about an element to the
+    # corresponding dictionary
+    #   elem - <type>/<group>/<enum>/<command>/<feature>/<extension> Element
+    #   info - corresponding {Type|Group|Enum|Cmd|Feature}Info object
+    #   infoName - 'type' / 'group' / 'enum' / 'command' / 'feature' / 'extension'
+    #   dictionary - self.{type|group|enum|cmd|api|ext}dict
+    # If the Element has an 'api' attribute, the dictionary key is the
+    # tuple (name,api). If not, the key is the name. 'name' is an 
+    # attribute of the Element
+    def addElementInfo(self, elem, info, infoName, dictionary):
+        if ('api' in elem.attrib):
+            key = (elem.get('name'),elem.get('api'))
+        else:
+            key = elem.get('name')
+        if key in dictionary:
+            self.gen.logMsg('warn', '*** Attempt to redefine',
+                            infoName, 'with key:', key)
+        else:
+            dictionary[key] = info
+    #
+    # lookupElementInfo - find a {Type|Enum|Cmd}Info object by name.
+    # If an object qualified by API name exists, use that.
+    #   fname - name of type / enum / command
+    #   dictionary - self.{type|enum|cmd}dict
+    def lookupElementInfo(self, fname, dictionary):
+        key = (fname, self.genOpts.apiname)
+        if (key in dictionary):
+            # self.gen.logMsg('diag', 'Found API-specific element for feature', fname)
+            return dictionary[key]
+        elif (fname in dictionary):
+            # self.gen.logMsg('diag', 'Found generic element for feature', fname)
+            return dictionary[fname]
+        else:
+            return None
+    def parseTree(self):
+        """Parse the registry Element, once created"""
+        # This must be the Element for the root <registry>
+        self.reg = self.tree.getroot()
+        #
+        # Create dictionary of registry types from toplevel <types> tags
+        # and add 'name' attribute to each <type> tag (where missing)
+        # based on its <name> element.
+        #
+        # There's usually one <types> block; more are OK
+        # Required <type> attributes: 'name' or nested <name> tag contents
+        self.typedict = {}
+        for type in self.reg.findall('types/type'):
+            # If the <type> doesn't already have a 'name' attribute, set
+            # it from contents of its <name> tag.
+            if (type.get('name') == None):
+                type.attrib['name'] = type.find('name').text
+            self.addElementInfo(type, TypeInfo(type), 'type', self.typedict)
+        #
+        # Create dictionary of registry groups from toplevel <groups> tags.
+        #
+        # There's usually one <groups> block; more are OK.
+        # Required <group> attributes: 'name'
+        self.groupdict = {}
+        for group in self.reg.findall('groups/group'):
+            self.addElementInfo(group, GroupInfo(group), 'group', self.groupdict)
+        #
+        # Create dictionary of registry enums from toplevel <enums> tags
+        #
+        # There are usually many <enums> tags in different namespaces, but
+        #   these are functional namespaces of the values, while the actual
+        #   enum names all share the dictionary.
+        # Required <enums> attributes: 'name', 'value'
+        self.enumdict = {}
+        for enum in self.reg.findall('enums/enum'):
+            self.addElementInfo(enum, EnumInfo(enum), 'enum', self.enumdict)
+        #
+        # Create dictionary of registry commands from <command> tags
+        # and add 'name' attribute to each <command> tag (where missing)
+        # based on its <proto><name> element.
+        #
+        # There's usually only one <commands> block; more are OK.
+        # Required <command> attributes: 'name' or <proto><name> tag contents
+        self.cmddict = {}
+        for cmd in self.reg.findall('commands/command'):
+            # If the <command> doesn't already have a 'name' attribute, set
+            # it from contents of its <proto><name> tag.
+            if (cmd.get('name') == None):
+                cmd.attrib['name'] = cmd.find('proto/name').text
+            ci = CmdInfo(cmd)
+            self.addElementInfo(cmd, ci, 'command', self.cmddict)
+        #
+        # Create dictionaries of API and extension interfaces
+        #   from toplevel <api> and <extension> tags.
+        #
+        self.apidict = {}
+        for feature in self.reg.findall('feature'):
+            ai = FeatureInfo(feature)
+            self.addElementInfo(feature, ai, 'feature', self.apidict)
+        self.extensions = self.reg.findall('extensions/extension')
+        self.extdict = {}
+        for feature in self.extensions:
+            ei = FeatureInfo(feature)
+            self.addElementInfo(feature, ei, 'extension', self.extdict)
+    def dumpReg(self, maxlen = 40, filehandle = sys.stdout):
+        """Dump all the dictionaries constructed from the Registry object"""
+        write('***************************************', file=filehandle)
+        write('    ** Dumping Registry contents **',     file=filehandle)
+        write('***************************************', file=filehandle)
+        write('// Types', file=filehandle)
+        for name in self.typedict:
+            tobj = self.typedict[name]
+            write('    Type', name, '->', etree.tostring(tobj.elem)[0:maxlen], file=filehandle)
+        write('// Groups', file=filehandle)
+        for name in self.groupdict:
+            gobj = self.groupdict[name]
+            write('    Group', name, '->', etree.tostring(gobj.elem)[0:maxlen], file=filehandle)
+        write('// Enums', file=filehandle)
+        for name in self.enumdict:
+            eobj = self.enumdict[name]
+            write('    Enum', name, '->', etree.tostring(eobj.elem)[0:maxlen], file=filehandle)
+        write('// Commands', file=filehandle)
+        for name in self.cmddict:
+            cobj = self.cmddict[name]
+            write('    Command', name, '->', etree.tostring(cobj.elem)[0:maxlen], file=filehandle)
+        write('// APIs', file=filehandle)
+        for key in self.apidict:
+            write('    API Version ', key, '->',
+                etree.tostring(self.apidict[key].elem)[0:maxlen], file=filehandle)
+        write('// Extensions', file=filehandle)
+        for key in self.extdict:
+            write('    Extension', key, '->',
+                etree.tostring(self.extdict[key].elem)[0:maxlen], file=filehandle)
+        # write('***************************************', file=filehandle)
+        # write('    ** Dumping XML ElementTree **', file=filehandle)
+        # write('***************************************', file=filehandle)
+        # write(etree.tostring(self.tree.getroot(),pretty_print=True), file=filehandle)
+    #
+    # typename - name of type
+    # required - boolean (to tag features as required or not)
+    def markTypeRequired(self, typename, required):
+        """Require (along with its dependencies) or remove (but not its dependencies) a type"""
+        self.gen.logMsg('diag', '*** tagging type:', typename, '-> required =', required)
+        # Get TypeInfo object for <type> tag corresponding to typename
+        type = self.lookupElementInfo(typename, self.typedict)
+        if (type != None):
+            # Tag required type dependencies as required.
+            # This DOES NOT un-tag dependencies in a <remove> tag.
+            # See comments in markRequired() below for the reason.
+            if (required and ('requires' in type.elem.attrib)):
+                depType = type.elem.get('requires')
+                self.gen.logMsg('diag', '*** Generating dependent type',
+                    depType, 'for type', typename)
+                self.markTypeRequired(depType, required)
+            type.required = required
+        else:
+            self.gen.logMsg('warn', '*** type:', typename , 'IS NOT DEFINED')
+    #
+    # features - Element for <require> or <remove> tag
+    # required - boolean (to tag features as required or not)
+    def markRequired(self, features, required):
+        """Require or remove features specified in the Element"""
+        self.gen.logMsg('diag', '*** markRequired (features = <too long to print>, required =', required, ')')
+        # Loop over types, enums, and commands in the tag
+        # @@ It would be possible to respect 'api' and 'profile' attributes
+        #  in individual features, but that's not done yet.
+        for typeElem in features.findall('type'):
+            self.markTypeRequired(typeElem.get('name'), required)
+        for enumElem in features.findall('enum'):
+            name = enumElem.get('name')
+            self.gen.logMsg('diag', '*** tagging enum:', name, '-> required =', required)
+            enum = self.lookupElementInfo(name, self.enumdict)
+            if (enum != None):
+                enum.required = required
+            else:
+                self.gen.logMsg('warn', '*** enum:', name , 'IS NOT DEFINED')
+        for cmdElem in features.findall('command'):
+            name = cmdElem.get('name')
+            self.gen.logMsg('diag', '*** tagging command:', name, '-> required =', required)
+            cmd = self.lookupElementInfo(name, self.cmddict)
+            if (cmd != None):
+                cmd.required = required
+                # Tag all parameter types of this command as required.
+                # This DOES NOT remove types of commands in a <remove>
+                # tag, because many other commands may use the same type.
+                # We could be more clever and reference count types,
+                # instead of using a boolean.
+                if (required):
+                    # Look for <ptype> in entire <command> tree,
+                    # not just immediate children
+                    for ptype in cmd.elem.findall('.//ptype'):
+                        self.gen.logMsg('diag', '*** markRequired: command implicitly requires dependent type', ptype.text)
+                        self.markTypeRequired(ptype.text, required)
+            else:
+                self.gen.logMsg('warn', '*** command:', name, 'IS NOT DEFINED')
+    #
+    # interface - Element for <version> or <extension>, containing
+    #   <require> and <remove> tags
+    # api - string specifying API name being generated
+    # profile - string specifying API profile being generated
+    def requireAndRemoveFeatures(self, interface, api, profile):
+        """Process <recquire> and <remove> tags for a <version> or <extension>"""
+        # <require> marks things that are required by this version/profile
+        for feature in interface.findall('require'):
+            if (matchAPIProfile(api, profile, feature)):
+                self.markRequired(feature,True)
+        # <remove> marks things that are removed by this version/profile
+        for feature in interface.findall('remove'):
+            if (matchAPIProfile(api, profile, feature)):
+                self.markRequired(feature,False)
+    #
+    # generateFeature - generate a single type / enum / command,
+    # and all its dependencies as needed.
+    #   fname - name of feature (<type>/<enum>/<command>
+    #   ftype - type of feature, 'type' | 'enum' | 'command'
+    #   dictionary - of *Info objects - self.{type|enum|cmd}dict
+    #   genProc - bound function pointer for self.gen.gen{Type|Enum|Cmd}
+    def generateFeature(self, fname, ftype, dictionary, genProc):
+        f = self.lookupElementInfo(fname, dictionary)
+        if (f == None):
+            # No such feature. This is an error, but reported earlier
+            self.gen.logMsg('diag', '*** No entry found for feature', fname,
+                            'returning!')
+            return
+        #
+        # If feature isn't required, or has already been declared, return
+        if (not f.required):
+            self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(not required)')
+            return
+        if (f.declared):
+            self.gen.logMsg('diag', '*** Skipping', ftype, fname, '(already declared)')
+            return
+        #
+        # Pull in dependent type declaration(s) of the feature.
+        # For types, there may be one in the 'required' attribute of the element
+        # For commands, there may be many in <ptype> tags within the element
+        # For enums, no dependencies are allowed (though perhasps if you
+        #   have a uint64 enum, it should require GLuint64)
+        if (ftype == 'type'):
+            if ('requires' in f.elem.attrib):
+                depname = f.elem.get('requires')
+                self.gen.logMsg('diag', '*** Generating required dependent type',
+                                depname)
+                self.generateFeature(depname, 'type', self.typedict,
+                                     self.gen.genType)
+        elif (ftype == 'command'):
+            for ptype in f.elem.findall('.//ptype'):
+                depname = ptype.text
+                self.gen.logMsg('diag', '*** Generating required parameter type',
+                                depname)
+                self.generateFeature(depname, 'type', self.typedict,
+                                     self.gen.genType)
+        #
+        # Actually generate the type only if emitting declarations
+        if self.emitFeatures:
+            self.gen.logMsg('diag', '*** Emitting', ftype, 'decl for', fname)
+            genProc(f, fname)
+        else:
+            self.gen.logMsg('diag', '*** Skipping', ftype, fname,
+                            '(not emitting this feature)')
+        # Always mark feature declared, as though actually emitted
+        f.declared = True
+    #
+    # generateRequiredInterface - generate all interfaces required
+    # by an API version or extension
+    #   interface - Element for <version> or <extension>
+    def generateRequiredInterface(self, interface):
+        """Generate required C interface for specified API version/extension"""
+        #
+        # Loop over all features inside all <require> tags.
+        # <remove> tags are ignored (handled in pass 1).
+        for features in interface.findall('require'):
+            for t in features.findall('type'):
+                self.generateFeature(t.get('name'), 'type', self.typedict,
+                                     self.gen.genType)
+            for e in features.findall('enum'):
+                self.generateFeature(e.get('name'), 'enum', self.enumdict,
+                                     self.gen.genEnum)
+            for c in features.findall('command'):
+                self.generateFeature(c.get('name'), 'command', self.cmddict,
+                                     self.gen.genCmd)
+    #
+    # apiGen(genOpts) - generate interface for specified versions
+    #   genOpts - GeneratorOptions object with parameters used
+    #   by the Generator object.
+    def apiGen(self, genOpts):
+        """Generate interfaces for the specified API type and range of versions"""
+        #
+        self.gen.logMsg('diag', '*******************************************')
+        self.gen.logMsg('diag', '  Registry.apiGen file:', genOpts.filename,
+                        'api:', genOpts.apiname,
+                        'profile:', genOpts.profile)
+        self.gen.logMsg('diag', '*******************************************')
+        #
+        self.genOpts = genOpts
+        # Reset required/declared flags for all features
+        self.apiReset()
+        #
+        # Compile regexps used to select versions & extensions
+        regVersions = re.compile(self.genOpts.versions)
+        regEmitVersions = re.compile(self.genOpts.emitversions)
+        regAddExtensions = re.compile(self.genOpts.addExtensions)
+        regRemoveExtensions = re.compile(self.genOpts.removeExtensions)
+        #
+        # Get all matching API versions & add to list of FeatureInfo
+        features = []
+        apiMatch = False
+        for key in self.apidict:
+            fi = self.apidict[key]
+            api = fi.elem.get('api')
+            if (api == self.genOpts.apiname):
+                apiMatch = True
+                if (regVersions.match(fi.number)):
+                    # Matches API & version #s being generated. Mark for
+                    # emission and add to the features[] list .
+                    # @@ Could use 'declared' instead of 'emit'?
+                    fi.emit = (regEmitVersions.match(fi.number) != None)
+                    features.append(fi)
+                    if (not fi.emit):
+                        self.gen.logMsg('diag', '*** NOT tagging feature api =', api,
+                            'name =', fi.name, 'number =', fi.number,
+                            'for emission (does not match emitversions pattern)')
+                else:
+                    self.gen.logMsg('diag', '*** NOT including feature api =', api,
+                        'name =', fi.name, 'number =', fi.number,
+                        '(does not match requested versions)')
+            else:
+                self.gen.logMsg('diag', '*** NOT including feature api =', api,
+                    'name =', fi.name,
+                    '(does not match requested API)')
+        if (not apiMatch):
+            self.gen.logMsg('warn', '*** No matching API versions found!')
+        #
+        # Get all matching extensions & add to the list.
+        # Start with extensions tagged with 'api' pattern matching the API
+        # being generated. Add extensions matching the pattern specified in
+        # regExtensions, then remove extensions matching the pattern
+        # specified in regRemoveExtensions
+        for key in self.extdict:
+            ei = self.extdict[key]
+            extName = ei.name
+            include = False
+            #
+            # Include extension if defaultExtensions is not None and if the
+            # 'supported' attribute matches defaultExtensions. The regexp in
+            # 'supported' must exactly match defaultExtensions, so bracket
+            # it with ^(pat)$.
+            pat = '^(' + ei.elem.get('supported') + ')$'
+            if (self.genOpts.defaultExtensions and
+                     re.match(pat, self.genOpts.defaultExtensions)):
+                self.gen.logMsg('diag', '*** Including extension',
+                    extName, "(defaultExtensions matches the 'supported' attribute)")
+                include = True
+            #
+            # Include additional extensions if the extension name matches
+            # the regexp specified in the generator options. This allows
+            # forcing extensions into an interface even if they're not
+            # tagged appropriately in the registry.
+            if (regAddExtensions.match(extName) != None):
+                self.gen.logMsg('diag', '*** Including extension',
+                    extName, '(matches explicitly requested extensions to add)')
+                include = True
+            # Remove extensions if the name matches the regexp specified
+            # in generator options. This allows forcing removal of
+            # extensions from an interface even if they're tagged that
+            # way in the registry.
+            if (regRemoveExtensions.match(extName) != None):
+                self.gen.logMsg('diag', '*** Removing extension',
+                    extName, '(matches explicitly requested extensions to remove)')
+                include = False
+            #
+            # If the extension is to be included, add it to the
+            # extension features list.
+            if (include):
+                ei.emit = True
+                features.append(ei)
+            else:
+                self.gen.logMsg('diag', '*** NOT including extension',
+                    extName, '(does not match api attribute or explicitly requested extensions)')
+        #
+        # Sort the extension features list, if a sort procedure is defined
+        if (self.genOpts.sortProcedure):
+            self.genOpts.sortProcedure(features)
+        #
+        # Pass 1: loop over requested API versions and extensions tagging
+        #   types/commands/features as required (in an <require> block) or no
+        #   longer required (in an <exclude> block). It is possible to remove
+        #   a feature in one version and restore it later by requiring it in
+        #   a later version.
+        # If a profile other than 'None' is being generated, it must
+        #   match the profile attribute (if any) of the <require> and
+        #   <remove> tags.
+        self.gen.logMsg('diag', '*** PASS 1: TAG FEATURES ********************************************')
+        for f in features:
+            self.gen.logMsg('diag', '*** PASS 1: Tagging required and removed features for',
+                f.name)
+            self.requireAndRemoveFeatures(f.elem, self.genOpts.apiname, self.genOpts.profile)
+        #
+        # Pass 2: loop over specified API versions and extensions printing
+        #   declarations for required things which haven't already been
+        #   generated.
+        self.gen.logMsg('diag', '*** PASS 2: GENERATE INTERFACES FOR FEATURES ************************')
+        self.gen.beginFile(self.genOpts)
+        for f in features:
+            self.gen.logMsg('diag', '*** PASS 2: Generating interface for',
+                f.name)
+            emit = self.emitFeatures = f.emit
+            if (not emit):
+                self.gen.logMsg('diag', '*** PASS 2: NOT declaring feature',
+                    f.elem.get('name'), 'because it is not tagged for emission')
+            # Generate the interface (or just tag its elements as having been
+            # emitted, if they haven't been).
+            self.gen.beginFeature(f.elem, emit)
+            self.generateRequiredInterface(f.elem)
+            self.gen.endFeature()
+        self.gen.endFile()
+    #
+    # apiReset - use between apiGen() calls to reset internal state
+    #
+    def apiReset(self):
+        """Reset type/enum/command dictionaries before generating another API"""
+        for type in self.typedict:
+            self.typedict[type].resetState()
+        for enum in self.enumdict:
+            self.enumdict[enum].resetState()
+        for cmd in self.cmddict:
+            self.cmddict[cmd].resetState()
+        for cmd in self.apidict:
+            self.apidict[cmd].resetState()
+    #
+    # validateGroups - check that group= attributes match actual groups
+    #
+    def validateGroups(self):
+        """Validate group= attributes on <param> and <proto> tags"""
+        # Keep track of group names not in <group> tags
+        badGroup = {}
+        self.gen.logMsg('diag', '*** VALIDATING GROUP ATTRIBUTES ***')
+        for cmd in self.reg.findall('commands/command'):
+            proto = cmd.find('proto')
+            funcname = cmd.find('proto/name').text
+            if ('group' in proto.attrib.keys()):
+                group = proto.get('group')
+                # self.gen.logMsg('diag', '*** Command ', funcname, ' has return group ', group)
+                if (group not in self.groupdict.keys()):
+                    # self.gen.logMsg('diag', '*** Command ', funcname, ' has UNKNOWN return group ', group)
+                    if (group not in badGroup.keys()):
+                        badGroup[group] = 1
+                    else:
+                        badGroup[group] = badGroup[group] +  1
+            for param in cmd.findall('param'):
+                pname = param.find('name')
+                if (pname != None):
+                    pname = pname.text
+                else:
+                    pname = type.get('name')
+                if ('group' in param.attrib.keys()):
+                    group = param.get('group')
+                    if (group not in self.groupdict.keys()):
+                        # self.gen.logMsg('diag', '*** Command ', funcname, ' param ', pname, ' has UNKNOWN group ', group)
+                        if (group not in badGroup.keys()):
+                            badGroup[group] = 1
+                        else:
+                            badGroup[group] = badGroup[group] +  1
+        if (len(badGroup.keys()) > 0):
+            self.gen.logMsg('diag', '*** SUMMARY OF UNRECOGNIZED GROUPS ***')
+            for key in sorted(badGroup.keys()):
+                self.gen.logMsg('diag', '    ', key, ' occurred ', badGroup[key], ' times')
diff --git a/services/batteryservice/Android.mk b/services/batteryservice/Android.mk
index 0a29c36..9354b99 100644
--- a/services/batteryservice/Android.mk
+++ b/services/batteryservice/Android.mk
@@ -3,6 +3,7 @@
 
 LOCAL_SRC_FILES:= \
 	BatteryProperties.cpp \
+	BatteryProperty.cpp \
 	IBatteryPropertiesListener.cpp \
 	IBatteryPropertiesRegistrar.cpp
 
diff --git a/services/batteryservice/BatteryProperties.cpp b/services/batteryservice/BatteryProperties.cpp
index e4a42ed..ab636a9 100644
--- a/services/batteryservice/BatteryProperties.cpp
+++ b/services/batteryservice/BatteryProperties.cpp
@@ -38,8 +38,6 @@
     batteryPresent = p->readInt32() == 1 ? true : false;
     batteryLevel = p->readInt32();
     batteryVoltage = p->readInt32();
-    batteryCurrentNow = p->readInt32();
-    batteryChargeCounter = p->readInt32();
     batteryTemperature = p->readInt32();
     batteryTechnology = String8((p->readString16()).string());
     return OK;
@@ -54,8 +52,6 @@
     p->writeInt32(batteryPresent ? 1 : 0);
     p->writeInt32(batteryLevel);
     p->writeInt32(batteryVoltage);
-    p->writeInt32(batteryCurrentNow);
-    p->writeInt32(batteryChargeCounter);
     p->writeInt32(batteryTemperature);
     p->writeString16(String16(batteryTechnology));
     return OK;
diff --git a/services/batteryservice/BatteryProperty.cpp b/services/batteryservice/BatteryProperty.cpp
new file mode 100644
index 0000000..483d925
--- /dev/null
+++ b/services/batteryservice/BatteryProperty.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <batteryservice/BatteryService.h>
+#include <binder/Parcel.h>
+#include <utils/Errors.h>
+
+namespace android {
+
+/*
+ * Parcel read/write code must be kept in sync with
+ * frameworks/base/core/java/android/os/BatteryProperty.java
+ */
+
+status_t BatteryProperty::readFromParcel(Parcel* p) {
+    valueInt64 = p->readInt64();
+    return OK;
+}
+
+status_t BatteryProperty::writeToParcel(Parcel* p) const {
+    p->writeInt64(valueInt64);
+    return OK;
+}
+
+}; // namespace android
diff --git a/services/batteryservice/IBatteryPropertiesRegistrar.cpp b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
index 6c2d2a5..296bfab 100644
--- a/services/batteryservice/IBatteryPropertiesRegistrar.cpp
+++ b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
@@ -44,6 +44,22 @@
             data.writeStrongBinder(listener->asBinder());
             remote()->transact(UNREGISTER_LISTENER, data, NULL);
         }
+
+        status_t getProperty(int id, struct BatteryProperty *val) {
+            Parcel data, reply;
+            data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
+            data.writeInt32(id);
+            remote()->transact(GET_PROPERTY, data, &reply);
+            int32_t ret = reply.readExceptionCode();
+            if (ret != 0) {
+                return ret;
+            }
+            ret = reply.readInt32();
+            int parcelpresent = reply.readInt32();
+            if (parcelpresent)
+                val->readFromParcel(&reply);
+            return ret;
+        }
 };
 
 IMPLEMENT_META_INTERFACE(BatteryPropertiesRegistrar, "android.os.IBatteryPropertiesRegistrar");
@@ -69,6 +85,18 @@
             unregisterListener(listener);
             return OK;
         }
+
+        case GET_PROPERTY: {
+            CHECK_INTERFACE(IBatteryPropertiesRegistrar, data, reply);
+            int id = data.readInt32();
+            struct BatteryProperty val;
+            status_t result = getProperty(id, &val);
+            reply->writeNoException();
+            reply->writeInt32(result);
+            reply->writeInt32(1);
+            val.writeToParcel(reply);
+            return OK;
+        }
     }
     return BBinder::onTransact(code, data, reply, flags);
 };
diff --git a/services/inputflinger/Android.mk b/services/inputflinger/Android.mk
new file mode 100644
index 0000000..574c14e
--- /dev/null
+++ b/services/inputflinger/Android.mk
@@ -0,0 +1,63 @@
+# Copyright (C) 2013 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+    EventHub.cpp \
+    InputApplication.cpp \
+    InputDispatcher.cpp \
+    InputListener.cpp \
+    InputManager.cpp \
+    InputReader.cpp \
+    InputWindow.cpp \
+    InputFlinger.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+    libbinder \
+    libcutils \
+    libinput \
+    liblog \
+    libutils \
+	libui \
+	libhardware_legacy
+
+
+# TODO: Move inputflinger to its own process and mark it hidden
+#LOCAL_CFLAGS += -fvisibility=hidden
+
+LOCAL_CFLAGS += -Wno-unused-parameter
+
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+
+LOCAL_MODULE := libinputflinger
+
+include $(BUILD_SHARED_LIBRARY)
+
+########################################################################
+# build input flinger executable
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	main.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libbinder \
+	libinputflinger \
+	libutils
+
+LOCAL_MODULE := inputflinger
+
+include $(BUILD_EXECUTABLE)
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp
new file mode 100644
index 0000000..ac73c1f
--- /dev/null
+++ b/services/inputflinger/EventHub.cpp
@@ -0,0 +1,1666 @@
+/*
+ * Copyright (C) 2005 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "EventHub"
+
+// #define LOG_NDEBUG 0
+
+#include "EventHub.h"
+
+#include <hardware_legacy/power.h>
+
+#include <cutils/properties.h>
+#include <utils/Log.h>
+#include <utils/Timers.h>
+#include <utils/threads.h>
+#include <utils/Errors.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <memory.h>
+#include <errno.h>
+#include <assert.h>
+
+#include <input/KeyLayoutMap.h>
+#include <input/KeyCharacterMap.h>
+#include <input/VirtualKeyMap.h>
+
+#include <string.h>
+#include <stdint.h>
+#include <dirent.h>
+
+#include <sys/inotify.h>
+#include <sys/epoll.h>
+#include <sys/ioctl.h>
+#include <sys/limits.h>
+#include <sys/sha1.h>
+#include <sys/utsname.h>
+
+/* this macro is used to tell if "bit" is set in "array"
+ * it selects a byte from the array, and does a boolean AND
+ * operation with a byte that only has the relevant bit set.
+ * eg. to check for the 12th bit, we do (array[1] & 1<<4)
+ */
+#define test_bit(bit, array)    (array[bit/8] & (1<<(bit%8)))
+
+/* this macro computes the number of bytes needed to represent a bit array of the specified size */
+#define sizeof_bit_array(bits)  ((bits + 7) / 8)
+
+#define INDENT "  "
+#define INDENT2 "    "
+#define INDENT3 "      "
+
+namespace android {
+
+static const char *WAKE_LOCK_ID = "KeyEvents";
+static const char *DEVICE_PATH = "/dev/input";
+
+/* return the larger integer */
+static inline int max(int v1, int v2)
+{
+    return (v1 > v2) ? v1 : v2;
+}
+
+static inline const char* toString(bool value) {
+    return value ? "true" : "false";
+}
+
+static String8 sha1(const String8& in) {
+    SHA1_CTX ctx;
+    SHA1Init(&ctx);
+    SHA1Update(&ctx, reinterpret_cast<const u_char*>(in.string()), in.size());
+    u_char digest[SHA1_DIGEST_LENGTH];
+    SHA1Final(digest, &ctx);
+
+    String8 out;
+    for (size_t i = 0; i < SHA1_DIGEST_LENGTH; i++) {
+        out.appendFormat("%02x", digest[i]);
+    }
+    return out;
+}
+
+static void getLinuxRelease(int* major, int* minor) {
+    struct utsname info;
+    if (uname(&info) || sscanf(info.release, "%d.%d", major, minor) <= 0) {
+        *major = 0, *minor = 0;
+        ALOGE("Could not get linux version: %s", strerror(errno));
+    }
+}
+
+// --- Global Functions ---
+
+uint32_t getAbsAxisUsage(int32_t axis, uint32_t deviceClasses) {
+    // Touch devices get dibs on touch-related axes.
+    if (deviceClasses & INPUT_DEVICE_CLASS_TOUCH) {
+        switch (axis) {
+        case ABS_X:
+        case ABS_Y:
+        case ABS_PRESSURE:
+        case ABS_TOOL_WIDTH:
+        case ABS_DISTANCE:
+        case ABS_TILT_X:
+        case ABS_TILT_Y:
+        case ABS_MT_SLOT:
+        case ABS_MT_TOUCH_MAJOR:
+        case ABS_MT_TOUCH_MINOR:
+        case ABS_MT_WIDTH_MAJOR:
+        case ABS_MT_WIDTH_MINOR:
+        case ABS_MT_ORIENTATION:
+        case ABS_MT_POSITION_X:
+        case ABS_MT_POSITION_Y:
+        case ABS_MT_TOOL_TYPE:
+        case ABS_MT_BLOB_ID:
+        case ABS_MT_TRACKING_ID:
+        case ABS_MT_PRESSURE:
+        case ABS_MT_DISTANCE:
+            return INPUT_DEVICE_CLASS_TOUCH;
+        }
+    }
+
+    // Joystick devices get the rest.
+    return deviceClasses & INPUT_DEVICE_CLASS_JOYSTICK;
+}
+
+// --- EventHub::Device ---
+
+EventHub::Device::Device(int fd, int32_t id, const String8& path,
+        const InputDeviceIdentifier& identifier) :
+        next(NULL),
+        fd(fd), id(id), path(path), identifier(identifier),
+        classes(0), configuration(NULL), virtualKeyMap(NULL),
+        ffEffectPlaying(false), ffEffectId(-1), controllerNumber(0),
+        timestampOverrideSec(0), timestampOverrideUsec(0) {
+    memset(keyBitmask, 0, sizeof(keyBitmask));
+    memset(absBitmask, 0, sizeof(absBitmask));
+    memset(relBitmask, 0, sizeof(relBitmask));
+    memset(swBitmask, 0, sizeof(swBitmask));
+    memset(ledBitmask, 0, sizeof(ledBitmask));
+    memset(ffBitmask, 0, sizeof(ffBitmask));
+    memset(propBitmask, 0, sizeof(propBitmask));
+}
+
+EventHub::Device::~Device() {
+    close();
+    delete configuration;
+    delete virtualKeyMap;
+}
+
+void EventHub::Device::close() {
+    if (fd >= 0) {
+        ::close(fd);
+        fd = -1;
+    }
+}
+
+
+// --- EventHub ---
+
+const uint32_t EventHub::EPOLL_ID_INOTIFY;
+const uint32_t EventHub::EPOLL_ID_WAKE;
+const int EventHub::EPOLL_SIZE_HINT;
+const int EventHub::EPOLL_MAX_EVENTS;
+
+EventHub::EventHub(void) :
+        mBuiltInKeyboardId(NO_BUILT_IN_KEYBOARD), mNextDeviceId(1), mControllerNumbers(),
+        mOpeningDevices(0), mClosingDevices(0),
+        mNeedToSendFinishedDeviceScan(false),
+        mNeedToReopenDevices(false), mNeedToScanDevices(true),
+        mPendingEventCount(0), mPendingEventIndex(0), mPendingINotify(false) {
+    acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID);
+
+    mEpollFd = epoll_create(EPOLL_SIZE_HINT);
+    LOG_ALWAYS_FATAL_IF(mEpollFd < 0, "Could not create epoll instance.  errno=%d", errno);
+
+    mINotifyFd = inotify_init();
+    int result = inotify_add_watch(mINotifyFd, DEVICE_PATH, IN_DELETE | IN_CREATE);
+    LOG_ALWAYS_FATAL_IF(result < 0, "Could not register INotify for %s.  errno=%d",
+            DEVICE_PATH, errno);
+
+    struct epoll_event eventItem;
+    memset(&eventItem, 0, sizeof(eventItem));
+    eventItem.events = EPOLLIN;
+    eventItem.data.u32 = EPOLL_ID_INOTIFY;
+    result = epoll_ctl(mEpollFd, EPOLL_CTL_ADD, mINotifyFd, &eventItem);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not add INotify to epoll instance.  errno=%d", errno);
+
+    int wakeFds[2];
+    result = pipe(wakeFds);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not create wake pipe.  errno=%d", errno);
+
+    mWakeReadPipeFd = wakeFds[0];
+    mWakeWritePipeFd = wakeFds[1];
+
+    result = fcntl(mWakeReadPipeFd, F_SETFL, O_NONBLOCK);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not make wake read pipe non-blocking.  errno=%d",
+            errno);
+
+    result = fcntl(mWakeWritePipeFd, F_SETFL, O_NONBLOCK);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not make wake write pipe non-blocking.  errno=%d",
+            errno);
+
+    eventItem.data.u32 = EPOLL_ID_WAKE;
+    result = epoll_ctl(mEpollFd, EPOLL_CTL_ADD, mWakeReadPipeFd, &eventItem);
+    LOG_ALWAYS_FATAL_IF(result != 0, "Could not add wake read pipe to epoll instance.  errno=%d",
+            errno);
+
+    int major, minor;
+    getLinuxRelease(&major, &minor);
+    // EPOLLWAKEUP was introduced in kernel 3.5
+    mUsingEpollWakeup = major > 3 || (major == 3 && minor >= 5);
+}
+
+EventHub::~EventHub(void) {
+    closeAllDevicesLocked();
+
+    while (mClosingDevices) {
+        Device* device = mClosingDevices;
+        mClosingDevices = device->next;
+        delete device;
+    }
+
+    ::close(mEpollFd);
+    ::close(mINotifyFd);
+    ::close(mWakeReadPipeFd);
+    ::close(mWakeWritePipeFd);
+
+    release_wake_lock(WAKE_LOCK_ID);
+}
+
+InputDeviceIdentifier EventHub::getDeviceIdentifier(int32_t deviceId) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device == NULL) return InputDeviceIdentifier();
+    return device->identifier;
+}
+
+uint32_t EventHub::getDeviceClasses(int32_t deviceId) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device == NULL) return 0;
+    return device->classes;
+}
+
+int32_t EventHub::getDeviceControllerNumber(int32_t deviceId) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device == NULL) return 0;
+    return device->controllerNumber;
+}
+
+void EventHub::getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device && device->configuration) {
+        *outConfiguration = *device->configuration;
+    } else {
+        outConfiguration->clear();
+    }
+}
+
+status_t EventHub::getAbsoluteAxisInfo(int32_t deviceId, int axis,
+        RawAbsoluteAxisInfo* outAxisInfo) const {
+    outAxisInfo->clear();
+
+    if (axis >= 0 && axis <= ABS_MAX) {
+        AutoMutex _l(mLock);
+
+        Device* device = getDeviceLocked(deviceId);
+        if (device && !device->isVirtual() && test_bit(axis, device->absBitmask)) {
+            struct input_absinfo info;
+            if(ioctl(device->fd, EVIOCGABS(axis), &info)) {
+                ALOGW("Error reading absolute controller %d for device %s fd %d, errno=%d",
+                     axis, device->identifier.name.string(), device->fd, errno);
+                return -errno;
+            }
+
+            if (info.minimum != info.maximum) {
+                outAxisInfo->valid = true;
+                outAxisInfo->minValue = info.minimum;
+                outAxisInfo->maxValue = info.maximum;
+                outAxisInfo->flat = info.flat;
+                outAxisInfo->fuzz = info.fuzz;
+                outAxisInfo->resolution = info.resolution;
+            }
+            return OK;
+        }
+    }
+    return -1;
+}
+
+bool EventHub::hasRelativeAxis(int32_t deviceId, int axis) const {
+    if (axis >= 0 && axis <= REL_MAX) {
+        AutoMutex _l(mLock);
+
+        Device* device = getDeviceLocked(deviceId);
+        if (device) {
+            return test_bit(axis, device->relBitmask);
+        }
+    }
+    return false;
+}
+
+bool EventHub::hasInputProperty(int32_t deviceId, int property) const {
+    if (property >= 0 && property <= INPUT_PROP_MAX) {
+        AutoMutex _l(mLock);
+
+        Device* device = getDeviceLocked(deviceId);
+        if (device) {
+            return test_bit(property, device->propBitmask);
+        }
+    }
+    return false;
+}
+
+int32_t EventHub::getScanCodeState(int32_t deviceId, int32_t scanCode) const {
+    if (scanCode >= 0 && scanCode <= KEY_MAX) {
+        AutoMutex _l(mLock);
+
+        Device* device = getDeviceLocked(deviceId);
+        if (device && !device->isVirtual() && test_bit(scanCode, device->keyBitmask)) {
+            uint8_t keyState[sizeof_bit_array(KEY_MAX + 1)];
+            memset(keyState, 0, sizeof(keyState));
+            if (ioctl(device->fd, EVIOCGKEY(sizeof(keyState)), keyState) >= 0) {
+                return test_bit(scanCode, keyState) ? AKEY_STATE_DOWN : AKEY_STATE_UP;
+            }
+        }
+    }
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t EventHub::getKeyCodeState(int32_t deviceId, int32_t keyCode) const {
+    AutoMutex _l(mLock);
+
+    Device* device = getDeviceLocked(deviceId);
+    if (device && !device->isVirtual() && device->keyMap.haveKeyLayout()) {
+        Vector<int32_t> scanCodes;
+        device->keyMap.keyLayoutMap->findScanCodesForKey(keyCode, &scanCodes);
+        if (scanCodes.size() != 0) {
+            uint8_t keyState[sizeof_bit_array(KEY_MAX + 1)];
+            memset(keyState, 0, sizeof(keyState));
+            if (ioctl(device->fd, EVIOCGKEY(sizeof(keyState)), keyState) >= 0) {
+                for (size_t i = 0; i < scanCodes.size(); i++) {
+                    int32_t sc = scanCodes.itemAt(i);
+                    if (sc >= 0 && sc <= KEY_MAX && test_bit(sc, keyState)) {
+                        return AKEY_STATE_DOWN;
+                    }
+                }
+                return AKEY_STATE_UP;
+            }
+        }
+    }
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t EventHub::getSwitchState(int32_t deviceId, int32_t sw) const {
+    if (sw >= 0 && sw <= SW_MAX) {
+        AutoMutex _l(mLock);
+
+        Device* device = getDeviceLocked(deviceId);
+        if (device && !device->isVirtual() && test_bit(sw, device->swBitmask)) {
+            uint8_t swState[sizeof_bit_array(SW_MAX + 1)];
+            memset(swState, 0, sizeof(swState));
+            if (ioctl(device->fd, EVIOCGSW(sizeof(swState)), swState) >= 0) {
+                return test_bit(sw, swState) ? AKEY_STATE_DOWN : AKEY_STATE_UP;
+            }
+        }
+    }
+    return AKEY_STATE_UNKNOWN;
+}
+
+status_t EventHub::getAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t* outValue) const {
+    *outValue = 0;
+
+    if (axis >= 0 && axis <= ABS_MAX) {
+        AutoMutex _l(mLock);
+
+        Device* device = getDeviceLocked(deviceId);
+        if (device && !device->isVirtual() && test_bit(axis, device->absBitmask)) {
+            struct input_absinfo info;
+            if(ioctl(device->fd, EVIOCGABS(axis), &info)) {
+                ALOGW("Error reading absolute controller %d for device %s fd %d, errno=%d",
+                     axis, device->identifier.name.string(), device->fd, errno);
+                return -errno;
+            }
+
+            *outValue = info.value;
+            return OK;
+        }
+    }
+    return -1;
+}
+
+bool EventHub::markSupportedKeyCodes(int32_t deviceId, size_t numCodes,
+        const int32_t* keyCodes, uint8_t* outFlags) const {
+    AutoMutex _l(mLock);
+
+    Device* device = getDeviceLocked(deviceId);
+    if (device && device->keyMap.haveKeyLayout()) {
+        Vector<int32_t> scanCodes;
+        for (size_t codeIndex = 0; codeIndex < numCodes; codeIndex++) {
+            scanCodes.clear();
+
+            status_t err = device->keyMap.keyLayoutMap->findScanCodesForKey(
+                    keyCodes[codeIndex], &scanCodes);
+            if (! err) {
+                // check the possible scan codes identified by the layout map against the
+                // map of codes actually emitted by the driver
+                for (size_t sc = 0; sc < scanCodes.size(); sc++) {
+                    if (test_bit(scanCodes[sc], device->keyBitmask)) {
+                        outFlags[codeIndex] = 1;
+                        break;
+                    }
+                }
+            }
+        }
+        return true;
+    }
+    return false;
+}
+
+status_t EventHub::mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
+        int32_t* outKeycode, uint32_t* outFlags) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+
+    if (device) {
+        // Check the key character map first.
+        sp<KeyCharacterMap> kcm = device->getKeyCharacterMap();
+        if (kcm != NULL) {
+            if (!kcm->mapKey(scanCode, usageCode, outKeycode)) {
+                *outFlags = 0;
+                return NO_ERROR;
+            }
+        }
+
+        // Check the key layout next.
+        if (device->keyMap.haveKeyLayout()) {
+            if (!device->keyMap.keyLayoutMap->mapKey(
+                    scanCode, usageCode, outKeycode, outFlags)) {
+                return NO_ERROR;
+            }
+        }
+    }
+
+    *outKeycode = 0;
+    *outFlags = 0;
+    return NAME_NOT_FOUND;
+}
+
+status_t EventHub::mapAxis(int32_t deviceId, int32_t scanCode, AxisInfo* outAxisInfo) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+
+    if (device && device->keyMap.haveKeyLayout()) {
+        status_t err = device->keyMap.keyLayoutMap->mapAxis(scanCode, outAxisInfo);
+        if (err == NO_ERROR) {
+            return NO_ERROR;
+        }
+    }
+
+    return NAME_NOT_FOUND;
+}
+
+void EventHub::setExcludedDevices(const Vector<String8>& devices) {
+    AutoMutex _l(mLock);
+
+    mExcludedDevices = devices;
+}
+
+bool EventHub::hasScanCode(int32_t deviceId, int32_t scanCode) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device && scanCode >= 0 && scanCode <= KEY_MAX) {
+        if (test_bit(scanCode, device->keyBitmask)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+bool EventHub::hasLed(int32_t deviceId, int32_t led) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    int32_t sc;
+    if (device && mapLed(device, led, &sc) == NO_ERROR) {
+        if (test_bit(sc, device->ledBitmask)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+void EventHub::setLedState(int32_t deviceId, int32_t led, bool on) {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    setLedStateLocked(device, led, on);
+}
+
+void EventHub::setLedStateLocked(Device* device, int32_t led, bool on) {
+    int32_t sc;
+    if (device && !device->isVirtual() && mapLed(device, led, &sc) != NAME_NOT_FOUND) {
+        struct input_event ev;
+        ev.time.tv_sec = 0;
+        ev.time.tv_usec = 0;
+        ev.type = EV_LED;
+        ev.code = sc;
+        ev.value = on ? 1 : 0;
+
+        ssize_t nWrite;
+        do {
+            nWrite = write(device->fd, &ev, sizeof(struct input_event));
+        } while (nWrite == -1 && errno == EINTR);
+    }
+}
+
+void EventHub::getVirtualKeyDefinitions(int32_t deviceId,
+        Vector<VirtualKeyDefinition>& outVirtualKeys) const {
+    outVirtualKeys.clear();
+
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device && device->virtualKeyMap) {
+        outVirtualKeys.appendVector(device->virtualKeyMap->getVirtualKeys());
+    }
+}
+
+sp<KeyCharacterMap> EventHub::getKeyCharacterMap(int32_t deviceId) const {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device) {
+        return device->getKeyCharacterMap();
+    }
+    return NULL;
+}
+
+bool EventHub::setKeyboardLayoutOverlay(int32_t deviceId,
+        const sp<KeyCharacterMap>& map) {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device) {
+        if (map != device->overlayKeyMap) {
+            device->overlayKeyMap = map;
+            device->combinedKeyMap = KeyCharacterMap::combine(
+                    device->keyMap.keyCharacterMap, map);
+            return true;
+        }
+    }
+    return false;
+}
+
+static String8 generateDescriptor(InputDeviceIdentifier& identifier) {
+    String8 rawDescriptor;
+    rawDescriptor.appendFormat(":%04x:%04x:", identifier.vendor,
+            identifier.product);
+    // TODO add handling for USB devices to not uniqueify kbs that show up twice
+    if (!identifier.uniqueId.isEmpty()) {
+        rawDescriptor.append("uniqueId:");
+        rawDescriptor.append(identifier.uniqueId);
+    } else if (identifier.nonce != 0) {
+        rawDescriptor.appendFormat("nonce:%04x", identifier.nonce);
+    }
+
+    if (identifier.vendor == 0 && identifier.product == 0) {
+        // If we don't know the vendor and product id, then the device is probably
+        // built-in so we need to rely on other information to uniquely identify
+        // the input device.  Usually we try to avoid relying on the device name or
+        // location but for built-in input device, they are unlikely to ever change.
+        if (!identifier.name.isEmpty()) {
+            rawDescriptor.append("name:");
+            rawDescriptor.append(identifier.name);
+        } else if (!identifier.location.isEmpty()) {
+            rawDescriptor.append("location:");
+            rawDescriptor.append(identifier.location);
+        }
+    }
+    identifier.descriptor = sha1(rawDescriptor);
+    return rawDescriptor;
+}
+
+void EventHub::assignDescriptorLocked(InputDeviceIdentifier& identifier) {
+    // Compute a device descriptor that uniquely identifies the device.
+    // The descriptor is assumed to be a stable identifier.  Its value should not
+    // change between reboots, reconnections, firmware updates or new releases
+    // of Android. In practice we sometimes get devices that cannot be uniquely
+    // identified. In this case we enforce uniqueness between connected devices.
+    // Ideally, we also want the descriptor to be short and relatively opaque.
+
+    identifier.nonce = 0;
+    String8 rawDescriptor = generateDescriptor(identifier);
+    if (identifier.uniqueId.isEmpty()) {
+        // If it didn't have a unique id check for conflicts and enforce
+        // uniqueness if necessary.
+        while(getDeviceByDescriptorLocked(identifier.descriptor) != NULL) {
+            identifier.nonce++;
+            rawDescriptor = generateDescriptor(identifier);
+        }
+    }
+    ALOGV("Created descriptor: raw=%s, cooked=%s", rawDescriptor.string(),
+            identifier.descriptor.string());
+}
+
+void EventHub::vibrate(int32_t deviceId, nsecs_t duration) {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device && !device->isVirtual()) {
+        ff_effect effect;
+        memset(&effect, 0, sizeof(effect));
+        effect.type = FF_RUMBLE;
+        effect.id = device->ffEffectId;
+        effect.u.rumble.strong_magnitude = 0xc000;
+        effect.u.rumble.weak_magnitude = 0xc000;
+        effect.replay.length = (duration + 999999LL) / 1000000LL;
+        effect.replay.delay = 0;
+        if (ioctl(device->fd, EVIOCSFF, &effect)) {
+            ALOGW("Could not upload force feedback effect to device %s due to error %d.",
+                    device->identifier.name.string(), errno);
+            return;
+        }
+        device->ffEffectId = effect.id;
+
+        struct input_event ev;
+        ev.time.tv_sec = 0;
+        ev.time.tv_usec = 0;
+        ev.type = EV_FF;
+        ev.code = device->ffEffectId;
+        ev.value = 1;
+        if (write(device->fd, &ev, sizeof(ev)) != sizeof(ev)) {
+            ALOGW("Could not start force feedback effect on device %s due to error %d.",
+                    device->identifier.name.string(), errno);
+            return;
+        }
+        device->ffEffectPlaying = true;
+    }
+}
+
+void EventHub::cancelVibrate(int32_t deviceId) {
+    AutoMutex _l(mLock);
+    Device* device = getDeviceLocked(deviceId);
+    if (device && !device->isVirtual()) {
+        if (device->ffEffectPlaying) {
+            device->ffEffectPlaying = false;
+
+            struct input_event ev;
+            ev.time.tv_sec = 0;
+            ev.time.tv_usec = 0;
+            ev.type = EV_FF;
+            ev.code = device->ffEffectId;
+            ev.value = 0;
+            if (write(device->fd, &ev, sizeof(ev)) != sizeof(ev)) {
+                ALOGW("Could not stop force feedback effect on device %s due to error %d.",
+                        device->identifier.name.string(), errno);
+                return;
+            }
+        }
+    }
+}
+
+EventHub::Device* EventHub::getDeviceByDescriptorLocked(String8& descriptor) const {
+    size_t size = mDevices.size();
+    for (size_t i = 0; i < size; i++) {
+        Device* device = mDevices.valueAt(i);
+        if (descriptor.compare(device->identifier.descriptor) == 0) {
+            return device;
+        }
+    }
+    return NULL;
+}
+
+EventHub::Device* EventHub::getDeviceLocked(int32_t deviceId) const {
+    if (deviceId == BUILT_IN_KEYBOARD_ID) {
+        deviceId = mBuiltInKeyboardId;
+    }
+    ssize_t index = mDevices.indexOfKey(deviceId);
+    return index >= 0 ? mDevices.valueAt(index) : NULL;
+}
+
+EventHub::Device* EventHub::getDeviceByPathLocked(const char* devicePath) const {
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        Device* device = mDevices.valueAt(i);
+        if (device->path == devicePath) {
+            return device;
+        }
+    }
+    return NULL;
+}
+
+size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSize) {
+    ALOG_ASSERT(bufferSize >= 1);
+
+    AutoMutex _l(mLock);
+
+    struct input_event readBuffer[bufferSize];
+
+    RawEvent* event = buffer;
+    size_t capacity = bufferSize;
+    bool awoken = false;
+    for (;;) {
+        nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+
+        // Reopen input devices if needed.
+        if (mNeedToReopenDevices) {
+            mNeedToReopenDevices = false;
+
+            ALOGI("Reopening all input devices due to a configuration change.");
+
+            closeAllDevicesLocked();
+            mNeedToScanDevices = true;
+            break; // return to the caller before we actually rescan
+        }
+
+        // Report any devices that had last been added/removed.
+        while (mClosingDevices) {
+            Device* device = mClosingDevices;
+            ALOGV("Reporting device closed: id=%d, name=%s\n",
+                 device->id, device->path.string());
+            mClosingDevices = device->next;
+            event->when = now;
+            event->deviceId = device->id == mBuiltInKeyboardId ? BUILT_IN_KEYBOARD_ID : device->id;
+            event->type = DEVICE_REMOVED;
+            event += 1;
+            delete device;
+            mNeedToSendFinishedDeviceScan = true;
+            if (--capacity == 0) {
+                break;
+            }
+        }
+
+        if (mNeedToScanDevices) {
+            mNeedToScanDevices = false;
+            scanDevicesLocked();
+            mNeedToSendFinishedDeviceScan = true;
+        }
+
+        while (mOpeningDevices != NULL) {
+            Device* device = mOpeningDevices;
+            ALOGV("Reporting device opened: id=%d, name=%s\n",
+                 device->id, device->path.string());
+            mOpeningDevices = device->next;
+            event->when = now;
+            event->deviceId = device->id == mBuiltInKeyboardId ? 0 : device->id;
+            event->type = DEVICE_ADDED;
+            event += 1;
+            mNeedToSendFinishedDeviceScan = true;
+            if (--capacity == 0) {
+                break;
+            }
+        }
+
+        if (mNeedToSendFinishedDeviceScan) {
+            mNeedToSendFinishedDeviceScan = false;
+            event->when = now;
+            event->type = FINISHED_DEVICE_SCAN;
+            event += 1;
+            if (--capacity == 0) {
+                break;
+            }
+        }
+
+        // Grab the next input event.
+        bool deviceChanged = false;
+        while (mPendingEventIndex < mPendingEventCount) {
+            const struct epoll_event& eventItem = mPendingEventItems[mPendingEventIndex++];
+            if (eventItem.data.u32 == EPOLL_ID_INOTIFY) {
+                if (eventItem.events & EPOLLIN) {
+                    mPendingINotify = true;
+                } else {
+                    ALOGW("Received unexpected epoll event 0x%08x for INotify.", eventItem.events);
+                }
+                continue;
+            }
+
+            if (eventItem.data.u32 == EPOLL_ID_WAKE) {
+                if (eventItem.events & EPOLLIN) {
+                    ALOGV("awoken after wake()");
+                    awoken = true;
+                    char buffer[16];
+                    ssize_t nRead;
+                    do {
+                        nRead = read(mWakeReadPipeFd, buffer, sizeof(buffer));
+                    } while ((nRead == -1 && errno == EINTR) || nRead == sizeof(buffer));
+                } else {
+                    ALOGW("Received unexpected epoll event 0x%08x for wake read pipe.",
+                            eventItem.events);
+                }
+                continue;
+            }
+
+            ssize_t deviceIndex = mDevices.indexOfKey(eventItem.data.u32);
+            if (deviceIndex < 0) {
+                ALOGW("Received unexpected epoll event 0x%08x for unknown device id %d.",
+                        eventItem.events, eventItem.data.u32);
+                continue;
+            }
+
+            Device* device = mDevices.valueAt(deviceIndex);
+            if (eventItem.events & EPOLLIN) {
+                int32_t readSize = read(device->fd, readBuffer,
+                        sizeof(struct input_event) * capacity);
+                if (readSize == 0 || (readSize < 0 && errno == ENODEV)) {
+                    // Device was removed before INotify noticed.
+                    ALOGW("could not get event, removed? (fd: %d size: %d bufferSize: %d "
+                            "capacity: %zu errno: %d)\n",
+                            device->fd, readSize, bufferSize, capacity, errno);
+                    deviceChanged = true;
+                    closeDeviceLocked(device);
+                } else if (readSize < 0) {
+                    if (errno != EAGAIN && errno != EINTR) {
+                        ALOGW("could not get event (errno=%d)", errno);
+                    }
+                } else if ((readSize % sizeof(struct input_event)) != 0) {
+                    ALOGE("could not get event (wrong size: %d)", readSize);
+                } else {
+                    int32_t deviceId = device->id == mBuiltInKeyboardId ? 0 : device->id;
+
+                    size_t count = size_t(readSize) / sizeof(struct input_event);
+                    for (size_t i = 0; i < count; i++) {
+                        struct input_event& iev = readBuffer[i];
+                        ALOGV("%s got: time=%d.%06d, type=%d, code=%d, value=%d",
+                                device->path.string(),
+                                (int) iev.time.tv_sec, (int) iev.time.tv_usec,
+                                iev.type, iev.code, iev.value);
+
+                        // Some input devices may have a better concept of the time
+                        // when an input event was actually generated than the kernel
+                        // which simply timestamps all events on entry to evdev.
+                        // This is a custom Android extension of the input protocol
+                        // mainly intended for use with uinput based device drivers.
+                        if (iev.type == EV_MSC) {
+                            if (iev.code == MSC_ANDROID_TIME_SEC) {
+                                device->timestampOverrideSec = iev.value;
+                                continue;
+                            } else if (iev.code == MSC_ANDROID_TIME_USEC) {
+                                device->timestampOverrideUsec = iev.value;
+                                continue;
+                            }
+                        }
+                        if (device->timestampOverrideSec || device->timestampOverrideUsec) {
+                            iev.time.tv_sec = device->timestampOverrideSec;
+                            iev.time.tv_usec = device->timestampOverrideUsec;
+                            if (iev.type == EV_SYN && iev.code == SYN_REPORT) {
+                                device->timestampOverrideSec = 0;
+                                device->timestampOverrideUsec = 0;
+                            }
+                            ALOGV("applied override time %d.%06d",
+                                    int(iev.time.tv_sec), int(iev.time.tv_usec));
+                        }
+
+#ifdef HAVE_POSIX_CLOCKS
+                        // Use the time specified in the event instead of the current time
+                        // so that downstream code can get more accurate estimates of
+                        // event dispatch latency from the time the event is enqueued onto
+                        // the evdev client buffer.
+                        //
+                        // The event's timestamp fortuitously uses the same monotonic clock
+                        // time base as the rest of Android.  The kernel event device driver
+                        // (drivers/input/evdev.c) obtains timestamps using ktime_get_ts().
+                        // The systemTime(SYSTEM_TIME_MONOTONIC) function we use everywhere
+                        // calls clock_gettime(CLOCK_MONOTONIC) which is implemented as a
+                        // system call that also queries ktime_get_ts().
+                        event->when = nsecs_t(iev.time.tv_sec) * 1000000000LL
+                                + nsecs_t(iev.time.tv_usec) * 1000LL;
+                        ALOGV("event time %lld, now %lld", event->when, now);
+
+                        // Bug 7291243: Add a guard in case the kernel generates timestamps
+                        // that appear to be far into the future because they were generated
+                        // using the wrong clock source.
+                        //
+                        // This can happen because when the input device is initially opened
+                        // it has a default clock source of CLOCK_REALTIME.  Any input events
+                        // enqueued right after the device is opened will have timestamps
+                        // generated using CLOCK_REALTIME.  We later set the clock source
+                        // to CLOCK_MONOTONIC but it is already too late.
+                        //
+                        // Invalid input event timestamps can result in ANRs, crashes and
+                        // and other issues that are hard to track down.  We must not let them
+                        // propagate through the system.
+                        //
+                        // Log a warning so that we notice the problem and recover gracefully.
+                        if (event->when >= now + 10 * 1000000000LL) {
+                            // Double-check.  Time may have moved on.
+                            nsecs_t time = systemTime(SYSTEM_TIME_MONOTONIC);
+                            if (event->when > time) {
+                                ALOGW("An input event from %s has a timestamp that appears to "
+                                        "have been generated using the wrong clock source "
+                                        "(expected CLOCK_MONOTONIC): "
+                                        "event time %lld, current time %lld, call time %lld.  "
+                                        "Using current time instead.",
+                                        device->path.string(), event->when, time, now);
+                                event->when = time;
+                            } else {
+                                ALOGV("Event time is ok but failed the fast path and required "
+                                        "an extra call to systemTime: "
+                                        "event time %lld, current time %lld, call time %lld.",
+                                        event->when, time, now);
+                            }
+                        }
+#else
+                        event->when = now;
+#endif
+                        event->deviceId = deviceId;
+                        event->type = iev.type;
+                        event->code = iev.code;
+                        event->value = iev.value;
+                        event += 1;
+                        capacity -= 1;
+                    }
+                    if (capacity == 0) {
+                        // The result buffer is full.  Reset the pending event index
+                        // so we will try to read the device again on the next iteration.
+                        mPendingEventIndex -= 1;
+                        break;
+                    }
+                }
+            } else if (eventItem.events & EPOLLHUP) {
+                ALOGI("Removing device %s due to epoll hang-up event.",
+                        device->identifier.name.string());
+                deviceChanged = true;
+                closeDeviceLocked(device);
+            } else {
+                ALOGW("Received unexpected epoll event 0x%08x for device %s.",
+                        eventItem.events, device->identifier.name.string());
+            }
+        }
+
+        // readNotify() will modify the list of devices so this must be done after
+        // processing all other events to ensure that we read all remaining events
+        // before closing the devices.
+        if (mPendingINotify && mPendingEventIndex >= mPendingEventCount) {
+            mPendingINotify = false;
+            readNotifyLocked();
+            deviceChanged = true;
+        }
+
+        // Report added or removed devices immediately.
+        if (deviceChanged) {
+            continue;
+        }
+
+        // Return now if we have collected any events or if we were explicitly awoken.
+        if (event != buffer || awoken) {
+            break;
+        }
+
+        // Poll for events.  Mind the wake lock dance!
+        // We hold a wake lock at all times except during epoll_wait().  This works due to some
+        // subtle choreography.  When a device driver has pending (unread) events, it acquires
+        // a kernel wake lock.  However, once the last pending event has been read, the device
+        // driver will release the kernel wake lock.  To prevent the system from going to sleep
+        // when this happens, the EventHub holds onto its own user wake lock while the client
+        // is processing events.  Thus the system can only sleep if there are no events
+        // pending or currently being processed.
+        //
+        // The timeout is advisory only.  If the device is asleep, it will not wake just to
+        // service the timeout.
+        mPendingEventIndex = 0;
+
+        mLock.unlock(); // release lock before poll, must be before release_wake_lock
+        release_wake_lock(WAKE_LOCK_ID);
+
+        int pollResult = epoll_wait(mEpollFd, mPendingEventItems, EPOLL_MAX_EVENTS, timeoutMillis);
+
+        acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID);
+        mLock.lock(); // reacquire lock after poll, must be after acquire_wake_lock
+
+        if (pollResult == 0) {
+            // Timed out.
+            mPendingEventCount = 0;
+            break;
+        }
+
+        if (pollResult < 0) {
+            // An error occurred.
+            mPendingEventCount = 0;
+
+            // Sleep after errors to avoid locking up the system.
+            // Hopefully the error is transient.
+            if (errno != EINTR) {
+                ALOGW("poll failed (errno=%d)\n", errno);
+                usleep(100000);
+            }
+        } else {
+            // Some events occurred.
+            mPendingEventCount = size_t(pollResult);
+        }
+    }
+
+    // All done, return the number of events we read.
+    return event - buffer;
+}
+
+void EventHub::wake() {
+    ALOGV("wake() called");
+
+    ssize_t nWrite;
+    do {
+        nWrite = write(mWakeWritePipeFd, "W", 1);
+    } while (nWrite == -1 && errno == EINTR);
+
+    if (nWrite != 1 && errno != EAGAIN) {
+        ALOGW("Could not write wake signal, errno=%d", errno);
+    }
+}
+
+void EventHub::scanDevicesLocked() {
+    status_t res = scanDirLocked(DEVICE_PATH);
+    if(res < 0) {
+        ALOGE("scan dir failed for %s\n", DEVICE_PATH);
+    }
+    if (mDevices.indexOfKey(VIRTUAL_KEYBOARD_ID) < 0) {
+        createVirtualKeyboardLocked();
+    }
+}
+
+// ----------------------------------------------------------------------------
+
+static bool containsNonZeroByte(const uint8_t* array, uint32_t startIndex, uint32_t endIndex) {
+    const uint8_t* end = array + endIndex;
+    array += startIndex;
+    while (array != end) {
+        if (*(array++) != 0) {
+            return true;
+        }
+    }
+    return false;
+}
+
+static const int32_t GAMEPAD_KEYCODES[] = {
+        AKEYCODE_BUTTON_A, AKEYCODE_BUTTON_B, AKEYCODE_BUTTON_C,
+        AKEYCODE_BUTTON_X, AKEYCODE_BUTTON_Y, AKEYCODE_BUTTON_Z,
+        AKEYCODE_BUTTON_L1, AKEYCODE_BUTTON_R1,
+        AKEYCODE_BUTTON_L2, AKEYCODE_BUTTON_R2,
+        AKEYCODE_BUTTON_THUMBL, AKEYCODE_BUTTON_THUMBR,
+        AKEYCODE_BUTTON_START, AKEYCODE_BUTTON_SELECT, AKEYCODE_BUTTON_MODE,
+};
+
+status_t EventHub::openDeviceLocked(const char *devicePath) {
+    char buffer[80];
+
+    ALOGV("Opening device: %s", devicePath);
+
+    int fd = open(devicePath, O_RDWR | O_CLOEXEC);
+    if(fd < 0) {
+        ALOGE("could not open %s, %s\n", devicePath, strerror(errno));
+        return -1;
+    }
+
+    InputDeviceIdentifier identifier;
+
+    // Get device name.
+    if(ioctl(fd, EVIOCGNAME(sizeof(buffer) - 1), &buffer) < 1) {
+        //fprintf(stderr, "could not get device name for %s, %s\n", devicePath, strerror(errno));
+    } else {
+        buffer[sizeof(buffer) - 1] = '\0';
+        identifier.name.setTo(buffer);
+    }
+
+    // Check to see if the device is on our excluded list
+    for (size_t i = 0; i < mExcludedDevices.size(); i++) {
+        const String8& item = mExcludedDevices.itemAt(i);
+        if (identifier.name == item) {
+            ALOGI("ignoring event id %s driver %s\n", devicePath, item.string());
+            close(fd);
+            return -1;
+        }
+    }
+
+    // Get device driver version.
+    int driverVersion;
+    if(ioctl(fd, EVIOCGVERSION, &driverVersion)) {
+        ALOGE("could not get driver version for %s, %s\n", devicePath, strerror(errno));
+        close(fd);
+        return -1;
+    }
+
+    // Get device identifier.
+    struct input_id inputId;
+    if(ioctl(fd, EVIOCGID, &inputId)) {
+        ALOGE("could not get device input id for %s, %s\n", devicePath, strerror(errno));
+        close(fd);
+        return -1;
+    }
+    identifier.bus = inputId.bustype;
+    identifier.product = inputId.product;
+    identifier.vendor = inputId.vendor;
+    identifier.version = inputId.version;
+
+    // Get device physical location.
+    if(ioctl(fd, EVIOCGPHYS(sizeof(buffer) - 1), &buffer) < 1) {
+        //fprintf(stderr, "could not get location for %s, %s\n", devicePath, strerror(errno));
+    } else {
+        buffer[sizeof(buffer) - 1] = '\0';
+        identifier.location.setTo(buffer);
+    }
+
+    // Get device unique id.
+    if(ioctl(fd, EVIOCGUNIQ(sizeof(buffer) - 1), &buffer) < 1) {
+        //fprintf(stderr, "could not get idstring for %s, %s\n", devicePath, strerror(errno));
+    } else {
+        buffer[sizeof(buffer) - 1] = '\0';
+        identifier.uniqueId.setTo(buffer);
+    }
+
+    // Fill in the descriptor.
+    assignDescriptorLocked(identifier);
+
+    // Make file descriptor non-blocking for use with poll().
+    if (fcntl(fd, F_SETFL, O_NONBLOCK)) {
+        ALOGE("Error %d making device file descriptor non-blocking.", errno);
+        close(fd);
+        return -1;
+    }
+
+    // Allocate device.  (The device object takes ownership of the fd at this point.)
+    int32_t deviceId = mNextDeviceId++;
+    Device* device = new Device(fd, deviceId, String8(devicePath), identifier);
+
+    ALOGV("add device %d: %s\n", deviceId, devicePath);
+    ALOGV("  bus:        %04x\n"
+         "  vendor      %04x\n"
+         "  product     %04x\n"
+         "  version     %04x\n",
+        identifier.bus, identifier.vendor, identifier.product, identifier.version);
+    ALOGV("  name:       \"%s\"\n", identifier.name.string());
+    ALOGV("  location:   \"%s\"\n", identifier.location.string());
+    ALOGV("  unique id:  \"%s\"\n", identifier.uniqueId.string());
+    ALOGV("  descriptor: \"%s\"\n", identifier.descriptor.string());
+    ALOGV("  driver:     v%d.%d.%d\n",
+        driverVersion >> 16, (driverVersion >> 8) & 0xff, driverVersion & 0xff);
+
+    // Load the configuration file for the device.
+    loadConfigurationLocked(device);
+
+    // Figure out the kinds of events the device reports.
+    ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(device->keyBitmask)), device->keyBitmask);
+    ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(device->absBitmask)), device->absBitmask);
+    ioctl(fd, EVIOCGBIT(EV_REL, sizeof(device->relBitmask)), device->relBitmask);
+    ioctl(fd, EVIOCGBIT(EV_SW, sizeof(device->swBitmask)), device->swBitmask);
+    ioctl(fd, EVIOCGBIT(EV_LED, sizeof(device->ledBitmask)), device->ledBitmask);
+    ioctl(fd, EVIOCGBIT(EV_FF, sizeof(device->ffBitmask)), device->ffBitmask);
+    ioctl(fd, EVIOCGPROP(sizeof(device->propBitmask)), device->propBitmask);
+
+    // See if this is a keyboard.  Ignore everything in the button range except for
+    // joystick and gamepad buttons which are handled like keyboards for the most part.
+    bool haveKeyboardKeys = containsNonZeroByte(device->keyBitmask, 0, sizeof_bit_array(BTN_MISC))
+            || containsNonZeroByte(device->keyBitmask, sizeof_bit_array(KEY_OK),
+                    sizeof_bit_array(KEY_MAX + 1));
+    bool haveGamepadButtons = containsNonZeroByte(device->keyBitmask, sizeof_bit_array(BTN_MISC),
+                    sizeof_bit_array(BTN_MOUSE))
+            || containsNonZeroByte(device->keyBitmask, sizeof_bit_array(BTN_JOYSTICK),
+                    sizeof_bit_array(BTN_DIGI));
+    if (haveKeyboardKeys || haveGamepadButtons) {
+        device->classes |= INPUT_DEVICE_CLASS_KEYBOARD;
+    }
+
+    // See if this is a cursor device such as a trackball or mouse.
+    if (test_bit(BTN_MOUSE, device->keyBitmask)
+            && test_bit(REL_X, device->relBitmask)
+            && test_bit(REL_Y, device->relBitmask)) {
+        device->classes |= INPUT_DEVICE_CLASS_CURSOR;
+    }
+
+    // See if this is a touch pad.
+    // Is this a new modern multi-touch driver?
+    if (test_bit(ABS_MT_POSITION_X, device->absBitmask)
+            && test_bit(ABS_MT_POSITION_Y, device->absBitmask)) {
+        // Some joysticks such as the PS3 controller report axes that conflict
+        // with the ABS_MT range.  Try to confirm that the device really is
+        // a touch screen.
+        if (test_bit(BTN_TOUCH, device->keyBitmask) || !haveGamepadButtons) {
+            device->classes |= INPUT_DEVICE_CLASS_TOUCH | INPUT_DEVICE_CLASS_TOUCH_MT;
+        }
+    // Is this an old style single-touch driver?
+    } else if (test_bit(BTN_TOUCH, device->keyBitmask)
+            && test_bit(ABS_X, device->absBitmask)
+            && test_bit(ABS_Y, device->absBitmask)) {
+        device->classes |= INPUT_DEVICE_CLASS_TOUCH;
+    }
+
+    // See if this device is a joystick.
+    // Assumes that joysticks always have gamepad buttons in order to distinguish them
+    // from other devices such as accelerometers that also have absolute axes.
+    if (haveGamepadButtons) {
+        uint32_t assumedClasses = device->classes | INPUT_DEVICE_CLASS_JOYSTICK;
+        for (int i = 0; i <= ABS_MAX; i++) {
+            if (test_bit(i, device->absBitmask)
+                    && (getAbsAxisUsage(i, assumedClasses) & INPUT_DEVICE_CLASS_JOYSTICK)) {
+                device->classes = assumedClasses;
+                break;
+            }
+        }
+    }
+
+    // Check whether this device has switches.
+    for (int i = 0; i <= SW_MAX; i++) {
+        if (test_bit(i, device->swBitmask)) {
+            device->classes |= INPUT_DEVICE_CLASS_SWITCH;
+            break;
+        }
+    }
+
+    // Check whether this device supports the vibrator.
+    if (test_bit(FF_RUMBLE, device->ffBitmask)) {
+        device->classes |= INPUT_DEVICE_CLASS_VIBRATOR;
+    }
+
+    // Configure virtual keys.
+    if ((device->classes & INPUT_DEVICE_CLASS_TOUCH)) {
+        // Load the virtual keys for the touch screen, if any.
+        // We do this now so that we can make sure to load the keymap if necessary.
+        status_t status = loadVirtualKeyMapLocked(device);
+        if (!status) {
+            device->classes |= INPUT_DEVICE_CLASS_KEYBOARD;
+        }
+    }
+
+    // Load the key map.
+    // We need to do this for joysticks too because the key layout may specify axes.
+    status_t keyMapStatus = NAME_NOT_FOUND;
+    if (device->classes & (INPUT_DEVICE_CLASS_KEYBOARD | INPUT_DEVICE_CLASS_JOYSTICK)) {
+        // Load the keymap for the device.
+        keyMapStatus = loadKeyMapLocked(device);
+    }
+
+    // Configure the keyboard, gamepad or virtual keyboard.
+    if (device->classes & INPUT_DEVICE_CLASS_KEYBOARD) {
+        // Register the keyboard as a built-in keyboard if it is eligible.
+        if (!keyMapStatus
+                && mBuiltInKeyboardId == NO_BUILT_IN_KEYBOARD
+                && isEligibleBuiltInKeyboard(device->identifier,
+                        device->configuration, &device->keyMap)) {
+            mBuiltInKeyboardId = device->id;
+        }
+
+        // 'Q' key support = cheap test of whether this is an alpha-capable kbd
+        if (hasKeycodeLocked(device, AKEYCODE_Q)) {
+            device->classes |= INPUT_DEVICE_CLASS_ALPHAKEY;
+        }
+
+        // See if this device has a DPAD.
+        if (hasKeycodeLocked(device, AKEYCODE_DPAD_UP) &&
+                hasKeycodeLocked(device, AKEYCODE_DPAD_DOWN) &&
+                hasKeycodeLocked(device, AKEYCODE_DPAD_LEFT) &&
+                hasKeycodeLocked(device, AKEYCODE_DPAD_RIGHT) &&
+                hasKeycodeLocked(device, AKEYCODE_DPAD_CENTER)) {
+            device->classes |= INPUT_DEVICE_CLASS_DPAD;
+        }
+
+        // See if this device has a gamepad.
+        for (size_t i = 0; i < sizeof(GAMEPAD_KEYCODES)/sizeof(GAMEPAD_KEYCODES[0]); i++) {
+            if (hasKeycodeLocked(device, GAMEPAD_KEYCODES[i])) {
+                device->classes |= INPUT_DEVICE_CLASS_GAMEPAD;
+                break;
+            }
+        }
+
+        // Disable kernel key repeat since we handle it ourselves
+        unsigned int repeatRate[] = {0,0};
+        if (ioctl(fd, EVIOCSREP, repeatRate)) {
+            ALOGW("Unable to disable kernel key repeat for %s: %s", devicePath, strerror(errno));
+        }
+    }
+
+    // If the device isn't recognized as something we handle, don't monitor it.
+    if (device->classes == 0) {
+        ALOGV("Dropping device: id=%d, path='%s', name='%s'",
+                deviceId, devicePath, device->identifier.name.string());
+        delete device;
+        return -1;
+    }
+
+    // Determine whether the device is external or internal.
+    if (isExternalDeviceLocked(device)) {
+        device->classes |= INPUT_DEVICE_CLASS_EXTERNAL;
+    }
+
+    if (device->classes & (INPUT_DEVICE_CLASS_JOYSTICK | INPUT_DEVICE_CLASS_DPAD)
+            && device->classes & INPUT_DEVICE_CLASS_GAMEPAD) {
+        device->controllerNumber = getNextControllerNumberLocked(device);
+        setLedForController(device);
+    }
+
+    // Register with epoll.
+    struct epoll_event eventItem;
+    memset(&eventItem, 0, sizeof(eventItem));
+    eventItem.events = mUsingEpollWakeup ? EPOLLIN : EPOLLIN | EPOLLWAKEUP;
+    eventItem.data.u32 = deviceId;
+    if (epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, &eventItem)) {
+        ALOGE("Could not add device fd to epoll instance.  errno=%d", errno);
+        delete device;
+        return -1;
+    }
+
+    String8 wakeMechanism("EPOLLWAKEUP");
+    if (!mUsingEpollWakeup) {
+#ifndef EVIOCSSUSPENDBLOCK
+        // uapi headers don't include EVIOCSSUSPENDBLOCK, and future kernels
+        // will use an epoll flag instead, so as long as we want to support
+        // this feature, we need to be prepared to define the ioctl ourselves.
+#define EVIOCSSUSPENDBLOCK _IOW('E', 0x91, int)
+#endif
+        if (ioctl(fd, EVIOCSSUSPENDBLOCK, 1)) {
+            wakeMechanism = "<none>";
+        } else {
+            wakeMechanism = "EVIOCSSUSPENDBLOCK";
+        }
+    }
+
+    // Tell the kernel that we want to use the monotonic clock for reporting timestamps
+    // associated with input events.  This is important because the input system
+    // uses the timestamps extensively and assumes they were recorded using the monotonic
+    // clock.
+    //
+    // In older kernel, before Linux 3.4, there was no way to tell the kernel which
+    // clock to use to input event timestamps.  The standard kernel behavior was to
+    // record a real time timestamp, which isn't what we want.  Android kernels therefore
+    // contained a patch to the evdev_event() function in drivers/input/evdev.c to
+    // replace the call to do_gettimeofday() with ktime_get_ts() to cause the monotonic
+    // clock to be used instead of the real time clock.
+    //
+    // As of Linux 3.4, there is a new EVIOCSCLOCKID ioctl to set the desired clock.
+    // Therefore, we no longer require the Android-specific kernel patch described above
+    // as long as we make sure to set select the monotonic clock.  We do that here.
+    int clockId = CLOCK_MONOTONIC;
+    bool usingClockIoctl = !ioctl(fd, EVIOCSCLOCKID, &clockId);
+
+    ALOGI("New device: id=%d, fd=%d, path='%s', name='%s', classes=0x%x, "
+            "configuration='%s', keyLayout='%s', keyCharacterMap='%s', builtinKeyboard=%s, "
+            "wakeMechanism=%s, usingClockIoctl=%s",
+         deviceId, fd, devicePath, device->identifier.name.string(),
+         device->classes,
+         device->configurationFile.string(),
+         device->keyMap.keyLayoutFile.string(),
+         device->keyMap.keyCharacterMapFile.string(),
+         toString(mBuiltInKeyboardId == deviceId),
+         wakeMechanism.string(), toString(usingClockIoctl));
+
+    addDeviceLocked(device);
+    return 0;
+}
+
+void EventHub::createVirtualKeyboardLocked() {
+    InputDeviceIdentifier identifier;
+    identifier.name = "Virtual";
+    identifier.uniqueId = "<virtual>";
+    assignDescriptorLocked(identifier);
+
+    Device* device = new Device(-1, VIRTUAL_KEYBOARD_ID, String8("<virtual>"), identifier);
+    device->classes = INPUT_DEVICE_CLASS_KEYBOARD
+            | INPUT_DEVICE_CLASS_ALPHAKEY
+            | INPUT_DEVICE_CLASS_DPAD
+            | INPUT_DEVICE_CLASS_VIRTUAL;
+    loadKeyMapLocked(device);
+    addDeviceLocked(device);
+}
+
+void EventHub::addDeviceLocked(Device* device) {
+    mDevices.add(device->id, device);
+    device->next = mOpeningDevices;
+    mOpeningDevices = device;
+}
+
+void EventHub::loadConfigurationLocked(Device* device) {
+    device->configurationFile = getInputDeviceConfigurationFilePathByDeviceIdentifier(
+            device->identifier, INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION);
+    if (device->configurationFile.isEmpty()) {
+        ALOGD("No input device configuration file found for device '%s'.",
+                device->identifier.name.string());
+    } else {
+        status_t status = PropertyMap::load(device->configurationFile,
+                &device->configuration);
+        if (status) {
+            ALOGE("Error loading input device configuration file for device '%s'.  "
+                    "Using default configuration.",
+                    device->identifier.name.string());
+        }
+    }
+}
+
+status_t EventHub::loadVirtualKeyMapLocked(Device* device) {
+    // The virtual key map is supplied by the kernel as a system board property file.
+    String8 path;
+    path.append("/sys/board_properties/virtualkeys.");
+    path.append(device->identifier.name);
+    if (access(path.string(), R_OK)) {
+        return NAME_NOT_FOUND;
+    }
+    return VirtualKeyMap::load(path, &device->virtualKeyMap);
+}
+
+status_t EventHub::loadKeyMapLocked(Device* device) {
+    return device->keyMap.load(device->identifier, device->configuration);
+}
+
+bool EventHub::isExternalDeviceLocked(Device* device) {
+    if (device->configuration) {
+        bool value;
+        if (device->configuration->tryGetProperty(String8("device.internal"), value)) {
+            return !value;
+        }
+    }
+    return device->identifier.bus == BUS_USB || device->identifier.bus == BUS_BLUETOOTH;
+}
+
+int32_t EventHub::getNextControllerNumberLocked(Device* device) {
+    if (mControllerNumbers.isFull()) {
+        ALOGI("Maximum number of controllers reached, assigning controller number 0 to device %s",
+                device->identifier.name.string());
+        return 0;
+    }
+    // Since the controller number 0 is reserved for non-controllers, translate all numbers up by
+    // one
+    return static_cast<int32_t>(mControllerNumbers.markFirstUnmarkedBit() + 1);
+}
+
+void EventHub::releaseControllerNumberLocked(Device* device) {
+    int32_t num = device->controllerNumber;
+    device->controllerNumber= 0;
+    if (num == 0) {
+        return;
+    }
+    mControllerNumbers.clearBit(static_cast<uint32_t>(num - 1));
+}
+
+void EventHub::setLedForController(Device* device) {
+    for (int i = 0; i < MAX_CONTROLLER_LEDS; i++) {
+        setLedStateLocked(device, ALED_CONTROLLER_1 + i, device->controllerNumber == i + 1);
+    }
+}
+
+bool EventHub::hasKeycodeLocked(Device* device, int keycode) const {
+    if (!device->keyMap.haveKeyLayout() || !device->keyBitmask) {
+        return false;
+    }
+    
+    Vector<int32_t> scanCodes;
+    device->keyMap.keyLayoutMap->findScanCodesForKey(keycode, &scanCodes);
+    const size_t N = scanCodes.size();
+    for (size_t i=0; i<N && i<=KEY_MAX; i++) {
+        int32_t sc = scanCodes.itemAt(i);
+        if (sc >= 0 && sc <= KEY_MAX && test_bit(sc, device->keyBitmask)) {
+            return true;
+        }
+    }
+    
+    return false;
+}
+
+status_t EventHub::mapLed(Device* device, int32_t led, int32_t* outScanCode) const {
+    if (!device->keyMap.haveKeyLayout() || !device->ledBitmask) {
+        return NAME_NOT_FOUND;
+    }
+
+    int32_t scanCode;
+    if(device->keyMap.keyLayoutMap->findScanCodeForLed(led, &scanCode) != NAME_NOT_FOUND) {
+        if(scanCode >= 0 && scanCode <= LED_MAX && test_bit(scanCode, device->ledBitmask)) {
+            *outScanCode = scanCode;
+            return NO_ERROR;
+        }
+    }
+    return NAME_NOT_FOUND;
+}
+
+status_t EventHub::closeDeviceByPathLocked(const char *devicePath) {
+    Device* device = getDeviceByPathLocked(devicePath);
+    if (device) {
+        closeDeviceLocked(device);
+        return 0;
+    }
+    ALOGV("Remove device: %s not found, device may already have been removed.", devicePath);
+    return -1;
+}
+
+void EventHub::closeAllDevicesLocked() {
+    while (mDevices.size() > 0) {
+        closeDeviceLocked(mDevices.valueAt(mDevices.size() - 1));
+    }
+}
+
+void EventHub::closeDeviceLocked(Device* device) {
+    ALOGI("Removed device: path=%s name=%s id=%d fd=%d classes=0x%x\n",
+         device->path.string(), device->identifier.name.string(), device->id,
+         device->fd, device->classes);
+
+    if (device->id == mBuiltInKeyboardId) {
+        ALOGW("built-in keyboard device %s (id=%d) is closing! the apps will not like this",
+                device->path.string(), mBuiltInKeyboardId);
+        mBuiltInKeyboardId = NO_BUILT_IN_KEYBOARD;
+    }
+
+    if (!device->isVirtual()) {
+        if (epoll_ctl(mEpollFd, EPOLL_CTL_DEL, device->fd, NULL)) {
+            ALOGW("Could not remove device fd from epoll instance.  errno=%d", errno);
+        }
+    }
+
+    releaseControllerNumberLocked(device);
+
+    mDevices.removeItem(device->id);
+    device->close();
+
+    // Unlink for opening devices list if it is present.
+    Device* pred = NULL;
+    bool found = false;
+    for (Device* entry = mOpeningDevices; entry != NULL; ) {
+        if (entry == device) {
+            found = true;
+            break;
+        }
+        pred = entry;
+        entry = entry->next;
+    }
+    if (found) {
+        // Unlink the device from the opening devices list then delete it.
+        // We don't need to tell the client that the device was closed because
+        // it does not even know it was opened in the first place.
+        ALOGI("Device %s was immediately closed after opening.", device->path.string());
+        if (pred) {
+            pred->next = device->next;
+        } else {
+            mOpeningDevices = device->next;
+        }
+        delete device;
+    } else {
+        // Link into closing devices list.
+        // The device will be deleted later after we have informed the client.
+        device->next = mClosingDevices;
+        mClosingDevices = device;
+    }
+}
+
+status_t EventHub::readNotifyLocked() {
+    int res;
+    char devname[PATH_MAX];
+    char *filename;
+    char event_buf[512];
+    int event_size;
+    int event_pos = 0;
+    struct inotify_event *event;
+
+    ALOGV("EventHub::readNotify nfd: %d\n", mINotifyFd);
+    res = read(mINotifyFd, event_buf, sizeof(event_buf));
+    if(res < (int)sizeof(*event)) {
+        if(errno == EINTR)
+            return 0;
+        ALOGW("could not get event, %s\n", strerror(errno));
+        return -1;
+    }
+    //printf("got %d bytes of event information\n", res);
+
+    strcpy(devname, DEVICE_PATH);
+    filename = devname + strlen(devname);
+    *filename++ = '/';
+
+    while(res >= (int)sizeof(*event)) {
+        event = (struct inotify_event *)(event_buf + event_pos);
+        //printf("%d: %08x \"%s\"\n", event->wd, event->mask, event->len ? event->name : "");
+        if(event->len) {
+            strcpy(filename, event->name);
+            if(event->mask & IN_CREATE) {
+                openDeviceLocked(devname);
+            } else {
+                ALOGI("Removing device '%s' due to inotify event\n", devname);
+                closeDeviceByPathLocked(devname);
+            }
+        }
+        event_size = sizeof(*event) + event->len;
+        res -= event_size;
+        event_pos += event_size;
+    }
+    return 0;
+}
+
+status_t EventHub::scanDirLocked(const char *dirname)
+{
+    char devname[PATH_MAX];
+    char *filename;
+    DIR *dir;
+    struct dirent *de;
+    dir = opendir(dirname);
+    if(dir == NULL)
+        return -1;
+    strcpy(devname, dirname);
+    filename = devname + strlen(devname);
+    *filename++ = '/';
+    while((de = readdir(dir))) {
+        if(de->d_name[0] == '.' &&
+           (de->d_name[1] == '\0' ||
+            (de->d_name[1] == '.' && de->d_name[2] == '\0')))
+            continue;
+        strcpy(filename, de->d_name);
+        openDeviceLocked(devname);
+    }
+    closedir(dir);
+    return 0;
+}
+
+void EventHub::requestReopenDevices() {
+    ALOGV("requestReopenDevices() called");
+
+    AutoMutex _l(mLock);
+    mNeedToReopenDevices = true;
+}
+
+void EventHub::dump(String8& dump) {
+    dump.append("Event Hub State:\n");
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        dump.appendFormat(INDENT "BuiltInKeyboardId: %d\n", mBuiltInKeyboardId);
+
+        dump.append(INDENT "Devices:\n");
+
+        for (size_t i = 0; i < mDevices.size(); i++) {
+            const Device* device = mDevices.valueAt(i);
+            if (mBuiltInKeyboardId == device->id) {
+                dump.appendFormat(INDENT2 "%d: %s (aka device 0 - built-in keyboard)\n",
+                        device->id, device->identifier.name.string());
+            } else {
+                dump.appendFormat(INDENT2 "%d: %s\n", device->id,
+                        device->identifier.name.string());
+            }
+            dump.appendFormat(INDENT3 "Classes: 0x%08x\n", device->classes);
+            dump.appendFormat(INDENT3 "Path: %s\n", device->path.string());
+            dump.appendFormat(INDENT3 "Descriptor: %s\n", device->identifier.descriptor.string());
+            dump.appendFormat(INDENT3 "Location: %s\n", device->identifier.location.string());
+            dump.appendFormat(INDENT3 "ControllerNumber: %d\n", device->controllerNumber);
+            dump.appendFormat(INDENT3 "UniqueId: %s\n", device->identifier.uniqueId.string());
+            dump.appendFormat(INDENT3 "Identifier: bus=0x%04x, vendor=0x%04x, "
+                    "product=0x%04x, version=0x%04x\n",
+                    device->identifier.bus, device->identifier.vendor,
+                    device->identifier.product, device->identifier.version);
+            dump.appendFormat(INDENT3 "KeyLayoutFile: %s\n",
+                    device->keyMap.keyLayoutFile.string());
+            dump.appendFormat(INDENT3 "KeyCharacterMapFile: %s\n",
+                    device->keyMap.keyCharacterMapFile.string());
+            dump.appendFormat(INDENT3 "ConfigurationFile: %s\n",
+                    device->configurationFile.string());
+            dump.appendFormat(INDENT3 "HaveKeyboardLayoutOverlay: %s\n",
+                    toString(device->overlayKeyMap != NULL));
+        }
+    } // release lock
+}
+
+void EventHub::monitor() {
+    // Acquire and release the lock to ensure that the event hub has not deadlocked.
+    mLock.lock();
+    mLock.unlock();
+}
+
+
+}; // namespace android
diff --git a/services/inputflinger/EventHub.h b/services/inputflinger/EventHub.h
new file mode 100644
index 0000000..20179ae
--- /dev/null
+++ b/services/inputflinger/EventHub.h
@@ -0,0 +1,457 @@
+/*
+ * Copyright (C) 2005 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+#ifndef _RUNTIME_EVENT_HUB_H
+#define _RUNTIME_EVENT_HUB_H
+
+#include <input/Input.h>
+#include <input/InputDevice.h>
+#include <input/Keyboard.h>
+#include <input/KeyLayoutMap.h>
+#include <input/KeyCharacterMap.h>
+#include <input/VirtualKeyMap.h>
+#include <utils/String8.h>
+#include <utils/threads.h>
+#include <utils/Log.h>
+#include <utils/threads.h>
+#include <utils/List.h>
+#include <utils/Errors.h>
+#include <utils/PropertyMap.h>
+#include <utils/Vector.h>
+#include <utils/KeyedVector.h>
+#include <utils/BitSet.h>
+
+#include <linux/input.h>
+#include <sys/epoll.h>
+
+/* Convenience constants. */
+
+#define BTN_FIRST 0x100  // first button code
+#define BTN_LAST 0x15f   // last button code
+
+/*
+ * These constants are used privately in Android to pass raw timestamps
+ * through evdev from uinput device drivers because there is currently no
+ * other way to transfer this information.  The evdev driver automatically
+ * timestamps all input events with the time they were posted and clobbers
+ * whatever information was passed in.
+ *
+ * For the purposes of this hack, the timestamp is specified in the
+ * CLOCK_MONOTONIC timebase and is split into two EV_MSC events specifying
+ * seconds and microseconds.
+ */
+#define MSC_ANDROID_TIME_SEC 0x6
+#define MSC_ANDROID_TIME_USEC 0x7
+
+namespace android {
+
+enum {
+    // Device id of a special "virtual" keyboard that is always present.
+    VIRTUAL_KEYBOARD_ID = -1,
+    // Device id of the "built-in" keyboard if there is one.
+    BUILT_IN_KEYBOARD_ID = 0,
+};
+
+/*
+ * A raw event as retrieved from the EventHub.
+ */
+struct RawEvent {
+    nsecs_t when;
+    int32_t deviceId;
+    int32_t type;
+    int32_t code;
+    int32_t value;
+};
+
+/* Describes an absolute axis. */
+struct RawAbsoluteAxisInfo {
+    bool valid; // true if the information is valid, false otherwise
+
+    int32_t minValue;  // minimum value
+    int32_t maxValue;  // maximum value
+    int32_t flat;      // center flat position, eg. flat == 8 means center is between -8 and 8
+    int32_t fuzz;      // error tolerance, eg. fuzz == 4 means value is +/- 4 due to noise
+    int32_t resolution; // resolution in units per mm or radians per mm
+
+    inline void clear() {
+        valid = false;
+        minValue = 0;
+        maxValue = 0;
+        flat = 0;
+        fuzz = 0;
+        resolution = 0;
+    }
+};
+
+/*
+ * Input device classes.
+ */
+enum {
+    /* The input device is a keyboard or has buttons. */
+    INPUT_DEVICE_CLASS_KEYBOARD      = 0x00000001,
+
+    /* The input device is an alpha-numeric keyboard (not just a dial pad). */
+    INPUT_DEVICE_CLASS_ALPHAKEY      = 0x00000002,
+
+    /* The input device is a touchscreen or a touchpad (either single-touch or multi-touch). */
+    INPUT_DEVICE_CLASS_TOUCH         = 0x00000004,
+
+    /* The input device is a cursor device such as a trackball or mouse. */
+    INPUT_DEVICE_CLASS_CURSOR        = 0x00000008,
+
+    /* The input device is a multi-touch touchscreen. */
+    INPUT_DEVICE_CLASS_TOUCH_MT      = 0x00000010,
+
+    /* The input device is a directional pad (implies keyboard, has DPAD keys). */
+    INPUT_DEVICE_CLASS_DPAD          = 0x00000020,
+
+    /* The input device is a gamepad (implies keyboard, has BUTTON keys). */
+    INPUT_DEVICE_CLASS_GAMEPAD       = 0x00000040,
+
+    /* The input device has switches. */
+    INPUT_DEVICE_CLASS_SWITCH        = 0x00000080,
+
+    /* The input device is a joystick (implies gamepad, has joystick absolute axes). */
+    INPUT_DEVICE_CLASS_JOYSTICK      = 0x00000100,
+
+    /* The input device has a vibrator (supports FF_RUMBLE). */
+    INPUT_DEVICE_CLASS_VIBRATOR      = 0x00000200,
+
+    /* The input device is virtual (not a real device, not part of UI configuration). */
+    INPUT_DEVICE_CLASS_VIRTUAL       = 0x40000000,
+
+    /* The input device is external (not built-in). */
+    INPUT_DEVICE_CLASS_EXTERNAL      = 0x80000000,
+};
+
+/*
+ * Gets the class that owns an axis, in cases where multiple classes might claim
+ * the same axis for different purposes.
+ */
+extern uint32_t getAbsAxisUsage(int32_t axis, uint32_t deviceClasses);
+
+/*
+ * Grand Central Station for events.
+ *
+ * The event hub aggregates input events received across all known input
+ * devices on the system, including devices that may be emulated by the simulator
+ * environment.  In addition, the event hub generates fake input events to indicate
+ * when devices are added or removed.
+ *
+ * The event hub provides a stream of input events (via the getEvent function).
+ * It also supports querying the current actual state of input devices such as identifying
+ * which keys are currently down.  Finally, the event hub keeps track of the capabilities of
+ * individual input devices, such as their class and the set of key codes that they support.
+ */
+class EventHubInterface : public virtual RefBase {
+protected:
+    EventHubInterface() { }
+    virtual ~EventHubInterface() { }
+
+public:
+    // Synthetic raw event type codes produced when devices are added or removed.
+    enum {
+        // Sent when a device is added.
+        DEVICE_ADDED = 0x10000000,
+        // Sent when a device is removed.
+        DEVICE_REMOVED = 0x20000000,
+        // Sent when all added/removed devices from the most recent scan have been reported.
+        // This event is always sent at least once.
+        FINISHED_DEVICE_SCAN = 0x30000000,
+
+        FIRST_SYNTHETIC_EVENT = DEVICE_ADDED,
+    };
+
+    virtual uint32_t getDeviceClasses(int32_t deviceId) const = 0;
+
+    virtual InputDeviceIdentifier getDeviceIdentifier(int32_t deviceId) const = 0;
+
+    virtual int32_t getDeviceControllerNumber(int32_t deviceId) const = 0;
+
+    virtual void getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const = 0;
+
+    virtual status_t getAbsoluteAxisInfo(int32_t deviceId, int axis,
+            RawAbsoluteAxisInfo* outAxisInfo) const = 0;
+
+    virtual bool hasRelativeAxis(int32_t deviceId, int axis) const = 0;
+
+    virtual bool hasInputProperty(int32_t deviceId, int property) const = 0;
+
+    virtual status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
+            int32_t* outKeycode, uint32_t* outFlags) const = 0;
+
+    virtual status_t mapAxis(int32_t deviceId, int32_t scanCode,
+            AxisInfo* outAxisInfo) const = 0;
+
+    // Sets devices that are excluded from opening.
+    // This can be used to ignore input devices for sensors.
+    virtual void setExcludedDevices(const Vector<String8>& devices) = 0;
+
+    /*
+     * Wait for events to become available and returns them.
+     * After returning, the EventHub holds onto a wake lock until the next call to getEvent.
+     * This ensures that the device will not go to sleep while the event is being processed.
+     * If the device needs to remain awake longer than that, then the caller is responsible
+     * for taking care of it (say, by poking the power manager user activity timer).
+     *
+     * The timeout is advisory only.  If the device is asleep, it will not wake just to
+     * service the timeout.
+     *
+     * Returns the number of events obtained, or 0 if the timeout expired.
+     */
+    virtual size_t getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSize) = 0;
+
+    /*
+     * Query current input state.
+     */
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const = 0;
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const = 0;
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t sw) const = 0;
+    virtual status_t getAbsoluteAxisValue(int32_t deviceId, int32_t axis,
+            int32_t* outValue) const = 0;
+
+    /*
+     * Examine key input devices for specific framework keycode support
+     */
+    virtual bool markSupportedKeyCodes(int32_t deviceId, size_t numCodes, const int32_t* keyCodes,
+            uint8_t* outFlags) const = 0;
+
+    virtual bool hasScanCode(int32_t deviceId, int32_t scanCode) const = 0;
+
+    /* LED related functions expect Android LED constants, not scan codes or HID usages */
+    virtual bool hasLed(int32_t deviceId, int32_t led) const = 0;
+    virtual void setLedState(int32_t deviceId, int32_t led, bool on) = 0;
+
+    virtual void getVirtualKeyDefinitions(int32_t deviceId,
+            Vector<VirtualKeyDefinition>& outVirtualKeys) const = 0;
+
+    virtual sp<KeyCharacterMap> getKeyCharacterMap(int32_t deviceId) const = 0;
+    virtual bool setKeyboardLayoutOverlay(int32_t deviceId, const sp<KeyCharacterMap>& map) = 0;
+
+    /* Control the vibrator. */
+    virtual void vibrate(int32_t deviceId, nsecs_t duration) = 0;
+    virtual void cancelVibrate(int32_t deviceId) = 0;
+
+    /* Requests the EventHub to reopen all input devices on the next call to getEvents(). */
+    virtual void requestReopenDevices() = 0;
+
+    /* Wakes up getEvents() if it is blocked on a read. */
+    virtual void wake() = 0;
+
+    /* Dump EventHub state to a string. */
+    virtual void dump(String8& dump) = 0;
+
+    /* Called by the heatbeat to ensures that the reader has not deadlocked. */
+    virtual void monitor() = 0;
+};
+
+class EventHub : public EventHubInterface
+{
+public:
+    EventHub();
+
+    virtual uint32_t getDeviceClasses(int32_t deviceId) const;
+
+    virtual InputDeviceIdentifier getDeviceIdentifier(int32_t deviceId) const;
+
+    virtual int32_t getDeviceControllerNumber(int32_t deviceId) const;
+
+    virtual void getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const;
+
+    virtual status_t getAbsoluteAxisInfo(int32_t deviceId, int axis,
+            RawAbsoluteAxisInfo* outAxisInfo) const;
+
+    virtual bool hasRelativeAxis(int32_t deviceId, int axis) const;
+
+    virtual bool hasInputProperty(int32_t deviceId, int property) const;
+
+    virtual status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
+            int32_t* outKeycode, uint32_t* outFlags) const;
+
+    virtual status_t mapAxis(int32_t deviceId, int32_t scanCode,
+            AxisInfo* outAxisInfo) const;
+
+    virtual void setExcludedDevices(const Vector<String8>& devices);
+
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const;
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const;
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t sw) const;
+    virtual status_t getAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t* outValue) const;
+
+    virtual bool markSupportedKeyCodes(int32_t deviceId, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags) const;
+
+    virtual size_t getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSize);
+
+    virtual bool hasScanCode(int32_t deviceId, int32_t scanCode) const;
+    virtual bool hasLed(int32_t deviceId, int32_t led) const;
+    virtual void setLedState(int32_t deviceId, int32_t led, bool on);
+
+    virtual void getVirtualKeyDefinitions(int32_t deviceId,
+            Vector<VirtualKeyDefinition>& outVirtualKeys) const;
+
+    virtual sp<KeyCharacterMap> getKeyCharacterMap(int32_t deviceId) const;
+    virtual bool setKeyboardLayoutOverlay(int32_t deviceId, const sp<KeyCharacterMap>& map);
+
+    virtual void vibrate(int32_t deviceId, nsecs_t duration);
+    virtual void cancelVibrate(int32_t deviceId);
+
+    virtual void requestReopenDevices();
+
+    virtual void wake();
+
+    virtual void dump(String8& dump);
+    virtual void monitor();
+
+protected:
+    virtual ~EventHub();
+
+private:
+    struct Device {
+        Device* next;
+
+        int fd; // may be -1 if device is virtual
+        const int32_t id;
+        const String8 path;
+        const InputDeviceIdentifier identifier;
+
+        uint32_t classes;
+
+        uint8_t keyBitmask[(KEY_MAX + 1) / 8];
+        uint8_t absBitmask[(ABS_MAX + 1) / 8];
+        uint8_t relBitmask[(REL_MAX + 1) / 8];
+        uint8_t swBitmask[(SW_MAX + 1) / 8];
+        uint8_t ledBitmask[(LED_MAX + 1) / 8];
+        uint8_t ffBitmask[(FF_MAX + 1) / 8];
+        uint8_t propBitmask[(INPUT_PROP_MAX + 1) / 8];
+
+        String8 configurationFile;
+        PropertyMap* configuration;
+        VirtualKeyMap* virtualKeyMap;
+        KeyMap keyMap;
+
+        sp<KeyCharacterMap> overlayKeyMap;
+        sp<KeyCharacterMap> combinedKeyMap;
+
+        bool ffEffectPlaying;
+        int16_t ffEffectId; // initially -1
+
+        int32_t controllerNumber;
+
+        int32_t timestampOverrideSec;
+        int32_t timestampOverrideUsec;
+
+        Device(int fd, int32_t id, const String8& path, const InputDeviceIdentifier& identifier);
+        ~Device();
+
+        void close();
+
+        inline bool isVirtual() const { return fd < 0; }
+
+        const sp<KeyCharacterMap>& getKeyCharacterMap() const {
+            if (combinedKeyMap != NULL) {
+                return combinedKeyMap;
+            }
+            return keyMap.keyCharacterMap;
+        }
+    };
+
+    status_t openDeviceLocked(const char *devicePath);
+    void createVirtualKeyboardLocked();
+    void addDeviceLocked(Device* device);
+    void assignDescriptorLocked(InputDeviceIdentifier& identifier);
+
+    status_t closeDeviceByPathLocked(const char *devicePath);
+    void closeDeviceLocked(Device* device);
+    void closeAllDevicesLocked();
+
+    status_t scanDirLocked(const char *dirname);
+    void scanDevicesLocked();
+    status_t readNotifyLocked();
+
+    Device* getDeviceByDescriptorLocked(String8& descriptor) const;
+    Device* getDeviceLocked(int32_t deviceId) const;
+    Device* getDeviceByPathLocked(const char* devicePath) const;
+
+    bool hasKeycodeLocked(Device* device, int keycode) const;
+
+    void loadConfigurationLocked(Device* device);
+    status_t loadVirtualKeyMapLocked(Device* device);
+    status_t loadKeyMapLocked(Device* device);
+
+    bool isExternalDeviceLocked(Device* device);
+
+    int32_t getNextControllerNumberLocked(Device* device);
+    void releaseControllerNumberLocked(Device* device);
+    void setLedForController(Device* device);
+
+    status_t mapLed(Device* device, int32_t led, int32_t* outScanCode) const;
+    void setLedStateLocked(Device* device, int32_t led, bool on);
+
+    // Protect all internal state.
+    mutable Mutex mLock;
+
+    // The actual id of the built-in keyboard, or NO_BUILT_IN_KEYBOARD if none.
+    // EventHub remaps the built-in keyboard to id 0 externally as required by the API.
+    enum {
+        // Must not conflict with any other assigned device ids, including
+        // the virtual keyboard id (-1).
+        NO_BUILT_IN_KEYBOARD = -2,
+    };
+    int32_t mBuiltInKeyboardId;
+
+    int32_t mNextDeviceId;
+
+    BitSet32 mControllerNumbers;
+
+    KeyedVector<int32_t, Device*> mDevices;
+
+    Device *mOpeningDevices;
+    Device *mClosingDevices;
+
+    bool mNeedToSendFinishedDeviceScan;
+    bool mNeedToReopenDevices;
+    bool mNeedToScanDevices;
+    Vector<String8> mExcludedDevices;
+
+    int mEpollFd;
+    int mINotifyFd;
+    int mWakeReadPipeFd;
+    int mWakeWritePipeFd;
+
+    // Ids used for epoll notifications not associated with devices.
+    static const uint32_t EPOLL_ID_INOTIFY = 0x80000001;
+    static const uint32_t EPOLL_ID_WAKE = 0x80000002;
+
+    // Epoll FD list size hint.
+    static const int EPOLL_SIZE_HINT = 8;
+
+    // Maximum number of signalled FDs to handle at a time.
+    static const int EPOLL_MAX_EVENTS = 16;
+
+    // The array of pending epoll events and the index of the next event to be handled.
+    struct epoll_event mPendingEventItems[EPOLL_MAX_EVENTS];
+    size_t mPendingEventCount;
+    size_t mPendingEventIndex;
+    bool mPendingINotify;
+
+    bool mUsingEpollWakeup;
+};
+
+}; // namespace android
+
+#endif // _RUNTIME_EVENT_HUB_H
diff --git a/services/inputflinger/InputApplication.cpp b/services/inputflinger/InputApplication.cpp
new file mode 100644
index 0000000..a99e637
--- /dev/null
+++ b/services/inputflinger/InputApplication.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputApplication"
+
+#include "InputApplication.h"
+
+#include <cutils/log.h>
+
+namespace android {
+
+// --- InputApplicationHandle ---
+
+InputApplicationHandle::InputApplicationHandle() :
+    mInfo(NULL) {
+}
+
+InputApplicationHandle::~InputApplicationHandle() {
+    delete mInfo;
+}
+
+void InputApplicationHandle::releaseInfo() {
+    if (mInfo) {
+        delete mInfo;
+        mInfo = NULL;
+    }
+}
+
+} // namespace android
diff --git a/services/inputflinger/InputApplication.h b/services/inputflinger/InputApplication.h
new file mode 100644
index 0000000..1f5504c
--- /dev/null
+++ b/services/inputflinger/InputApplication.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_APPLICATION_H
+#define _UI_INPUT_APPLICATION_H
+
+#include <input/Input.h>
+
+#include <utils/RefBase.h>
+#include <utils/Timers.h>
+#include <utils/String8.h>
+
+namespace android {
+
+/*
+ * Describes the properties of an application that can receive input.
+ */
+struct InputApplicationInfo {
+    String8 name;
+    nsecs_t dispatchingTimeout;
+};
+
+
+/*
+ * Handle for an application that can receive input.
+ *
+ * Used by the native input dispatcher as a handle for the window manager objects
+ * that describe an application.
+ */
+class InputApplicationHandle : public RefBase {
+public:
+    inline const InputApplicationInfo* getInfo() const {
+        return mInfo;
+    }
+
+    inline String8 getName() const {
+        return mInfo ? mInfo->name : String8("<invalid>");
+    }
+
+    inline nsecs_t getDispatchingTimeout(nsecs_t defaultValue) const {
+        return mInfo ? mInfo->dispatchingTimeout : defaultValue;
+    }
+
+    /**
+     * Requests that the state of this object be updated to reflect
+     * the most current available information about the application.
+     *
+     * This method should only be called from within the input dispatcher's
+     * critical section.
+     *
+     * Returns true on success, or false if the handle is no longer valid.
+     */
+    virtual bool updateInfo() = 0;
+
+    /**
+     * Releases the storage used by the associated information when it is
+     * no longer needed.
+     */
+    void releaseInfo();
+
+protected:
+    InputApplicationHandle();
+    virtual ~InputApplicationHandle();
+
+    InputApplicationInfo* mInfo;
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_APPLICATION_H
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
new file mode 100644
index 0000000..a750a3d
--- /dev/null
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -0,0 +1,4487 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputDispatcher"
+#define ATRACE_TAG ATRACE_TAG_INPUT
+
+//#define LOG_NDEBUG 0
+
+// Log detailed debug messages about each inbound event notification to the dispatcher.
+#define DEBUG_INBOUND_EVENT_DETAILS 0
+
+// Log detailed debug messages about each outbound event processed by the dispatcher.
+#define DEBUG_OUTBOUND_EVENT_DETAILS 0
+
+// Log debug messages about the dispatch cycle.
+#define DEBUG_DISPATCH_CYCLE 0
+
+// Log debug messages about registrations.
+#define DEBUG_REGISTRATION 0
+
+// Log debug messages about input event injection.
+#define DEBUG_INJECTION 0
+
+// Log debug messages about input focus tracking.
+#define DEBUG_FOCUS 0
+
+// Log debug messages about the app switch latency optimization.
+#define DEBUG_APP_SWITCH 0
+
+// Log debug messages about hover events.
+#define DEBUG_HOVER 0
+
+#include "InputDispatcher.h"
+
+#include <utils/Trace.h>
+#include <cutils/log.h>
+#include <powermanager/PowerManager.h>
+#include <ui/Region.h>
+
+#include <stddef.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+#include <time.h>
+
+#define INDENT "  "
+#define INDENT2 "    "
+#define INDENT3 "      "
+#define INDENT4 "        "
+
+namespace android {
+
+// Default input dispatching timeout if there is no focused application or paused window
+// from which to determine an appropriate dispatching timeout.
+const nsecs_t DEFAULT_INPUT_DISPATCHING_TIMEOUT = 5000 * 1000000LL; // 5 sec
+
+// Amount of time to allow for all pending events to be processed when an app switch
+// key is on the way.  This is used to preempt input dispatch and drop input events
+// when an application takes too long to respond and the user has pressed an app switch key.
+const nsecs_t APP_SWITCH_TIMEOUT = 500 * 1000000LL; // 0.5sec
+
+// Amount of time to allow for an event to be dispatched (measured since its eventTime)
+// before considering it stale and dropping it.
+const nsecs_t STALE_EVENT_TIMEOUT = 10000 * 1000000LL; // 10sec
+
+// Amount of time to allow touch events to be streamed out to a connection before requiring
+// that the first event be finished.  This value extends the ANR timeout by the specified
+// amount.  For example, if streaming is allowed to get ahead by one second relative to the
+// queue of waiting unfinished events, then ANRs will similarly be delayed by one second.
+const nsecs_t STREAM_AHEAD_EVENT_TIMEOUT = 500 * 1000000LL; // 0.5sec
+
+// Log a warning when an event takes longer than this to process, even if an ANR does not occur.
+const nsecs_t SLOW_EVENT_PROCESSING_WARNING_TIMEOUT = 2000 * 1000000LL; // 2sec
+
+// Number of recent events to keep for debugging purposes.
+const size_t RECENT_QUEUE_MAX_SIZE = 10;
+
+static inline nsecs_t now() {
+    return systemTime(SYSTEM_TIME_MONOTONIC);
+}
+
+static inline const char* toString(bool value) {
+    return value ? "true" : "false";
+}
+
+static inline int32_t getMotionEventActionPointerIndex(int32_t action) {
+    return (action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK)
+            >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
+}
+
+static bool isValidKeyAction(int32_t action) {
+    switch (action) {
+    case AKEY_EVENT_ACTION_DOWN:
+    case AKEY_EVENT_ACTION_UP:
+        return true;
+    default:
+        return false;
+    }
+}
+
+static bool validateKeyEvent(int32_t action) {
+    if (! isValidKeyAction(action)) {
+        ALOGE("Key event has invalid action code 0x%x", action);
+        return false;
+    }
+    return true;
+}
+
+static bool isValidMotionAction(int32_t action, size_t pointerCount) {
+    switch (action & AMOTION_EVENT_ACTION_MASK) {
+    case AMOTION_EVENT_ACTION_DOWN:
+    case AMOTION_EVENT_ACTION_UP:
+    case AMOTION_EVENT_ACTION_CANCEL:
+    case AMOTION_EVENT_ACTION_MOVE:
+    case AMOTION_EVENT_ACTION_OUTSIDE:
+    case AMOTION_EVENT_ACTION_HOVER_ENTER:
+    case AMOTION_EVENT_ACTION_HOVER_MOVE:
+    case AMOTION_EVENT_ACTION_HOVER_EXIT:
+    case AMOTION_EVENT_ACTION_SCROLL:
+        return true;
+    case AMOTION_EVENT_ACTION_POINTER_DOWN:
+    case AMOTION_EVENT_ACTION_POINTER_UP: {
+        int32_t index = getMotionEventActionPointerIndex(action);
+        return index >= 0 && size_t(index) < pointerCount;
+    }
+    default:
+        return false;
+    }
+}
+
+static bool validateMotionEvent(int32_t action, size_t pointerCount,
+        const PointerProperties* pointerProperties) {
+    if (! isValidMotionAction(action, pointerCount)) {
+        ALOGE("Motion event has invalid action code 0x%x", action);
+        return false;
+    }
+    if (pointerCount < 1 || pointerCount > MAX_POINTERS) {
+        ALOGE("Motion event has invalid pointer count %zu; value must be between 1 and %d.",
+                pointerCount, MAX_POINTERS);
+        return false;
+    }
+    BitSet32 pointerIdBits;
+    for (size_t i = 0; i < pointerCount; i++) {
+        int32_t id = pointerProperties[i].id;
+        if (id < 0 || id > MAX_POINTER_ID) {
+            ALOGE("Motion event has invalid pointer id %d; value must be between 0 and %d",
+                    id, MAX_POINTER_ID);
+            return false;
+        }
+        if (pointerIdBits.hasBit(id)) {
+            ALOGE("Motion event has duplicate pointer id %d", id);
+            return false;
+        }
+        pointerIdBits.markBit(id);
+    }
+    return true;
+}
+
+static bool isMainDisplay(int32_t displayId) {
+    return displayId == ADISPLAY_ID_DEFAULT || displayId == ADISPLAY_ID_NONE;
+}
+
+static void dumpRegion(String8& dump, const Region& region) {
+    if (region.isEmpty()) {
+        dump.append("<empty>");
+        return;
+    }
+
+    bool first = true;
+    Region::const_iterator cur = region.begin();
+    Region::const_iterator const tail = region.end();
+    while (cur != tail) {
+        if (first) {
+            first = false;
+        } else {
+            dump.append("|");
+        }
+        dump.appendFormat("[%d,%d][%d,%d]", cur->left, cur->top, cur->right, cur->bottom);
+        cur++;
+    }
+}
+
+
+// --- InputDispatcher ---
+
+InputDispatcher::InputDispatcher(const sp<InputDispatcherPolicyInterface>& policy) :
+    mPolicy(policy),
+    mPendingEvent(NULL), mAppSwitchSawKeyDown(false), mAppSwitchDueTime(LONG_LONG_MAX),
+    mNextUnblockedEvent(NULL),
+    mDispatchEnabled(false), mDispatchFrozen(false), mInputFilterEnabled(false),
+    mInputTargetWaitCause(INPUT_TARGET_WAIT_CAUSE_NONE) {
+    mLooper = new Looper(false);
+
+    mKeyRepeatState.lastKeyEntry = NULL;
+
+    policy->getDispatcherConfiguration(&mConfig);
+}
+
+InputDispatcher::~InputDispatcher() {
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        resetKeyRepeatLocked();
+        releasePendingEventLocked();
+        drainInboundQueueLocked();
+    }
+
+    while (mConnectionsByFd.size() != 0) {
+        unregisterInputChannel(mConnectionsByFd.valueAt(0)->inputChannel);
+    }
+}
+
+void InputDispatcher::dispatchOnce() {
+    nsecs_t nextWakeupTime = LONG_LONG_MAX;
+    { // acquire lock
+        AutoMutex _l(mLock);
+        mDispatcherIsAliveCondition.broadcast();
+
+        // Run a dispatch loop if there are no pending commands.
+        // The dispatch loop might enqueue commands to run afterwards.
+        if (!haveCommandsLocked()) {
+            dispatchOnceInnerLocked(&nextWakeupTime);
+        }
+
+        // Run all pending commands if there are any.
+        // If any commands were run then force the next poll to wake up immediately.
+        if (runCommandsLockedInterruptible()) {
+            nextWakeupTime = LONG_LONG_MIN;
+        }
+    } // release lock
+
+    // Wait for callback or timeout or wake.  (make sure we round up, not down)
+    nsecs_t currentTime = now();
+    int timeoutMillis = toMillisecondTimeoutDelay(currentTime, nextWakeupTime);
+    mLooper->pollOnce(timeoutMillis);
+}
+
+void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) {
+    nsecs_t currentTime = now();
+
+    // Reset the key repeat timer whenever normal dispatch is suspended while the
+    // device is in a non-interactive state.  This is to ensure that we abort a key
+    // repeat if the device is just coming out of sleep.
+    if (!mDispatchEnabled) {
+        resetKeyRepeatLocked();
+    }
+
+    // If dispatching is frozen, do not process timeouts or try to deliver any new events.
+    if (mDispatchFrozen) {
+#if DEBUG_FOCUS
+        ALOGD("Dispatch frozen.  Waiting some more.");
+#endif
+        return;
+    }
+
+    // Optimize latency of app switches.
+    // Essentially we start a short timeout when an app switch key (HOME / ENDCALL) has
+    // been pressed.  When it expires, we preempt dispatch and drop all other pending events.
+    bool isAppSwitchDue = mAppSwitchDueTime <= currentTime;
+    if (mAppSwitchDueTime < *nextWakeupTime) {
+        *nextWakeupTime = mAppSwitchDueTime;
+    }
+
+    // Ready to start a new event.
+    // If we don't already have a pending event, go grab one.
+    if (! mPendingEvent) {
+        if (mInboundQueue.isEmpty()) {
+            if (isAppSwitchDue) {
+                // The inbound queue is empty so the app switch key we were waiting
+                // for will never arrive.  Stop waiting for it.
+                resetPendingAppSwitchLocked(false);
+                isAppSwitchDue = false;
+            }
+
+            // Synthesize a key repeat if appropriate.
+            if (mKeyRepeatState.lastKeyEntry) {
+                if (currentTime >= mKeyRepeatState.nextRepeatTime) {
+                    mPendingEvent = synthesizeKeyRepeatLocked(currentTime);
+                } else {
+                    if (mKeyRepeatState.nextRepeatTime < *nextWakeupTime) {
+                        *nextWakeupTime = mKeyRepeatState.nextRepeatTime;
+                    }
+                }
+            }
+
+            // Nothing to do if there is no pending event.
+            if (!mPendingEvent) {
+                return;
+            }
+        } else {
+            // Inbound queue has at least one entry.
+            mPendingEvent = mInboundQueue.dequeueAtHead();
+            traceInboundQueueLengthLocked();
+        }
+
+        // Poke user activity for this event.
+        if (mPendingEvent->policyFlags & POLICY_FLAG_PASS_TO_USER) {
+            pokeUserActivityLocked(mPendingEvent);
+        }
+
+        // Get ready to dispatch the event.
+        resetANRTimeoutsLocked();
+    }
+
+    // Now we have an event to dispatch.
+    // All events are eventually dequeued and processed this way, even if we intend to drop them.
+    ALOG_ASSERT(mPendingEvent != NULL);
+    bool done = false;
+    DropReason dropReason = DROP_REASON_NOT_DROPPED;
+    if (!(mPendingEvent->policyFlags & POLICY_FLAG_PASS_TO_USER)) {
+        dropReason = DROP_REASON_POLICY;
+    } else if (!mDispatchEnabled) {
+        dropReason = DROP_REASON_DISABLED;
+    }
+
+    if (mNextUnblockedEvent == mPendingEvent) {
+        mNextUnblockedEvent = NULL;
+    }
+
+    switch (mPendingEvent->type) {
+    case EventEntry::TYPE_CONFIGURATION_CHANGED: {
+        ConfigurationChangedEntry* typedEntry =
+                static_cast<ConfigurationChangedEntry*>(mPendingEvent);
+        done = dispatchConfigurationChangedLocked(currentTime, typedEntry);
+        dropReason = DROP_REASON_NOT_DROPPED; // configuration changes are never dropped
+        break;
+    }
+
+    case EventEntry::TYPE_DEVICE_RESET: {
+        DeviceResetEntry* typedEntry =
+                static_cast<DeviceResetEntry*>(mPendingEvent);
+        done = dispatchDeviceResetLocked(currentTime, typedEntry);
+        dropReason = DROP_REASON_NOT_DROPPED; // device resets are never dropped
+        break;
+    }
+
+    case EventEntry::TYPE_KEY: {
+        KeyEntry* typedEntry = static_cast<KeyEntry*>(mPendingEvent);
+        if (isAppSwitchDue) {
+            if (isAppSwitchKeyEventLocked(typedEntry)) {
+                resetPendingAppSwitchLocked(true);
+                isAppSwitchDue = false;
+            } else if (dropReason == DROP_REASON_NOT_DROPPED) {
+                dropReason = DROP_REASON_APP_SWITCH;
+            }
+        }
+        if (dropReason == DROP_REASON_NOT_DROPPED
+                && isStaleEventLocked(currentTime, typedEntry)) {
+            dropReason = DROP_REASON_STALE;
+        }
+        if (dropReason == DROP_REASON_NOT_DROPPED && mNextUnblockedEvent) {
+            dropReason = DROP_REASON_BLOCKED;
+        }
+        done = dispatchKeyLocked(currentTime, typedEntry, &dropReason, nextWakeupTime);
+        break;
+    }
+
+    case EventEntry::TYPE_MOTION: {
+        MotionEntry* typedEntry = static_cast<MotionEntry*>(mPendingEvent);
+        if (dropReason == DROP_REASON_NOT_DROPPED && isAppSwitchDue) {
+            dropReason = DROP_REASON_APP_SWITCH;
+        }
+        if (dropReason == DROP_REASON_NOT_DROPPED
+                && isStaleEventLocked(currentTime, typedEntry)) {
+            dropReason = DROP_REASON_STALE;
+        }
+        if (dropReason == DROP_REASON_NOT_DROPPED && mNextUnblockedEvent) {
+            dropReason = DROP_REASON_BLOCKED;
+        }
+        done = dispatchMotionLocked(currentTime, typedEntry,
+                &dropReason, nextWakeupTime);
+        break;
+    }
+
+    default:
+        ALOG_ASSERT(false);
+        break;
+    }
+
+    if (done) {
+        if (dropReason != DROP_REASON_NOT_DROPPED) {
+            dropInboundEventLocked(mPendingEvent, dropReason);
+        }
+
+        releasePendingEventLocked();
+        *nextWakeupTime = LONG_LONG_MIN;  // force next poll to wake up immediately
+    }
+}
+
+bool InputDispatcher::enqueueInboundEventLocked(EventEntry* entry) {
+    bool needWake = mInboundQueue.isEmpty();
+    mInboundQueue.enqueueAtTail(entry);
+    traceInboundQueueLengthLocked();
+
+    switch (entry->type) {
+    case EventEntry::TYPE_KEY: {
+        // Optimize app switch latency.
+        // If the application takes too long to catch up then we drop all events preceding
+        // the app switch key.
+        KeyEntry* keyEntry = static_cast<KeyEntry*>(entry);
+        if (isAppSwitchKeyEventLocked(keyEntry)) {
+            if (keyEntry->action == AKEY_EVENT_ACTION_DOWN) {
+                mAppSwitchSawKeyDown = true;
+            } else if (keyEntry->action == AKEY_EVENT_ACTION_UP) {
+                if (mAppSwitchSawKeyDown) {
+#if DEBUG_APP_SWITCH
+                    ALOGD("App switch is pending!");
+#endif
+                    mAppSwitchDueTime = keyEntry->eventTime + APP_SWITCH_TIMEOUT;
+                    mAppSwitchSawKeyDown = false;
+                    needWake = true;
+                }
+            }
+        }
+        break;
+    }
+
+    case EventEntry::TYPE_MOTION: {
+        // Optimize case where the current application is unresponsive and the user
+        // decides to touch a window in a different application.
+        // If the application takes too long to catch up then we drop all events preceding
+        // the touch into the other window.
+        MotionEntry* motionEntry = static_cast<MotionEntry*>(entry);
+        if (motionEntry->action == AMOTION_EVENT_ACTION_DOWN
+                && (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER)
+                && mInputTargetWaitCause == INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY
+                && mInputTargetWaitApplicationHandle != NULL) {
+            int32_t displayId = motionEntry->displayId;
+            int32_t x = int32_t(motionEntry->pointerCoords[0].
+                    getAxisValue(AMOTION_EVENT_AXIS_X));
+            int32_t y = int32_t(motionEntry->pointerCoords[0].
+                    getAxisValue(AMOTION_EVENT_AXIS_Y));
+            sp<InputWindowHandle> touchedWindowHandle = findTouchedWindowAtLocked(displayId, x, y);
+            if (touchedWindowHandle != NULL
+                    && touchedWindowHandle->inputApplicationHandle
+                            != mInputTargetWaitApplicationHandle) {
+                // User touched a different application than the one we are waiting on.
+                // Flag the event, and start pruning the input queue.
+                mNextUnblockedEvent = motionEntry;
+                needWake = true;
+            }
+        }
+        break;
+    }
+    }
+
+    return needWake;
+}
+
+void InputDispatcher::addRecentEventLocked(EventEntry* entry) {
+    entry->refCount += 1;
+    mRecentQueue.enqueueAtTail(entry);
+    if (mRecentQueue.count() > RECENT_QUEUE_MAX_SIZE) {
+        mRecentQueue.dequeueAtHead()->release();
+    }
+}
+
+sp<InputWindowHandle> InputDispatcher::findTouchedWindowAtLocked(int32_t displayId,
+        int32_t x, int32_t y) {
+    // Traverse windows from front to back to find touched window.
+    size_t numWindows = mWindowHandles.size();
+    for (size_t i = 0; i < numWindows; i++) {
+        sp<InputWindowHandle> windowHandle = mWindowHandles.itemAt(i);
+        const InputWindowInfo* windowInfo = windowHandle->getInfo();
+        if (windowInfo->displayId == displayId) {
+            int32_t flags = windowInfo->layoutParamsFlags;
+            int32_t privateFlags = windowInfo->layoutParamsPrivateFlags;
+
+            if (windowInfo->visible) {
+                if (!(flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
+                    bool isTouchModal = (flags & (InputWindowInfo::FLAG_NOT_FOCUSABLE
+                            | InputWindowInfo::FLAG_NOT_TOUCH_MODAL)) == 0;
+                    if (isTouchModal || windowInfo->touchableRegionContainsPoint(x, y)) {
+                        // Found window.
+                        return windowHandle;
+                    }
+                }
+            }
+
+            if (privateFlags & InputWindowInfo::PRIVATE_FLAG_SYSTEM_ERROR) {
+                // Error window is on top but not visible, so touch is dropped.
+                return NULL;
+            }
+        }
+    }
+    return NULL;
+}
+
+void InputDispatcher::dropInboundEventLocked(EventEntry* entry, DropReason dropReason) {
+    const char* reason;
+    switch (dropReason) {
+    case DROP_REASON_POLICY:
+#if DEBUG_INBOUND_EVENT_DETAILS
+        ALOGD("Dropped event because policy consumed it.");
+#endif
+        reason = "inbound event was dropped because the policy consumed it";
+        break;
+    case DROP_REASON_DISABLED:
+        ALOGI("Dropped event because input dispatch is disabled.");
+        reason = "inbound event was dropped because input dispatch is disabled";
+        break;
+    case DROP_REASON_APP_SWITCH:
+        ALOGI("Dropped event because of pending overdue app switch.");
+        reason = "inbound event was dropped because of pending overdue app switch";
+        break;
+    case DROP_REASON_BLOCKED:
+        ALOGI("Dropped event because the current application is not responding and the user "
+                "has started interacting with a different application.");
+        reason = "inbound event was dropped because the current application is not responding "
+                "and the user has started interacting with a different application";
+        break;
+    case DROP_REASON_STALE:
+        ALOGI("Dropped event because it is stale.");
+        reason = "inbound event was dropped because it is stale";
+        break;
+    default:
+        ALOG_ASSERT(false);
+        return;
+    }
+
+    switch (entry->type) {
+    case EventEntry::TYPE_KEY: {
+        CancelationOptions options(CancelationOptions::CANCEL_NON_POINTER_EVENTS, reason);
+        synthesizeCancelationEventsForAllConnectionsLocked(options);
+        break;
+    }
+    case EventEntry::TYPE_MOTION: {
+        MotionEntry* motionEntry = static_cast<MotionEntry*>(entry);
+        if (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER) {
+            CancelationOptions options(CancelationOptions::CANCEL_POINTER_EVENTS, reason);
+            synthesizeCancelationEventsForAllConnectionsLocked(options);
+        } else {
+            CancelationOptions options(CancelationOptions::CANCEL_NON_POINTER_EVENTS, reason);
+            synthesizeCancelationEventsForAllConnectionsLocked(options);
+        }
+        break;
+    }
+    }
+}
+
+bool InputDispatcher::isAppSwitchKeyCode(int32_t keyCode) {
+    return keyCode == AKEYCODE_HOME
+            || keyCode == AKEYCODE_ENDCALL
+            || keyCode == AKEYCODE_APP_SWITCH;
+}
+
+bool InputDispatcher::isAppSwitchKeyEventLocked(KeyEntry* keyEntry) {
+    return ! (keyEntry->flags & AKEY_EVENT_FLAG_CANCELED)
+            && isAppSwitchKeyCode(keyEntry->keyCode)
+            && (keyEntry->policyFlags & POLICY_FLAG_TRUSTED)
+            && (keyEntry->policyFlags & POLICY_FLAG_PASS_TO_USER);
+}
+
+bool InputDispatcher::isAppSwitchPendingLocked() {
+    return mAppSwitchDueTime != LONG_LONG_MAX;
+}
+
+void InputDispatcher::resetPendingAppSwitchLocked(bool handled) {
+    mAppSwitchDueTime = LONG_LONG_MAX;
+
+#if DEBUG_APP_SWITCH
+    if (handled) {
+        ALOGD("App switch has arrived.");
+    } else {
+        ALOGD("App switch was abandoned.");
+    }
+#endif
+}
+
+bool InputDispatcher::isStaleEventLocked(nsecs_t currentTime, EventEntry* entry) {
+    return currentTime - entry->eventTime >= STALE_EVENT_TIMEOUT;
+}
+
+bool InputDispatcher::haveCommandsLocked() const {
+    return !mCommandQueue.isEmpty();
+}
+
+bool InputDispatcher::runCommandsLockedInterruptible() {
+    if (mCommandQueue.isEmpty()) {
+        return false;
+    }
+
+    do {
+        CommandEntry* commandEntry = mCommandQueue.dequeueAtHead();
+
+        Command command = commandEntry->command;
+        (this->*command)(commandEntry); // commands are implicitly 'LockedInterruptible'
+
+        commandEntry->connection.clear();
+        delete commandEntry;
+    } while (! mCommandQueue.isEmpty());
+    return true;
+}
+
+InputDispatcher::CommandEntry* InputDispatcher::postCommandLocked(Command command) {
+    CommandEntry* commandEntry = new CommandEntry(command);
+    mCommandQueue.enqueueAtTail(commandEntry);
+    return commandEntry;
+}
+
+void InputDispatcher::drainInboundQueueLocked() {
+    while (! mInboundQueue.isEmpty()) {
+        EventEntry* entry = mInboundQueue.dequeueAtHead();
+        releaseInboundEventLocked(entry);
+    }
+    traceInboundQueueLengthLocked();
+}
+
+void InputDispatcher::releasePendingEventLocked() {
+    if (mPendingEvent) {
+        resetANRTimeoutsLocked();
+        releaseInboundEventLocked(mPendingEvent);
+        mPendingEvent = NULL;
+    }
+}
+
+void InputDispatcher::releaseInboundEventLocked(EventEntry* entry) {
+    InjectionState* injectionState = entry->injectionState;
+    if (injectionState && injectionState->injectionResult == INPUT_EVENT_INJECTION_PENDING) {
+#if DEBUG_DISPATCH_CYCLE
+        ALOGD("Injected inbound event was dropped.");
+#endif
+        setInjectionResultLocked(entry, INPUT_EVENT_INJECTION_FAILED);
+    }
+    if (entry == mNextUnblockedEvent) {
+        mNextUnblockedEvent = NULL;
+    }
+    addRecentEventLocked(entry);
+    entry->release();
+}
+
+void InputDispatcher::resetKeyRepeatLocked() {
+    if (mKeyRepeatState.lastKeyEntry) {
+        mKeyRepeatState.lastKeyEntry->release();
+        mKeyRepeatState.lastKeyEntry = NULL;
+    }
+}
+
+InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(nsecs_t currentTime) {
+    KeyEntry* entry = mKeyRepeatState.lastKeyEntry;
+
+    // Reuse the repeated key entry if it is otherwise unreferenced.
+    uint32_t policyFlags = (entry->policyFlags & POLICY_FLAG_RAW_MASK)
+            | POLICY_FLAG_PASS_TO_USER | POLICY_FLAG_TRUSTED;
+    if (entry->refCount == 1) {
+        entry->recycle();
+        entry->eventTime = currentTime;
+        entry->policyFlags = policyFlags;
+        entry->repeatCount += 1;
+    } else {
+        KeyEntry* newEntry = new KeyEntry(currentTime,
+                entry->deviceId, entry->source, policyFlags,
+                entry->action, entry->flags, entry->keyCode, entry->scanCode,
+                entry->metaState, entry->repeatCount + 1, entry->downTime);
+
+        mKeyRepeatState.lastKeyEntry = newEntry;
+        entry->release();
+
+        entry = newEntry;
+    }
+    entry->syntheticRepeat = true;
+
+    // Increment reference count since we keep a reference to the event in
+    // mKeyRepeatState.lastKeyEntry in addition to the one we return.
+    entry->refCount += 1;
+
+    mKeyRepeatState.nextRepeatTime = currentTime + mConfig.keyRepeatDelay;
+    return entry;
+}
+
+bool InputDispatcher::dispatchConfigurationChangedLocked(
+        nsecs_t currentTime, ConfigurationChangedEntry* entry) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    ALOGD("dispatchConfigurationChanged - eventTime=%lld", entry->eventTime);
+#endif
+
+    // Reset key repeating in case a keyboard device was added or removed or something.
+    resetKeyRepeatLocked();
+
+    // Enqueue a command to run outside the lock to tell the policy that the configuration changed.
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doNotifyConfigurationChangedInterruptible);
+    commandEntry->eventTime = entry->eventTime;
+    return true;
+}
+
+bool InputDispatcher::dispatchDeviceResetLocked(
+        nsecs_t currentTime, DeviceResetEntry* entry) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    ALOGD("dispatchDeviceReset - eventTime=%lld, deviceId=%d", entry->eventTime, entry->deviceId);
+#endif
+
+    CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS,
+            "device was reset");
+    options.deviceId = entry->deviceId;
+    synthesizeCancelationEventsForAllConnectionsLocked(options);
+    return true;
+}
+
+bool InputDispatcher::dispatchKeyLocked(nsecs_t currentTime, KeyEntry* entry,
+        DropReason* dropReason, nsecs_t* nextWakeupTime) {
+    // Preprocessing.
+    if (! entry->dispatchInProgress) {
+        if (entry->repeatCount == 0
+                && entry->action == AKEY_EVENT_ACTION_DOWN
+                && (entry->policyFlags & POLICY_FLAG_TRUSTED)
+                && (!(entry->policyFlags & POLICY_FLAG_DISABLE_KEY_REPEAT))) {
+            if (mKeyRepeatState.lastKeyEntry
+                    && mKeyRepeatState.lastKeyEntry->keyCode == entry->keyCode) {
+                // We have seen two identical key downs in a row which indicates that the device
+                // driver is automatically generating key repeats itself.  We take note of the
+                // repeat here, but we disable our own next key repeat timer since it is clear that
+                // we will not need to synthesize key repeats ourselves.
+                entry->repeatCount = mKeyRepeatState.lastKeyEntry->repeatCount + 1;
+                resetKeyRepeatLocked();
+                mKeyRepeatState.nextRepeatTime = LONG_LONG_MAX; // don't generate repeats ourselves
+            } else {
+                // Not a repeat.  Save key down state in case we do see a repeat later.
+                resetKeyRepeatLocked();
+                mKeyRepeatState.nextRepeatTime = entry->eventTime + mConfig.keyRepeatTimeout;
+            }
+            mKeyRepeatState.lastKeyEntry = entry;
+            entry->refCount += 1;
+        } else if (! entry->syntheticRepeat) {
+            resetKeyRepeatLocked();
+        }
+
+        if (entry->repeatCount == 1) {
+            entry->flags |= AKEY_EVENT_FLAG_LONG_PRESS;
+        } else {
+            entry->flags &= ~AKEY_EVENT_FLAG_LONG_PRESS;
+        }
+
+        entry->dispatchInProgress = true;
+
+        logOutboundKeyDetailsLocked("dispatchKey - ", entry);
+    }
+
+    // Handle case where the policy asked us to try again later last time.
+    if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER) {
+        if (currentTime < entry->interceptKeyWakeupTime) {
+            if (entry->interceptKeyWakeupTime < *nextWakeupTime) {
+                *nextWakeupTime = entry->interceptKeyWakeupTime;
+            }
+            return false; // wait until next wakeup
+        }
+        entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN;
+        entry->interceptKeyWakeupTime = 0;
+    }
+
+    // Give the policy a chance to intercept the key.
+    if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN) {
+        if (entry->policyFlags & POLICY_FLAG_PASS_TO_USER) {
+            CommandEntry* commandEntry = postCommandLocked(
+                    & InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible);
+            if (mFocusedWindowHandle != NULL) {
+                commandEntry->inputWindowHandle = mFocusedWindowHandle;
+            }
+            commandEntry->keyEntry = entry;
+            entry->refCount += 1;
+            return false; // wait for the command to run
+        } else {
+            entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_CONTINUE;
+        }
+    } else if (entry->interceptKeyResult == KeyEntry::INTERCEPT_KEY_RESULT_SKIP) {
+        if (*dropReason == DROP_REASON_NOT_DROPPED) {
+            *dropReason = DROP_REASON_POLICY;
+        }
+    }
+
+    // Clean up if dropping the event.
+    if (*dropReason != DROP_REASON_NOT_DROPPED) {
+        setInjectionResultLocked(entry, *dropReason == DROP_REASON_POLICY
+                ? INPUT_EVENT_INJECTION_SUCCEEDED : INPUT_EVENT_INJECTION_FAILED);
+        return true;
+    }
+
+    // Identify targets.
+    Vector<InputTarget> inputTargets;
+    int32_t injectionResult = findFocusedWindowTargetsLocked(currentTime,
+            entry, inputTargets, nextWakeupTime);
+    if (injectionResult == INPUT_EVENT_INJECTION_PENDING) {
+        return false;
+    }
+
+    setInjectionResultLocked(entry, injectionResult);
+    if (injectionResult != INPUT_EVENT_INJECTION_SUCCEEDED) {
+        return true;
+    }
+
+    addMonitoringTargetsLocked(inputTargets);
+
+    // Dispatch the key.
+    dispatchEventLocked(currentTime, entry, inputTargets);
+    return true;
+}
+
+void InputDispatcher::logOutboundKeyDetailsLocked(const char* prefix, const KeyEntry* entry) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    ALOGD("%seventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, "
+            "action=0x%x, flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, "
+            "repeatCount=%d, downTime=%lld",
+            prefix,
+            entry->eventTime, entry->deviceId, entry->source, entry->policyFlags,
+            entry->action, entry->flags, entry->keyCode, entry->scanCode, entry->metaState,
+            entry->repeatCount, entry->downTime);
+#endif
+}
+
+bool InputDispatcher::dispatchMotionLocked(
+        nsecs_t currentTime, MotionEntry* entry, DropReason* dropReason, nsecs_t* nextWakeupTime) {
+    // Preprocessing.
+    if (! entry->dispatchInProgress) {
+        entry->dispatchInProgress = true;
+
+        logOutboundMotionDetailsLocked("dispatchMotion - ", entry);
+    }
+
+    // Clean up if dropping the event.
+    if (*dropReason != DROP_REASON_NOT_DROPPED) {
+        setInjectionResultLocked(entry, *dropReason == DROP_REASON_POLICY
+                ? INPUT_EVENT_INJECTION_SUCCEEDED : INPUT_EVENT_INJECTION_FAILED);
+        return true;
+    }
+
+    bool isPointerEvent = entry->source & AINPUT_SOURCE_CLASS_POINTER;
+
+    // Identify targets.
+    Vector<InputTarget> inputTargets;
+
+    bool conflictingPointerActions = false;
+    int32_t injectionResult;
+    if (isPointerEvent) {
+        // Pointer event.  (eg. touchscreen)
+        injectionResult = findTouchedWindowTargetsLocked(currentTime,
+                entry, inputTargets, nextWakeupTime, &conflictingPointerActions);
+    } else {
+        // Non touch event.  (eg. trackball)
+        injectionResult = findFocusedWindowTargetsLocked(currentTime,
+                entry, inputTargets, nextWakeupTime);
+    }
+    if (injectionResult == INPUT_EVENT_INJECTION_PENDING) {
+        return false;
+    }
+
+    setInjectionResultLocked(entry, injectionResult);
+    if (injectionResult != INPUT_EVENT_INJECTION_SUCCEEDED) {
+        return true;
+    }
+
+    // TODO: support sending secondary display events to input monitors
+    if (isMainDisplay(entry->displayId)) {
+        addMonitoringTargetsLocked(inputTargets);
+    }
+
+    // Dispatch the motion.
+    if (conflictingPointerActions) {
+        CancelationOptions options(CancelationOptions::CANCEL_POINTER_EVENTS,
+                "conflicting pointer actions");
+        synthesizeCancelationEventsForAllConnectionsLocked(options);
+    }
+    dispatchEventLocked(currentTime, entry, inputTargets);
+    return true;
+}
+
+
+void InputDispatcher::logOutboundMotionDetailsLocked(const char* prefix, const MotionEntry* entry) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+    ALOGD("%seventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, "
+            "action=0x%x, flags=0x%x, "
+            "metaState=0x%x, buttonState=0x%x, "
+            "edgeFlags=0x%x, xPrecision=%f, yPrecision=%f, downTime=%lld",
+            prefix,
+            entry->eventTime, entry->deviceId, entry->source, entry->policyFlags,
+            entry->action, entry->flags,
+            entry->metaState, entry->buttonState,
+            entry->edgeFlags, entry->xPrecision, entry->yPrecision,
+            entry->downTime);
+
+    for (uint32_t i = 0; i < entry->pointerCount; i++) {
+        ALOGD("  Pointer %d: id=%d, toolType=%d, "
+                "x=%f, y=%f, pressure=%f, size=%f, "
+                "touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, "
+                "orientation=%f",
+                i, entry->pointerProperties[i].id,
+                entry->pointerProperties[i].toolType,
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_X),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_Y),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_PRESSURE),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_SIZE),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR),
+                entry->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_ORIENTATION));
+    }
+#endif
+}
+
+void InputDispatcher::dispatchEventLocked(nsecs_t currentTime,
+        EventEntry* eventEntry, const Vector<InputTarget>& inputTargets) {
+#if DEBUG_DISPATCH_CYCLE
+    ALOGD("dispatchEventToCurrentInputTargets");
+#endif
+
+    ALOG_ASSERT(eventEntry->dispatchInProgress); // should already have been set to true
+
+    pokeUserActivityLocked(eventEntry);
+
+    for (size_t i = 0; i < inputTargets.size(); i++) {
+        const InputTarget& inputTarget = inputTargets.itemAt(i);
+
+        ssize_t connectionIndex = getConnectionIndexLocked(inputTarget.inputChannel);
+        if (connectionIndex >= 0) {
+            sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex);
+            prepareDispatchCycleLocked(currentTime, connection, eventEntry, &inputTarget);
+        } else {
+#if DEBUG_FOCUS
+            ALOGD("Dropping event delivery to target with channel '%s' because it "
+                    "is no longer registered with the input dispatcher.",
+                    inputTarget.inputChannel->getName().string());
+#endif
+        }
+    }
+}
+
+int32_t InputDispatcher::handleTargetsNotReadyLocked(nsecs_t currentTime,
+        const EventEntry* entry,
+        const sp<InputApplicationHandle>& applicationHandle,
+        const sp<InputWindowHandle>& windowHandle,
+        nsecs_t* nextWakeupTime, const char* reason) {
+    if (applicationHandle == NULL && windowHandle == NULL) {
+        if (mInputTargetWaitCause != INPUT_TARGET_WAIT_CAUSE_SYSTEM_NOT_READY) {
+#if DEBUG_FOCUS
+            ALOGD("Waiting for system to become ready for input.  Reason: %s", reason);
+#endif
+            mInputTargetWaitCause = INPUT_TARGET_WAIT_CAUSE_SYSTEM_NOT_READY;
+            mInputTargetWaitStartTime = currentTime;
+            mInputTargetWaitTimeoutTime = LONG_LONG_MAX;
+            mInputTargetWaitTimeoutExpired = false;
+            mInputTargetWaitApplicationHandle.clear();
+        }
+    } else {
+        if (mInputTargetWaitCause != INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY) {
+#if DEBUG_FOCUS
+            ALOGD("Waiting for application to become ready for input: %s.  Reason: %s",
+                    getApplicationWindowLabelLocked(applicationHandle, windowHandle).string(),
+                    reason);
+#endif
+            nsecs_t timeout;
+            if (windowHandle != NULL) {
+                timeout = windowHandle->getDispatchingTimeout(DEFAULT_INPUT_DISPATCHING_TIMEOUT);
+            } else if (applicationHandle != NULL) {
+                timeout = applicationHandle->getDispatchingTimeout(
+                        DEFAULT_INPUT_DISPATCHING_TIMEOUT);
+            } else {
+                timeout = DEFAULT_INPUT_DISPATCHING_TIMEOUT;
+            }
+
+            mInputTargetWaitCause = INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY;
+            mInputTargetWaitStartTime = currentTime;
+            mInputTargetWaitTimeoutTime = currentTime + timeout;
+            mInputTargetWaitTimeoutExpired = false;
+            mInputTargetWaitApplicationHandle.clear();
+
+            if (windowHandle != NULL) {
+                mInputTargetWaitApplicationHandle = windowHandle->inputApplicationHandle;
+            }
+            if (mInputTargetWaitApplicationHandle == NULL && applicationHandle != NULL) {
+                mInputTargetWaitApplicationHandle = applicationHandle;
+            }
+        }
+    }
+
+    if (mInputTargetWaitTimeoutExpired) {
+        return INPUT_EVENT_INJECTION_TIMED_OUT;
+    }
+
+    if (currentTime >= mInputTargetWaitTimeoutTime) {
+        onANRLocked(currentTime, applicationHandle, windowHandle,
+                entry->eventTime, mInputTargetWaitStartTime, reason);
+
+        // Force poll loop to wake up immediately on next iteration once we get the
+        // ANR response back from the policy.
+        *nextWakeupTime = LONG_LONG_MIN;
+        return INPUT_EVENT_INJECTION_PENDING;
+    } else {
+        // Force poll loop to wake up when timeout is due.
+        if (mInputTargetWaitTimeoutTime < *nextWakeupTime) {
+            *nextWakeupTime = mInputTargetWaitTimeoutTime;
+        }
+        return INPUT_EVENT_INJECTION_PENDING;
+    }
+}
+
+void InputDispatcher::resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout,
+        const sp<InputChannel>& inputChannel) {
+    if (newTimeout > 0) {
+        // Extend the timeout.
+        mInputTargetWaitTimeoutTime = now() + newTimeout;
+    } else {
+        // Give up.
+        mInputTargetWaitTimeoutExpired = true;
+
+        // Input state will not be realistic.  Mark it out of sync.
+        if (inputChannel.get()) {
+            ssize_t connectionIndex = getConnectionIndexLocked(inputChannel);
+            if (connectionIndex >= 0) {
+                sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex);
+                sp<InputWindowHandle> windowHandle = connection->inputWindowHandle;
+
+                if (windowHandle != NULL) {
+                    const InputWindowInfo* info = windowHandle->getInfo();
+                    if (info) {
+                        ssize_t stateIndex = mTouchStatesByDisplay.indexOfKey(info->displayId);
+                        if (stateIndex >= 0) {
+                            mTouchStatesByDisplay.editValueAt(stateIndex).removeWindow(
+                                    windowHandle);
+                        }
+                    }
+                }
+
+                if (connection->status == Connection::STATUS_NORMAL) {
+                    CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS,
+                            "application not responding");
+                    synthesizeCancelationEventsForConnectionLocked(connection, options);
+                }
+            }
+        }
+    }
+}
+
+nsecs_t InputDispatcher::getTimeSpentWaitingForApplicationLocked(
+        nsecs_t currentTime) {
+    if (mInputTargetWaitCause == INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY) {
+        return currentTime - mInputTargetWaitStartTime;
+    }
+    return 0;
+}
+
+void InputDispatcher::resetANRTimeoutsLocked() {
+#if DEBUG_FOCUS
+        ALOGD("Resetting ANR timeouts.");
+#endif
+
+    // Reset input target wait timeout.
+    mInputTargetWaitCause = INPUT_TARGET_WAIT_CAUSE_NONE;
+    mInputTargetWaitApplicationHandle.clear();
+}
+
+int32_t InputDispatcher::findFocusedWindowTargetsLocked(nsecs_t currentTime,
+        const EventEntry* entry, Vector<InputTarget>& inputTargets, nsecs_t* nextWakeupTime) {
+    int32_t injectionResult;
+
+    // If there is no currently focused window and no focused application
+    // then drop the event.
+    if (mFocusedWindowHandle == NULL) {
+        if (mFocusedApplicationHandle != NULL) {
+            injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+                    mFocusedApplicationHandle, NULL, nextWakeupTime,
+                    "Waiting because no window has focus but there is a "
+                    "focused application that may eventually add a window "
+                    "when it finishes starting up.");
+            goto Unresponsive;
+        }
+
+        ALOGI("Dropping event because there is no focused window or focused application.");
+        injectionResult = INPUT_EVENT_INJECTION_FAILED;
+        goto Failed;
+    }
+
+    // Check permissions.
+    if (! checkInjectionPermission(mFocusedWindowHandle, entry->injectionState)) {
+        injectionResult = INPUT_EVENT_INJECTION_PERMISSION_DENIED;
+        goto Failed;
+    }
+
+    // If the currently focused window is paused then keep waiting.
+    if (mFocusedWindowHandle->getInfo()->paused) {
+        injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+                mFocusedApplicationHandle, mFocusedWindowHandle, nextWakeupTime,
+                "Waiting because the focused window is paused.");
+        goto Unresponsive;
+    }
+
+    // If the currently focused window is still working on previous events then keep waiting.
+    if (!isWindowReadyForMoreInputLocked(currentTime, mFocusedWindowHandle, entry)) {
+        injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+                mFocusedApplicationHandle, mFocusedWindowHandle, nextWakeupTime,
+                "Waiting because the focused window has not finished "
+                "processing the input events that were previously delivered to it.");
+        goto Unresponsive;
+    }
+
+    // Success!  Output targets.
+    injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
+    addWindowTargetLocked(mFocusedWindowHandle,
+            InputTarget::FLAG_FOREGROUND | InputTarget::FLAG_DISPATCH_AS_IS, BitSet32(0),
+            inputTargets);
+
+    // Done.
+Failed:
+Unresponsive:
+    nsecs_t timeSpentWaitingForApplication = getTimeSpentWaitingForApplicationLocked(currentTime);
+    updateDispatchStatisticsLocked(currentTime, entry,
+            injectionResult, timeSpentWaitingForApplication);
+#if DEBUG_FOCUS
+    ALOGD("findFocusedWindow finished: injectionResult=%d, "
+            "timeSpentWaitingForApplication=%0.1fms",
+            injectionResult, timeSpentWaitingForApplication / 1000000.0);
+#endif
+    return injectionResult;
+}
+
+int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
+        const MotionEntry* entry, Vector<InputTarget>& inputTargets, nsecs_t* nextWakeupTime,
+        bool* outConflictingPointerActions) {
+    enum InjectionPermission {
+        INJECTION_PERMISSION_UNKNOWN,
+        INJECTION_PERMISSION_GRANTED,
+        INJECTION_PERMISSION_DENIED
+    };
+
+    nsecs_t startTime = now();
+
+    // For security reasons, we defer updating the touch state until we are sure that
+    // event injection will be allowed.
+    int32_t displayId = entry->displayId;
+    int32_t action = entry->action;
+    int32_t maskedAction = action & AMOTION_EVENT_ACTION_MASK;
+
+    // Update the touch state as needed based on the properties of the touch event.
+    int32_t injectionResult = INPUT_EVENT_INJECTION_PENDING;
+    InjectionPermission injectionPermission = INJECTION_PERMISSION_UNKNOWN;
+    sp<InputWindowHandle> newHoverWindowHandle;
+
+    // Copy current touch state into mTempTouchState.
+    // This state is always reset at the end of this function, so if we don't find state
+    // for the specified display then our initial state will be empty.
+    const TouchState* oldState = NULL;
+    ssize_t oldStateIndex = mTouchStatesByDisplay.indexOfKey(displayId);
+    if (oldStateIndex >= 0) {
+        oldState = &mTouchStatesByDisplay.valueAt(oldStateIndex);
+        mTempTouchState.copyFrom(*oldState);
+    }
+
+    bool isSplit = mTempTouchState.split;
+    bool switchedDevice = mTempTouchState.deviceId >= 0 && mTempTouchState.displayId >= 0
+            && (mTempTouchState.deviceId != entry->deviceId
+                    || mTempTouchState.source != entry->source
+                    || mTempTouchState.displayId != displayId);
+    bool isHoverAction = (maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE
+            || maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER
+            || maskedAction == AMOTION_EVENT_ACTION_HOVER_EXIT);
+    bool newGesture = (maskedAction == AMOTION_EVENT_ACTION_DOWN
+            || maskedAction == AMOTION_EVENT_ACTION_SCROLL
+            || isHoverAction);
+    bool wrongDevice = false;
+    if (newGesture) {
+        bool down = maskedAction == AMOTION_EVENT_ACTION_DOWN;
+        if (switchedDevice && mTempTouchState.down && !down) {
+#if DEBUG_FOCUS
+            ALOGD("Dropping event because a pointer for a different device is already down.");
+#endif
+            injectionResult = INPUT_EVENT_INJECTION_FAILED;
+            switchedDevice = false;
+            wrongDevice = true;
+            goto Failed;
+        }
+        mTempTouchState.reset();
+        mTempTouchState.down = down;
+        mTempTouchState.deviceId = entry->deviceId;
+        mTempTouchState.source = entry->source;
+        mTempTouchState.displayId = displayId;
+        isSplit = false;
+    }
+
+    if (newGesture || (isSplit && maskedAction == AMOTION_EVENT_ACTION_POINTER_DOWN)) {
+        /* Case 1: New splittable pointer going down, or need target for hover or scroll. */
+
+        int32_t pointerIndex = getMotionEventActionPointerIndex(action);
+        int32_t x = int32_t(entry->pointerCoords[pointerIndex].
+                getAxisValue(AMOTION_EVENT_AXIS_X));
+        int32_t y = int32_t(entry->pointerCoords[pointerIndex].
+                getAxisValue(AMOTION_EVENT_AXIS_Y));
+        sp<InputWindowHandle> newTouchedWindowHandle;
+        sp<InputWindowHandle> topErrorWindowHandle;
+        bool isTouchModal = false;
+
+        // Traverse windows from front to back to find touched window and outside targets.
+        size_t numWindows = mWindowHandles.size();
+        for (size_t i = 0; i < numWindows; i++) {
+            sp<InputWindowHandle> windowHandle = mWindowHandles.itemAt(i);
+            const InputWindowInfo* windowInfo = windowHandle->getInfo();
+            if (windowInfo->displayId != displayId) {
+                continue; // wrong display
+            }
+
+            int32_t privateFlags = windowInfo->layoutParamsPrivateFlags;
+            if (privateFlags & InputWindowInfo::PRIVATE_FLAG_SYSTEM_ERROR) {
+                if (topErrorWindowHandle == NULL) {
+                    topErrorWindowHandle = windowHandle;
+                }
+            }
+
+            int32_t flags = windowInfo->layoutParamsFlags;
+            if (windowInfo->visible) {
+                if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
+                    isTouchModal = (flags & (InputWindowInfo::FLAG_NOT_FOCUSABLE
+                            | InputWindowInfo::FLAG_NOT_TOUCH_MODAL)) == 0;
+                    if (isTouchModal || windowInfo->touchableRegionContainsPoint(x, y)) {
+                        newTouchedWindowHandle = windowHandle;
+                        break; // found touched window, exit window loop
+                    }
+                }
+
+                if (maskedAction == AMOTION_EVENT_ACTION_DOWN
+                        && (flags & InputWindowInfo::FLAG_WATCH_OUTSIDE_TOUCH)) {
+                    int32_t outsideTargetFlags = InputTarget::FLAG_DISPATCH_AS_OUTSIDE;
+                    if (isWindowObscuredAtPointLocked(windowHandle, x, y)) {
+                        outsideTargetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED;
+                    }
+
+                    mTempTouchState.addOrUpdateWindow(
+                            windowHandle, outsideTargetFlags, BitSet32(0));
+                }
+            }
+        }
+
+        // If there is an error window but it is not taking focus (typically because
+        // it is invisible) then wait for it.  Any other focused window may in
+        // fact be in ANR state.
+        if (topErrorWindowHandle != NULL && newTouchedWindowHandle != topErrorWindowHandle) {
+            injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+                    NULL, NULL, nextWakeupTime,
+                    "Waiting because a system error window is about to be displayed.");
+            injectionPermission = INJECTION_PERMISSION_UNKNOWN;
+            goto Unresponsive;
+        }
+
+        // Figure out whether splitting will be allowed for this window.
+        if (newTouchedWindowHandle != NULL
+                && newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
+            // New window supports splitting.
+            isSplit = true;
+        } else if (isSplit) {
+            // New window does not support splitting but we have already split events.
+            // Ignore the new window.
+            newTouchedWindowHandle = NULL;
+        }
+
+        // Handle the case where we did not find a window.
+        if (newTouchedWindowHandle == NULL) {
+            // Try to assign the pointer to the first foreground window we find, if there is one.
+            newTouchedWindowHandle = mTempTouchState.getFirstForegroundWindowHandle();
+            if (newTouchedWindowHandle == NULL) {
+                ALOGI("Dropping event because there is no touchable window at (%d, %d).", x, y);
+                injectionResult = INPUT_EVENT_INJECTION_FAILED;
+                goto Failed;
+            }
+        }
+
+        // Set target flags.
+        int32_t targetFlags = InputTarget::FLAG_FOREGROUND | InputTarget::FLAG_DISPATCH_AS_IS;
+        if (isSplit) {
+            targetFlags |= InputTarget::FLAG_SPLIT;
+        }
+        if (isWindowObscuredAtPointLocked(newTouchedWindowHandle, x, y)) {
+            targetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED;
+        }
+
+        // Update hover state.
+        if (isHoverAction) {
+            newHoverWindowHandle = newTouchedWindowHandle;
+        } else if (maskedAction == AMOTION_EVENT_ACTION_SCROLL) {
+            newHoverWindowHandle = mLastHoverWindowHandle;
+        }
+
+        // Update the temporary touch state.
+        BitSet32 pointerIds;
+        if (isSplit) {
+            uint32_t pointerId = entry->pointerProperties[pointerIndex].id;
+            pointerIds.markBit(pointerId);
+        }
+        mTempTouchState.addOrUpdateWindow(newTouchedWindowHandle, targetFlags, pointerIds);
+    } else {
+        /* Case 2: Pointer move, up, cancel or non-splittable pointer down. */
+
+        // If the pointer is not currently down, then ignore the event.
+        if (! mTempTouchState.down) {
+#if DEBUG_FOCUS
+            ALOGD("Dropping event because the pointer is not down or we previously "
+                    "dropped the pointer down event.");
+#endif
+            injectionResult = INPUT_EVENT_INJECTION_FAILED;
+            goto Failed;
+        }
+
+        // Check whether touches should slip outside of the current foreground window.
+        if (maskedAction == AMOTION_EVENT_ACTION_MOVE
+                && entry->pointerCount == 1
+                && mTempTouchState.isSlippery()) {
+            int32_t x = int32_t(entry->pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X));
+            int32_t y = int32_t(entry->pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y));
+
+            sp<InputWindowHandle> oldTouchedWindowHandle =
+                    mTempTouchState.getFirstForegroundWindowHandle();
+            sp<InputWindowHandle> newTouchedWindowHandle =
+                    findTouchedWindowAtLocked(displayId, x, y);
+            if (oldTouchedWindowHandle != newTouchedWindowHandle
+                    && newTouchedWindowHandle != NULL) {
+#if DEBUG_FOCUS
+                ALOGD("Touch is slipping out of window %s into window %s.",
+                        oldTouchedWindowHandle->getName().string(),
+                        newTouchedWindowHandle->getName().string());
+#endif
+                // Make a slippery exit from the old window.
+                mTempTouchState.addOrUpdateWindow(oldTouchedWindowHandle,
+                        InputTarget::FLAG_DISPATCH_AS_SLIPPERY_EXIT, BitSet32(0));
+
+                // Make a slippery entrance into the new window.
+                if (newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
+                    isSplit = true;
+                }
+
+                int32_t targetFlags = InputTarget::FLAG_FOREGROUND
+                        | InputTarget::FLAG_DISPATCH_AS_SLIPPERY_ENTER;
+                if (isSplit) {
+                    targetFlags |= InputTarget::FLAG_SPLIT;
+                }
+                if (isWindowObscuredAtPointLocked(newTouchedWindowHandle, x, y)) {
+                    targetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED;
+                }
+
+                BitSet32 pointerIds;
+                if (isSplit) {
+                    pointerIds.markBit(entry->pointerProperties[0].id);
+                }
+                mTempTouchState.addOrUpdateWindow(newTouchedWindowHandle, targetFlags, pointerIds);
+            }
+        }
+    }
+
+    if (newHoverWindowHandle != mLastHoverWindowHandle) {
+        // Let the previous window know that the hover sequence is over.
+        if (mLastHoverWindowHandle != NULL) {
+#if DEBUG_HOVER
+            ALOGD("Sending hover exit event to window %s.",
+                    mLastHoverWindowHandle->getName().string());
+#endif
+            mTempTouchState.addOrUpdateWindow(mLastHoverWindowHandle,
+                    InputTarget::FLAG_DISPATCH_AS_HOVER_EXIT, BitSet32(0));
+        }
+
+        // Let the new window know that the hover sequence is starting.
+        if (newHoverWindowHandle != NULL) {
+#if DEBUG_HOVER
+            ALOGD("Sending hover enter event to window %s.",
+                    newHoverWindowHandle->getName().string());
+#endif
+            mTempTouchState.addOrUpdateWindow(newHoverWindowHandle,
+                    InputTarget::FLAG_DISPATCH_AS_HOVER_ENTER, BitSet32(0));
+        }
+    }
+
+    // Check permission to inject into all touched foreground windows and ensure there
+    // is at least one touched foreground window.
+    {
+        bool haveForegroundWindow = false;
+        for (size_t i = 0; i < mTempTouchState.windows.size(); i++) {
+            const TouchedWindow& touchedWindow = mTempTouchState.windows[i];
+            if (touchedWindow.targetFlags & InputTarget::FLAG_FOREGROUND) {
+                haveForegroundWindow = true;
+                if (! checkInjectionPermission(touchedWindow.windowHandle,
+                        entry->injectionState)) {
+                    injectionResult = INPUT_EVENT_INJECTION_PERMISSION_DENIED;
+                    injectionPermission = INJECTION_PERMISSION_DENIED;
+                    goto Failed;
+                }
+            }
+        }
+        if (! haveForegroundWindow) {
+#if DEBUG_FOCUS
+            ALOGD("Dropping event because there is no touched foreground window to receive it.");
+#endif
+            injectionResult = INPUT_EVENT_INJECTION_FAILED;
+            goto Failed;
+        }
+
+        // Permission granted to injection into all touched foreground windows.
+        injectionPermission = INJECTION_PERMISSION_GRANTED;
+    }
+
+    // Check whether windows listening for outside touches are owned by the same UID. If it is
+    // set the policy flag that we will not reveal coordinate information to this window.
+    if (maskedAction == AMOTION_EVENT_ACTION_DOWN) {
+        sp<InputWindowHandle> foregroundWindowHandle =
+                mTempTouchState.getFirstForegroundWindowHandle();
+        const int32_t foregroundWindowUid = foregroundWindowHandle->getInfo()->ownerUid;
+        for (size_t i = 0; i < mTempTouchState.windows.size(); i++) {
+            const TouchedWindow& touchedWindow = mTempTouchState.windows[i];
+            if (touchedWindow.targetFlags & InputTarget::FLAG_DISPATCH_AS_OUTSIDE) {
+                sp<InputWindowHandle> inputWindowHandle = touchedWindow.windowHandle;
+                if (inputWindowHandle->getInfo()->ownerUid != foregroundWindowUid) {
+                    mTempTouchState.addOrUpdateWindow(inputWindowHandle,
+                            InputTarget::FLAG_ZERO_COORDS, BitSet32(0));
+                }
+            }
+        }
+    }
+
+    // Ensure all touched foreground windows are ready for new input.
+    for (size_t i = 0; i < mTempTouchState.windows.size(); i++) {
+        const TouchedWindow& touchedWindow = mTempTouchState.windows[i];
+        if (touchedWindow.targetFlags & InputTarget::FLAG_FOREGROUND) {
+            // If the touched window is paused then keep waiting.
+            if (touchedWindow.windowHandle->getInfo()->paused) {
+                injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+                        NULL, touchedWindow.windowHandle, nextWakeupTime,
+                        "Waiting because the touched window is paused.");
+                goto Unresponsive;
+            }
+
+            // If the touched window is still working on previous events then keep waiting.
+            if (!isWindowReadyForMoreInputLocked(currentTime, touchedWindow.windowHandle, entry)) {
+                injectionResult = handleTargetsNotReadyLocked(currentTime, entry,
+                        NULL, touchedWindow.windowHandle, nextWakeupTime,
+                        "Waiting because the touched window has not finished "
+                        "processing the input events that were previously delivered to it.");
+                goto Unresponsive;
+            }
+        }
+    }
+
+    // If this is the first pointer going down and the touched window has a wallpaper
+    // then also add the touched wallpaper windows so they are locked in for the duration
+    // of the touch gesture.
+    // We do not collect wallpapers during HOVER_MOVE or SCROLL because the wallpaper
+    // engine only supports touch events.  We would need to add a mechanism similar
+    // to View.onGenericMotionEvent to enable wallpapers to handle these events.
+    if (maskedAction == AMOTION_EVENT_ACTION_DOWN) {
+        sp<InputWindowHandle> foregroundWindowHandle =
+                mTempTouchState.getFirstForegroundWindowHandle();
+        if (foregroundWindowHandle->getInfo()->hasWallpaper) {
+            for (size_t i = 0; i < mWindowHandles.size(); i++) {
+                sp<InputWindowHandle> windowHandle = mWindowHandles.itemAt(i);
+                const InputWindowInfo* info = windowHandle->getInfo();
+                if (info->displayId == displayId
+                        && windowHandle->getInfo()->layoutParamsType
+                                == InputWindowInfo::TYPE_WALLPAPER) {
+                    mTempTouchState.addOrUpdateWindow(windowHandle,
+                            InputTarget::FLAG_WINDOW_IS_OBSCURED
+                                    | InputTarget::FLAG_DISPATCH_AS_IS,
+                            BitSet32(0));
+                }
+            }
+        }
+    }
+
+    // Success!  Output targets.
+    injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
+
+    for (size_t i = 0; i < mTempTouchState.windows.size(); i++) {
+        const TouchedWindow& touchedWindow = mTempTouchState.windows.itemAt(i);
+        addWindowTargetLocked(touchedWindow.windowHandle, touchedWindow.targetFlags,
+                touchedWindow.pointerIds, inputTargets);
+    }
+
+    // Drop the outside or hover touch windows since we will not care about them
+    // in the next iteration.
+    mTempTouchState.filterNonAsIsTouchWindows();
+
+Failed:
+    // Check injection permission once and for all.
+    if (injectionPermission == INJECTION_PERMISSION_UNKNOWN) {
+        if (checkInjectionPermission(NULL, entry->injectionState)) {
+            injectionPermission = INJECTION_PERMISSION_GRANTED;
+        } else {
+            injectionPermission = INJECTION_PERMISSION_DENIED;
+        }
+    }
+
+    // Update final pieces of touch state if the injector had permission.
+    if (injectionPermission == INJECTION_PERMISSION_GRANTED) {
+        if (!wrongDevice) {
+            if (switchedDevice) {
+#if DEBUG_FOCUS
+                ALOGD("Conflicting pointer actions: Switched to a different device.");
+#endif
+                *outConflictingPointerActions = true;
+            }
+
+            if (isHoverAction) {
+                // Started hovering, therefore no longer down.
+                if (oldState && oldState->down) {
+#if DEBUG_FOCUS
+                    ALOGD("Conflicting pointer actions: Hover received while pointer was down.");
+#endif
+                    *outConflictingPointerActions = true;
+                }
+                mTempTouchState.reset();
+                if (maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER
+                        || maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE) {
+                    mTempTouchState.deviceId = entry->deviceId;
+                    mTempTouchState.source = entry->source;
+                    mTempTouchState.displayId = displayId;
+                }
+            } else if (maskedAction == AMOTION_EVENT_ACTION_UP
+                    || maskedAction == AMOTION_EVENT_ACTION_CANCEL) {
+                // All pointers up or canceled.
+                mTempTouchState.reset();
+            } else if (maskedAction == AMOTION_EVENT_ACTION_DOWN) {
+                // First pointer went down.
+                if (oldState && oldState->down) {
+#if DEBUG_FOCUS
+                    ALOGD("Conflicting pointer actions: Down received while already down.");
+#endif
+                    *outConflictingPointerActions = true;
+                }
+            } else if (maskedAction == AMOTION_EVENT_ACTION_POINTER_UP) {
+                // One pointer went up.
+                if (isSplit) {
+                    int32_t pointerIndex = getMotionEventActionPointerIndex(action);
+                    uint32_t pointerId = entry->pointerProperties[pointerIndex].id;
+
+                    for (size_t i = 0; i < mTempTouchState.windows.size(); ) {
+                        TouchedWindow& touchedWindow = mTempTouchState.windows.editItemAt(i);
+                        if (touchedWindow.targetFlags & InputTarget::FLAG_SPLIT) {
+                            touchedWindow.pointerIds.clearBit(pointerId);
+                            if (touchedWindow.pointerIds.isEmpty()) {
+                                mTempTouchState.windows.removeAt(i);
+                                continue;
+                            }
+                        }
+                        i += 1;
+                    }
+                }
+            }
+
+            // Save changes unless the action was scroll in which case the temporary touch
+            // state was only valid for this one action.
+            if (maskedAction != AMOTION_EVENT_ACTION_SCROLL) {
+                if (mTempTouchState.displayId >= 0) {
+                    if (oldStateIndex >= 0) {
+                        mTouchStatesByDisplay.editValueAt(oldStateIndex).copyFrom(mTempTouchState);
+                    } else {
+                        mTouchStatesByDisplay.add(displayId, mTempTouchState);
+                    }
+                } else if (oldStateIndex >= 0) {
+                    mTouchStatesByDisplay.removeItemsAt(oldStateIndex);
+                }
+            }
+
+            // Update hover state.
+            mLastHoverWindowHandle = newHoverWindowHandle;
+        }
+    } else {
+#if DEBUG_FOCUS
+        ALOGD("Not updating touch focus because injection was denied.");
+#endif
+    }
+
+Unresponsive:
+    // Reset temporary touch state to ensure we release unnecessary references to input channels.
+    mTempTouchState.reset();
+
+    nsecs_t timeSpentWaitingForApplication = getTimeSpentWaitingForApplicationLocked(currentTime);
+    updateDispatchStatisticsLocked(currentTime, entry,
+            injectionResult, timeSpentWaitingForApplication);
+#if DEBUG_FOCUS
+    ALOGD("findTouchedWindow finished: injectionResult=%d, injectionPermission=%d, "
+            "timeSpentWaitingForApplication=%0.1fms",
+            injectionResult, injectionPermission, timeSpentWaitingForApplication / 1000000.0);
+#endif
+    return injectionResult;
+}
+
+void InputDispatcher::addWindowTargetLocked(const sp<InputWindowHandle>& windowHandle,
+        int32_t targetFlags, BitSet32 pointerIds, Vector<InputTarget>& inputTargets) {
+    inputTargets.push();
+
+    const InputWindowInfo* windowInfo = windowHandle->getInfo();
+    InputTarget& target = inputTargets.editTop();
+    target.inputChannel = windowInfo->inputChannel;
+    target.flags = targetFlags;
+    target.xOffset = - windowInfo->frameLeft;
+    target.yOffset = - windowInfo->frameTop;
+    target.scaleFactor = windowInfo->scaleFactor;
+    target.pointerIds = pointerIds;
+}
+
+void InputDispatcher::addMonitoringTargetsLocked(Vector<InputTarget>& inputTargets) {
+    for (size_t i = 0; i < mMonitoringChannels.size(); i++) {
+        inputTargets.push();
+
+        InputTarget& target = inputTargets.editTop();
+        target.inputChannel = mMonitoringChannels[i];
+        target.flags = InputTarget::FLAG_DISPATCH_AS_IS;
+        target.xOffset = 0;
+        target.yOffset = 0;
+        target.pointerIds.clear();
+        target.scaleFactor = 1.0f;
+    }
+}
+
+bool InputDispatcher::checkInjectionPermission(const sp<InputWindowHandle>& windowHandle,
+        const InjectionState* injectionState) {
+    if (injectionState
+            && (windowHandle == NULL
+                    || windowHandle->getInfo()->ownerUid != injectionState->injectorUid)
+            && !hasInjectionPermission(injectionState->injectorPid, injectionState->injectorUid)) {
+        if (windowHandle != NULL) {
+            ALOGW("Permission denied: injecting event from pid %d uid %d to window %s "
+                    "owned by uid %d",
+                    injectionState->injectorPid, injectionState->injectorUid,
+                    windowHandle->getName().string(),
+                    windowHandle->getInfo()->ownerUid);
+        } else {
+            ALOGW("Permission denied: injecting event from pid %d uid %d",
+                    injectionState->injectorPid, injectionState->injectorUid);
+        }
+        return false;
+    }
+    return true;
+}
+
+bool InputDispatcher::isWindowObscuredAtPointLocked(
+        const sp<InputWindowHandle>& windowHandle, int32_t x, int32_t y) const {
+    int32_t displayId = windowHandle->getInfo()->displayId;
+    size_t numWindows = mWindowHandles.size();
+    for (size_t i = 0; i < numWindows; i++) {
+        sp<InputWindowHandle> otherHandle = mWindowHandles.itemAt(i);
+        if (otherHandle == windowHandle) {
+            break;
+        }
+
+        const InputWindowInfo* otherInfo = otherHandle->getInfo();
+        if (otherInfo->displayId == displayId
+                && otherInfo->visible && !otherInfo->isTrustedOverlay()
+                && otherInfo->frameContainsPoint(x, y)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+bool InputDispatcher::isWindowReadyForMoreInputLocked(nsecs_t currentTime,
+        const sp<InputWindowHandle>& windowHandle, const EventEntry* eventEntry) {
+    ssize_t connectionIndex = getConnectionIndexLocked(windowHandle->getInputChannel());
+    if (connectionIndex >= 0) {
+        sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex);
+        if (connection->inputPublisherBlocked) {
+            return false;
+        }
+        if (eventEntry->type == EventEntry::TYPE_KEY) {
+            // If the event is a key event, then we must wait for all previous events to
+            // complete before delivering it because previous events may have the
+            // side-effect of transferring focus to a different window and we want to
+            // ensure that the following keys are sent to the new window.
+            //
+            // Suppose the user touches a button in a window then immediately presses "A".
+            // If the button causes a pop-up window to appear then we want to ensure that
+            // the "A" key is delivered to the new pop-up window.  This is because users
+            // often anticipate pending UI changes when typing on a keyboard.
+            // To obtain this behavior, we must serialize key events with respect to all
+            // prior input events.
+            return connection->outboundQueue.isEmpty()
+                    && connection->waitQueue.isEmpty();
+        }
+        // Touch events can always be sent to a window immediately because the user intended
+        // to touch whatever was visible at the time.  Even if focus changes or a new
+        // window appears moments later, the touch event was meant to be delivered to
+        // whatever window happened to be on screen at the time.
+        //
+        // Generic motion events, such as trackball or joystick events are a little trickier.
+        // Like key events, generic motion events are delivered to the focused window.
+        // Unlike key events, generic motion events don't tend to transfer focus to other
+        // windows and it is not important for them to be serialized.  So we prefer to deliver
+        // generic motion events as soon as possible to improve efficiency and reduce lag
+        // through batching.
+        //
+        // The one case where we pause input event delivery is when the wait queue is piling
+        // up with lots of events because the application is not responding.
+        // This condition ensures that ANRs are detected reliably.
+        if (!connection->waitQueue.isEmpty()
+                && currentTime >= connection->waitQueue.head->deliveryTime
+                        + STREAM_AHEAD_EVENT_TIMEOUT) {
+            return false;
+        }
+    }
+    return true;
+}
+
+String8 InputDispatcher::getApplicationWindowLabelLocked(
+        const sp<InputApplicationHandle>& applicationHandle,
+        const sp<InputWindowHandle>& windowHandle) {
+    if (applicationHandle != NULL) {
+        if (windowHandle != NULL) {
+            String8 label(applicationHandle->getName());
+            label.append(" - ");
+            label.append(windowHandle->getName());
+            return label;
+        } else {
+            return applicationHandle->getName();
+        }
+    } else if (windowHandle != NULL) {
+        return windowHandle->getName();
+    } else {
+        return String8("<unknown application or window>");
+    }
+}
+
+void InputDispatcher::pokeUserActivityLocked(const EventEntry* eventEntry) {
+    if (mFocusedWindowHandle != NULL) {
+        const InputWindowInfo* info = mFocusedWindowHandle->getInfo();
+        if (info->inputFeatures & InputWindowInfo::INPUT_FEATURE_DISABLE_USER_ACTIVITY) {
+#if DEBUG_DISPATCH_CYCLE
+            ALOGD("Not poking user activity: disabled by window '%s'.", info->name.string());
+#endif
+            return;
+        }
+    }
+
+    int32_t eventType = USER_ACTIVITY_EVENT_OTHER;
+    switch (eventEntry->type) {
+    case EventEntry::TYPE_MOTION: {
+        const MotionEntry* motionEntry = static_cast<const MotionEntry*>(eventEntry);
+        if (motionEntry->action == AMOTION_EVENT_ACTION_CANCEL) {
+            return;
+        }
+
+        if (MotionEvent::isTouchEvent(motionEntry->source, motionEntry->action)) {
+            eventType = USER_ACTIVITY_EVENT_TOUCH;
+        }
+        break;
+    }
+    case EventEntry::TYPE_KEY: {
+        const KeyEntry* keyEntry = static_cast<const KeyEntry*>(eventEntry);
+        if (keyEntry->flags & AKEY_EVENT_FLAG_CANCELED) {
+            return;
+        }
+        eventType = USER_ACTIVITY_EVENT_BUTTON;
+        break;
+    }
+    }
+
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doPokeUserActivityLockedInterruptible);
+    commandEntry->eventTime = eventEntry->eventTime;
+    commandEntry->userActivityEventType = eventType;
+}
+
+void InputDispatcher::prepareDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, EventEntry* eventEntry, const InputTarget* inputTarget) {
+#if DEBUG_DISPATCH_CYCLE
+    ALOGD("channel '%s' ~ prepareDispatchCycle - flags=0x%08x, "
+            "xOffset=%f, yOffset=%f, scaleFactor=%f, "
+            "pointerIds=0x%x",
+            connection->getInputChannelName(), inputTarget->flags,
+            inputTarget->xOffset, inputTarget->yOffset,
+            inputTarget->scaleFactor, inputTarget->pointerIds.value);
+#endif
+
+    // Skip this event if the connection status is not normal.
+    // We don't want to enqueue additional outbound events if the connection is broken.
+    if (connection->status != Connection::STATUS_NORMAL) {
+#if DEBUG_DISPATCH_CYCLE
+        ALOGD("channel '%s' ~ Dropping event because the channel status is %s",
+                connection->getInputChannelName(), connection->getStatusLabel());
+#endif
+        return;
+    }
+
+    // Split a motion event if needed.
+    if (inputTarget->flags & InputTarget::FLAG_SPLIT) {
+        ALOG_ASSERT(eventEntry->type == EventEntry::TYPE_MOTION);
+
+        MotionEntry* originalMotionEntry = static_cast<MotionEntry*>(eventEntry);
+        if (inputTarget->pointerIds.count() != originalMotionEntry->pointerCount) {
+            MotionEntry* splitMotionEntry = splitMotionEvent(
+                    originalMotionEntry, inputTarget->pointerIds);
+            if (!splitMotionEntry) {
+                return; // split event was dropped
+            }
+#if DEBUG_FOCUS
+            ALOGD("channel '%s' ~ Split motion event.",
+                    connection->getInputChannelName());
+            logOutboundMotionDetailsLocked("  ", splitMotionEntry);
+#endif
+            enqueueDispatchEntriesLocked(currentTime, connection,
+                    splitMotionEntry, inputTarget);
+            splitMotionEntry->release();
+            return;
+        }
+    }
+
+    // Not splitting.  Enqueue dispatch entries for the event as is.
+    enqueueDispatchEntriesLocked(currentTime, connection, eventEntry, inputTarget);
+}
+
+void InputDispatcher::enqueueDispatchEntriesLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, EventEntry* eventEntry, const InputTarget* inputTarget) {
+    bool wasEmpty = connection->outboundQueue.isEmpty();
+
+    // Enqueue dispatch entries for the requested modes.
+    enqueueDispatchEntryLocked(connection, eventEntry, inputTarget,
+            InputTarget::FLAG_DISPATCH_AS_HOVER_EXIT);
+    enqueueDispatchEntryLocked(connection, eventEntry, inputTarget,
+            InputTarget::FLAG_DISPATCH_AS_OUTSIDE);
+    enqueueDispatchEntryLocked(connection, eventEntry, inputTarget,
+            InputTarget::FLAG_DISPATCH_AS_HOVER_ENTER);
+    enqueueDispatchEntryLocked(connection, eventEntry, inputTarget,
+            InputTarget::FLAG_DISPATCH_AS_IS);
+    enqueueDispatchEntryLocked(connection, eventEntry, inputTarget,
+            InputTarget::FLAG_DISPATCH_AS_SLIPPERY_EXIT);
+    enqueueDispatchEntryLocked(connection, eventEntry, inputTarget,
+            InputTarget::FLAG_DISPATCH_AS_SLIPPERY_ENTER);
+
+    // If the outbound queue was previously empty, start the dispatch cycle going.
+    if (wasEmpty && !connection->outboundQueue.isEmpty()) {
+        startDispatchCycleLocked(currentTime, connection);
+    }
+}
+
+void InputDispatcher::enqueueDispatchEntryLocked(
+        const sp<Connection>& connection, EventEntry* eventEntry, const InputTarget* inputTarget,
+        int32_t dispatchMode) {
+    int32_t inputTargetFlags = inputTarget->flags;
+    if (!(inputTargetFlags & dispatchMode)) {
+        return;
+    }
+    inputTargetFlags = (inputTargetFlags & ~InputTarget::FLAG_DISPATCH_MASK) | dispatchMode;
+
+    // This is a new event.
+    // Enqueue a new dispatch entry onto the outbound queue for this connection.
+    DispatchEntry* dispatchEntry = new DispatchEntry(eventEntry, // increments ref
+            inputTargetFlags, inputTarget->xOffset, inputTarget->yOffset,
+            inputTarget->scaleFactor);
+
+    // Apply target flags and update the connection's input state.
+    switch (eventEntry->type) {
+    case EventEntry::TYPE_KEY: {
+        KeyEntry* keyEntry = static_cast<KeyEntry*>(eventEntry);
+        dispatchEntry->resolvedAction = keyEntry->action;
+        dispatchEntry->resolvedFlags = keyEntry->flags;
+
+        if (!connection->inputState.trackKey(keyEntry,
+                dispatchEntry->resolvedAction, dispatchEntry->resolvedFlags)) {
+#if DEBUG_DISPATCH_CYCLE
+            ALOGD("channel '%s' ~ enqueueDispatchEntryLocked: skipping inconsistent key event",
+                    connection->getInputChannelName());
+#endif
+            delete dispatchEntry;
+            return; // skip the inconsistent event
+        }
+        break;
+    }
+
+    case EventEntry::TYPE_MOTION: {
+        MotionEntry* motionEntry = static_cast<MotionEntry*>(eventEntry);
+        if (dispatchMode & InputTarget::FLAG_DISPATCH_AS_OUTSIDE) {
+            dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_OUTSIDE;
+        } else if (dispatchMode & InputTarget::FLAG_DISPATCH_AS_HOVER_EXIT) {
+            dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_HOVER_EXIT;
+        } else if (dispatchMode & InputTarget::FLAG_DISPATCH_AS_HOVER_ENTER) {
+            dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_HOVER_ENTER;
+        } else if (dispatchMode & InputTarget::FLAG_DISPATCH_AS_SLIPPERY_EXIT) {
+            dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_CANCEL;
+        } else if (dispatchMode & InputTarget::FLAG_DISPATCH_AS_SLIPPERY_ENTER) {
+            dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_DOWN;
+        } else {
+            dispatchEntry->resolvedAction = motionEntry->action;
+        }
+        if (dispatchEntry->resolvedAction == AMOTION_EVENT_ACTION_HOVER_MOVE
+                && !connection->inputState.isHovering(
+                        motionEntry->deviceId, motionEntry->source, motionEntry->displayId)) {
+#if DEBUG_DISPATCH_CYCLE
+        ALOGD("channel '%s' ~ enqueueDispatchEntryLocked: filling in missing hover enter event",
+                connection->getInputChannelName());
+#endif
+            dispatchEntry->resolvedAction = AMOTION_EVENT_ACTION_HOVER_ENTER;
+        }
+
+        dispatchEntry->resolvedFlags = motionEntry->flags;
+        if (dispatchEntry->targetFlags & InputTarget::FLAG_WINDOW_IS_OBSCURED) {
+            dispatchEntry->resolvedFlags |= AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED;
+        }
+
+        if (!connection->inputState.trackMotion(motionEntry,
+                dispatchEntry->resolvedAction, dispatchEntry->resolvedFlags)) {
+#if DEBUG_DISPATCH_CYCLE
+            ALOGD("channel '%s' ~ enqueueDispatchEntryLocked: skipping inconsistent motion event",
+                    connection->getInputChannelName());
+#endif
+            delete dispatchEntry;
+            return; // skip the inconsistent event
+        }
+        break;
+    }
+    }
+
+    // Remember that we are waiting for this dispatch to complete.
+    if (dispatchEntry->hasForegroundTarget()) {
+        incrementPendingForegroundDispatchesLocked(eventEntry);
+    }
+
+    // Enqueue the dispatch entry.
+    connection->outboundQueue.enqueueAtTail(dispatchEntry);
+    traceOutboundQueueLengthLocked(connection);
+}
+
+void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection) {
+#if DEBUG_DISPATCH_CYCLE
+    ALOGD("channel '%s' ~ startDispatchCycle",
+            connection->getInputChannelName());
+#endif
+
+    while (connection->status == Connection::STATUS_NORMAL
+            && !connection->outboundQueue.isEmpty()) {
+        DispatchEntry* dispatchEntry = connection->outboundQueue.head;
+        dispatchEntry->deliveryTime = currentTime;
+
+        // Publish the event.
+        status_t status;
+        EventEntry* eventEntry = dispatchEntry->eventEntry;
+        switch (eventEntry->type) {
+        case EventEntry::TYPE_KEY: {
+            KeyEntry* keyEntry = static_cast<KeyEntry*>(eventEntry);
+
+            // Publish the key event.
+            status = connection->inputPublisher.publishKeyEvent(dispatchEntry->seq,
+                    keyEntry->deviceId, keyEntry->source,
+                    dispatchEntry->resolvedAction, dispatchEntry->resolvedFlags,
+                    keyEntry->keyCode, keyEntry->scanCode,
+                    keyEntry->metaState, keyEntry->repeatCount, keyEntry->downTime,
+                    keyEntry->eventTime);
+            break;
+        }
+
+        case EventEntry::TYPE_MOTION: {
+            MotionEntry* motionEntry = static_cast<MotionEntry*>(eventEntry);
+
+            PointerCoords scaledCoords[MAX_POINTERS];
+            const PointerCoords* usingCoords = motionEntry->pointerCoords;
+
+            // Set the X and Y offset depending on the input source.
+            float xOffset, yOffset, scaleFactor;
+            if ((motionEntry->source & AINPUT_SOURCE_CLASS_POINTER)
+                    && !(dispatchEntry->targetFlags & InputTarget::FLAG_ZERO_COORDS)) {
+                scaleFactor = dispatchEntry->scaleFactor;
+                xOffset = dispatchEntry->xOffset * scaleFactor;
+                yOffset = dispatchEntry->yOffset * scaleFactor;
+                if (scaleFactor != 1.0f) {
+                    for (uint32_t i = 0; i < motionEntry->pointerCount; i++) {
+                        scaledCoords[i] = motionEntry->pointerCoords[i];
+                        scaledCoords[i].scale(scaleFactor);
+                    }
+                    usingCoords = scaledCoords;
+                }
+            } else {
+                xOffset = 0.0f;
+                yOffset = 0.0f;
+                scaleFactor = 1.0f;
+
+                // We don't want the dispatch target to know.
+                if (dispatchEntry->targetFlags & InputTarget::FLAG_ZERO_COORDS) {
+                    for (uint32_t i = 0; i < motionEntry->pointerCount; i++) {
+                        scaledCoords[i].clear();
+                    }
+                    usingCoords = scaledCoords;
+                }
+            }
+
+            // Publish the motion event.
+            status = connection->inputPublisher.publishMotionEvent(dispatchEntry->seq,
+                    motionEntry->deviceId, motionEntry->source,
+                    dispatchEntry->resolvedAction, dispatchEntry->resolvedFlags,
+                    motionEntry->edgeFlags, motionEntry->metaState, motionEntry->buttonState,
+                    xOffset, yOffset,
+                    motionEntry->xPrecision, motionEntry->yPrecision,
+                    motionEntry->downTime, motionEntry->eventTime,
+                    motionEntry->pointerCount, motionEntry->pointerProperties,
+                    usingCoords);
+            break;
+        }
+
+        default:
+            ALOG_ASSERT(false);
+            return;
+        }
+
+        // Check the result.
+        if (status) {
+            if (status == WOULD_BLOCK) {
+                if (connection->waitQueue.isEmpty()) {
+                    ALOGE("channel '%s' ~ Could not publish event because the pipe is full. "
+                            "This is unexpected because the wait queue is empty, so the pipe "
+                            "should be empty and we shouldn't have any problems writing an "
+                            "event to it, status=%d", connection->getInputChannelName(), status);
+                    abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/);
+                } else {
+                    // Pipe is full and we are waiting for the app to finish process some events
+                    // before sending more events to it.
+#if DEBUG_DISPATCH_CYCLE
+                    ALOGD("channel '%s' ~ Could not publish event because the pipe is full, "
+                            "waiting for the application to catch up",
+                            connection->getInputChannelName());
+#endif
+                    connection->inputPublisherBlocked = true;
+                }
+            } else {
+                ALOGE("channel '%s' ~ Could not publish event due to an unexpected error, "
+                        "status=%d", connection->getInputChannelName(), status);
+                abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/);
+            }
+            return;
+        }
+
+        // Re-enqueue the event on the wait queue.
+        connection->outboundQueue.dequeue(dispatchEntry);
+        traceOutboundQueueLengthLocked(connection);
+        connection->waitQueue.enqueueAtTail(dispatchEntry);
+        traceWaitQueueLengthLocked(connection);
+    }
+}
+
+void InputDispatcher::finishDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, uint32_t seq, bool handled) {
+#if DEBUG_DISPATCH_CYCLE
+    ALOGD("channel '%s' ~ finishDispatchCycle - seq=%u, handled=%s",
+            connection->getInputChannelName(), seq, toString(handled));
+#endif
+
+    connection->inputPublisherBlocked = false;
+
+    if (connection->status == Connection::STATUS_BROKEN
+            || connection->status == Connection::STATUS_ZOMBIE) {
+        return;
+    }
+
+    // Notify other system components and prepare to start the next dispatch cycle.
+    onDispatchCycleFinishedLocked(currentTime, connection, seq, handled);
+}
+
+void InputDispatcher::abortBrokenDispatchCycleLocked(nsecs_t currentTime,
+        const sp<Connection>& connection, bool notify) {
+#if DEBUG_DISPATCH_CYCLE
+    ALOGD("channel '%s' ~ abortBrokenDispatchCycle - notify=%s",
+            connection->getInputChannelName(), toString(notify));
+#endif
+
+    // Clear the dispatch queues.
+    drainDispatchQueueLocked(&connection->outboundQueue);
+    traceOutboundQueueLengthLocked(connection);
+    drainDispatchQueueLocked(&connection->waitQueue);
+    traceWaitQueueLengthLocked(connection);
+
+    // The connection appears to be unrecoverably broken.
+    // Ignore already broken or zombie connections.
+    if (connection->status == Connection::STATUS_NORMAL) {
+        connection->status = Connection::STATUS_BROKEN;
+
+        if (notify) {
+            // Notify other system components.
+            onDispatchCycleBrokenLocked(currentTime, connection);
+        }
+    }
+}
+
+void InputDispatcher::drainDispatchQueueLocked(Queue<DispatchEntry>* queue) {
+    while (!queue->isEmpty()) {
+        DispatchEntry* dispatchEntry = queue->dequeueAtHead();
+        releaseDispatchEntryLocked(dispatchEntry);
+    }
+}
+
+void InputDispatcher::releaseDispatchEntryLocked(DispatchEntry* dispatchEntry) {
+    if (dispatchEntry->hasForegroundTarget()) {
+        decrementPendingForegroundDispatchesLocked(dispatchEntry->eventEntry);
+    }
+    delete dispatchEntry;
+}
+
+int InputDispatcher::handleReceiveCallback(int fd, int events, void* data) {
+    InputDispatcher* d = static_cast<InputDispatcher*>(data);
+
+    { // acquire lock
+        AutoMutex _l(d->mLock);
+
+        ssize_t connectionIndex = d->mConnectionsByFd.indexOfKey(fd);
+        if (connectionIndex < 0) {
+            ALOGE("Received spurious receive callback for unknown input channel.  "
+                    "fd=%d, events=0x%x", fd, events);
+            return 0; // remove the callback
+        }
+
+        bool notify;
+        sp<Connection> connection = d->mConnectionsByFd.valueAt(connectionIndex);
+        if (!(events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP))) {
+            if (!(events & ALOOPER_EVENT_INPUT)) {
+                ALOGW("channel '%s' ~ Received spurious callback for unhandled poll event.  "
+                        "events=0x%x", connection->getInputChannelName(), events);
+                return 1;
+            }
+
+            nsecs_t currentTime = now();
+            bool gotOne = false;
+            status_t status;
+            for (;;) {
+                uint32_t seq;
+                bool handled;
+                status = connection->inputPublisher.receiveFinishedSignal(&seq, &handled);
+                if (status) {
+                    break;
+                }
+                d->finishDispatchCycleLocked(currentTime, connection, seq, handled);
+                gotOne = true;
+            }
+            if (gotOne) {
+                d->runCommandsLockedInterruptible();
+                if (status == WOULD_BLOCK) {
+                    return 1;
+                }
+            }
+
+            notify = status != DEAD_OBJECT || !connection->monitor;
+            if (notify) {
+                ALOGE("channel '%s' ~ Failed to receive finished signal.  status=%d",
+                        connection->getInputChannelName(), status);
+            }
+        } else {
+            // Monitor channels are never explicitly unregistered.
+            // We do it automatically when the remote endpoint is closed so don't warn
+            // about them.
+            notify = !connection->monitor;
+            if (notify) {
+                ALOGW("channel '%s' ~ Consumer closed input channel or an error occurred.  "
+                        "events=0x%x", connection->getInputChannelName(), events);
+            }
+        }
+
+        // Unregister the channel.
+        d->unregisterInputChannelLocked(connection->inputChannel, notify);
+        return 0; // remove the callback
+    } // release lock
+}
+
+void InputDispatcher::synthesizeCancelationEventsForAllConnectionsLocked(
+        const CancelationOptions& options) {
+    for (size_t i = 0; i < mConnectionsByFd.size(); i++) {
+        synthesizeCancelationEventsForConnectionLocked(
+                mConnectionsByFd.valueAt(i), options);
+    }
+}
+
+void InputDispatcher::synthesizeCancelationEventsForInputChannelLocked(
+        const sp<InputChannel>& channel, const CancelationOptions& options) {
+    ssize_t index = getConnectionIndexLocked(channel);
+    if (index >= 0) {
+        synthesizeCancelationEventsForConnectionLocked(
+                mConnectionsByFd.valueAt(index), options);
+    }
+}
+
+void InputDispatcher::synthesizeCancelationEventsForConnectionLocked(
+        const sp<Connection>& connection, const CancelationOptions& options) {
+    if (connection->status == Connection::STATUS_BROKEN) {
+        return;
+    }
+
+    nsecs_t currentTime = now();
+
+    Vector<EventEntry*> cancelationEvents;
+    connection->inputState.synthesizeCancelationEvents(currentTime,
+            cancelationEvents, options);
+
+    if (!cancelationEvents.isEmpty()) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+        ALOGD("channel '%s' ~ Synthesized %d cancelation events to bring channel back in sync "
+                "with reality: %s, mode=%d.",
+                connection->getInputChannelName(), cancelationEvents.size(),
+                options.reason, options.mode);
+#endif
+        for (size_t i = 0; i < cancelationEvents.size(); i++) {
+            EventEntry* cancelationEventEntry = cancelationEvents.itemAt(i);
+            switch (cancelationEventEntry->type) {
+            case EventEntry::TYPE_KEY:
+                logOutboundKeyDetailsLocked("cancel - ",
+                        static_cast<KeyEntry*>(cancelationEventEntry));
+                break;
+            case EventEntry::TYPE_MOTION:
+                logOutboundMotionDetailsLocked("cancel - ",
+                        static_cast<MotionEntry*>(cancelationEventEntry));
+                break;
+            }
+
+            InputTarget target;
+            sp<InputWindowHandle> windowHandle = getWindowHandleLocked(connection->inputChannel);
+            if (windowHandle != NULL) {
+                const InputWindowInfo* windowInfo = windowHandle->getInfo();
+                target.xOffset = -windowInfo->frameLeft;
+                target.yOffset = -windowInfo->frameTop;
+                target.scaleFactor = windowInfo->scaleFactor;
+            } else {
+                target.xOffset = 0;
+                target.yOffset = 0;
+                target.scaleFactor = 1.0f;
+            }
+            target.inputChannel = connection->inputChannel;
+            target.flags = InputTarget::FLAG_DISPATCH_AS_IS;
+
+            enqueueDispatchEntryLocked(connection, cancelationEventEntry, // increments ref
+                    &target, InputTarget::FLAG_DISPATCH_AS_IS);
+
+            cancelationEventEntry->release();
+        }
+
+        startDispatchCycleLocked(currentTime, connection);
+    }
+}
+
+InputDispatcher::MotionEntry*
+InputDispatcher::splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet32 pointerIds) {
+    ALOG_ASSERT(pointerIds.value != 0);
+
+    uint32_t splitPointerIndexMap[MAX_POINTERS];
+    PointerProperties splitPointerProperties[MAX_POINTERS];
+    PointerCoords splitPointerCoords[MAX_POINTERS];
+
+    uint32_t originalPointerCount = originalMotionEntry->pointerCount;
+    uint32_t splitPointerCount = 0;
+
+    for (uint32_t originalPointerIndex = 0; originalPointerIndex < originalPointerCount;
+            originalPointerIndex++) {
+        const PointerProperties& pointerProperties =
+                originalMotionEntry->pointerProperties[originalPointerIndex];
+        uint32_t pointerId = uint32_t(pointerProperties.id);
+        if (pointerIds.hasBit(pointerId)) {
+            splitPointerIndexMap[splitPointerCount] = originalPointerIndex;
+            splitPointerProperties[splitPointerCount].copyFrom(pointerProperties);
+            splitPointerCoords[splitPointerCount].copyFrom(
+                    originalMotionEntry->pointerCoords[originalPointerIndex]);
+            splitPointerCount += 1;
+        }
+    }
+
+    if (splitPointerCount != pointerIds.count()) {
+        // This is bad.  We are missing some of the pointers that we expected to deliver.
+        // Most likely this indicates that we received an ACTION_MOVE events that has
+        // different pointer ids than we expected based on the previous ACTION_DOWN
+        // or ACTION_POINTER_DOWN events that caused us to decide to split the pointers
+        // in this way.
+        ALOGW("Dropping split motion event because the pointer count is %d but "
+                "we expected there to be %d pointers.  This probably means we received "
+                "a broken sequence of pointer ids from the input device.",
+                splitPointerCount, pointerIds.count());
+        return NULL;
+    }
+
+    int32_t action = originalMotionEntry->action;
+    int32_t maskedAction = action & AMOTION_EVENT_ACTION_MASK;
+    if (maskedAction == AMOTION_EVENT_ACTION_POINTER_DOWN
+            || maskedAction == AMOTION_EVENT_ACTION_POINTER_UP) {
+        int32_t originalPointerIndex = getMotionEventActionPointerIndex(action);
+        const PointerProperties& pointerProperties =
+                originalMotionEntry->pointerProperties[originalPointerIndex];
+        uint32_t pointerId = uint32_t(pointerProperties.id);
+        if (pointerIds.hasBit(pointerId)) {
+            if (pointerIds.count() == 1) {
+                // The first/last pointer went down/up.
+                action = maskedAction == AMOTION_EVENT_ACTION_POINTER_DOWN
+                        ? AMOTION_EVENT_ACTION_DOWN : AMOTION_EVENT_ACTION_UP;
+            } else {
+                // A secondary pointer went down/up.
+                uint32_t splitPointerIndex = 0;
+                while (pointerId != uint32_t(splitPointerProperties[splitPointerIndex].id)) {
+                    splitPointerIndex += 1;
+                }
+                action = maskedAction | (splitPointerIndex
+                        << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT);
+            }
+        } else {
+            // An unrelated pointer changed.
+            action = AMOTION_EVENT_ACTION_MOVE;
+        }
+    }
+
+    MotionEntry* splitMotionEntry = new MotionEntry(
+            originalMotionEntry->eventTime,
+            originalMotionEntry->deviceId,
+            originalMotionEntry->source,
+            originalMotionEntry->policyFlags,
+            action,
+            originalMotionEntry->flags,
+            originalMotionEntry->metaState,
+            originalMotionEntry->buttonState,
+            originalMotionEntry->edgeFlags,
+            originalMotionEntry->xPrecision,
+            originalMotionEntry->yPrecision,
+            originalMotionEntry->downTime,
+            originalMotionEntry->displayId,
+            splitPointerCount, splitPointerProperties, splitPointerCoords, 0, 0);
+
+    if (originalMotionEntry->injectionState) {
+        splitMotionEntry->injectionState = originalMotionEntry->injectionState;
+        splitMotionEntry->injectionState->refCount += 1;
+    }
+
+    return splitMotionEntry;
+}
+
+void InputDispatcher::notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    ALOGD("notifyConfigurationChanged - eventTime=%lld", args->eventTime);
+#endif
+
+    bool needWake;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        ConfigurationChangedEntry* newEntry = new ConfigurationChangedEntry(args->eventTime);
+        needWake = enqueueInboundEventLocked(newEntry);
+    } // release lock
+
+    if (needWake) {
+        mLooper->wake();
+    }
+}
+
+void InputDispatcher::notifyKey(const NotifyKeyArgs* args) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    ALOGD("notifyKey - eventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, action=0x%x, "
+            "flags=0x%x, keyCode=0x%x, scanCode=0x%x, metaState=0x%x, downTime=%lld",
+            args->eventTime, args->deviceId, args->source, args->policyFlags,
+            args->action, args->flags, args->keyCode, args->scanCode,
+            args->metaState, args->downTime);
+#endif
+    if (!validateKeyEvent(args->action)) {
+        return;
+    }
+
+    uint32_t policyFlags = args->policyFlags;
+    int32_t flags = args->flags;
+    int32_t metaState = args->metaState;
+    if ((policyFlags & POLICY_FLAG_VIRTUAL) || (flags & AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY)) {
+        policyFlags |= POLICY_FLAG_VIRTUAL;
+        flags |= AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY;
+    }
+    if (policyFlags & POLICY_FLAG_FUNCTION) {
+        metaState |= AMETA_FUNCTION_ON;
+    }
+
+    policyFlags |= POLICY_FLAG_TRUSTED;
+
+    KeyEvent event;
+    event.initialize(args->deviceId, args->source, args->action,
+            flags, args->keyCode, args->scanCode, metaState, 0,
+            args->downTime, args->eventTime);
+
+    mPolicy->interceptKeyBeforeQueueing(&event, /*byref*/ policyFlags);
+
+    bool needWake;
+    { // acquire lock
+        mLock.lock();
+
+        if (shouldSendKeyToInputFilterLocked(args)) {
+            mLock.unlock();
+
+            policyFlags |= POLICY_FLAG_FILTERED;
+            if (!mPolicy->filterInputEvent(&event, policyFlags)) {
+                return; // event was consumed by the filter
+            }
+
+            mLock.lock();
+        }
+
+        int32_t repeatCount = 0;
+        KeyEntry* newEntry = new KeyEntry(args->eventTime,
+                args->deviceId, args->source, policyFlags,
+                args->action, flags, args->keyCode, args->scanCode,
+                metaState, repeatCount, args->downTime);
+
+        needWake = enqueueInboundEventLocked(newEntry);
+        mLock.unlock();
+    } // release lock
+
+    if (needWake) {
+        mLooper->wake();
+    }
+}
+
+bool InputDispatcher::shouldSendKeyToInputFilterLocked(const NotifyKeyArgs* args) {
+    return mInputFilterEnabled;
+}
+
+void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    ALOGD("notifyMotion - eventTime=%lld, deviceId=%d, source=0x%x, policyFlags=0x%x, "
+            "action=0x%x, flags=0x%x, metaState=0x%x, buttonState=0x%x, edgeFlags=0x%x, "
+            "xPrecision=%f, yPrecision=%f, downTime=%lld",
+            args->eventTime, args->deviceId, args->source, args->policyFlags,
+            args->action, args->flags, args->metaState, args->buttonState,
+            args->edgeFlags, args->xPrecision, args->yPrecision, args->downTime);
+    for (uint32_t i = 0; i < args->pointerCount; i++) {
+        ALOGD("  Pointer %d: id=%d, toolType=%d, "
+                "x=%f, y=%f, pressure=%f, size=%f, "
+                "touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, "
+                "orientation=%f",
+                i, args->pointerProperties[i].id,
+                args->pointerProperties[i].toolType,
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_X),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_Y),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_PRESSURE),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_SIZE),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR),
+                args->pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_ORIENTATION));
+    }
+#endif
+    if (!validateMotionEvent(args->action, args->pointerCount, args->pointerProperties)) {
+        return;
+    }
+
+    uint32_t policyFlags = args->policyFlags;
+    policyFlags |= POLICY_FLAG_TRUSTED;
+    mPolicy->interceptMotionBeforeQueueing(args->eventTime, /*byref*/ policyFlags);
+
+    bool needWake;
+    { // acquire lock
+        mLock.lock();
+
+        if (shouldSendMotionToInputFilterLocked(args)) {
+            mLock.unlock();
+
+            MotionEvent event;
+            event.initialize(args->deviceId, args->source, args->action, args->flags,
+                    args->edgeFlags, args->metaState, args->buttonState, 0, 0,
+                    args->xPrecision, args->yPrecision,
+                    args->downTime, args->eventTime,
+                    args->pointerCount, args->pointerProperties, args->pointerCoords);
+
+            policyFlags |= POLICY_FLAG_FILTERED;
+            if (!mPolicy->filterInputEvent(&event, policyFlags)) {
+                return; // event was consumed by the filter
+            }
+
+            mLock.lock();
+        }
+
+        // Just enqueue a new motion event.
+        MotionEntry* newEntry = new MotionEntry(args->eventTime,
+                args->deviceId, args->source, policyFlags,
+                args->action, args->flags, args->metaState, args->buttonState,
+                args->edgeFlags, args->xPrecision, args->yPrecision, args->downTime,
+                args->displayId,
+                args->pointerCount, args->pointerProperties, args->pointerCoords, 0, 0);
+
+        needWake = enqueueInboundEventLocked(newEntry);
+        mLock.unlock();
+    } // release lock
+
+    if (needWake) {
+        mLooper->wake();
+    }
+}
+
+bool InputDispatcher::shouldSendMotionToInputFilterLocked(const NotifyMotionArgs* args) {
+    // TODO: support sending secondary display events to input filter
+    return mInputFilterEnabled && isMainDisplay(args->displayId);
+}
+
+void InputDispatcher::notifySwitch(const NotifySwitchArgs* args) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    ALOGD("notifySwitch - eventTime=%lld, policyFlags=0x%x, switchValues=0x%08x, switchMask=0x%08x",
+            args->eventTime, args->policyFlags,
+            args->switchValues, args->switchMask);
+#endif
+
+    uint32_t policyFlags = args->policyFlags;
+    policyFlags |= POLICY_FLAG_TRUSTED;
+    mPolicy->notifySwitch(args->eventTime,
+            args->switchValues, args->switchMask, policyFlags);
+}
+
+void InputDispatcher::notifyDeviceReset(const NotifyDeviceResetArgs* args) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    ALOGD("notifyDeviceReset - eventTime=%lld, deviceId=%d",
+            args->eventTime, args->deviceId);
+#endif
+
+    bool needWake;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        DeviceResetEntry* newEntry = new DeviceResetEntry(args->eventTime, args->deviceId);
+        needWake = enqueueInboundEventLocked(newEntry);
+    } // release lock
+
+    if (needWake) {
+        mLooper->wake();
+    }
+}
+
+int32_t InputDispatcher::injectInputEvent(const InputEvent* event, int32_t displayId,
+        int32_t injectorPid, int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis,
+        uint32_t policyFlags) {
+#if DEBUG_INBOUND_EVENT_DETAILS
+    ALOGD("injectInputEvent - eventType=%d, injectorPid=%d, injectorUid=%d, "
+            "syncMode=%d, timeoutMillis=%d, policyFlags=0x%08x",
+            event->getType(), injectorPid, injectorUid, syncMode, timeoutMillis, policyFlags);
+#endif
+
+    nsecs_t endTime = now() + milliseconds_to_nanoseconds(timeoutMillis);
+
+    policyFlags |= POLICY_FLAG_INJECTED;
+    if (hasInjectionPermission(injectorPid, injectorUid)) {
+        policyFlags |= POLICY_FLAG_TRUSTED;
+    }
+
+    EventEntry* firstInjectedEntry;
+    EventEntry* lastInjectedEntry;
+    switch (event->getType()) {
+    case AINPUT_EVENT_TYPE_KEY: {
+        const KeyEvent* keyEvent = static_cast<const KeyEvent*>(event);
+        int32_t action = keyEvent->getAction();
+        if (! validateKeyEvent(action)) {
+            return INPUT_EVENT_INJECTION_FAILED;
+        }
+
+        int32_t flags = keyEvent->getFlags();
+        if (flags & AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY) {
+            policyFlags |= POLICY_FLAG_VIRTUAL;
+        }
+
+        if (!(policyFlags & POLICY_FLAG_FILTERED)) {
+            mPolicy->interceptKeyBeforeQueueing(keyEvent, /*byref*/ policyFlags);
+        }
+
+        mLock.lock();
+        firstInjectedEntry = new KeyEntry(keyEvent->getEventTime(),
+                keyEvent->getDeviceId(), keyEvent->getSource(),
+                policyFlags, action, flags,
+                keyEvent->getKeyCode(), keyEvent->getScanCode(), keyEvent->getMetaState(),
+                keyEvent->getRepeatCount(), keyEvent->getDownTime());
+        lastInjectedEntry = firstInjectedEntry;
+        break;
+    }
+
+    case AINPUT_EVENT_TYPE_MOTION: {
+        const MotionEvent* motionEvent = static_cast<const MotionEvent*>(event);
+        int32_t action = motionEvent->getAction();
+        size_t pointerCount = motionEvent->getPointerCount();
+        const PointerProperties* pointerProperties = motionEvent->getPointerProperties();
+        if (! validateMotionEvent(action, pointerCount, pointerProperties)) {
+            return INPUT_EVENT_INJECTION_FAILED;
+        }
+
+        if (!(policyFlags & POLICY_FLAG_FILTERED)) {
+            nsecs_t eventTime = motionEvent->getEventTime();
+            mPolicy->interceptMotionBeforeQueueing(eventTime, /*byref*/ policyFlags);
+        }
+
+        mLock.lock();
+        const nsecs_t* sampleEventTimes = motionEvent->getSampleEventTimes();
+        const PointerCoords* samplePointerCoords = motionEvent->getSamplePointerCoords();
+        firstInjectedEntry = new MotionEntry(*sampleEventTimes,
+                motionEvent->getDeviceId(), motionEvent->getSource(), policyFlags,
+                action, motionEvent->getFlags(),
+                motionEvent->getMetaState(), motionEvent->getButtonState(),
+                motionEvent->getEdgeFlags(),
+                motionEvent->getXPrecision(), motionEvent->getYPrecision(),
+                motionEvent->getDownTime(), displayId,
+                uint32_t(pointerCount), pointerProperties, samplePointerCoords,
+                motionEvent->getXOffset(), motionEvent->getYOffset());
+        lastInjectedEntry = firstInjectedEntry;
+        for (size_t i = motionEvent->getHistorySize(); i > 0; i--) {
+            sampleEventTimes += 1;
+            samplePointerCoords += pointerCount;
+            MotionEntry* nextInjectedEntry = new MotionEntry(*sampleEventTimes,
+                    motionEvent->getDeviceId(), motionEvent->getSource(), policyFlags,
+                    action, motionEvent->getFlags(),
+                    motionEvent->getMetaState(), motionEvent->getButtonState(),
+                    motionEvent->getEdgeFlags(),
+                    motionEvent->getXPrecision(), motionEvent->getYPrecision(),
+                    motionEvent->getDownTime(), displayId,
+                    uint32_t(pointerCount), pointerProperties, samplePointerCoords,
+                    motionEvent->getXOffset(), motionEvent->getYOffset());
+            lastInjectedEntry->next = nextInjectedEntry;
+            lastInjectedEntry = nextInjectedEntry;
+        }
+        break;
+    }
+
+    default:
+        ALOGW("Cannot inject event of type %d", event->getType());
+        return INPUT_EVENT_INJECTION_FAILED;
+    }
+
+    InjectionState* injectionState = new InjectionState(injectorPid, injectorUid);
+    if (syncMode == INPUT_EVENT_INJECTION_SYNC_NONE) {
+        injectionState->injectionIsAsync = true;
+    }
+
+    injectionState->refCount += 1;
+    lastInjectedEntry->injectionState = injectionState;
+
+    bool needWake = false;
+    for (EventEntry* entry = firstInjectedEntry; entry != NULL; ) {
+        EventEntry* nextEntry = entry->next;
+        needWake |= enqueueInboundEventLocked(entry);
+        entry = nextEntry;
+    }
+
+    mLock.unlock();
+
+    if (needWake) {
+        mLooper->wake();
+    }
+
+    int32_t injectionResult;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        if (syncMode == INPUT_EVENT_INJECTION_SYNC_NONE) {
+            injectionResult = INPUT_EVENT_INJECTION_SUCCEEDED;
+        } else {
+            for (;;) {
+                injectionResult = injectionState->injectionResult;
+                if (injectionResult != INPUT_EVENT_INJECTION_PENDING) {
+                    break;
+                }
+
+                nsecs_t remainingTimeout = endTime - now();
+                if (remainingTimeout <= 0) {
+#if DEBUG_INJECTION
+                    ALOGD("injectInputEvent - Timed out waiting for injection result "
+                            "to become available.");
+#endif
+                    injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
+                    break;
+                }
+
+                mInjectionResultAvailableCondition.waitRelative(mLock, remainingTimeout);
+            }
+
+            if (injectionResult == INPUT_EVENT_INJECTION_SUCCEEDED
+                    && syncMode == INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_FINISHED) {
+                while (injectionState->pendingForegroundDispatches != 0) {
+#if DEBUG_INJECTION
+                    ALOGD("injectInputEvent - Waiting for %d pending foreground dispatches.",
+                            injectionState->pendingForegroundDispatches);
+#endif
+                    nsecs_t remainingTimeout = endTime - now();
+                    if (remainingTimeout <= 0) {
+#if DEBUG_INJECTION
+                    ALOGD("injectInputEvent - Timed out waiting for pending foreground "
+                            "dispatches to finish.");
+#endif
+                        injectionResult = INPUT_EVENT_INJECTION_TIMED_OUT;
+                        break;
+                    }
+
+                    mInjectionSyncFinishedCondition.waitRelative(mLock, remainingTimeout);
+                }
+            }
+        }
+
+        injectionState->release();
+    } // release lock
+
+#if DEBUG_INJECTION
+    ALOGD("injectInputEvent - Finished with result %d.  "
+            "injectorPid=%d, injectorUid=%d",
+            injectionResult, injectorPid, injectorUid);
+#endif
+
+    return injectionResult;
+}
+
+bool InputDispatcher::hasInjectionPermission(int32_t injectorPid, int32_t injectorUid) {
+    return injectorUid == 0
+            || mPolicy->checkInjectEventsPermissionNonReentrant(injectorPid, injectorUid);
+}
+
+void InputDispatcher::setInjectionResultLocked(EventEntry* entry, int32_t injectionResult) {
+    InjectionState* injectionState = entry->injectionState;
+    if (injectionState) {
+#if DEBUG_INJECTION
+        ALOGD("Setting input event injection result to %d.  "
+                "injectorPid=%d, injectorUid=%d",
+                 injectionResult, injectionState->injectorPid, injectionState->injectorUid);
+#endif
+
+        if (injectionState->injectionIsAsync
+                && !(entry->policyFlags & POLICY_FLAG_FILTERED)) {
+            // Log the outcome since the injector did not wait for the injection result.
+            switch (injectionResult) {
+            case INPUT_EVENT_INJECTION_SUCCEEDED:
+                ALOGV("Asynchronous input event injection succeeded.");
+                break;
+            case INPUT_EVENT_INJECTION_FAILED:
+                ALOGW("Asynchronous input event injection failed.");
+                break;
+            case INPUT_EVENT_INJECTION_PERMISSION_DENIED:
+                ALOGW("Asynchronous input event injection permission denied.");
+                break;
+            case INPUT_EVENT_INJECTION_TIMED_OUT:
+                ALOGW("Asynchronous input event injection timed out.");
+                break;
+            }
+        }
+
+        injectionState->injectionResult = injectionResult;
+        mInjectionResultAvailableCondition.broadcast();
+    }
+}
+
+void InputDispatcher::incrementPendingForegroundDispatchesLocked(EventEntry* entry) {
+    InjectionState* injectionState = entry->injectionState;
+    if (injectionState) {
+        injectionState->pendingForegroundDispatches += 1;
+    }
+}
+
+void InputDispatcher::decrementPendingForegroundDispatchesLocked(EventEntry* entry) {
+    InjectionState* injectionState = entry->injectionState;
+    if (injectionState) {
+        injectionState->pendingForegroundDispatches -= 1;
+
+        if (injectionState->pendingForegroundDispatches == 0) {
+            mInjectionSyncFinishedCondition.broadcast();
+        }
+    }
+}
+
+sp<InputWindowHandle> InputDispatcher::getWindowHandleLocked(
+        const sp<InputChannel>& inputChannel) const {
+    size_t numWindows = mWindowHandles.size();
+    for (size_t i = 0; i < numWindows; i++) {
+        const sp<InputWindowHandle>& windowHandle = mWindowHandles.itemAt(i);
+        if (windowHandle->getInputChannel() == inputChannel) {
+            return windowHandle;
+        }
+    }
+    return NULL;
+}
+
+bool InputDispatcher::hasWindowHandleLocked(
+        const sp<InputWindowHandle>& windowHandle) const {
+    size_t numWindows = mWindowHandles.size();
+    for (size_t i = 0; i < numWindows; i++) {
+        if (mWindowHandles.itemAt(i) == windowHandle) {
+            return true;
+        }
+    }
+    return false;
+}
+
+void InputDispatcher::setInputWindows(const Vector<sp<InputWindowHandle> >& inputWindowHandles) {
+#if DEBUG_FOCUS
+    ALOGD("setInputWindows");
+#endif
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        Vector<sp<InputWindowHandle> > oldWindowHandles = mWindowHandles;
+        mWindowHandles = inputWindowHandles;
+
+        sp<InputWindowHandle> newFocusedWindowHandle;
+        bool foundHoveredWindow = false;
+        for (size_t i = 0; i < mWindowHandles.size(); i++) {
+            const sp<InputWindowHandle>& windowHandle = mWindowHandles.itemAt(i);
+            if (!windowHandle->updateInfo() || windowHandle->getInputChannel() == NULL) {
+                mWindowHandles.removeAt(i--);
+                continue;
+            }
+            if (windowHandle->getInfo()->hasFocus) {
+                newFocusedWindowHandle = windowHandle;
+            }
+            if (windowHandle == mLastHoverWindowHandle) {
+                foundHoveredWindow = true;
+            }
+        }
+
+        if (!foundHoveredWindow) {
+            mLastHoverWindowHandle = NULL;
+        }
+
+        if (mFocusedWindowHandle != newFocusedWindowHandle) {
+            if (mFocusedWindowHandle != NULL) {
+#if DEBUG_FOCUS
+                ALOGD("Focus left window: %s",
+                        mFocusedWindowHandle->getName().string());
+#endif
+                sp<InputChannel> focusedInputChannel = mFocusedWindowHandle->getInputChannel();
+                if (focusedInputChannel != NULL) {
+                    CancelationOptions options(CancelationOptions::CANCEL_NON_POINTER_EVENTS,
+                            "focus left window");
+                    synthesizeCancelationEventsForInputChannelLocked(
+                            focusedInputChannel, options);
+                }
+            }
+            if (newFocusedWindowHandle != NULL) {
+#if DEBUG_FOCUS
+                ALOGD("Focus entered window: %s",
+                        newFocusedWindowHandle->getName().string());
+#endif
+            }
+            mFocusedWindowHandle = newFocusedWindowHandle;
+        }
+
+        for (size_t d = 0; d < mTouchStatesByDisplay.size(); d++) {
+            TouchState& state = mTouchStatesByDisplay.editValueAt(d);
+            for (size_t i = 0; i < state.windows.size(); i++) {
+                TouchedWindow& touchedWindow = state.windows.editItemAt(i);
+                if (!hasWindowHandleLocked(touchedWindow.windowHandle)) {
+#if DEBUG_FOCUS
+                    ALOGD("Touched window was removed: %s",
+                            touchedWindow.windowHandle->getName().string());
+#endif
+                    sp<InputChannel> touchedInputChannel =
+                            touchedWindow.windowHandle->getInputChannel();
+                    if (touchedInputChannel != NULL) {
+                        CancelationOptions options(CancelationOptions::CANCEL_POINTER_EVENTS,
+                                "touched window was removed");
+                        synthesizeCancelationEventsForInputChannelLocked(
+                                touchedInputChannel, options);
+                    }
+                    state.windows.removeAt(i--);
+                }
+            }
+        }
+
+        // Release information for windows that are no longer present.
+        // This ensures that unused input channels are released promptly.
+        // Otherwise, they might stick around until the window handle is destroyed
+        // which might not happen until the next GC.
+        for (size_t i = 0; i < oldWindowHandles.size(); i++) {
+            const sp<InputWindowHandle>& oldWindowHandle = oldWindowHandles.itemAt(i);
+            if (!hasWindowHandleLocked(oldWindowHandle)) {
+#if DEBUG_FOCUS
+                ALOGD("Window went away: %s", oldWindowHandle->getName().string());
+#endif
+                oldWindowHandle->releaseInfo();
+            }
+        }
+    } // release lock
+
+    // Wake up poll loop since it may need to make new input dispatching choices.
+    mLooper->wake();
+}
+
+void InputDispatcher::setFocusedApplication(
+        const sp<InputApplicationHandle>& inputApplicationHandle) {
+#if DEBUG_FOCUS
+    ALOGD("setFocusedApplication");
+#endif
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        if (inputApplicationHandle != NULL && inputApplicationHandle->updateInfo()) {
+            if (mFocusedApplicationHandle != inputApplicationHandle) {
+                if (mFocusedApplicationHandle != NULL) {
+                    resetANRTimeoutsLocked();
+                    mFocusedApplicationHandle->releaseInfo();
+                }
+                mFocusedApplicationHandle = inputApplicationHandle;
+            }
+        } else if (mFocusedApplicationHandle != NULL) {
+            resetANRTimeoutsLocked();
+            mFocusedApplicationHandle->releaseInfo();
+            mFocusedApplicationHandle.clear();
+        }
+
+#if DEBUG_FOCUS
+        //logDispatchStateLocked();
+#endif
+    } // release lock
+
+    // Wake up poll loop since it may need to make new input dispatching choices.
+    mLooper->wake();
+}
+
+void InputDispatcher::setInputDispatchMode(bool enabled, bool frozen) {
+#if DEBUG_FOCUS
+    ALOGD("setInputDispatchMode: enabled=%d, frozen=%d", enabled, frozen);
+#endif
+
+    bool changed;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        if (mDispatchEnabled != enabled || mDispatchFrozen != frozen) {
+            if (mDispatchFrozen && !frozen) {
+                resetANRTimeoutsLocked();
+            }
+
+            if (mDispatchEnabled && !enabled) {
+                resetAndDropEverythingLocked("dispatcher is being disabled");
+            }
+
+            mDispatchEnabled = enabled;
+            mDispatchFrozen = frozen;
+            changed = true;
+        } else {
+            changed = false;
+        }
+
+#if DEBUG_FOCUS
+        //logDispatchStateLocked();
+#endif
+    } // release lock
+
+    if (changed) {
+        // Wake up poll loop since it may need to make new input dispatching choices.
+        mLooper->wake();
+    }
+}
+
+void InputDispatcher::setInputFilterEnabled(bool enabled) {
+#if DEBUG_FOCUS
+    ALOGD("setInputFilterEnabled: enabled=%d", enabled);
+#endif
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        if (mInputFilterEnabled == enabled) {
+            return;
+        }
+
+        mInputFilterEnabled = enabled;
+        resetAndDropEverythingLocked("input filter is being enabled or disabled");
+    } // release lock
+
+    // Wake up poll loop since there might be work to do to drop everything.
+    mLooper->wake();
+}
+
+bool InputDispatcher::transferTouchFocus(const sp<InputChannel>& fromChannel,
+        const sp<InputChannel>& toChannel) {
+#if DEBUG_FOCUS
+    ALOGD("transferTouchFocus: fromChannel=%s, toChannel=%s",
+            fromChannel->getName().string(), toChannel->getName().string());
+#endif
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        sp<InputWindowHandle> fromWindowHandle = getWindowHandleLocked(fromChannel);
+        sp<InputWindowHandle> toWindowHandle = getWindowHandleLocked(toChannel);
+        if (fromWindowHandle == NULL || toWindowHandle == NULL) {
+#if DEBUG_FOCUS
+            ALOGD("Cannot transfer focus because from or to window not found.");
+#endif
+            return false;
+        }
+        if (fromWindowHandle == toWindowHandle) {
+#if DEBUG_FOCUS
+            ALOGD("Trivial transfer to same window.");
+#endif
+            return true;
+        }
+        if (fromWindowHandle->getInfo()->displayId != toWindowHandle->getInfo()->displayId) {
+#if DEBUG_FOCUS
+            ALOGD("Cannot transfer focus because windows are on different displays.");
+#endif
+            return false;
+        }
+
+        bool found = false;
+        for (size_t d = 0; d < mTouchStatesByDisplay.size(); d++) {
+            TouchState& state = mTouchStatesByDisplay.editValueAt(d);
+            for (size_t i = 0; i < state.windows.size(); i++) {
+                const TouchedWindow& touchedWindow = state.windows[i];
+                if (touchedWindow.windowHandle == fromWindowHandle) {
+                    int32_t oldTargetFlags = touchedWindow.targetFlags;
+                    BitSet32 pointerIds = touchedWindow.pointerIds;
+
+                    state.windows.removeAt(i);
+
+                    int32_t newTargetFlags = oldTargetFlags
+                            & (InputTarget::FLAG_FOREGROUND
+                                    | InputTarget::FLAG_SPLIT | InputTarget::FLAG_DISPATCH_AS_IS);
+                    state.addOrUpdateWindow(toWindowHandle, newTargetFlags, pointerIds);
+
+                    found = true;
+                    goto Found;
+                }
+            }
+        }
+Found:
+
+        if (! found) {
+#if DEBUG_FOCUS
+            ALOGD("Focus transfer failed because from window did not have focus.");
+#endif
+            return false;
+        }
+
+        ssize_t fromConnectionIndex = getConnectionIndexLocked(fromChannel);
+        ssize_t toConnectionIndex = getConnectionIndexLocked(toChannel);
+        if (fromConnectionIndex >= 0 && toConnectionIndex >= 0) {
+            sp<Connection> fromConnection = mConnectionsByFd.valueAt(fromConnectionIndex);
+            sp<Connection> toConnection = mConnectionsByFd.valueAt(toConnectionIndex);
+
+            fromConnection->inputState.copyPointerStateTo(toConnection->inputState);
+            CancelationOptions options(CancelationOptions::CANCEL_POINTER_EVENTS,
+                    "transferring touch focus from this window to another window");
+            synthesizeCancelationEventsForConnectionLocked(fromConnection, options);
+        }
+
+#if DEBUG_FOCUS
+        logDispatchStateLocked();
+#endif
+    } // release lock
+
+    // Wake up poll loop since it may need to make new input dispatching choices.
+    mLooper->wake();
+    return true;
+}
+
+void InputDispatcher::resetAndDropEverythingLocked(const char* reason) {
+#if DEBUG_FOCUS
+    ALOGD("Resetting and dropping all events (%s).", reason);
+#endif
+
+    CancelationOptions options(CancelationOptions::CANCEL_ALL_EVENTS, reason);
+    synthesizeCancelationEventsForAllConnectionsLocked(options);
+
+    resetKeyRepeatLocked();
+    releasePendingEventLocked();
+    drainInboundQueueLocked();
+    resetANRTimeoutsLocked();
+
+    mTouchStatesByDisplay.clear();
+    mLastHoverWindowHandle.clear();
+}
+
+void InputDispatcher::logDispatchStateLocked() {
+    String8 dump;
+    dumpDispatchStateLocked(dump);
+
+    char* text = dump.lockBuffer(dump.size());
+    char* start = text;
+    while (*start != '\0') {
+        char* end = strchr(start, '\n');
+        if (*end == '\n') {
+            *(end++) = '\0';
+        }
+        ALOGD("%s", start);
+        start = end;
+    }
+}
+
+void InputDispatcher::dumpDispatchStateLocked(String8& dump) {
+    dump.appendFormat(INDENT "DispatchEnabled: %d\n", mDispatchEnabled);
+    dump.appendFormat(INDENT "DispatchFrozen: %d\n", mDispatchFrozen);
+
+    if (mFocusedApplicationHandle != NULL) {
+        dump.appendFormat(INDENT "FocusedApplication: name='%s', dispatchingTimeout=%0.3fms\n",
+                mFocusedApplicationHandle->getName().string(),
+                mFocusedApplicationHandle->getDispatchingTimeout(
+                        DEFAULT_INPUT_DISPATCHING_TIMEOUT) / 1000000.0);
+    } else {
+        dump.append(INDENT "FocusedApplication: <null>\n");
+    }
+    dump.appendFormat(INDENT "FocusedWindow: name='%s'\n",
+            mFocusedWindowHandle != NULL ? mFocusedWindowHandle->getName().string() : "<null>");
+
+    if (!mTouchStatesByDisplay.isEmpty()) {
+        dump.appendFormat(INDENT "TouchStatesByDisplay:\n");
+        for (size_t i = 0; i < mTouchStatesByDisplay.size(); i++) {
+            const TouchState& state = mTouchStatesByDisplay.valueAt(i);
+            dump.appendFormat(INDENT2 "%d: down=%s, split=%s, deviceId=%d, source=0x%08x\n",
+                    state.displayId, toString(state.down), toString(state.split),
+                    state.deviceId, state.source);
+            if (!state.windows.isEmpty()) {
+                dump.append(INDENT3 "Windows:\n");
+                for (size_t i = 0; i < state.windows.size(); i++) {
+                    const TouchedWindow& touchedWindow = state.windows[i];
+                    dump.appendFormat(INDENT4 "%zu: name='%s', pointerIds=0x%0x, targetFlags=0x%x\n",
+                            i, touchedWindow.windowHandle->getName().string(),
+                            touchedWindow.pointerIds.value,
+                            touchedWindow.targetFlags);
+                }
+            } else {
+                dump.append(INDENT3 "Windows: <none>\n");
+            }
+        }
+    } else {
+        dump.append(INDENT "TouchStates: <no displays touched>\n");
+    }
+
+    if (!mWindowHandles.isEmpty()) {
+        dump.append(INDENT "Windows:\n");
+        for (size_t i = 0; i < mWindowHandles.size(); i++) {
+            const sp<InputWindowHandle>& windowHandle = mWindowHandles.itemAt(i);
+            const InputWindowInfo* windowInfo = windowHandle->getInfo();
+
+            dump.appendFormat(INDENT2 "%zu: name='%s', displayId=%d, "
+                    "paused=%s, hasFocus=%s, hasWallpaper=%s, "
+                    "visible=%s, canReceiveKeys=%s, flags=0x%08x, type=0x%08x, layer=%d, "
+                    "frame=[%d,%d][%d,%d], scale=%f, "
+                    "touchableRegion=",
+                    i, windowInfo->name.string(), windowInfo->displayId,
+                    toString(windowInfo->paused),
+                    toString(windowInfo->hasFocus),
+                    toString(windowInfo->hasWallpaper),
+                    toString(windowInfo->visible),
+                    toString(windowInfo->canReceiveKeys),
+                    windowInfo->layoutParamsFlags, windowInfo->layoutParamsType,
+                    windowInfo->layer,
+                    windowInfo->frameLeft, windowInfo->frameTop,
+                    windowInfo->frameRight, windowInfo->frameBottom,
+                    windowInfo->scaleFactor);
+            dumpRegion(dump, windowInfo->touchableRegion);
+            dump.appendFormat(", inputFeatures=0x%08x", windowInfo->inputFeatures);
+            dump.appendFormat(", ownerPid=%d, ownerUid=%d, dispatchingTimeout=%0.3fms\n",
+                    windowInfo->ownerPid, windowInfo->ownerUid,
+                    windowInfo->dispatchingTimeout / 1000000.0);
+        }
+    } else {
+        dump.append(INDENT "Windows: <none>\n");
+    }
+
+    if (!mMonitoringChannels.isEmpty()) {
+        dump.append(INDENT "MonitoringChannels:\n");
+        for (size_t i = 0; i < mMonitoringChannels.size(); i++) {
+            const sp<InputChannel>& channel = mMonitoringChannels[i];
+            dump.appendFormat(INDENT2 "%zu: '%s'\n", i, channel->getName().string());
+        }
+    } else {
+        dump.append(INDENT "MonitoringChannels: <none>\n");
+    }
+
+    nsecs_t currentTime = now();
+
+    // Dump recently dispatched or dropped events from oldest to newest.
+    if (!mRecentQueue.isEmpty()) {
+        dump.appendFormat(INDENT "RecentQueue: length=%u\n", mRecentQueue.count());
+        for (EventEntry* entry = mRecentQueue.head; entry; entry = entry->next) {
+            dump.append(INDENT2);
+            entry->appendDescription(dump);
+            dump.appendFormat(", age=%0.1fms\n",
+                    (currentTime - entry->eventTime) * 0.000001f);
+        }
+    } else {
+        dump.append(INDENT "RecentQueue: <empty>\n");
+    }
+
+    // Dump event currently being dispatched.
+    if (mPendingEvent) {
+        dump.append(INDENT "PendingEvent:\n");
+        dump.append(INDENT2);
+        mPendingEvent->appendDescription(dump);
+        dump.appendFormat(", age=%0.1fms\n",
+                (currentTime - mPendingEvent->eventTime) * 0.000001f);
+    } else {
+        dump.append(INDENT "PendingEvent: <none>\n");
+    }
+
+    // Dump inbound events from oldest to newest.
+    if (!mInboundQueue.isEmpty()) {
+        dump.appendFormat(INDENT "InboundQueue: length=%u\n", mInboundQueue.count());
+        for (EventEntry* entry = mInboundQueue.head; entry; entry = entry->next) {
+            dump.append(INDENT2);
+            entry->appendDescription(dump);
+            dump.appendFormat(", age=%0.1fms\n",
+                    (currentTime - entry->eventTime) * 0.000001f);
+        }
+    } else {
+        dump.append(INDENT "InboundQueue: <empty>\n");
+    }
+
+    if (!mConnectionsByFd.isEmpty()) {
+        dump.append(INDENT "Connections:\n");
+        for (size_t i = 0; i < mConnectionsByFd.size(); i++) {
+            const sp<Connection>& connection = mConnectionsByFd.valueAt(i);
+            dump.appendFormat(INDENT2 "%zu: channelName='%s', windowName='%s', "
+                    "status=%s, monitor=%s, inputPublisherBlocked=%s\n",
+                    i, connection->getInputChannelName(), connection->getWindowName(),
+                    connection->getStatusLabel(), toString(connection->monitor),
+                    toString(connection->inputPublisherBlocked));
+
+            if (!connection->outboundQueue.isEmpty()) {
+                dump.appendFormat(INDENT3 "OutboundQueue: length=%u\n",
+                        connection->outboundQueue.count());
+                for (DispatchEntry* entry = connection->outboundQueue.head; entry;
+                        entry = entry->next) {
+                    dump.append(INDENT4);
+                    entry->eventEntry->appendDescription(dump);
+                    dump.appendFormat(", targetFlags=0x%08x, resolvedAction=%d, age=%0.1fms\n",
+                            entry->targetFlags, entry->resolvedAction,
+                            (currentTime - entry->eventEntry->eventTime) * 0.000001f);
+                }
+            } else {
+                dump.append(INDENT3 "OutboundQueue: <empty>\n");
+            }
+
+            if (!connection->waitQueue.isEmpty()) {
+                dump.appendFormat(INDENT3 "WaitQueue: length=%u\n",
+                        connection->waitQueue.count());
+                for (DispatchEntry* entry = connection->waitQueue.head; entry;
+                        entry = entry->next) {
+                    dump.append(INDENT4);
+                    entry->eventEntry->appendDescription(dump);
+                    dump.appendFormat(", targetFlags=0x%08x, resolvedAction=%d, "
+                            "age=%0.1fms, wait=%0.1fms\n",
+                            entry->targetFlags, entry->resolvedAction,
+                            (currentTime - entry->eventEntry->eventTime) * 0.000001f,
+                            (currentTime - entry->deliveryTime) * 0.000001f);
+                }
+            } else {
+                dump.append(INDENT3 "WaitQueue: <empty>\n");
+            }
+        }
+    } else {
+        dump.append(INDENT "Connections: <none>\n");
+    }
+
+    if (isAppSwitchPendingLocked()) {
+        dump.appendFormat(INDENT "AppSwitch: pending, due in %0.1fms\n",
+                (mAppSwitchDueTime - now()) / 1000000.0);
+    } else {
+        dump.append(INDENT "AppSwitch: not pending\n");
+    }
+
+    dump.append(INDENT "Configuration:\n");
+    dump.appendFormat(INDENT2 "KeyRepeatDelay: %0.1fms\n",
+            mConfig.keyRepeatDelay * 0.000001f);
+    dump.appendFormat(INDENT2 "KeyRepeatTimeout: %0.1fms\n",
+            mConfig.keyRepeatTimeout * 0.000001f);
+}
+
+status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChannel,
+        const sp<InputWindowHandle>& inputWindowHandle, bool monitor) {
+#if DEBUG_REGISTRATION
+    ALOGD("channel '%s' ~ registerInputChannel - monitor=%s", inputChannel->getName().string(),
+            toString(monitor));
+#endif
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        if (getConnectionIndexLocked(inputChannel) >= 0) {
+            ALOGW("Attempted to register already registered input channel '%s'",
+                    inputChannel->getName().string());
+            return BAD_VALUE;
+        }
+
+        sp<Connection> connection = new Connection(inputChannel, inputWindowHandle, monitor);
+
+        int fd = inputChannel->getFd();
+        mConnectionsByFd.add(fd, connection);
+
+        if (monitor) {
+            mMonitoringChannels.push(inputChannel);
+        }
+
+        mLooper->addFd(fd, 0, ALOOPER_EVENT_INPUT, handleReceiveCallback, this);
+    } // release lock
+
+    // Wake the looper because some connections have changed.
+    mLooper->wake();
+    return OK;
+}
+
+status_t InputDispatcher::unregisterInputChannel(const sp<InputChannel>& inputChannel) {
+#if DEBUG_REGISTRATION
+    ALOGD("channel '%s' ~ unregisterInputChannel", inputChannel->getName().string());
+#endif
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        status_t status = unregisterInputChannelLocked(inputChannel, false /*notify*/);
+        if (status) {
+            return status;
+        }
+    } // release lock
+
+    // Wake the poll loop because removing the connection may have changed the current
+    // synchronization state.
+    mLooper->wake();
+    return OK;
+}
+
+status_t InputDispatcher::unregisterInputChannelLocked(const sp<InputChannel>& inputChannel,
+        bool notify) {
+    ssize_t connectionIndex = getConnectionIndexLocked(inputChannel);
+    if (connectionIndex < 0) {
+        ALOGW("Attempted to unregister already unregistered input channel '%s'",
+                inputChannel->getName().string());
+        return BAD_VALUE;
+    }
+
+    sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex);
+    mConnectionsByFd.removeItemsAt(connectionIndex);
+
+    if (connection->monitor) {
+        removeMonitorChannelLocked(inputChannel);
+    }
+
+    mLooper->removeFd(inputChannel->getFd());
+
+    nsecs_t currentTime = now();
+    abortBrokenDispatchCycleLocked(currentTime, connection, notify);
+
+    connection->status = Connection::STATUS_ZOMBIE;
+    return OK;
+}
+
+void InputDispatcher::removeMonitorChannelLocked(const sp<InputChannel>& inputChannel) {
+    for (size_t i = 0; i < mMonitoringChannels.size(); i++) {
+         if (mMonitoringChannels[i] == inputChannel) {
+             mMonitoringChannels.removeAt(i);
+             break;
+         }
+    }
+}
+
+ssize_t InputDispatcher::getConnectionIndexLocked(const sp<InputChannel>& inputChannel) {
+    ssize_t connectionIndex = mConnectionsByFd.indexOfKey(inputChannel->getFd());
+    if (connectionIndex >= 0) {
+        sp<Connection> connection = mConnectionsByFd.valueAt(connectionIndex);
+        if (connection->inputChannel.get() == inputChannel.get()) {
+            return connectionIndex;
+        }
+    }
+
+    return -1;
+}
+
+void InputDispatcher::onDispatchCycleFinishedLocked(
+        nsecs_t currentTime, const sp<Connection>& connection, uint32_t seq, bool handled) {
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doDispatchCycleFinishedLockedInterruptible);
+    commandEntry->connection = connection;
+    commandEntry->eventTime = currentTime;
+    commandEntry->seq = seq;
+    commandEntry->handled = handled;
+}
+
+void InputDispatcher::onDispatchCycleBrokenLocked(
+        nsecs_t currentTime, const sp<Connection>& connection) {
+    ALOGE("channel '%s' ~ Channel is unrecoverably broken and will be disposed!",
+            connection->getInputChannelName());
+
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doNotifyInputChannelBrokenLockedInterruptible);
+    commandEntry->connection = connection;
+}
+
+void InputDispatcher::onANRLocked(
+        nsecs_t currentTime, const sp<InputApplicationHandle>& applicationHandle,
+        const sp<InputWindowHandle>& windowHandle,
+        nsecs_t eventTime, nsecs_t waitStartTime, const char* reason) {
+    float dispatchLatency = (currentTime - eventTime) * 0.000001f;
+    float waitDuration = (currentTime - waitStartTime) * 0.000001f;
+    ALOGI("Application is not responding: %s.  "
+            "It has been %0.1fms since event, %0.1fms since wait started.  Reason: %s",
+            getApplicationWindowLabelLocked(applicationHandle, windowHandle).string(),
+            dispatchLatency, waitDuration, reason);
+
+    // Capture a record of the InputDispatcher state at the time of the ANR.
+    time_t t = time(NULL);
+    struct tm tm;
+    localtime_r(&t, &tm);
+    char timestr[64];
+    strftime(timestr, sizeof(timestr), "%F %T", &tm);
+    mLastANRState.clear();
+    mLastANRState.append(INDENT "ANR:\n");
+    mLastANRState.appendFormat(INDENT2 "Time: %s\n", timestr);
+    mLastANRState.appendFormat(INDENT2 "Window: %s\n",
+            getApplicationWindowLabelLocked(applicationHandle, windowHandle).string());
+    mLastANRState.appendFormat(INDENT2 "DispatchLatency: %0.1fms\n", dispatchLatency);
+    mLastANRState.appendFormat(INDENT2 "WaitDuration: %0.1fms\n", waitDuration);
+    mLastANRState.appendFormat(INDENT2 "Reason: %s\n", reason);
+    dumpDispatchStateLocked(mLastANRState);
+
+    CommandEntry* commandEntry = postCommandLocked(
+            & InputDispatcher::doNotifyANRLockedInterruptible);
+    commandEntry->inputApplicationHandle = applicationHandle;
+    commandEntry->inputWindowHandle = windowHandle;
+    commandEntry->reason = reason;
+}
+
+void InputDispatcher::doNotifyConfigurationChangedInterruptible(
+        CommandEntry* commandEntry) {
+    mLock.unlock();
+
+    mPolicy->notifyConfigurationChanged(commandEntry->eventTime);
+
+    mLock.lock();
+}
+
+void InputDispatcher::doNotifyInputChannelBrokenLockedInterruptible(
+        CommandEntry* commandEntry) {
+    sp<Connection> connection = commandEntry->connection;
+
+    if (connection->status != Connection::STATUS_ZOMBIE) {
+        mLock.unlock();
+
+        mPolicy->notifyInputChannelBroken(connection->inputWindowHandle);
+
+        mLock.lock();
+    }
+}
+
+void InputDispatcher::doNotifyANRLockedInterruptible(
+        CommandEntry* commandEntry) {
+    mLock.unlock();
+
+    nsecs_t newTimeout = mPolicy->notifyANR(
+            commandEntry->inputApplicationHandle, commandEntry->inputWindowHandle,
+            commandEntry->reason);
+
+    mLock.lock();
+
+    resumeAfterTargetsNotReadyTimeoutLocked(newTimeout,
+            commandEntry->inputWindowHandle != NULL
+                    ? commandEntry->inputWindowHandle->getInputChannel() : NULL);
+}
+
+void InputDispatcher::doInterceptKeyBeforeDispatchingLockedInterruptible(
+        CommandEntry* commandEntry) {
+    KeyEntry* entry = commandEntry->keyEntry;
+
+    KeyEvent event;
+    initializeKeyEvent(&event, entry);
+
+    mLock.unlock();
+
+    nsecs_t delay = mPolicy->interceptKeyBeforeDispatching(commandEntry->inputWindowHandle,
+            &event, entry->policyFlags);
+
+    mLock.lock();
+
+    if (delay < 0) {
+        entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_SKIP;
+    } else if (!delay) {
+        entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_CONTINUE;
+    } else {
+        entry->interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER;
+        entry->interceptKeyWakeupTime = now() + delay;
+    }
+    entry->release();
+}
+
+void InputDispatcher::doDispatchCycleFinishedLockedInterruptible(
+        CommandEntry* commandEntry) {
+    sp<Connection> connection = commandEntry->connection;
+    nsecs_t finishTime = commandEntry->eventTime;
+    uint32_t seq = commandEntry->seq;
+    bool handled = commandEntry->handled;
+
+    // Handle post-event policy actions.
+    DispatchEntry* dispatchEntry = connection->findWaitQueueEntry(seq);
+    if (dispatchEntry) {
+        nsecs_t eventDuration = finishTime - dispatchEntry->deliveryTime;
+        if (eventDuration > SLOW_EVENT_PROCESSING_WARNING_TIMEOUT) {
+            String8 msg;
+            msg.appendFormat("Window '%s' spent %0.1fms processing the last input event: ",
+                    connection->getWindowName(), eventDuration * 0.000001f);
+            dispatchEntry->eventEntry->appendDescription(msg);
+            ALOGI("%s", msg.string());
+        }
+
+        bool restartEvent;
+        if (dispatchEntry->eventEntry->type == EventEntry::TYPE_KEY) {
+            KeyEntry* keyEntry = static_cast<KeyEntry*>(dispatchEntry->eventEntry);
+            restartEvent = afterKeyEventLockedInterruptible(connection,
+                    dispatchEntry, keyEntry, handled);
+        } else if (dispatchEntry->eventEntry->type == EventEntry::TYPE_MOTION) {
+            MotionEntry* motionEntry = static_cast<MotionEntry*>(dispatchEntry->eventEntry);
+            restartEvent = afterMotionEventLockedInterruptible(connection,
+                    dispatchEntry, motionEntry, handled);
+        } else {
+            restartEvent = false;
+        }
+
+        // Dequeue the event and start the next cycle.
+        // Note that because the lock might have been released, it is possible that the
+        // contents of the wait queue to have been drained, so we need to double-check
+        // a few things.
+        if (dispatchEntry == connection->findWaitQueueEntry(seq)) {
+            connection->waitQueue.dequeue(dispatchEntry);
+            traceWaitQueueLengthLocked(connection);
+            if (restartEvent && connection->status == Connection::STATUS_NORMAL) {
+                connection->outboundQueue.enqueueAtHead(dispatchEntry);
+                traceOutboundQueueLengthLocked(connection);
+            } else {
+                releaseDispatchEntryLocked(dispatchEntry);
+            }
+        }
+
+        // Start the next dispatch cycle for this connection.
+        startDispatchCycleLocked(now(), connection);
+    }
+}
+
+bool InputDispatcher::afterKeyEventLockedInterruptible(const sp<Connection>& connection,
+        DispatchEntry* dispatchEntry, KeyEntry* keyEntry, bool handled) {
+    if (!(keyEntry->flags & AKEY_EVENT_FLAG_FALLBACK)) {
+        // Get the fallback key state.
+        // Clear it out after dispatching the UP.
+        int32_t originalKeyCode = keyEntry->keyCode;
+        int32_t fallbackKeyCode = connection->inputState.getFallbackKey(originalKeyCode);
+        if (keyEntry->action == AKEY_EVENT_ACTION_UP) {
+            connection->inputState.removeFallbackKey(originalKeyCode);
+        }
+
+        if (handled || !dispatchEntry->hasForegroundTarget()) {
+            // If the application handles the original key for which we previously
+            // generated a fallback or if the window is not a foreground window,
+            // then cancel the associated fallback key, if any.
+            if (fallbackKeyCode != -1) {
+                // Dispatch the unhandled key to the policy with the cancel flag.
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+                ALOGD("Unhandled key event: Asking policy to cancel fallback action.  "
+                        "keyCode=%d, action=%d, repeatCount=%d, policyFlags=0x%08x",
+                        keyEntry->keyCode, keyEntry->action, keyEntry->repeatCount,
+                        keyEntry->policyFlags);
+#endif
+                KeyEvent event;
+                initializeKeyEvent(&event, keyEntry);
+                event.setFlags(event.getFlags() | AKEY_EVENT_FLAG_CANCELED);
+
+                mLock.unlock();
+
+                mPolicy->dispatchUnhandledKey(connection->inputWindowHandle,
+                        &event, keyEntry->policyFlags, &event);
+
+                mLock.lock();
+
+                // Cancel the fallback key.
+                if (fallbackKeyCode != AKEYCODE_UNKNOWN) {
+                    CancelationOptions options(CancelationOptions::CANCEL_FALLBACK_EVENTS,
+                            "application handled the original non-fallback key "
+                            "or is no longer a foreground target, "
+                            "canceling previously dispatched fallback key");
+                    options.keyCode = fallbackKeyCode;
+                    synthesizeCancelationEventsForConnectionLocked(connection, options);
+                }
+                connection->inputState.removeFallbackKey(originalKeyCode);
+            }
+        } else {
+            // If the application did not handle a non-fallback key, first check
+            // that we are in a good state to perform unhandled key event processing
+            // Then ask the policy what to do with it.
+            bool initialDown = keyEntry->action == AKEY_EVENT_ACTION_DOWN
+                    && keyEntry->repeatCount == 0;
+            if (fallbackKeyCode == -1 && !initialDown) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+                ALOGD("Unhandled key event: Skipping unhandled key event processing "
+                        "since this is not an initial down.  "
+                        "keyCode=%d, action=%d, repeatCount=%d, policyFlags=0x%08x",
+                        originalKeyCode, keyEntry->action, keyEntry->repeatCount,
+                        keyEntry->policyFlags);
+#endif
+                return false;
+            }
+
+            // Dispatch the unhandled key to the policy.
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+            ALOGD("Unhandled key event: Asking policy to perform fallback action.  "
+                    "keyCode=%d, action=%d, repeatCount=%d, policyFlags=0x%08x",
+                    keyEntry->keyCode, keyEntry->action, keyEntry->repeatCount,
+                    keyEntry->policyFlags);
+#endif
+            KeyEvent event;
+            initializeKeyEvent(&event, keyEntry);
+
+            mLock.unlock();
+
+            bool fallback = mPolicy->dispatchUnhandledKey(connection->inputWindowHandle,
+                    &event, keyEntry->policyFlags, &event);
+
+            mLock.lock();
+
+            if (connection->status != Connection::STATUS_NORMAL) {
+                connection->inputState.removeFallbackKey(originalKeyCode);
+                return false;
+            }
+
+            // Latch the fallback keycode for this key on an initial down.
+            // The fallback keycode cannot change at any other point in the lifecycle.
+            if (initialDown) {
+                if (fallback) {
+                    fallbackKeyCode = event.getKeyCode();
+                } else {
+                    fallbackKeyCode = AKEYCODE_UNKNOWN;
+                }
+                connection->inputState.setFallbackKey(originalKeyCode, fallbackKeyCode);
+            }
+
+            ALOG_ASSERT(fallbackKeyCode != -1);
+
+            // Cancel the fallback key if the policy decides not to send it anymore.
+            // We will continue to dispatch the key to the policy but we will no
+            // longer dispatch a fallback key to the application.
+            if (fallbackKeyCode != AKEYCODE_UNKNOWN
+                    && (!fallback || fallbackKeyCode != event.getKeyCode())) {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+                if (fallback) {
+                    ALOGD("Unhandled key event: Policy requested to send key %d"
+                            "as a fallback for %d, but on the DOWN it had requested "
+                            "to send %d instead.  Fallback canceled.",
+                            event.getKeyCode(), originalKeyCode, fallbackKeyCode);
+                } else {
+                    ALOGD("Unhandled key event: Policy did not request fallback for %d, "
+                            "but on the DOWN it had requested to send %d.  "
+                            "Fallback canceled.",
+                            originalKeyCode, fallbackKeyCode);
+                }
+#endif
+
+                CancelationOptions options(CancelationOptions::CANCEL_FALLBACK_EVENTS,
+                        "canceling fallback, policy no longer desires it");
+                options.keyCode = fallbackKeyCode;
+                synthesizeCancelationEventsForConnectionLocked(connection, options);
+
+                fallback = false;
+                fallbackKeyCode = AKEYCODE_UNKNOWN;
+                if (keyEntry->action != AKEY_EVENT_ACTION_UP) {
+                    connection->inputState.setFallbackKey(originalKeyCode,
+                            fallbackKeyCode);
+                }
+            }
+
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+            {
+                String8 msg;
+                const KeyedVector<int32_t, int32_t>& fallbackKeys =
+                        connection->inputState.getFallbackKeys();
+                for (size_t i = 0; i < fallbackKeys.size(); i++) {
+                    msg.appendFormat(", %d->%d", fallbackKeys.keyAt(i),
+                            fallbackKeys.valueAt(i));
+                }
+                ALOGD("Unhandled key event: %d currently tracked fallback keys%s.",
+                        fallbackKeys.size(), msg.string());
+            }
+#endif
+
+            if (fallback) {
+                // Restart the dispatch cycle using the fallback key.
+                keyEntry->eventTime = event.getEventTime();
+                keyEntry->deviceId = event.getDeviceId();
+                keyEntry->source = event.getSource();
+                keyEntry->flags = event.getFlags() | AKEY_EVENT_FLAG_FALLBACK;
+                keyEntry->keyCode = fallbackKeyCode;
+                keyEntry->scanCode = event.getScanCode();
+                keyEntry->metaState = event.getMetaState();
+                keyEntry->repeatCount = event.getRepeatCount();
+                keyEntry->downTime = event.getDownTime();
+                keyEntry->syntheticRepeat = false;
+
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+                ALOGD("Unhandled key event: Dispatching fallback key.  "
+                        "originalKeyCode=%d, fallbackKeyCode=%d, fallbackMetaState=%08x",
+                        originalKeyCode, fallbackKeyCode, keyEntry->metaState);
+#endif
+                return true; // restart the event
+            } else {
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+                ALOGD("Unhandled key event: No fallback key.");
+#endif
+            }
+        }
+    }
+    return false;
+}
+
+bool InputDispatcher::afterMotionEventLockedInterruptible(const sp<Connection>& connection,
+        DispatchEntry* dispatchEntry, MotionEntry* motionEntry, bool handled) {
+    return false;
+}
+
+void InputDispatcher::doPokeUserActivityLockedInterruptible(CommandEntry* commandEntry) {
+    mLock.unlock();
+
+    mPolicy->pokeUserActivity(commandEntry->eventTime, commandEntry->userActivityEventType);
+
+    mLock.lock();
+}
+
+void InputDispatcher::initializeKeyEvent(KeyEvent* event, const KeyEntry* entry) {
+    event->initialize(entry->deviceId, entry->source, entry->action, entry->flags,
+            entry->keyCode, entry->scanCode, entry->metaState, entry->repeatCount,
+            entry->downTime, entry->eventTime);
+}
+
+void InputDispatcher::updateDispatchStatisticsLocked(nsecs_t currentTime, const EventEntry* entry,
+        int32_t injectionResult, nsecs_t timeSpentWaitingForApplication) {
+    // TODO Write some statistics about how long we spend waiting.
+}
+
+void InputDispatcher::traceInboundQueueLengthLocked() {
+    if (ATRACE_ENABLED()) {
+        ATRACE_INT("iq", mInboundQueue.count());
+    }
+}
+
+void InputDispatcher::traceOutboundQueueLengthLocked(const sp<Connection>& connection) {
+    if (ATRACE_ENABLED()) {
+        char counterName[40];
+        snprintf(counterName, sizeof(counterName), "oq:%s", connection->getWindowName());
+        ATRACE_INT(counterName, connection->outboundQueue.count());
+    }
+}
+
+void InputDispatcher::traceWaitQueueLengthLocked(const sp<Connection>& connection) {
+    if (ATRACE_ENABLED()) {
+        char counterName[40];
+        snprintf(counterName, sizeof(counterName), "wq:%s", connection->getWindowName());
+        ATRACE_INT(counterName, connection->waitQueue.count());
+    }
+}
+
+void InputDispatcher::dump(String8& dump) {
+    AutoMutex _l(mLock);
+
+    dump.append("Input Dispatcher State:\n");
+    dumpDispatchStateLocked(dump);
+
+    if (!mLastANRState.isEmpty()) {
+        dump.append("\nInput Dispatcher State at time of last ANR:\n");
+        dump.append(mLastANRState);
+    }
+}
+
+void InputDispatcher::monitor() {
+    // Acquire and release the lock to ensure that the dispatcher has not deadlocked.
+    mLock.lock();
+    mLooper->wake();
+    mDispatcherIsAliveCondition.wait(mLock);
+    mLock.unlock();
+}
+
+
+// --- InputDispatcher::Queue ---
+
+template <typename T>
+uint32_t InputDispatcher::Queue<T>::count() const {
+    uint32_t result = 0;
+    for (const T* entry = head; entry; entry = entry->next) {
+        result += 1;
+    }
+    return result;
+}
+
+
+// --- InputDispatcher::InjectionState ---
+
+InputDispatcher::InjectionState::InjectionState(int32_t injectorPid, int32_t injectorUid) :
+        refCount(1),
+        injectorPid(injectorPid), injectorUid(injectorUid),
+        injectionResult(INPUT_EVENT_INJECTION_PENDING), injectionIsAsync(false),
+        pendingForegroundDispatches(0) {
+}
+
+InputDispatcher::InjectionState::~InjectionState() {
+}
+
+void InputDispatcher::InjectionState::release() {
+    refCount -= 1;
+    if (refCount == 0) {
+        delete this;
+    } else {
+        ALOG_ASSERT(refCount > 0);
+    }
+}
+
+
+// --- InputDispatcher::EventEntry ---
+
+InputDispatcher::EventEntry::EventEntry(int32_t type, nsecs_t eventTime, uint32_t policyFlags) :
+        refCount(1), type(type), eventTime(eventTime), policyFlags(policyFlags),
+        injectionState(NULL), dispatchInProgress(false) {
+}
+
+InputDispatcher::EventEntry::~EventEntry() {
+    releaseInjectionState();
+}
+
+void InputDispatcher::EventEntry::release() {
+    refCount -= 1;
+    if (refCount == 0) {
+        delete this;
+    } else {
+        ALOG_ASSERT(refCount > 0);
+    }
+}
+
+void InputDispatcher::EventEntry::releaseInjectionState() {
+    if (injectionState) {
+        injectionState->release();
+        injectionState = NULL;
+    }
+}
+
+
+// --- InputDispatcher::ConfigurationChangedEntry ---
+
+InputDispatcher::ConfigurationChangedEntry::ConfigurationChangedEntry(nsecs_t eventTime) :
+        EventEntry(TYPE_CONFIGURATION_CHANGED, eventTime, 0) {
+}
+
+InputDispatcher::ConfigurationChangedEntry::~ConfigurationChangedEntry() {
+}
+
+void InputDispatcher::ConfigurationChangedEntry::appendDescription(String8& msg) const {
+    msg.append("ConfigurationChangedEvent(), policyFlags=0x%08x",
+            policyFlags);
+}
+
+
+// --- InputDispatcher::DeviceResetEntry ---
+
+InputDispatcher::DeviceResetEntry::DeviceResetEntry(nsecs_t eventTime, int32_t deviceId) :
+        EventEntry(TYPE_DEVICE_RESET, eventTime, 0),
+        deviceId(deviceId) {
+}
+
+InputDispatcher::DeviceResetEntry::~DeviceResetEntry() {
+}
+
+void InputDispatcher::DeviceResetEntry::appendDescription(String8& msg) const {
+    msg.appendFormat("DeviceResetEvent(deviceId=%d), policyFlags=0x%08x",
+            deviceId, policyFlags);
+}
+
+
+// --- InputDispatcher::KeyEntry ---
+
+InputDispatcher::KeyEntry::KeyEntry(nsecs_t eventTime,
+        int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
+        int32_t flags, int32_t keyCode, int32_t scanCode, int32_t metaState,
+        int32_t repeatCount, nsecs_t downTime) :
+        EventEntry(TYPE_KEY, eventTime, policyFlags),
+        deviceId(deviceId), source(source), action(action), flags(flags),
+        keyCode(keyCode), scanCode(scanCode), metaState(metaState),
+        repeatCount(repeatCount), downTime(downTime),
+        syntheticRepeat(false), interceptKeyResult(KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN),
+        interceptKeyWakeupTime(0) {
+}
+
+InputDispatcher::KeyEntry::~KeyEntry() {
+}
+
+void InputDispatcher::KeyEntry::appendDescription(String8& msg) const {
+    msg.appendFormat("KeyEvent(deviceId=%d, source=0x%08x, action=%d, "
+            "flags=0x%08x, keyCode=%d, scanCode=%d, metaState=0x%08x, "
+            "repeatCount=%d), policyFlags=0x%08x",
+            deviceId, source, action, flags, keyCode, scanCode, metaState,
+            repeatCount, policyFlags);
+}
+
+void InputDispatcher::KeyEntry::recycle() {
+    releaseInjectionState();
+
+    dispatchInProgress = false;
+    syntheticRepeat = false;
+    interceptKeyResult = KeyEntry::INTERCEPT_KEY_RESULT_UNKNOWN;
+    interceptKeyWakeupTime = 0;
+}
+
+
+// --- InputDispatcher::MotionEntry ---
+
+InputDispatcher::MotionEntry::MotionEntry(nsecs_t eventTime,
+        int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action, int32_t flags,
+        int32_t metaState, int32_t buttonState,
+        int32_t edgeFlags, float xPrecision, float yPrecision,
+        nsecs_t downTime, int32_t displayId, uint32_t pointerCount,
+        const PointerProperties* pointerProperties, const PointerCoords* pointerCoords,
+        float xOffset, float yOffset) :
+        EventEntry(TYPE_MOTION, eventTime, policyFlags),
+        eventTime(eventTime),
+        deviceId(deviceId), source(source), action(action), flags(flags),
+        metaState(metaState), buttonState(buttonState), edgeFlags(edgeFlags),
+        xPrecision(xPrecision), yPrecision(yPrecision),
+        downTime(downTime), displayId(displayId), pointerCount(pointerCount) {
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        this->pointerProperties[i].copyFrom(pointerProperties[i]);
+        this->pointerCoords[i].copyFrom(pointerCoords[i]);
+        if (xOffset || yOffset) {
+            this->pointerCoords[i].applyOffset(xOffset, yOffset);
+        }
+    }
+}
+
+InputDispatcher::MotionEntry::~MotionEntry() {
+}
+
+void InputDispatcher::MotionEntry::appendDescription(String8& msg) const {
+    msg.appendFormat("MotionEvent(deviceId=%d, source=0x%08x, action=%d, "
+            "flags=0x%08x, metaState=0x%08x, buttonState=0x%08x, edgeFlags=0x%08x, "
+            "xPrecision=%.1f, yPrecision=%.1f, displayId=%d, pointers=[",
+            deviceId, source, action, flags, metaState, buttonState, edgeFlags,
+            xPrecision, yPrecision, displayId);
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        if (i) {
+            msg.append(", ");
+        }
+        msg.appendFormat("%d: (%.1f, %.1f)", pointerProperties[i].id,
+                pointerCoords[i].getX(), pointerCoords[i].getY());
+    }
+    msg.appendFormat("]), policyFlags=0x%08x", policyFlags);
+}
+
+
+// --- InputDispatcher::DispatchEntry ---
+
+volatile int32_t InputDispatcher::DispatchEntry::sNextSeqAtomic;
+
+InputDispatcher::DispatchEntry::DispatchEntry(EventEntry* eventEntry,
+        int32_t targetFlags, float xOffset, float yOffset, float scaleFactor) :
+        seq(nextSeq()),
+        eventEntry(eventEntry), targetFlags(targetFlags),
+        xOffset(xOffset), yOffset(yOffset), scaleFactor(scaleFactor),
+        deliveryTime(0), resolvedAction(0), resolvedFlags(0) {
+    eventEntry->refCount += 1;
+}
+
+InputDispatcher::DispatchEntry::~DispatchEntry() {
+    eventEntry->release();
+}
+
+uint32_t InputDispatcher::DispatchEntry::nextSeq() {
+    // Sequence number 0 is reserved and will never be returned.
+    uint32_t seq;
+    do {
+        seq = android_atomic_inc(&sNextSeqAtomic);
+    } while (!seq);
+    return seq;
+}
+
+
+// --- InputDispatcher::InputState ---
+
+InputDispatcher::InputState::InputState() {
+}
+
+InputDispatcher::InputState::~InputState() {
+}
+
+bool InputDispatcher::InputState::isNeutral() const {
+    return mKeyMementos.isEmpty() && mMotionMementos.isEmpty();
+}
+
+bool InputDispatcher::InputState::isHovering(int32_t deviceId, uint32_t source,
+        int32_t displayId) const {
+    for (size_t i = 0; i < mMotionMementos.size(); i++) {
+        const MotionMemento& memento = mMotionMementos.itemAt(i);
+        if (memento.deviceId == deviceId
+                && memento.source == source
+                && memento.displayId == displayId
+                && memento.hovering) {
+            return true;
+        }
+    }
+    return false;
+}
+
+bool InputDispatcher::InputState::trackKey(const KeyEntry* entry,
+        int32_t action, int32_t flags) {
+    switch (action) {
+    case AKEY_EVENT_ACTION_UP: {
+        if (entry->flags & AKEY_EVENT_FLAG_FALLBACK) {
+            for (size_t i = 0; i < mFallbackKeys.size(); ) {
+                if (mFallbackKeys.valueAt(i) == entry->keyCode) {
+                    mFallbackKeys.removeItemsAt(i);
+                } else {
+                    i += 1;
+                }
+            }
+        }
+        ssize_t index = findKeyMemento(entry);
+        if (index >= 0) {
+            mKeyMementos.removeAt(index);
+            return true;
+        }
+        /* FIXME: We can't just drop the key up event because that prevents creating
+         * popup windows that are automatically shown when a key is held and then
+         * dismissed when the key is released.  The problem is that the popup will
+         * not have received the original key down, so the key up will be considered
+         * to be inconsistent with its observed state.  We could perhaps handle this
+         * by synthesizing a key down but that will cause other problems.
+         *
+         * So for now, allow inconsistent key up events to be dispatched.
+         *
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+        ALOGD("Dropping inconsistent key up event: deviceId=%d, source=%08x, "
+                "keyCode=%d, scanCode=%d",
+                entry->deviceId, entry->source, entry->keyCode, entry->scanCode);
+#endif
+        return false;
+        */
+        return true;
+    }
+
+    case AKEY_EVENT_ACTION_DOWN: {
+        ssize_t index = findKeyMemento(entry);
+        if (index >= 0) {
+            mKeyMementos.removeAt(index);
+        }
+        addKeyMemento(entry, flags);
+        return true;
+    }
+
+    default:
+        return true;
+    }
+}
+
+bool InputDispatcher::InputState::trackMotion(const MotionEntry* entry,
+        int32_t action, int32_t flags) {
+    int32_t actionMasked = action & AMOTION_EVENT_ACTION_MASK;
+    switch (actionMasked) {
+    case AMOTION_EVENT_ACTION_UP:
+    case AMOTION_EVENT_ACTION_CANCEL: {
+        ssize_t index = findMotionMemento(entry, false /*hovering*/);
+        if (index >= 0) {
+            mMotionMementos.removeAt(index);
+            return true;
+        }
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+        ALOGD("Dropping inconsistent motion up or cancel event: deviceId=%d, source=%08x, "
+                "actionMasked=%d",
+                entry->deviceId, entry->source, actionMasked);
+#endif
+        return false;
+    }
+
+    case AMOTION_EVENT_ACTION_DOWN: {
+        ssize_t index = findMotionMemento(entry, false /*hovering*/);
+        if (index >= 0) {
+            mMotionMementos.removeAt(index);
+        }
+        addMotionMemento(entry, flags, false /*hovering*/);
+        return true;
+    }
+
+    case AMOTION_EVENT_ACTION_POINTER_UP:
+    case AMOTION_EVENT_ACTION_POINTER_DOWN:
+    case AMOTION_EVENT_ACTION_MOVE: {
+        if (entry->source & AINPUT_SOURCE_CLASS_NAVIGATION) {
+            // Trackballs can send MOVE events with a corresponding DOWN or UP. There's no need to
+            // generate cancellation events for these since they're based in relative rather than
+            // absolute units.
+            return true;
+        }
+
+        ssize_t index = findMotionMemento(entry, false /*hovering*/);
+
+        if (entry->source & AINPUT_SOURCE_CLASS_JOYSTICK) {
+            // Joysticks can send MOVE events without a corresponding DOWN or UP. Since all
+            // joystick axes are normalized to [-1, 1] we can trust that 0 means it's neutral. Any
+            // other value and we need to track the motion so we can send cancellation events for
+            // anything generating fallback events (e.g. DPad keys for joystick movements).
+            if (index >= 0) {
+                if (entry->pointerCoords[0].isEmpty()) {
+                    mMotionMementos.removeAt(index);
+                } else {
+                    MotionMemento& memento = mMotionMementos.editItemAt(index);
+                    memento.setPointers(entry);
+                }
+            } else if (!entry->pointerCoords[0].isEmpty()) {
+                addMotionMemento(entry, flags, false /*hovering*/);
+            }
+
+            // Joysticks and trackballs can send MOVE events without corresponding DOWN or UP.
+            return true;
+        }
+        if (index >= 0) {
+            MotionMemento& memento = mMotionMementos.editItemAt(index);
+            memento.setPointers(entry);
+            return true;
+        }
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+        ALOGD("Dropping inconsistent motion pointer up/down or move event: "
+                "deviceId=%d, source=%08x, actionMasked=%d",
+                entry->deviceId, entry->source, actionMasked);
+#endif
+        return false;
+    }
+
+    case AMOTION_EVENT_ACTION_HOVER_EXIT: {
+        ssize_t index = findMotionMemento(entry, true /*hovering*/);
+        if (index >= 0) {
+            mMotionMementos.removeAt(index);
+            return true;
+        }
+#if DEBUG_OUTBOUND_EVENT_DETAILS
+        ALOGD("Dropping inconsistent motion hover exit event: deviceId=%d, source=%08x",
+                entry->deviceId, entry->source);
+#endif
+        return false;
+    }
+
+    case AMOTION_EVENT_ACTION_HOVER_ENTER:
+    case AMOTION_EVENT_ACTION_HOVER_MOVE: {
+        ssize_t index = findMotionMemento(entry, true /*hovering*/);
+        if (index >= 0) {
+            mMotionMementos.removeAt(index);
+        }
+        addMotionMemento(entry, flags, true /*hovering*/);
+        return true;
+    }
+
+    default:
+        return true;
+    }
+}
+
+ssize_t InputDispatcher::InputState::findKeyMemento(const KeyEntry* entry) const {
+    for (size_t i = 0; i < mKeyMementos.size(); i++) {
+        const KeyMemento& memento = mKeyMementos.itemAt(i);
+        if (memento.deviceId == entry->deviceId
+                && memento.source == entry->source
+                && memento.keyCode == entry->keyCode
+                && memento.scanCode == entry->scanCode) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+ssize_t InputDispatcher::InputState::findMotionMemento(const MotionEntry* entry,
+        bool hovering) const {
+    for (size_t i = 0; i < mMotionMementos.size(); i++) {
+        const MotionMemento& memento = mMotionMementos.itemAt(i);
+        if (memento.deviceId == entry->deviceId
+                && memento.source == entry->source
+                && memento.displayId == entry->displayId
+                && memento.hovering == hovering) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+void InputDispatcher::InputState::addKeyMemento(const KeyEntry* entry, int32_t flags) {
+    mKeyMementos.push();
+    KeyMemento& memento = mKeyMementos.editTop();
+    memento.deviceId = entry->deviceId;
+    memento.source = entry->source;
+    memento.keyCode = entry->keyCode;
+    memento.scanCode = entry->scanCode;
+    memento.metaState = entry->metaState;
+    memento.flags = flags;
+    memento.downTime = entry->downTime;
+    memento.policyFlags = entry->policyFlags;
+}
+
+void InputDispatcher::InputState::addMotionMemento(const MotionEntry* entry,
+        int32_t flags, bool hovering) {
+    mMotionMementos.push();
+    MotionMemento& memento = mMotionMementos.editTop();
+    memento.deviceId = entry->deviceId;
+    memento.source = entry->source;
+    memento.flags = flags;
+    memento.xPrecision = entry->xPrecision;
+    memento.yPrecision = entry->yPrecision;
+    memento.downTime = entry->downTime;
+    memento.displayId = entry->displayId;
+    memento.setPointers(entry);
+    memento.hovering = hovering;
+    memento.policyFlags = entry->policyFlags;
+}
+
+void InputDispatcher::InputState::MotionMemento::setPointers(const MotionEntry* entry) {
+    pointerCount = entry->pointerCount;
+    for (uint32_t i = 0; i < entry->pointerCount; i++) {
+        pointerProperties[i].copyFrom(entry->pointerProperties[i]);
+        pointerCoords[i].copyFrom(entry->pointerCoords[i]);
+    }
+}
+
+void InputDispatcher::InputState::synthesizeCancelationEvents(nsecs_t currentTime,
+        Vector<EventEntry*>& outEvents, const CancelationOptions& options) {
+    for (size_t i = 0; i < mKeyMementos.size(); i++) {
+        const KeyMemento& memento = mKeyMementos.itemAt(i);
+        if (shouldCancelKey(memento, options)) {
+            outEvents.push(new KeyEntry(currentTime,
+                    memento.deviceId, memento.source, memento.policyFlags,
+                    AKEY_EVENT_ACTION_UP, memento.flags | AKEY_EVENT_FLAG_CANCELED,
+                    memento.keyCode, memento.scanCode, memento.metaState, 0, memento.downTime));
+        }
+    }
+
+    for (size_t i = 0; i < mMotionMementos.size(); i++) {
+        const MotionMemento& memento = mMotionMementos.itemAt(i);
+        if (shouldCancelMotion(memento, options)) {
+            outEvents.push(new MotionEntry(currentTime,
+                    memento.deviceId, memento.source, memento.policyFlags,
+                    memento.hovering
+                            ? AMOTION_EVENT_ACTION_HOVER_EXIT
+                            : AMOTION_EVENT_ACTION_CANCEL,
+                    memento.flags, 0, 0, 0,
+                    memento.xPrecision, memento.yPrecision, memento.downTime,
+                    memento.displayId,
+                    memento.pointerCount, memento.pointerProperties, memento.pointerCoords,
+                    0, 0));
+        }
+    }
+}
+
+void InputDispatcher::InputState::clear() {
+    mKeyMementos.clear();
+    mMotionMementos.clear();
+    mFallbackKeys.clear();
+}
+
+void InputDispatcher::InputState::copyPointerStateTo(InputState& other) const {
+    for (size_t i = 0; i < mMotionMementos.size(); i++) {
+        const MotionMemento& memento = mMotionMementos.itemAt(i);
+        if (memento.source & AINPUT_SOURCE_CLASS_POINTER) {
+            for (size_t j = 0; j < other.mMotionMementos.size(); ) {
+                const MotionMemento& otherMemento = other.mMotionMementos.itemAt(j);
+                if (memento.deviceId == otherMemento.deviceId
+                        && memento.source == otherMemento.source
+                        && memento.displayId == otherMemento.displayId) {
+                    other.mMotionMementos.removeAt(j);
+                } else {
+                    j += 1;
+                }
+            }
+            other.mMotionMementos.push(memento);
+        }
+    }
+}
+
+int32_t InputDispatcher::InputState::getFallbackKey(int32_t originalKeyCode) {
+    ssize_t index = mFallbackKeys.indexOfKey(originalKeyCode);
+    return index >= 0 ? mFallbackKeys.valueAt(index) : -1;
+}
+
+void InputDispatcher::InputState::setFallbackKey(int32_t originalKeyCode,
+        int32_t fallbackKeyCode) {
+    ssize_t index = mFallbackKeys.indexOfKey(originalKeyCode);
+    if (index >= 0) {
+        mFallbackKeys.replaceValueAt(index, fallbackKeyCode);
+    } else {
+        mFallbackKeys.add(originalKeyCode, fallbackKeyCode);
+    }
+}
+
+void InputDispatcher::InputState::removeFallbackKey(int32_t originalKeyCode) {
+    mFallbackKeys.removeItem(originalKeyCode);
+}
+
+bool InputDispatcher::InputState::shouldCancelKey(const KeyMemento& memento,
+        const CancelationOptions& options) {
+    if (options.keyCode != -1 && memento.keyCode != options.keyCode) {
+        return false;
+    }
+
+    if (options.deviceId != -1 && memento.deviceId != options.deviceId) {
+        return false;
+    }
+
+    switch (options.mode) {
+    case CancelationOptions::CANCEL_ALL_EVENTS:
+    case CancelationOptions::CANCEL_NON_POINTER_EVENTS:
+        return true;
+    case CancelationOptions::CANCEL_FALLBACK_EVENTS:
+        return memento.flags & AKEY_EVENT_FLAG_FALLBACK;
+    default:
+        return false;
+    }
+}
+
+bool InputDispatcher::InputState::shouldCancelMotion(const MotionMemento& memento,
+        const CancelationOptions& options) {
+    if (options.deviceId != -1 && memento.deviceId != options.deviceId) {
+        return false;
+    }
+
+    switch (options.mode) {
+    case CancelationOptions::CANCEL_ALL_EVENTS:
+        return true;
+    case CancelationOptions::CANCEL_POINTER_EVENTS:
+        return memento.source & AINPUT_SOURCE_CLASS_POINTER;
+    case CancelationOptions::CANCEL_NON_POINTER_EVENTS:
+        return !(memento.source & AINPUT_SOURCE_CLASS_POINTER);
+    default:
+        return false;
+    }
+}
+
+
+// --- InputDispatcher::Connection ---
+
+InputDispatcher::Connection::Connection(const sp<InputChannel>& inputChannel,
+        const sp<InputWindowHandle>& inputWindowHandle, bool monitor) :
+        status(STATUS_NORMAL), inputChannel(inputChannel), inputWindowHandle(inputWindowHandle),
+        monitor(monitor),
+        inputPublisher(inputChannel), inputPublisherBlocked(false) {
+}
+
+InputDispatcher::Connection::~Connection() {
+}
+
+const char* InputDispatcher::Connection::getWindowName() const {
+    if (inputWindowHandle != NULL) {
+        return inputWindowHandle->getName().string();
+    }
+    if (monitor) {
+        return "monitor";
+    }
+    return "?";
+}
+
+const char* InputDispatcher::Connection::getStatusLabel() const {
+    switch (status) {
+    case STATUS_NORMAL:
+        return "NORMAL";
+
+    case STATUS_BROKEN:
+        return "BROKEN";
+
+    case STATUS_ZOMBIE:
+        return "ZOMBIE";
+
+    default:
+        return "UNKNOWN";
+    }
+}
+
+InputDispatcher::DispatchEntry* InputDispatcher::Connection::findWaitQueueEntry(uint32_t seq) {
+    for (DispatchEntry* entry = waitQueue.head; entry != NULL; entry = entry->next) {
+        if (entry->seq == seq) {
+            return entry;
+        }
+    }
+    return NULL;
+}
+
+
+// --- InputDispatcher::CommandEntry ---
+
+InputDispatcher::CommandEntry::CommandEntry(Command command) :
+    command(command), eventTime(0), keyEntry(NULL), userActivityEventType(0),
+    seq(0), handled(false) {
+}
+
+InputDispatcher::CommandEntry::~CommandEntry() {
+}
+
+
+// --- InputDispatcher::TouchState ---
+
+InputDispatcher::TouchState::TouchState() :
+    down(false), split(false), deviceId(-1), source(0), displayId(-1) {
+}
+
+InputDispatcher::TouchState::~TouchState() {
+}
+
+void InputDispatcher::TouchState::reset() {
+    down = false;
+    split = false;
+    deviceId = -1;
+    source = 0;
+    displayId = -1;
+    windows.clear();
+}
+
+void InputDispatcher::TouchState::copyFrom(const TouchState& other) {
+    down = other.down;
+    split = other.split;
+    deviceId = other.deviceId;
+    source = other.source;
+    displayId = other.displayId;
+    windows = other.windows;
+}
+
+void InputDispatcher::TouchState::addOrUpdateWindow(const sp<InputWindowHandle>& windowHandle,
+        int32_t targetFlags, BitSet32 pointerIds) {
+    if (targetFlags & InputTarget::FLAG_SPLIT) {
+        split = true;
+    }
+
+    for (size_t i = 0; i < windows.size(); i++) {
+        TouchedWindow& touchedWindow = windows.editItemAt(i);
+        if (touchedWindow.windowHandle == windowHandle) {
+            touchedWindow.targetFlags |= targetFlags;
+            if (targetFlags & InputTarget::FLAG_DISPATCH_AS_SLIPPERY_EXIT) {
+                touchedWindow.targetFlags &= ~InputTarget::FLAG_DISPATCH_AS_IS;
+            }
+            touchedWindow.pointerIds.value |= pointerIds.value;
+            return;
+        }
+    }
+
+    windows.push();
+
+    TouchedWindow& touchedWindow = windows.editTop();
+    touchedWindow.windowHandle = windowHandle;
+    touchedWindow.targetFlags = targetFlags;
+    touchedWindow.pointerIds = pointerIds;
+}
+
+void InputDispatcher::TouchState::removeWindow(const sp<InputWindowHandle>& windowHandle) {
+    for (size_t i = 0; i < windows.size(); i++) {
+        if (windows.itemAt(i).windowHandle == windowHandle) {
+            windows.removeAt(i);
+            return;
+        }
+    }
+}
+
+void InputDispatcher::TouchState::filterNonAsIsTouchWindows() {
+    for (size_t i = 0 ; i < windows.size(); ) {
+        TouchedWindow& window = windows.editItemAt(i);
+        if (window.targetFlags & (InputTarget::FLAG_DISPATCH_AS_IS
+                | InputTarget::FLAG_DISPATCH_AS_SLIPPERY_ENTER)) {
+            window.targetFlags &= ~InputTarget::FLAG_DISPATCH_MASK;
+            window.targetFlags |= InputTarget::FLAG_DISPATCH_AS_IS;
+            i += 1;
+        } else {
+            windows.removeAt(i);
+        }
+    }
+}
+
+sp<InputWindowHandle> InputDispatcher::TouchState::getFirstForegroundWindowHandle() const {
+    for (size_t i = 0; i < windows.size(); i++) {
+        const TouchedWindow& window = windows.itemAt(i);
+        if (window.targetFlags & InputTarget::FLAG_FOREGROUND) {
+            return window.windowHandle;
+        }
+    }
+    return NULL;
+}
+
+bool InputDispatcher::TouchState::isSlippery() const {
+    // Must have exactly one foreground window.
+    bool haveSlipperyForegroundWindow = false;
+    for (size_t i = 0; i < windows.size(); i++) {
+        const TouchedWindow& window = windows.itemAt(i);
+        if (window.targetFlags & InputTarget::FLAG_FOREGROUND) {
+            if (haveSlipperyForegroundWindow
+                    || !(window.windowHandle->getInfo()->layoutParamsFlags
+                            & InputWindowInfo::FLAG_SLIPPERY)) {
+                return false;
+            }
+            haveSlipperyForegroundWindow = true;
+        }
+    }
+    return haveSlipperyForegroundWindow;
+}
+
+
+// --- InputDispatcherThread ---
+
+InputDispatcherThread::InputDispatcherThread(const sp<InputDispatcherInterface>& dispatcher) :
+        Thread(/*canCallJava*/ true), mDispatcher(dispatcher) {
+}
+
+InputDispatcherThread::~InputDispatcherThread() {
+}
+
+bool InputDispatcherThread::threadLoop() {
+    mDispatcher->dispatchOnce();
+    return true;
+}
+
+} // namespace android
diff --git a/services/inputflinger/InputDispatcher.h b/services/inputflinger/InputDispatcher.h
new file mode 100644
index 0000000..9439124
--- /dev/null
+++ b/services/inputflinger/InputDispatcher.h
@@ -0,0 +1,1121 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_DISPATCHER_H
+#define _UI_INPUT_DISPATCHER_H
+
+#include <input/Input.h>
+#include <input/InputTransport.h>
+#include <utils/KeyedVector.h>
+#include <utils/Vector.h>
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+#include <utils/Looper.h>
+#include <utils/BitSet.h>
+#include <cutils/atomic.h>
+
+#include <stddef.h>
+#include <unistd.h>
+#include <limits.h>
+
+#include "InputWindow.h"
+#include "InputApplication.h"
+#include "InputListener.h"
+
+
+namespace android {
+
+/*
+ * Constants used to report the outcome of input event injection.
+ */
+enum {
+    /* (INTERNAL USE ONLY) Specifies that injection is pending and its outcome is unknown. */
+    INPUT_EVENT_INJECTION_PENDING = -1,
+
+    /* Injection succeeded. */
+    INPUT_EVENT_INJECTION_SUCCEEDED = 0,
+
+    /* Injection failed because the injector did not have permission to inject
+     * into the application with input focus. */
+    INPUT_EVENT_INJECTION_PERMISSION_DENIED = 1,
+
+    /* Injection failed because there were no available input targets. */
+    INPUT_EVENT_INJECTION_FAILED = 2,
+
+    /* Injection failed due to a timeout. */
+    INPUT_EVENT_INJECTION_TIMED_OUT = 3
+};
+
+/*
+ * Constants used to determine the input event injection synchronization mode.
+ */
+enum {
+    /* Injection is asynchronous and is assumed always to be successful. */
+    INPUT_EVENT_INJECTION_SYNC_NONE = 0,
+
+    /* Waits for previous events to be dispatched so that the input dispatcher can determine
+     * whether input event injection willbe permitted based on the current input focus.
+     * Does not wait for the input event to finish processing. */
+    INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_RESULT = 1,
+
+    /* Waits for the input event to be completely processed. */
+    INPUT_EVENT_INJECTION_SYNC_WAIT_FOR_FINISHED = 2,
+};
+
+
+/*
+ * An input target specifies how an input event is to be dispatched to a particular window
+ * including the window's input channel, control flags, a timeout, and an X / Y offset to
+ * be added to input event coordinates to compensate for the absolute position of the
+ * window area.
+ */
+struct InputTarget {
+    enum {
+        /* This flag indicates that the event is being delivered to a foreground application. */
+        FLAG_FOREGROUND = 1 << 0,
+
+        /* This flag indicates that the target of a MotionEvent is partly or wholly
+         * obscured by another visible window above it.  The motion event should be
+         * delivered with flag AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED. */
+        FLAG_WINDOW_IS_OBSCURED = 1 << 1,
+
+        /* This flag indicates that a motion event is being split across multiple windows. */
+        FLAG_SPLIT = 1 << 2,
+
+        /* This flag indicates that the pointer coordinates dispatched to the application
+         * will be zeroed out to avoid revealing information to an application. This is
+         * used in conjunction with FLAG_DISPATCH_AS_OUTSIDE to prevent apps not sharing
+         * the same UID from watching all touches. */
+        FLAG_ZERO_COORDS = 1 << 3,
+
+        /* This flag indicates that the event should be sent as is.
+         * Should always be set unless the event is to be transmuted. */
+        FLAG_DISPATCH_AS_IS = 1 << 8,
+
+        /* This flag indicates that a MotionEvent with AMOTION_EVENT_ACTION_DOWN falls outside
+         * of the area of this target and so should instead be delivered as an
+         * AMOTION_EVENT_ACTION_OUTSIDE to this target. */
+        FLAG_DISPATCH_AS_OUTSIDE = 1 << 9,
+
+        /* This flag indicates that a hover sequence is starting in the given window.
+         * The event is transmuted into ACTION_HOVER_ENTER. */
+        FLAG_DISPATCH_AS_HOVER_ENTER = 1 << 10,
+
+        /* This flag indicates that a hover event happened outside of a window which handled
+         * previous hover events, signifying the end of the current hover sequence for that
+         * window.
+         * The event is transmuted into ACTION_HOVER_ENTER. */
+        FLAG_DISPATCH_AS_HOVER_EXIT = 1 << 11,
+
+        /* This flag indicates that the event should be canceled.
+         * It is used to transmute ACTION_MOVE into ACTION_CANCEL when a touch slips
+         * outside of a window. */
+        FLAG_DISPATCH_AS_SLIPPERY_EXIT = 1 << 12,
+
+        /* This flag indicates that the event should be dispatched as an initial down.
+         * It is used to transmute ACTION_MOVE into ACTION_DOWN when a touch slips
+         * into a new window. */
+        FLAG_DISPATCH_AS_SLIPPERY_ENTER = 1 << 13,
+
+        /* Mask for all dispatch modes. */
+        FLAG_DISPATCH_MASK = FLAG_DISPATCH_AS_IS
+                | FLAG_DISPATCH_AS_OUTSIDE
+                | FLAG_DISPATCH_AS_HOVER_ENTER
+                | FLAG_DISPATCH_AS_HOVER_EXIT
+                | FLAG_DISPATCH_AS_SLIPPERY_EXIT
+                | FLAG_DISPATCH_AS_SLIPPERY_ENTER,
+    };
+
+    // The input channel to be targeted.
+    sp<InputChannel> inputChannel;
+
+    // Flags for the input target.
+    int32_t flags;
+
+    // The x and y offset to add to a MotionEvent as it is delivered.
+    // (ignored for KeyEvents)
+    float xOffset, yOffset;
+
+    // Scaling factor to apply to MotionEvent as it is delivered.
+    // (ignored for KeyEvents)
+    float scaleFactor;
+
+    // The subset of pointer ids to include in motion events dispatched to this input target
+    // if FLAG_SPLIT is set.
+    BitSet32 pointerIds;
+};
+
+
+/*
+ * Input dispatcher configuration.
+ *
+ * Specifies various options that modify the behavior of the input dispatcher.
+ * The values provided here are merely defaults. The actual values will come from ViewConfiguration
+ * and are passed into the dispatcher during initialization.
+ */
+struct InputDispatcherConfiguration {
+    // The key repeat initial timeout.
+    nsecs_t keyRepeatTimeout;
+
+    // The key repeat inter-key delay.
+    nsecs_t keyRepeatDelay;
+
+    InputDispatcherConfiguration() :
+            keyRepeatTimeout(500 * 1000000LL),
+            keyRepeatDelay(50 * 1000000LL) { }
+};
+
+
+/*
+ * Input dispatcher policy interface.
+ *
+ * The input reader policy is used by the input reader to interact with the Window Manager
+ * and other system components.
+ *
+ * The actual implementation is partially supported by callbacks into the DVM
+ * via JNI.  This interface is also mocked in the unit tests.
+ */
+class InputDispatcherPolicyInterface : public virtual RefBase {
+protected:
+    InputDispatcherPolicyInterface() { }
+    virtual ~InputDispatcherPolicyInterface() { }
+
+public:
+    /* Notifies the system that a configuration change has occurred. */
+    virtual void notifyConfigurationChanged(nsecs_t when) = 0;
+
+    /* Notifies the system that an application is not responding.
+     * Returns a new timeout to continue waiting, or 0 to abort dispatch. */
+    virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
+            const sp<InputWindowHandle>& inputWindowHandle,
+            const String8& reason) = 0;
+
+    /* Notifies the system that an input channel is unrecoverably broken. */
+    virtual void notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle) = 0;
+
+    /* Gets the input dispatcher configuration. */
+    virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) = 0;
+
+    /* Filters an input event.
+     * Return true to dispatch the event unmodified, false to consume the event.
+     * A filter can also transform and inject events later by passing POLICY_FLAG_FILTERED
+     * to injectInputEvent.
+     */
+    virtual bool filterInputEvent(const InputEvent* inputEvent, uint32_t policyFlags) = 0;
+
+    /* Intercepts a key event immediately before queueing it.
+     * The policy can use this method as an opportunity to perform power management functions
+     * and early event preprocessing such as updating policy flags.
+     *
+     * This method is expected to set the POLICY_FLAG_PASS_TO_USER policy flag if the event
+     * should be dispatched to applications.
+     */
+    virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags) = 0;
+
+    /* Intercepts a touch, trackball or other motion event before queueing it.
+     * The policy can use this method as an opportunity to perform power management functions
+     * and early event preprocessing such as updating policy flags.
+     *
+     * This method is expected to set the POLICY_FLAG_PASS_TO_USER policy flag if the event
+     * should be dispatched to applications.
+     */
+    virtual void interceptMotionBeforeQueueing(nsecs_t when, uint32_t& policyFlags) = 0;
+
+    /* Allows the policy a chance to intercept a key before dispatching. */
+    virtual nsecs_t interceptKeyBeforeDispatching(const sp<InputWindowHandle>& inputWindowHandle,
+            const KeyEvent* keyEvent, uint32_t policyFlags) = 0;
+
+    /* Allows the policy a chance to perform default processing for an unhandled key.
+     * Returns an alternate keycode to redispatch as a fallback, or 0 to give up. */
+    virtual bool dispatchUnhandledKey(const sp<InputWindowHandle>& inputWindowHandle,
+            const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) = 0;
+
+    /* Notifies the policy about switch events.
+     */
+    virtual void notifySwitch(nsecs_t when,
+            uint32_t switchValues, uint32_t switchMask, uint32_t policyFlags) = 0;
+
+    /* Poke user activity for an event dispatched to a window. */
+    virtual void pokeUserActivity(nsecs_t eventTime, int32_t eventType) = 0;
+
+    /* Checks whether a given application pid/uid has permission to inject input events
+     * into other applications.
+     *
+     * This method is special in that its implementation promises to be non-reentrant and
+     * is safe to call while holding other locks.  (Most other methods make no such guarantees!)
+     */
+    virtual bool checkInjectEventsPermissionNonReentrant(
+            int32_t injectorPid, int32_t injectorUid) = 0;
+};
+
+
+/* Notifies the system about input events generated by the input reader.
+ * The dispatcher is expected to be mostly asynchronous. */
+class InputDispatcherInterface : public virtual RefBase, public InputListenerInterface {
+protected:
+    InputDispatcherInterface() { }
+    virtual ~InputDispatcherInterface() { }
+
+public:
+    /* Dumps the state of the input dispatcher.
+     *
+     * This method may be called on any thread (usually by the input manager). */
+    virtual void dump(String8& dump) = 0;
+
+    /* Called by the heatbeat to ensures that the dispatcher has not deadlocked. */
+    virtual void monitor() = 0;
+
+    /* Runs a single iteration of the dispatch loop.
+     * Nominally processes one queued event, a timeout, or a response from an input consumer.
+     *
+     * This method should only be called on the input dispatcher thread.
+     */
+    virtual void dispatchOnce() = 0;
+
+    /* Injects an input event and optionally waits for sync.
+     * The synchronization mode determines whether the method blocks while waiting for
+     * input injection to proceed.
+     * Returns one of the INPUT_EVENT_INJECTION_XXX constants.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual int32_t injectInputEvent(const InputEvent* event, int32_t displayId,
+            int32_t injectorPid, int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis,
+            uint32_t policyFlags) = 0;
+
+    /* Sets the list of input windows.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual void setInputWindows(const Vector<sp<InputWindowHandle> >& inputWindowHandles) = 0;
+
+    /* Sets the focused application.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual void setFocusedApplication(
+            const sp<InputApplicationHandle>& inputApplicationHandle) = 0;
+
+    /* Sets the input dispatching mode.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual void setInputDispatchMode(bool enabled, bool frozen) = 0;
+
+    /* Sets whether input event filtering is enabled.
+     * When enabled, incoming input events are sent to the policy's filterInputEvent
+     * method instead of being dispatched.  The filter is expected to use
+     * injectInputEvent to inject the events it would like to have dispatched.
+     * It should include POLICY_FLAG_FILTERED in the policy flags during injection.
+     */
+    virtual void setInputFilterEnabled(bool enabled) = 0;
+
+    /* Transfers touch focus from the window associated with one channel to the
+     * window associated with the other channel.
+     *
+     * Returns true on success.  False if the window did not actually have touch focus.
+     */
+    virtual bool transferTouchFocus(const sp<InputChannel>& fromChannel,
+            const sp<InputChannel>& toChannel) = 0;
+
+    /* Registers or unregister input channels that may be used as targets for input events.
+     * If monitor is true, the channel will receive a copy of all input events.
+     *
+     * These methods may be called on any thread (usually by the input manager).
+     */
+    virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel,
+            const sp<InputWindowHandle>& inputWindowHandle, bool monitor) = 0;
+    virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel) = 0;
+};
+
+/* Dispatches events to input targets.  Some functions of the input dispatcher, such as
+ * identifying input targets, are controlled by a separate policy object.
+ *
+ * IMPORTANT INVARIANT:
+ *     Because the policy can potentially block or cause re-entrance into the input dispatcher,
+ *     the input dispatcher never calls into the policy while holding its internal locks.
+ *     The implementation is also carefully designed to recover from scenarios such as an
+ *     input channel becoming unregistered while identifying input targets or processing timeouts.
+ *
+ *     Methods marked 'Locked' must be called with the lock acquired.
+ *
+ *     Methods marked 'LockedInterruptible' must be called with the lock acquired but
+ *     may during the course of their execution release the lock, call into the policy, and
+ *     then reacquire the lock.  The caller is responsible for recovering gracefully.
+ *
+ *     A 'LockedInterruptible' method may called a 'Locked' method, but NOT vice-versa.
+ */
+class InputDispatcher : public InputDispatcherInterface {
+protected:
+    virtual ~InputDispatcher();
+
+public:
+    explicit InputDispatcher(const sp<InputDispatcherPolicyInterface>& policy);
+
+    virtual void dump(String8& dump);
+    virtual void monitor();
+
+    virtual void dispatchOnce();
+
+    virtual void notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args);
+    virtual void notifyKey(const NotifyKeyArgs* args);
+    virtual void notifyMotion(const NotifyMotionArgs* args);
+    virtual void notifySwitch(const NotifySwitchArgs* args);
+    virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args);
+
+    virtual int32_t injectInputEvent(const InputEvent* event, int32_t displayId,
+            int32_t injectorPid, int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis,
+            uint32_t policyFlags);
+
+    virtual void setInputWindows(const Vector<sp<InputWindowHandle> >& inputWindowHandles);
+    virtual void setFocusedApplication(const sp<InputApplicationHandle>& inputApplicationHandle);
+    virtual void setInputDispatchMode(bool enabled, bool frozen);
+    virtual void setInputFilterEnabled(bool enabled);
+
+    virtual bool transferTouchFocus(const sp<InputChannel>& fromChannel,
+            const sp<InputChannel>& toChannel);
+
+    virtual status_t registerInputChannel(const sp<InputChannel>& inputChannel,
+            const sp<InputWindowHandle>& inputWindowHandle, bool monitor);
+    virtual status_t unregisterInputChannel(const sp<InputChannel>& inputChannel);
+
+private:
+    template <typename T>
+    struct Link {
+        T* next;
+        T* prev;
+
+    protected:
+        inline Link() : next(NULL), prev(NULL) { }
+    };
+
+    struct InjectionState {
+        mutable int32_t refCount;
+
+        int32_t injectorPid;
+        int32_t injectorUid;
+        int32_t injectionResult;  // initially INPUT_EVENT_INJECTION_PENDING
+        bool injectionIsAsync; // set to true if injection is not waiting for the result
+        int32_t pendingForegroundDispatches; // the number of foreground dispatches in progress
+
+        InjectionState(int32_t injectorPid, int32_t injectorUid);
+        void release();
+
+    private:
+        ~InjectionState();
+    };
+
+    struct EventEntry : Link<EventEntry> {
+        enum {
+            TYPE_CONFIGURATION_CHANGED,
+            TYPE_DEVICE_RESET,
+            TYPE_KEY,
+            TYPE_MOTION
+        };
+
+        mutable int32_t refCount;
+        int32_t type;
+        nsecs_t eventTime;
+        uint32_t policyFlags;
+        InjectionState* injectionState;
+
+        bool dispatchInProgress; // initially false, set to true while dispatching
+
+        inline bool isInjected() const { return injectionState != NULL; }
+
+        void release();
+
+        virtual void appendDescription(String8& msg) const = 0;
+
+    protected:
+        EventEntry(int32_t type, nsecs_t eventTime, uint32_t policyFlags);
+        virtual ~EventEntry();
+        void releaseInjectionState();
+    };
+
+    struct ConfigurationChangedEntry : EventEntry {
+        ConfigurationChangedEntry(nsecs_t eventTime);
+        virtual void appendDescription(String8& msg) const;
+
+    protected:
+        virtual ~ConfigurationChangedEntry();
+    };
+
+    struct DeviceResetEntry : EventEntry {
+        int32_t deviceId;
+
+        DeviceResetEntry(nsecs_t eventTime, int32_t deviceId);
+        virtual void appendDescription(String8& msg) const;
+
+    protected:
+        virtual ~DeviceResetEntry();
+    };
+
+    struct KeyEntry : EventEntry {
+        int32_t deviceId;
+        uint32_t source;
+        int32_t action;
+        int32_t flags;
+        int32_t keyCode;
+        int32_t scanCode;
+        int32_t metaState;
+        int32_t repeatCount;
+        nsecs_t downTime;
+
+        bool syntheticRepeat; // set to true for synthetic key repeats
+
+        enum InterceptKeyResult {
+            INTERCEPT_KEY_RESULT_UNKNOWN,
+            INTERCEPT_KEY_RESULT_SKIP,
+            INTERCEPT_KEY_RESULT_CONTINUE,
+            INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER,
+        };
+        InterceptKeyResult interceptKeyResult; // set based on the interception result
+        nsecs_t interceptKeyWakeupTime; // used with INTERCEPT_KEY_RESULT_TRY_AGAIN_LATER
+
+        KeyEntry(nsecs_t eventTime,
+                int32_t deviceId, uint32_t source, uint32_t policyFlags, int32_t action,
+                int32_t flags, int32_t keyCode, int32_t scanCode, int32_t metaState,
+                int32_t repeatCount, nsecs_t downTime);
+        virtual void appendDescription(String8& msg) const;
+        void recycle();
+
+    protected:
+        virtual ~KeyEntry();
+    };
+
+    struct MotionEntry : EventEntry {
+        nsecs_t eventTime;
+        int32_t deviceId;
+        uint32_t source;
+        int32_t action;
+        int32_t flags;
+        int32_t metaState;
+        int32_t buttonState;
+        int32_t edgeFlags;
+        float xPrecision;
+        float yPrecision;
+        nsecs_t downTime;
+        int32_t displayId;
+        uint32_t pointerCount;
+        PointerProperties pointerProperties[MAX_POINTERS];
+        PointerCoords pointerCoords[MAX_POINTERS];
+
+        MotionEntry(nsecs_t eventTime,
+                int32_t deviceId, uint32_t source, uint32_t policyFlags,
+                int32_t action, int32_t flags,
+                int32_t metaState, int32_t buttonState, int32_t edgeFlags,
+                float xPrecision, float yPrecision,
+                nsecs_t downTime, int32_t displayId, uint32_t pointerCount,
+                const PointerProperties* pointerProperties, const PointerCoords* pointerCoords,
+                float xOffset, float yOffset);
+        virtual void appendDescription(String8& msg) const;
+
+    protected:
+        virtual ~MotionEntry();
+    };
+
+    // Tracks the progress of dispatching a particular event to a particular connection.
+    struct DispatchEntry : Link<DispatchEntry> {
+        const uint32_t seq; // unique sequence number, never 0
+
+        EventEntry* eventEntry; // the event to dispatch
+        int32_t targetFlags;
+        float xOffset;
+        float yOffset;
+        float scaleFactor;
+        nsecs_t deliveryTime; // time when the event was actually delivered
+
+        // Set to the resolved action and flags when the event is enqueued.
+        int32_t resolvedAction;
+        int32_t resolvedFlags;
+
+        DispatchEntry(EventEntry* eventEntry,
+                int32_t targetFlags, float xOffset, float yOffset, float scaleFactor);
+        ~DispatchEntry();
+
+        inline bool hasForegroundTarget() const {
+            return targetFlags & InputTarget::FLAG_FOREGROUND;
+        }
+
+        inline bool isSplit() const {
+            return targetFlags & InputTarget::FLAG_SPLIT;
+        }
+
+    private:
+        static volatile int32_t sNextSeqAtomic;
+
+        static uint32_t nextSeq();
+    };
+
+    // A command entry captures state and behavior for an action to be performed in the
+    // dispatch loop after the initial processing has taken place.  It is essentially
+    // a kind of continuation used to postpone sensitive policy interactions to a point
+    // in the dispatch loop where it is safe to release the lock (generally after finishing
+    // the critical parts of the dispatch cycle).
+    //
+    // The special thing about commands is that they can voluntarily release and reacquire
+    // the dispatcher lock at will.  Initially when the command starts running, the
+    // dispatcher lock is held.  However, if the command needs to call into the policy to
+    // do some work, it can release the lock, do the work, then reacquire the lock again
+    // before returning.
+    //
+    // This mechanism is a bit clunky but it helps to preserve the invariant that the dispatch
+    // never calls into the policy while holding its lock.
+    //
+    // Commands are implicitly 'LockedInterruptible'.
+    struct CommandEntry;
+    typedef void (InputDispatcher::*Command)(CommandEntry* commandEntry);
+
+    class Connection;
+    struct CommandEntry : Link<CommandEntry> {
+        CommandEntry(Command command);
+        ~CommandEntry();
+
+        Command command;
+
+        // parameters for the command (usage varies by command)
+        sp<Connection> connection;
+        nsecs_t eventTime;
+        KeyEntry* keyEntry;
+        sp<InputApplicationHandle> inputApplicationHandle;
+        sp<InputWindowHandle> inputWindowHandle;
+        String8 reason;
+        int32_t userActivityEventType;
+        uint32_t seq;
+        bool handled;
+    };
+
+    // Generic queue implementation.
+    template <typename T>
+    struct Queue {
+        T* head;
+        T* tail;
+
+        inline Queue() : head(NULL), tail(NULL) {
+        }
+
+        inline bool isEmpty() const {
+            return !head;
+        }
+
+        inline void enqueueAtTail(T* entry) {
+            entry->prev = tail;
+            if (tail) {
+                tail->next = entry;
+            } else {
+                head = entry;
+            }
+            entry->next = NULL;
+            tail = entry;
+        }
+
+        inline void enqueueAtHead(T* entry) {
+            entry->next = head;
+            if (head) {
+                head->prev = entry;
+            } else {
+                tail = entry;
+            }
+            entry->prev = NULL;
+            head = entry;
+        }
+
+        inline void dequeue(T* entry) {
+            if (entry->prev) {
+                entry->prev->next = entry->next;
+            } else {
+                head = entry->next;
+            }
+            if (entry->next) {
+                entry->next->prev = entry->prev;
+            } else {
+                tail = entry->prev;
+            }
+        }
+
+        inline T* dequeueAtHead() {
+            T* entry = head;
+            head = entry->next;
+            if (head) {
+                head->prev = NULL;
+            } else {
+                tail = NULL;
+            }
+            return entry;
+        }
+
+        uint32_t count() const;
+    };
+
+    /* Specifies which events are to be canceled and why. */
+    struct CancelationOptions {
+        enum Mode {
+            CANCEL_ALL_EVENTS = 0,
+            CANCEL_POINTER_EVENTS = 1,
+            CANCEL_NON_POINTER_EVENTS = 2,
+            CANCEL_FALLBACK_EVENTS = 3,
+        };
+
+        // The criterion to use to determine which events should be canceled.
+        Mode mode;
+
+        // Descriptive reason for the cancelation.
+        const char* reason;
+
+        // The specific keycode of the key event to cancel, or -1 to cancel any key event.
+        int32_t keyCode;
+
+        // The specific device id of events to cancel, or -1 to cancel events from any device.
+        int32_t deviceId;
+
+        CancelationOptions(Mode mode, const char* reason) :
+                mode(mode), reason(reason), keyCode(-1), deviceId(-1) { }
+    };
+
+    /* Tracks dispatched key and motion event state so that cancelation events can be
+     * synthesized when events are dropped. */
+    class InputState {
+    public:
+        InputState();
+        ~InputState();
+
+        // Returns true if there is no state to be canceled.
+        bool isNeutral() const;
+
+        // Returns true if the specified source is known to have received a hover enter
+        // motion event.
+        bool isHovering(int32_t deviceId, uint32_t source, int32_t displayId) const;
+
+        // Records tracking information for a key event that has just been published.
+        // Returns true if the event should be delivered, false if it is inconsistent
+        // and should be skipped.
+        bool trackKey(const KeyEntry* entry, int32_t action, int32_t flags);
+
+        // Records tracking information for a motion event that has just been published.
+        // Returns true if the event should be delivered, false if it is inconsistent
+        // and should be skipped.
+        bool trackMotion(const MotionEntry* entry, int32_t action, int32_t flags);
+
+        // Synthesizes cancelation events for the current state and resets the tracked state.
+        void synthesizeCancelationEvents(nsecs_t currentTime,
+                Vector<EventEntry*>& outEvents, const CancelationOptions& options);
+
+        // Clears the current state.
+        void clear();
+
+        // Copies pointer-related parts of the input state to another instance.
+        void copyPointerStateTo(InputState& other) const;
+
+        // Gets the fallback key associated with a keycode.
+        // Returns -1 if none.
+        // Returns AKEYCODE_UNKNOWN if we are only dispatching the unhandled key to the policy.
+        int32_t getFallbackKey(int32_t originalKeyCode);
+
+        // Sets the fallback key for a particular keycode.
+        void setFallbackKey(int32_t originalKeyCode, int32_t fallbackKeyCode);
+
+        // Removes the fallback key for a particular keycode.
+        void removeFallbackKey(int32_t originalKeyCode);
+
+        inline const KeyedVector<int32_t, int32_t>& getFallbackKeys() const {
+            return mFallbackKeys;
+        }
+
+    private:
+        struct KeyMemento {
+            int32_t deviceId;
+            uint32_t source;
+            int32_t keyCode;
+            int32_t scanCode;
+            int32_t metaState;
+            int32_t flags;
+            nsecs_t downTime;
+            uint32_t policyFlags;
+        };
+
+        struct MotionMemento {
+            int32_t deviceId;
+            uint32_t source;
+            int32_t flags;
+            float xPrecision;
+            float yPrecision;
+            nsecs_t downTime;
+            int32_t displayId;
+            uint32_t pointerCount;
+            PointerProperties pointerProperties[MAX_POINTERS];
+            PointerCoords pointerCoords[MAX_POINTERS];
+            bool hovering;
+            uint32_t policyFlags;
+
+            void setPointers(const MotionEntry* entry);
+        };
+
+        Vector<KeyMemento> mKeyMementos;
+        Vector<MotionMemento> mMotionMementos;
+        KeyedVector<int32_t, int32_t> mFallbackKeys;
+
+        ssize_t findKeyMemento(const KeyEntry* entry) const;
+        ssize_t findMotionMemento(const MotionEntry* entry, bool hovering) const;
+
+        void addKeyMemento(const KeyEntry* entry, int32_t flags);
+        void addMotionMemento(const MotionEntry* entry, int32_t flags, bool hovering);
+
+        static bool shouldCancelKey(const KeyMemento& memento,
+                const CancelationOptions& options);
+        static bool shouldCancelMotion(const MotionMemento& memento,
+                const CancelationOptions& options);
+    };
+
+    /* Manages the dispatch state associated with a single input channel. */
+    class Connection : public RefBase {
+    protected:
+        virtual ~Connection();
+
+    public:
+        enum Status {
+            // Everything is peachy.
+            STATUS_NORMAL,
+            // An unrecoverable communication error has occurred.
+            STATUS_BROKEN,
+            // The input channel has been unregistered.
+            STATUS_ZOMBIE
+        };
+
+        Status status;
+        sp<InputChannel> inputChannel; // never null
+        sp<InputWindowHandle> inputWindowHandle; // may be null
+        bool monitor;
+        InputPublisher inputPublisher;
+        InputState inputState;
+
+        // True if the socket is full and no further events can be published until
+        // the application consumes some of the input.
+        bool inputPublisherBlocked;
+
+        // Queue of events that need to be published to the connection.
+        Queue<DispatchEntry> outboundQueue;
+
+        // Queue of events that have been published to the connection but that have not
+        // yet received a "finished" response from the application.
+        Queue<DispatchEntry> waitQueue;
+
+        explicit Connection(const sp<InputChannel>& inputChannel,
+                const sp<InputWindowHandle>& inputWindowHandle, bool monitor);
+
+        inline const char* getInputChannelName() const { return inputChannel->getName().string(); }
+
+        const char* getWindowName() const;
+        const char* getStatusLabel() const;
+
+        DispatchEntry* findWaitQueueEntry(uint32_t seq);
+    };
+
+    enum DropReason {
+        DROP_REASON_NOT_DROPPED = 0,
+        DROP_REASON_POLICY = 1,
+        DROP_REASON_APP_SWITCH = 2,
+        DROP_REASON_DISABLED = 3,
+        DROP_REASON_BLOCKED = 4,
+        DROP_REASON_STALE = 5,
+    };
+
+    sp<InputDispatcherPolicyInterface> mPolicy;
+    InputDispatcherConfiguration mConfig;
+
+    Mutex mLock;
+
+    Condition mDispatcherIsAliveCondition;
+
+    sp<Looper> mLooper;
+
+    EventEntry* mPendingEvent;
+    Queue<EventEntry> mInboundQueue;
+    Queue<EventEntry> mRecentQueue;
+    Queue<CommandEntry> mCommandQueue;
+
+    void dispatchOnceInnerLocked(nsecs_t* nextWakeupTime);
+
+    // Enqueues an inbound event.  Returns true if mLooper->wake() should be called.
+    bool enqueueInboundEventLocked(EventEntry* entry);
+
+    // Cleans up input state when dropping an inbound event.
+    void dropInboundEventLocked(EventEntry* entry, DropReason dropReason);
+
+    // Adds an event to a queue of recent events for debugging purposes.
+    void addRecentEventLocked(EventEntry* entry);
+
+    // App switch latency optimization.
+    bool mAppSwitchSawKeyDown;
+    nsecs_t mAppSwitchDueTime;
+
+    static bool isAppSwitchKeyCode(int32_t keyCode);
+    bool isAppSwitchKeyEventLocked(KeyEntry* keyEntry);
+    bool isAppSwitchPendingLocked();
+    void resetPendingAppSwitchLocked(bool handled);
+
+    // Stale event latency optimization.
+    static bool isStaleEventLocked(nsecs_t currentTime, EventEntry* entry);
+
+    // Blocked event latency optimization.  Drops old events when the user intends
+    // to transfer focus to a new application.
+    EventEntry* mNextUnblockedEvent;
+
+    sp<InputWindowHandle> findTouchedWindowAtLocked(int32_t displayId, int32_t x, int32_t y);
+
+    // All registered connections mapped by channel file descriptor.
+    KeyedVector<int, sp<Connection> > mConnectionsByFd;
+
+    ssize_t getConnectionIndexLocked(const sp<InputChannel>& inputChannel);
+
+    // Input channels that will receive a copy of all input events.
+    Vector<sp<InputChannel> > mMonitoringChannels;
+
+    // Event injection and synchronization.
+    Condition mInjectionResultAvailableCondition;
+    bool hasInjectionPermission(int32_t injectorPid, int32_t injectorUid);
+    void setInjectionResultLocked(EventEntry* entry, int32_t injectionResult);
+
+    Condition mInjectionSyncFinishedCondition;
+    void incrementPendingForegroundDispatchesLocked(EventEntry* entry);
+    void decrementPendingForegroundDispatchesLocked(EventEntry* entry);
+
+    // Key repeat tracking.
+    struct KeyRepeatState {
+        KeyEntry* lastKeyEntry; // or null if no repeat
+        nsecs_t nextRepeatTime;
+    } mKeyRepeatState;
+
+    void resetKeyRepeatLocked();
+    KeyEntry* synthesizeKeyRepeatLocked(nsecs_t currentTime);
+
+    // Deferred command processing.
+    bool haveCommandsLocked() const;
+    bool runCommandsLockedInterruptible();
+    CommandEntry* postCommandLocked(Command command);
+
+    // Input filter processing.
+    bool shouldSendKeyToInputFilterLocked(const NotifyKeyArgs* args);
+    bool shouldSendMotionToInputFilterLocked(const NotifyMotionArgs* args);
+
+    // Inbound event processing.
+    void drainInboundQueueLocked();
+    void releasePendingEventLocked();
+    void releaseInboundEventLocked(EventEntry* entry);
+
+    // Dispatch state.
+    bool mDispatchEnabled;
+    bool mDispatchFrozen;
+    bool mInputFilterEnabled;
+
+    Vector<sp<InputWindowHandle> > mWindowHandles;
+
+    sp<InputWindowHandle> getWindowHandleLocked(const sp<InputChannel>& inputChannel) const;
+    bool hasWindowHandleLocked(const sp<InputWindowHandle>& windowHandle) const;
+
+    // Focus tracking for keys, trackball, etc.
+    sp<InputWindowHandle> mFocusedWindowHandle;
+
+    // Focus tracking for touch.
+    struct TouchedWindow {
+        sp<InputWindowHandle> windowHandle;
+        int32_t targetFlags;
+        BitSet32 pointerIds;        // zero unless target flag FLAG_SPLIT is set
+    };
+    struct TouchState {
+        bool down;
+        bool split;
+        int32_t deviceId; // id of the device that is currently down, others are rejected
+        uint32_t source;  // source of the device that is current down, others are rejected
+        int32_t displayId; // id to the display that currently has a touch, others are rejected
+        Vector<TouchedWindow> windows;
+
+        TouchState();
+        ~TouchState();
+        void reset();
+        void copyFrom(const TouchState& other);
+        void addOrUpdateWindow(const sp<InputWindowHandle>& windowHandle,
+                int32_t targetFlags, BitSet32 pointerIds);
+        void removeWindow(const sp<InputWindowHandle>& windowHandle);
+        void filterNonAsIsTouchWindows();
+        sp<InputWindowHandle> getFirstForegroundWindowHandle() const;
+        bool isSlippery() const;
+    };
+
+    KeyedVector<int32_t, TouchState> mTouchStatesByDisplay;
+    TouchState mTempTouchState;
+
+    // Focused application.
+    sp<InputApplicationHandle> mFocusedApplicationHandle;
+
+    // Dispatcher state at time of last ANR.
+    String8 mLastANRState;
+
+    // Dispatch inbound events.
+    bool dispatchConfigurationChangedLocked(
+            nsecs_t currentTime, ConfigurationChangedEntry* entry);
+    bool dispatchDeviceResetLocked(
+            nsecs_t currentTime, DeviceResetEntry* entry);
+    bool dispatchKeyLocked(
+            nsecs_t currentTime, KeyEntry* entry,
+            DropReason* dropReason, nsecs_t* nextWakeupTime);
+    bool dispatchMotionLocked(
+            nsecs_t currentTime, MotionEntry* entry,
+            DropReason* dropReason, nsecs_t* nextWakeupTime);
+    void dispatchEventLocked(nsecs_t currentTime, EventEntry* entry,
+            const Vector<InputTarget>& inputTargets);
+
+    void logOutboundKeyDetailsLocked(const char* prefix, const KeyEntry* entry);
+    void logOutboundMotionDetailsLocked(const char* prefix, const MotionEntry* entry);
+
+    // Keeping track of ANR timeouts.
+    enum InputTargetWaitCause {
+        INPUT_TARGET_WAIT_CAUSE_NONE,
+        INPUT_TARGET_WAIT_CAUSE_SYSTEM_NOT_READY,
+        INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY,
+    };
+
+    InputTargetWaitCause mInputTargetWaitCause;
+    nsecs_t mInputTargetWaitStartTime;
+    nsecs_t mInputTargetWaitTimeoutTime;
+    bool mInputTargetWaitTimeoutExpired;
+    sp<InputApplicationHandle> mInputTargetWaitApplicationHandle;
+
+    // Contains the last window which received a hover event.
+    sp<InputWindowHandle> mLastHoverWindowHandle;
+
+    // Finding targets for input events.
+    int32_t handleTargetsNotReadyLocked(nsecs_t currentTime, const EventEntry* entry,
+            const sp<InputApplicationHandle>& applicationHandle,
+            const sp<InputWindowHandle>& windowHandle,
+            nsecs_t* nextWakeupTime, const char* reason);
+    void resumeAfterTargetsNotReadyTimeoutLocked(nsecs_t newTimeout,
+            const sp<InputChannel>& inputChannel);
+    nsecs_t getTimeSpentWaitingForApplicationLocked(nsecs_t currentTime);
+    void resetANRTimeoutsLocked();
+
+    int32_t findFocusedWindowTargetsLocked(nsecs_t currentTime, const EventEntry* entry,
+            Vector<InputTarget>& inputTargets, nsecs_t* nextWakeupTime);
+    int32_t findTouchedWindowTargetsLocked(nsecs_t currentTime, const MotionEntry* entry,
+            Vector<InputTarget>& inputTargets, nsecs_t* nextWakeupTime,
+            bool* outConflictingPointerActions);
+
+    void addWindowTargetLocked(const sp<InputWindowHandle>& windowHandle,
+            int32_t targetFlags, BitSet32 pointerIds, Vector<InputTarget>& inputTargets);
+    void addMonitoringTargetsLocked(Vector<InputTarget>& inputTargets);
+
+    void pokeUserActivityLocked(const EventEntry* eventEntry);
+    bool checkInjectionPermission(const sp<InputWindowHandle>& windowHandle,
+            const InjectionState* injectionState);
+    bool isWindowObscuredAtPointLocked(const sp<InputWindowHandle>& windowHandle,
+            int32_t x, int32_t y) const;
+    bool isWindowReadyForMoreInputLocked(nsecs_t currentTime,
+            const sp<InputWindowHandle>& windowHandle, const EventEntry* eventEntry);
+    String8 getApplicationWindowLabelLocked(const sp<InputApplicationHandle>& applicationHandle,
+            const sp<InputWindowHandle>& windowHandle);
+
+    // Manage the dispatch cycle for a single connection.
+    // These methods are deliberately not Interruptible because doing all of the work
+    // with the mutex held makes it easier to ensure that connection invariants are maintained.
+    // If needed, the methods post commands to run later once the critical bits are done.
+    void prepareDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
+            EventEntry* eventEntry, const InputTarget* inputTarget);
+    void enqueueDispatchEntriesLocked(nsecs_t currentTime, const sp<Connection>& connection,
+            EventEntry* eventEntry, const InputTarget* inputTarget);
+    void enqueueDispatchEntryLocked(const sp<Connection>& connection,
+            EventEntry* eventEntry, const InputTarget* inputTarget, int32_t dispatchMode);
+    void startDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection);
+    void finishDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
+            uint32_t seq, bool handled);
+    void abortBrokenDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
+            bool notify);
+    void drainDispatchQueueLocked(Queue<DispatchEntry>* queue);
+    void releaseDispatchEntryLocked(DispatchEntry* dispatchEntry);
+    static int handleReceiveCallback(int fd, int events, void* data);
+
+    void synthesizeCancelationEventsForAllConnectionsLocked(
+            const CancelationOptions& options);
+    void synthesizeCancelationEventsForInputChannelLocked(const sp<InputChannel>& channel,
+            const CancelationOptions& options);
+    void synthesizeCancelationEventsForConnectionLocked(const sp<Connection>& connection,
+            const CancelationOptions& options);
+
+    // Splitting motion events across windows.
+    MotionEntry* splitMotionEvent(const MotionEntry* originalMotionEntry, BitSet32 pointerIds);
+
+    // Reset and drop everything the dispatcher is doing.
+    void resetAndDropEverythingLocked(const char* reason);
+
+    // Dump state.
+    void dumpDispatchStateLocked(String8& dump);
+    void logDispatchStateLocked();
+
+    // Registration.
+    void removeMonitorChannelLocked(const sp<InputChannel>& inputChannel);
+    status_t unregisterInputChannelLocked(const sp<InputChannel>& inputChannel, bool notify);
+
+    // Add or remove a connection to the mActiveConnections vector.
+    void activateConnectionLocked(Connection* connection);
+    void deactivateConnectionLocked(Connection* connection);
+
+    // Interesting events that we might like to log or tell the framework about.
+    void onDispatchCycleFinishedLocked(
+            nsecs_t currentTime, const sp<Connection>& connection, uint32_t seq, bool handled);
+    void onDispatchCycleBrokenLocked(
+            nsecs_t currentTime, const sp<Connection>& connection);
+    void onANRLocked(
+            nsecs_t currentTime, const sp<InputApplicationHandle>& applicationHandle,
+            const sp<InputWindowHandle>& windowHandle,
+            nsecs_t eventTime, nsecs_t waitStartTime, const char* reason);
+
+    // Outbound policy interactions.
+    void doNotifyConfigurationChangedInterruptible(CommandEntry* commandEntry);
+    void doNotifyInputChannelBrokenLockedInterruptible(CommandEntry* commandEntry);
+    void doNotifyANRLockedInterruptible(CommandEntry* commandEntry);
+    void doInterceptKeyBeforeDispatchingLockedInterruptible(CommandEntry* commandEntry);
+    void doDispatchCycleFinishedLockedInterruptible(CommandEntry* commandEntry);
+    bool afterKeyEventLockedInterruptible(const sp<Connection>& connection,
+            DispatchEntry* dispatchEntry, KeyEntry* keyEntry, bool handled);
+    bool afterMotionEventLockedInterruptible(const sp<Connection>& connection,
+            DispatchEntry* dispatchEntry, MotionEntry* motionEntry, bool handled);
+    void doPokeUserActivityLockedInterruptible(CommandEntry* commandEntry);
+    void initializeKeyEvent(KeyEvent* event, const KeyEntry* entry);
+
+    // Statistics gathering.
+    void updateDispatchStatisticsLocked(nsecs_t currentTime, const EventEntry* entry,
+            int32_t injectionResult, nsecs_t timeSpentWaitingForApplication);
+    void traceInboundQueueLengthLocked();
+    void traceOutboundQueueLengthLocked(const sp<Connection>& connection);
+    void traceWaitQueueLengthLocked(const sp<Connection>& connection);
+};
+
+/* Enqueues and dispatches input events, endlessly. */
+class InputDispatcherThread : public Thread {
+public:
+    explicit InputDispatcherThread(const sp<InputDispatcherInterface>& dispatcher);
+    ~InputDispatcherThread();
+
+private:
+    virtual bool threadLoop();
+
+    sp<InputDispatcherInterface> mDispatcher;
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_DISPATCHER_H
diff --git a/services/inputflinger/InputFlinger.cpp b/services/inputflinger/InputFlinger.cpp
new file mode 100644
index 0000000..9ea6ce5
--- /dev/null
+++ b/services/inputflinger/InputFlinger.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputFlinger"
+
+#include "InputFlinger.h"
+
+#include <stdint.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+
+#include <binder/IPCThreadState.h>
+#include <binder/PermissionCache.h>
+#include <cutils/log.h>
+#include <private/android_filesystem_config.h>
+
+namespace android {
+
+const String16 sAccessInputFlingerPermission("android.permission.ACCESS_INPUT_FLINGER");
+const String16 sDumpPermission("android.permission.DUMP");
+
+
+InputFlinger::InputFlinger() :
+        BnInputFlinger() {
+    ALOGI("InputFlinger is starting");
+}
+
+InputFlinger::~InputFlinger() {
+}
+
+status_t InputFlinger::onTransact(
+        uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags) {
+    switch (code) {
+    case DO_SOMETHING_TRANSACTION:
+        const IPCThreadState* ipc = IPCThreadState::self();
+        const int pid = ipc->getCallingPid();
+        const int uid = ipc->getCallingUid();
+        if (!PermissionCache::checkPermission(sAccessInputFlingerPermission, pid, uid)) {
+            ALOGE("Permission Denial: "
+                    "can't access InputFlinger from pid=%d, uid=%d", pid, uid);
+            return PERMISSION_DENIED;
+        }
+        break;
+    }
+
+    return BnInputFlinger::onTransact(code, data, reply, flags);
+}
+
+status_t InputFlinger::dump(int fd, const Vector<String16>& args) {
+    String8 result;
+    const IPCThreadState* ipc = IPCThreadState::self();
+    const int pid = ipc->getCallingPid();
+    const int uid = ipc->getCallingUid();
+    if ((uid != AID_SHELL)
+            && !PermissionCache::checkPermission(sDumpPermission, pid, uid)) {
+        result.appendFormat("Permission Denial: "
+                "can't dump SurfaceFlinger from pid=%d, uid=%d\n", pid, uid);
+    } else {
+        dumpInternal(result);
+    }
+    write(fd, result.string(), result.size());
+    return OK;
+}
+
+void InputFlinger::dumpInternal(String8& result) {
+    result.append("INPUT FLINGER (dumpsys inputflinger)\n");
+    result.append("... nothing here yet...\n");
+}
+
+status_t InputFlinger::doSomething() {
+    ALOGI("Did something...");
+    return OK;
+}
+
+}; // namespace android
diff --git a/services/inputflinger/InputFlinger.h b/services/inputflinger/InputFlinger.h
new file mode 100644
index 0000000..731ab17
--- /dev/null
+++ b/services/inputflinger/InputFlinger.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_INPUT_FLINGER_H
+#define ANDROID_INPUT_FLINGER_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <cutils/compiler.h>
+#include <input/IInputFlinger.h>
+#include <utils/String8.h>
+#include <utils/String16.h>
+
+namespace android {
+
+class InputFlinger : public BnInputFlinger {
+public:
+    static char const* getServiceName() ANDROID_API {
+        return "inputflinger";
+    }
+
+    InputFlinger() ANDROID_API;
+
+    // IBinder interface
+    virtual status_t onTransact(uint32_t code,
+            const Parcel& data, Parcel* reply, uint32_t flags);
+    virtual status_t dump(int fd, const Vector<String16>& args);
+
+    // IInputFlinger interface
+    virtual status_t doSomething();
+
+private:
+    virtual ~InputFlinger();
+
+    void dumpInternal(String8& result);
+};
+
+} // namespace android
+
+#endif // ANDROID_INPUT_FLINGER_H
diff --git a/services/inputflinger/InputListener.cpp b/services/inputflinger/InputListener.cpp
new file mode 100644
index 0000000..85bb0ed
--- /dev/null
+++ b/services/inputflinger/InputListener.cpp
@@ -0,0 +1,182 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputListener"
+
+//#define LOG_NDEBUG 0
+
+#include "InputListener.h"
+
+#include <cutils/log.h>
+
+namespace android {
+
+// --- NotifyConfigurationChangedArgs ---
+
+NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(nsecs_t eventTime) :
+        eventTime(eventTime) {
+}
+
+NotifyConfigurationChangedArgs::NotifyConfigurationChangedArgs(
+        const NotifyConfigurationChangedArgs& other) :
+        eventTime(other.eventTime) {
+}
+
+void NotifyConfigurationChangedArgs::notify(const sp<InputListenerInterface>& listener) const {
+    listener->notifyConfigurationChanged(this);
+}
+
+
+// --- NotifyKeyArgs ---
+
+NotifyKeyArgs::NotifyKeyArgs(nsecs_t eventTime, int32_t deviceId, uint32_t source,
+        uint32_t policyFlags,
+        int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode,
+        int32_t metaState, nsecs_t downTime) :
+        eventTime(eventTime), deviceId(deviceId), source(source), policyFlags(policyFlags),
+        action(action), flags(flags), keyCode(keyCode), scanCode(scanCode),
+        metaState(metaState), downTime(downTime) {
+}
+
+NotifyKeyArgs::NotifyKeyArgs(const NotifyKeyArgs& other) :
+        eventTime(other.eventTime), deviceId(other.deviceId), source(other.source),
+        policyFlags(other.policyFlags),
+        action(other.action), flags(other.flags),
+        keyCode(other.keyCode), scanCode(other.scanCode),
+        metaState(other.metaState), downTime(other.downTime) {
+}
+
+void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const {
+    listener->notifyKey(this);
+}
+
+
+// --- NotifyMotionArgs ---
+
+NotifyMotionArgs::NotifyMotionArgs(nsecs_t eventTime, int32_t deviceId, uint32_t source,
+        uint32_t policyFlags,
+        int32_t action, int32_t flags, int32_t metaState, int32_t buttonState,
+        int32_t edgeFlags, int32_t displayId, uint32_t pointerCount,
+        const PointerProperties* pointerProperties, const PointerCoords* pointerCoords,
+        float xPrecision, float yPrecision, nsecs_t downTime) :
+        eventTime(eventTime), deviceId(deviceId), source(source), policyFlags(policyFlags),
+        action(action), flags(flags), metaState(metaState), buttonState(buttonState),
+        edgeFlags(edgeFlags), displayId(displayId), pointerCount(pointerCount),
+        xPrecision(xPrecision), yPrecision(yPrecision), downTime(downTime) {
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        this->pointerProperties[i].copyFrom(pointerProperties[i]);
+        this->pointerCoords[i].copyFrom(pointerCoords[i]);
+    }
+}
+
+NotifyMotionArgs::NotifyMotionArgs(const NotifyMotionArgs& other) :
+        eventTime(other.eventTime), deviceId(other.deviceId), source(other.source),
+        policyFlags(other.policyFlags),
+        action(other.action), flags(other.flags),
+        metaState(other.metaState), buttonState(other.buttonState),
+        edgeFlags(other.edgeFlags), displayId(other.displayId),
+        pointerCount(other.pointerCount),
+        xPrecision(other.xPrecision), yPrecision(other.yPrecision), downTime(other.downTime) {
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        pointerProperties[i].copyFrom(other.pointerProperties[i]);
+        pointerCoords[i].copyFrom(other.pointerCoords[i]);
+    }
+}
+
+void NotifyMotionArgs::notify(const sp<InputListenerInterface>& listener) const {
+    listener->notifyMotion(this);
+}
+
+
+// --- NotifySwitchArgs ---
+
+NotifySwitchArgs::NotifySwitchArgs(nsecs_t eventTime, uint32_t policyFlags,
+        uint32_t switchValues, uint32_t switchMask) :
+        eventTime(eventTime), policyFlags(policyFlags),
+        switchValues(switchValues), switchMask(switchMask) {
+}
+
+NotifySwitchArgs::NotifySwitchArgs(const NotifySwitchArgs& other) :
+        eventTime(other.eventTime), policyFlags(other.policyFlags),
+        switchValues(other.switchValues), switchMask(other.switchMask) {
+}
+
+void NotifySwitchArgs::notify(const sp<InputListenerInterface>& listener) const {
+    listener->notifySwitch(this);
+}
+
+
+// --- NotifyDeviceResetArgs ---
+
+NotifyDeviceResetArgs::NotifyDeviceResetArgs(nsecs_t eventTime, int32_t deviceId) :
+        eventTime(eventTime), deviceId(deviceId) {
+}
+
+NotifyDeviceResetArgs::NotifyDeviceResetArgs(const NotifyDeviceResetArgs& other) :
+        eventTime(other.eventTime), deviceId(other.deviceId) {
+}
+
+void NotifyDeviceResetArgs::notify(const sp<InputListenerInterface>& listener) const {
+    listener->notifyDeviceReset(this);
+}
+
+
+// --- QueuedInputListener ---
+
+QueuedInputListener::QueuedInputListener(const sp<InputListenerInterface>& innerListener) :
+        mInnerListener(innerListener) {
+}
+
+QueuedInputListener::~QueuedInputListener() {
+    size_t count = mArgsQueue.size();
+    for (size_t i = 0; i < count; i++) {
+        delete mArgsQueue[i];
+    }
+}
+
+void QueuedInputListener::notifyConfigurationChanged(
+        const NotifyConfigurationChangedArgs* args) {
+    mArgsQueue.push(new NotifyConfigurationChangedArgs(*args));
+}
+
+void QueuedInputListener::notifyKey(const NotifyKeyArgs* args) {
+    mArgsQueue.push(new NotifyKeyArgs(*args));
+}
+
+void QueuedInputListener::notifyMotion(const NotifyMotionArgs* args) {
+    mArgsQueue.push(new NotifyMotionArgs(*args));
+}
+
+void QueuedInputListener::notifySwitch(const NotifySwitchArgs* args) {
+    mArgsQueue.push(new NotifySwitchArgs(*args));
+}
+
+void QueuedInputListener::notifyDeviceReset(const NotifyDeviceResetArgs* args) {
+    mArgsQueue.push(new NotifyDeviceResetArgs(*args));
+}
+
+void QueuedInputListener::flush() {
+    size_t count = mArgsQueue.size();
+    for (size_t i = 0; i < count; i++) {
+        NotifyArgs* args = mArgsQueue[i];
+        args->notify(mInnerListener);
+        delete args;
+    }
+    mArgsQueue.clear();
+}
+
+
+} // namespace android
diff --git a/services/inputflinger/InputListener.h b/services/inputflinger/InputListener.h
new file mode 100644
index 0000000..78ae10f
--- /dev/null
+++ b/services/inputflinger/InputListener.h
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_LISTENER_H
+#define _UI_INPUT_LISTENER_H
+
+#include <input/Input.h>
+#include <utils/RefBase.h>
+#include <utils/Vector.h>
+
+namespace android {
+
+class InputListenerInterface;
+
+
+/* Superclass of all input event argument objects */
+struct NotifyArgs {
+    virtual ~NotifyArgs() { }
+
+    virtual void notify(const sp<InputListenerInterface>& listener) const = 0;
+};
+
+
+/* Describes a configuration change event. */
+struct NotifyConfigurationChangedArgs : public NotifyArgs {
+    nsecs_t eventTime;
+
+    inline NotifyConfigurationChangedArgs() { }
+
+    NotifyConfigurationChangedArgs(nsecs_t eventTime);
+
+    NotifyConfigurationChangedArgs(const NotifyConfigurationChangedArgs& other);
+
+    virtual ~NotifyConfigurationChangedArgs() { }
+
+    virtual void notify(const sp<InputListenerInterface>& listener) const;
+};
+
+
+/* Describes a key event. */
+struct NotifyKeyArgs : public NotifyArgs {
+    nsecs_t eventTime;
+    int32_t deviceId;
+    uint32_t source;
+    uint32_t policyFlags;
+    int32_t action;
+    int32_t flags;
+    int32_t keyCode;
+    int32_t scanCode;
+    int32_t metaState;
+    nsecs_t downTime;
+
+    inline NotifyKeyArgs() { }
+
+    NotifyKeyArgs(nsecs_t eventTime, int32_t deviceId, uint32_t source, uint32_t policyFlags,
+            int32_t action, int32_t flags, int32_t keyCode, int32_t scanCode,
+            int32_t metaState, nsecs_t downTime);
+
+    NotifyKeyArgs(const NotifyKeyArgs& other);
+
+    virtual ~NotifyKeyArgs() { }
+
+    virtual void notify(const sp<InputListenerInterface>& listener) const;
+};
+
+
+/* Describes a motion event. */
+struct NotifyMotionArgs : public NotifyArgs {
+    nsecs_t eventTime;
+    int32_t deviceId;
+    uint32_t source;
+    uint32_t policyFlags;
+    int32_t action;
+    int32_t flags;
+    int32_t metaState;
+    int32_t buttonState;
+    int32_t edgeFlags;
+    int32_t displayId;
+    uint32_t pointerCount;
+    PointerProperties pointerProperties[MAX_POINTERS];
+    PointerCoords pointerCoords[MAX_POINTERS];
+    float xPrecision;
+    float yPrecision;
+    nsecs_t downTime;
+
+    inline NotifyMotionArgs() { }
+
+    NotifyMotionArgs(nsecs_t eventTime, int32_t deviceId, uint32_t source, uint32_t policyFlags,
+            int32_t action, int32_t flags, int32_t metaState, int32_t buttonState,
+            int32_t edgeFlags, int32_t displayId, uint32_t pointerCount,
+            const PointerProperties* pointerProperties, const PointerCoords* pointerCoords,
+            float xPrecision, float yPrecision, nsecs_t downTime);
+
+    NotifyMotionArgs(const NotifyMotionArgs& other);
+
+    virtual ~NotifyMotionArgs() { }
+
+    virtual void notify(const sp<InputListenerInterface>& listener) const;
+};
+
+
+/* Describes a switch event. */
+struct NotifySwitchArgs : public NotifyArgs {
+    nsecs_t eventTime;
+    uint32_t policyFlags;
+    uint32_t switchValues;
+    uint32_t switchMask;
+
+    inline NotifySwitchArgs() { }
+
+    NotifySwitchArgs(nsecs_t eventTime, uint32_t policyFlags,
+            uint32_t switchValues, uint32_t switchMask);
+
+    NotifySwitchArgs(const NotifySwitchArgs& other);
+
+    virtual ~NotifySwitchArgs() { }
+
+    virtual void notify(const sp<InputListenerInterface>& listener) const;
+};
+
+
+/* Describes a device reset event, such as when a device is added,
+ * reconfigured, or removed. */
+struct NotifyDeviceResetArgs : public NotifyArgs {
+    nsecs_t eventTime;
+    int32_t deviceId;
+
+    inline NotifyDeviceResetArgs() { }
+
+    NotifyDeviceResetArgs(nsecs_t eventTime, int32_t deviceId);
+
+    NotifyDeviceResetArgs(const NotifyDeviceResetArgs& other);
+
+    virtual ~NotifyDeviceResetArgs() { }
+
+    virtual void notify(const sp<InputListenerInterface>& listener) const;
+};
+
+
+/*
+ * The interface used by the InputReader to notify the InputListener about input events.
+ */
+class InputListenerInterface : public virtual RefBase {
+protected:
+    InputListenerInterface() { }
+    virtual ~InputListenerInterface() { }
+
+public:
+    virtual void notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args) = 0;
+    virtual void notifyKey(const NotifyKeyArgs* args) = 0;
+    virtual void notifyMotion(const NotifyMotionArgs* args) = 0;
+    virtual void notifySwitch(const NotifySwitchArgs* args) = 0;
+    virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args) = 0;
+};
+
+
+/*
+ * An implementation of the listener interface that queues up and defers dispatch
+ * of decoded events until flushed.
+ */
+class QueuedInputListener : public InputListenerInterface {
+protected:
+    virtual ~QueuedInputListener();
+
+public:
+    QueuedInputListener(const sp<InputListenerInterface>& innerListener);
+
+    virtual void notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args);
+    virtual void notifyKey(const NotifyKeyArgs* args);
+    virtual void notifyMotion(const NotifyMotionArgs* args);
+    virtual void notifySwitch(const NotifySwitchArgs* args);
+    virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args);
+
+    void flush();
+
+private:
+    sp<InputListenerInterface> mInnerListener;
+    Vector<NotifyArgs*> mArgsQueue;
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_LISTENER_H
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
new file mode 100644
index 0000000..6a6547b
--- /dev/null
+++ b/services/inputflinger/InputManager.cpp
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputManager"
+
+//#define LOG_NDEBUG 0
+
+#include "InputManager.h"
+
+#include <cutils/log.h>
+
+namespace android {
+
+InputManager::InputManager(
+        const sp<EventHubInterface>& eventHub,
+        const sp<InputReaderPolicyInterface>& readerPolicy,
+        const sp<InputDispatcherPolicyInterface>& dispatcherPolicy) {
+    mDispatcher = new InputDispatcher(dispatcherPolicy);
+    mReader = new InputReader(eventHub, readerPolicy, mDispatcher);
+    initialize();
+}
+
+InputManager::InputManager(
+        const sp<InputReaderInterface>& reader,
+        const sp<InputDispatcherInterface>& dispatcher) :
+        mReader(reader),
+        mDispatcher(dispatcher) {
+    initialize();
+}
+
+InputManager::~InputManager() {
+    stop();
+}
+
+void InputManager::initialize() {
+    mReaderThread = new InputReaderThread(mReader);
+    mDispatcherThread = new InputDispatcherThread(mDispatcher);
+}
+
+status_t InputManager::start() {
+    status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY);
+    if (result) {
+        ALOGE("Could not start InputDispatcher thread due to error %d.", result);
+        return result;
+    }
+
+    result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY);
+    if (result) {
+        ALOGE("Could not start InputReader thread due to error %d.", result);
+
+        mDispatcherThread->requestExit();
+        return result;
+    }
+
+    return OK;
+}
+
+status_t InputManager::stop() {
+    status_t result = mReaderThread->requestExitAndWait();
+    if (result) {
+        ALOGW("Could not stop InputReader thread due to error %d.", result);
+    }
+
+    result = mDispatcherThread->requestExitAndWait();
+    if (result) {
+        ALOGW("Could not stop InputDispatcher thread due to error %d.", result);
+    }
+
+    return OK;
+}
+
+sp<InputReaderInterface> InputManager::getReader() {
+    return mReader;
+}
+
+sp<InputDispatcherInterface> InputManager::getDispatcher() {
+    return mDispatcher;
+}
+
+} // namespace android
diff --git a/services/inputflinger/InputManager.h b/services/inputflinger/InputManager.h
new file mode 100644
index 0000000..a213b2d
--- /dev/null
+++ b/services/inputflinger/InputManager.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_MANAGER_H
+#define _UI_INPUT_MANAGER_H
+
+/**
+ * Native input manager.
+ */
+
+#include "EventHub.h"
+#include "InputReader.h"
+#include "InputDispatcher.h"
+
+#include <input/Input.h>
+#include <input/InputTransport.h>
+#include <utils/Errors.h>
+#include <utils/Vector.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+
+namespace android {
+
+/*
+ * The input manager is the core of the system event processing.
+ *
+ * The input manager uses two threads.
+ *
+ * 1. The InputReaderThread (called "InputReader") reads and preprocesses raw input events,
+ *    applies policy, and posts messages to a queue managed by the DispatcherThread.
+ * 2. The InputDispatcherThread (called "InputDispatcher") thread waits for new events on the
+ *    queue and asynchronously dispatches them to applications.
+ *
+ * By design, the InputReaderThread class and InputDispatcherThread class do not share any
+ * internal state.  Moreover, all communication is done one way from the InputReaderThread
+ * into the InputDispatcherThread and never the reverse.  Both classes may interact with the
+ * InputDispatchPolicy, however.
+ *
+ * The InputManager class never makes any calls into Java itself.  Instead, the
+ * InputDispatchPolicy is responsible for performing all external interactions with the
+ * system, including calling DVM services.
+ */
+class InputManagerInterface : public virtual RefBase {
+protected:
+    InputManagerInterface() { }
+    virtual ~InputManagerInterface() { }
+
+public:
+    /* Starts the input manager threads. */
+    virtual status_t start() = 0;
+
+    /* Stops the input manager threads and waits for them to exit. */
+    virtual status_t stop() = 0;
+
+    /* Gets the input reader. */
+    virtual sp<InputReaderInterface> getReader() = 0;
+
+    /* Gets the input dispatcher. */
+    virtual sp<InputDispatcherInterface> getDispatcher() = 0;
+};
+
+class InputManager : public InputManagerInterface {
+protected:
+    virtual ~InputManager();
+
+public:
+    InputManager(
+            const sp<EventHubInterface>& eventHub,
+            const sp<InputReaderPolicyInterface>& readerPolicy,
+            const sp<InputDispatcherPolicyInterface>& dispatcherPolicy);
+
+    // (used for testing purposes)
+    InputManager(
+            const sp<InputReaderInterface>& reader,
+            const sp<InputDispatcherInterface>& dispatcher);
+
+    virtual status_t start();
+    virtual status_t stop();
+
+    virtual sp<InputReaderInterface> getReader();
+    virtual sp<InputDispatcherInterface> getDispatcher();
+
+private:
+    sp<InputReaderInterface> mReader;
+    sp<InputReaderThread> mReaderThread;
+
+    sp<InputDispatcherInterface> mDispatcher;
+    sp<InputDispatcherThread> mDispatcherThread;
+
+    void initialize();
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_MANAGER_H
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
new file mode 100644
index 0000000..8295c4c
--- /dev/null
+++ b/services/inputflinger/InputReader.cpp
@@ -0,0 +1,6584 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputReader"
+
+//#define LOG_NDEBUG 0
+
+// Log debug messages for each raw event received from the EventHub.
+#define DEBUG_RAW_EVENTS 0
+
+// Log debug messages about touch screen filtering hacks.
+#define DEBUG_HACKS 0
+
+// Log debug messages about virtual key processing.
+#define DEBUG_VIRTUAL_KEYS 0
+
+// Log debug messages about pointers.
+#define DEBUG_POINTERS 0
+
+// Log debug messages about pointer assignment calculations.
+#define DEBUG_POINTER_ASSIGNMENT 0
+
+// Log debug messages about gesture detection.
+#define DEBUG_GESTURES 0
+
+// Log debug messages about the vibrator.
+#define DEBUG_VIBRATOR 0
+
+#include "InputReader.h"
+
+#include <cutils/log.h>
+#include <input/Keyboard.h>
+#include <input/VirtualKeyMap.h>
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+#include <math.h>
+
+#define INDENT "  "
+#define INDENT2 "    "
+#define INDENT3 "      "
+#define INDENT4 "        "
+#define INDENT5 "          "
+
+namespace android {
+
+// --- Constants ---
+
+// Maximum number of slots supported when using the slot-based Multitouch Protocol B.
+static const size_t MAX_SLOTS = 32;
+
+// --- Static Functions ---
+
+template<typename T>
+inline static T abs(const T& value) {
+    return value < 0 ? - value : value;
+}
+
+template<typename T>
+inline static T min(const T& a, const T& b) {
+    return a < b ? a : b;
+}
+
+template<typename T>
+inline static void swap(T& a, T& b) {
+    T temp = a;
+    a = b;
+    b = temp;
+}
+
+inline static float avg(float x, float y) {
+    return (x + y) / 2;
+}
+
+inline static float distance(float x1, float y1, float x2, float y2) {
+    return hypotf(x1 - x2, y1 - y2);
+}
+
+inline static int32_t signExtendNybble(int32_t value) {
+    return value >= 8 ? value - 16 : value;
+}
+
+static inline const char* toString(bool value) {
+    return value ? "true" : "false";
+}
+
+static int32_t rotateValueUsingRotationMap(int32_t value, int32_t orientation,
+        const int32_t map[][4], size_t mapSize) {
+    if (orientation != DISPLAY_ORIENTATION_0) {
+        for (size_t i = 0; i < mapSize; i++) {
+            if (value == map[i][0]) {
+                return map[i][orientation];
+            }
+        }
+    }
+    return value;
+}
+
+static const int32_t keyCodeRotationMap[][4] = {
+        // key codes enumerated counter-clockwise with the original (unrotated) key first
+        // no rotation,        90 degree rotation,  180 degree rotation, 270 degree rotation
+        { AKEYCODE_DPAD_DOWN,   AKEYCODE_DPAD_RIGHT,  AKEYCODE_DPAD_UP,     AKEYCODE_DPAD_LEFT },
+        { AKEYCODE_DPAD_RIGHT,  AKEYCODE_DPAD_UP,     AKEYCODE_DPAD_LEFT,   AKEYCODE_DPAD_DOWN },
+        { AKEYCODE_DPAD_UP,     AKEYCODE_DPAD_LEFT,   AKEYCODE_DPAD_DOWN,   AKEYCODE_DPAD_RIGHT },
+        { AKEYCODE_DPAD_LEFT,   AKEYCODE_DPAD_DOWN,   AKEYCODE_DPAD_RIGHT,  AKEYCODE_DPAD_UP },
+};
+static const size_t keyCodeRotationMapSize =
+        sizeof(keyCodeRotationMap) / sizeof(keyCodeRotationMap[0]);
+
+static int32_t rotateKeyCode(int32_t keyCode, int32_t orientation) {
+    return rotateValueUsingRotationMap(keyCode, orientation,
+            keyCodeRotationMap, keyCodeRotationMapSize);
+}
+
+static void rotateDelta(int32_t orientation, float* deltaX, float* deltaY) {
+    float temp;
+    switch (orientation) {
+    case DISPLAY_ORIENTATION_90:
+        temp = *deltaX;
+        *deltaX = *deltaY;
+        *deltaY = -temp;
+        break;
+
+    case DISPLAY_ORIENTATION_180:
+        *deltaX = -*deltaX;
+        *deltaY = -*deltaY;
+        break;
+
+    case DISPLAY_ORIENTATION_270:
+        temp = *deltaX;
+        *deltaX = -*deltaY;
+        *deltaY = temp;
+        break;
+    }
+}
+
+static inline bool sourcesMatchMask(uint32_t sources, uint32_t sourceMask) {
+    return (sources & sourceMask & ~ AINPUT_SOURCE_CLASS_MASK) != 0;
+}
+
+// Returns true if the pointer should be reported as being down given the specified
+// button states.  This determines whether the event is reported as a touch event.
+static bool isPointerDown(int32_t buttonState) {
+    return buttonState &
+            (AMOTION_EVENT_BUTTON_PRIMARY | AMOTION_EVENT_BUTTON_SECONDARY
+                    | AMOTION_EVENT_BUTTON_TERTIARY);
+}
+
+static float calculateCommonVector(float a, float b) {
+    if (a > 0 && b > 0) {
+        return a < b ? a : b;
+    } else if (a < 0 && b < 0) {
+        return a > b ? a : b;
+    } else {
+        return 0;
+    }
+}
+
+static void synthesizeButtonKey(InputReaderContext* context, int32_t action,
+        nsecs_t when, int32_t deviceId, uint32_t source,
+        uint32_t policyFlags, int32_t lastButtonState, int32_t currentButtonState,
+        int32_t buttonState, int32_t keyCode) {
+    if (
+            (action == AKEY_EVENT_ACTION_DOWN
+                    && !(lastButtonState & buttonState)
+                    && (currentButtonState & buttonState))
+            || (action == AKEY_EVENT_ACTION_UP
+                    && (lastButtonState & buttonState)
+                    && !(currentButtonState & buttonState))) {
+        NotifyKeyArgs args(when, deviceId, source, policyFlags,
+                action, 0, keyCode, 0, context->getGlobalMetaState(), when);
+        context->getListener()->notifyKey(&args);
+    }
+}
+
+static void synthesizeButtonKeys(InputReaderContext* context, int32_t action,
+        nsecs_t when, int32_t deviceId, uint32_t source,
+        uint32_t policyFlags, int32_t lastButtonState, int32_t currentButtonState) {
+    synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
+            lastButtonState, currentButtonState,
+            AMOTION_EVENT_BUTTON_BACK, AKEYCODE_BACK);
+    synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
+            lastButtonState, currentButtonState,
+            AMOTION_EVENT_BUTTON_FORWARD, AKEYCODE_FORWARD);
+}
+
+
+// --- InputReaderConfiguration ---
+
+bool InputReaderConfiguration::getDisplayInfo(bool external, DisplayViewport* outViewport) const {
+    const DisplayViewport& viewport = external ? mExternalDisplay : mInternalDisplay;
+    if (viewport.displayId >= 0) {
+        *outViewport = viewport;
+        return true;
+    }
+    return false;
+}
+
+void InputReaderConfiguration::setDisplayInfo(bool external, const DisplayViewport& viewport) {
+    DisplayViewport& v = external ? mExternalDisplay : mInternalDisplay;
+    v = viewport;
+}
+
+
+// -- TouchAffineTransformation --
+void TouchAffineTransformation::applyTo(float& x, float& y) const {
+    float newX, newY;
+    newX = x * x_scale + y * x_ymix + x_offset;
+    newY = x * y_xmix + y * y_scale + y_offset;
+
+    x = newX;
+    y = newY;
+}
+
+
+// --- InputReader ---
+
+InputReader::InputReader(const sp<EventHubInterface>& eventHub,
+        const sp<InputReaderPolicyInterface>& policy,
+        const sp<InputListenerInterface>& listener) :
+        mContext(this), mEventHub(eventHub), mPolicy(policy),
+        mGlobalMetaState(0), mGeneration(1),
+        mDisableVirtualKeysTimeout(LLONG_MIN), mNextTimeout(LLONG_MAX),
+        mConfigurationChangesToRefresh(0) {
+    mQueuedListener = new QueuedInputListener(listener);
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        refreshConfigurationLocked(0);
+        updateGlobalMetaStateLocked();
+    } // release lock
+}
+
+InputReader::~InputReader() {
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        delete mDevices.valueAt(i);
+    }
+}
+
+void InputReader::loopOnce() {
+    int32_t oldGeneration;
+    int32_t timeoutMillis;
+    bool inputDevicesChanged = false;
+    Vector<InputDeviceInfo> inputDevices;
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        oldGeneration = mGeneration;
+        timeoutMillis = -1;
+
+        uint32_t changes = mConfigurationChangesToRefresh;
+        if (changes) {
+            mConfigurationChangesToRefresh = 0;
+            timeoutMillis = 0;
+            refreshConfigurationLocked(changes);
+        } else if (mNextTimeout != LLONG_MAX) {
+            nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+            timeoutMillis = toMillisecondTimeoutDelay(now, mNextTimeout);
+        }
+    } // release lock
+
+    size_t count = mEventHub->getEvents(timeoutMillis, mEventBuffer, EVENT_BUFFER_SIZE);
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+        mReaderIsAliveCondition.broadcast();
+
+        if (count) {
+            processEventsLocked(mEventBuffer, count);
+        }
+
+        if (mNextTimeout != LLONG_MAX) {
+            nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+            if (now >= mNextTimeout) {
+#if DEBUG_RAW_EVENTS
+                ALOGD("Timeout expired, latency=%0.3fms", (now - mNextTimeout) * 0.000001f);
+#endif
+                mNextTimeout = LLONG_MAX;
+                timeoutExpiredLocked(now);
+            }
+        }
+
+        if (oldGeneration != mGeneration) {
+            inputDevicesChanged = true;
+            getInputDevicesLocked(inputDevices);
+        }
+    } // release lock
+
+    // Send out a message that the describes the changed input devices.
+    if (inputDevicesChanged) {
+        mPolicy->notifyInputDevicesChanged(inputDevices);
+    }
+
+    // Flush queued events out to the listener.
+    // This must happen outside of the lock because the listener could potentially call
+    // back into the InputReader's methods, such as getScanCodeState, or become blocked
+    // on another thread similarly waiting to acquire the InputReader lock thereby
+    // resulting in a deadlock.  This situation is actually quite plausible because the
+    // listener is actually the input dispatcher, which calls into the window manager,
+    // which occasionally calls into the input reader.
+    mQueuedListener->flush();
+}
+
+void InputReader::processEventsLocked(const RawEvent* rawEvents, size_t count) {
+    for (const RawEvent* rawEvent = rawEvents; count;) {
+        int32_t type = rawEvent->type;
+        size_t batchSize = 1;
+        if (type < EventHubInterface::FIRST_SYNTHETIC_EVENT) {
+            int32_t deviceId = rawEvent->deviceId;
+            while (batchSize < count) {
+                if (rawEvent[batchSize].type >= EventHubInterface::FIRST_SYNTHETIC_EVENT
+                        || rawEvent[batchSize].deviceId != deviceId) {
+                    break;
+                }
+                batchSize += 1;
+            }
+#if DEBUG_RAW_EVENTS
+            ALOGD("BatchSize: %d Count: %d", batchSize, count);
+#endif
+            processEventsForDeviceLocked(deviceId, rawEvent, batchSize);
+        } else {
+            switch (rawEvent->type) {
+            case EventHubInterface::DEVICE_ADDED:
+                addDeviceLocked(rawEvent->when, rawEvent->deviceId);
+                break;
+            case EventHubInterface::DEVICE_REMOVED:
+                removeDeviceLocked(rawEvent->when, rawEvent->deviceId);
+                break;
+            case EventHubInterface::FINISHED_DEVICE_SCAN:
+                handleConfigurationChangedLocked(rawEvent->when);
+                break;
+            default:
+                ALOG_ASSERT(false); // can't happen
+                break;
+            }
+        }
+        count -= batchSize;
+        rawEvent += batchSize;
+    }
+}
+
+void InputReader::addDeviceLocked(nsecs_t when, int32_t deviceId) {
+    ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+    if (deviceIndex >= 0) {
+        ALOGW("Ignoring spurious device added event for deviceId %d.", deviceId);
+        return;
+    }
+
+    InputDeviceIdentifier identifier = mEventHub->getDeviceIdentifier(deviceId);
+    uint32_t classes = mEventHub->getDeviceClasses(deviceId);
+    int32_t controllerNumber = mEventHub->getDeviceControllerNumber(deviceId);
+
+    InputDevice* device = createDeviceLocked(deviceId, controllerNumber, identifier, classes);
+    device->configure(when, &mConfig, 0);
+    device->reset(when);
+
+    if (device->isIgnored()) {
+        ALOGI("Device added: id=%d, name='%s' (ignored non-input device)", deviceId,
+                identifier.name.string());
+    } else {
+        ALOGI("Device added: id=%d, name='%s', sources=0x%08x", deviceId,
+                identifier.name.string(), device->getSources());
+    }
+
+    mDevices.add(deviceId, device);
+    bumpGenerationLocked();
+}
+
+void InputReader::removeDeviceLocked(nsecs_t when, int32_t deviceId) {
+    InputDevice* device = NULL;
+    ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+    if (deviceIndex < 0) {
+        ALOGW("Ignoring spurious device removed event for deviceId %d.", deviceId);
+        return;
+    }
+
+    device = mDevices.valueAt(deviceIndex);
+    mDevices.removeItemsAt(deviceIndex, 1);
+    bumpGenerationLocked();
+
+    if (device->isIgnored()) {
+        ALOGI("Device removed: id=%d, name='%s' (ignored non-input device)",
+                device->getId(), device->getName().string());
+    } else {
+        ALOGI("Device removed: id=%d, name='%s', sources=0x%08x",
+                device->getId(), device->getName().string(), device->getSources());
+    }
+
+    device->reset(when);
+    delete device;
+}
+
+InputDevice* InputReader::createDeviceLocked(int32_t deviceId, int32_t controllerNumber,
+        const InputDeviceIdentifier& identifier, uint32_t classes) {
+    InputDevice* device = new InputDevice(&mContext, deviceId, bumpGenerationLocked(),
+            controllerNumber, identifier, classes);
+
+    // External devices.
+    if (classes & INPUT_DEVICE_CLASS_EXTERNAL) {
+        device->setExternal(true);
+    }
+
+    // Switch-like devices.
+    if (classes & INPUT_DEVICE_CLASS_SWITCH) {
+        device->addMapper(new SwitchInputMapper(device));
+    }
+
+    // Vibrator-like devices.
+    if (classes & INPUT_DEVICE_CLASS_VIBRATOR) {
+        device->addMapper(new VibratorInputMapper(device));
+    }
+
+    // Keyboard-like devices.
+    uint32_t keyboardSource = 0;
+    int32_t keyboardType = AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC;
+    if (classes & INPUT_DEVICE_CLASS_KEYBOARD) {
+        keyboardSource |= AINPUT_SOURCE_KEYBOARD;
+    }
+    if (classes & INPUT_DEVICE_CLASS_ALPHAKEY) {
+        keyboardType = AINPUT_KEYBOARD_TYPE_ALPHABETIC;
+    }
+    if (classes & INPUT_DEVICE_CLASS_DPAD) {
+        keyboardSource |= AINPUT_SOURCE_DPAD;
+    }
+    if (classes & INPUT_DEVICE_CLASS_GAMEPAD) {
+        keyboardSource |= AINPUT_SOURCE_GAMEPAD;
+    }
+
+    if (keyboardSource != 0) {
+        device->addMapper(new KeyboardInputMapper(device, keyboardSource, keyboardType));
+    }
+
+    // Cursor-like devices.
+    if (classes & INPUT_DEVICE_CLASS_CURSOR) {
+        device->addMapper(new CursorInputMapper(device));
+    }
+
+    // Touchscreens and touchpad devices.
+    if (classes & INPUT_DEVICE_CLASS_TOUCH_MT) {
+        device->addMapper(new MultiTouchInputMapper(device));
+    } else if (classes & INPUT_DEVICE_CLASS_TOUCH) {
+        device->addMapper(new SingleTouchInputMapper(device));
+    }
+
+    // Joystick-like devices.
+    if (classes & INPUT_DEVICE_CLASS_JOYSTICK) {
+        device->addMapper(new JoystickInputMapper(device));
+    }
+
+    return device;
+}
+
+void InputReader::processEventsForDeviceLocked(int32_t deviceId,
+        const RawEvent* rawEvents, size_t count) {
+    ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+    if (deviceIndex < 0) {
+        ALOGW("Discarding event for unknown deviceId %d.", deviceId);
+        return;
+    }
+
+    InputDevice* device = mDevices.valueAt(deviceIndex);
+    if (device->isIgnored()) {
+        //ALOGD("Discarding event for ignored deviceId %d.", deviceId);
+        return;
+    }
+
+    device->process(rawEvents, count);
+}
+
+void InputReader::timeoutExpiredLocked(nsecs_t when) {
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        InputDevice* device = mDevices.valueAt(i);
+        if (!device->isIgnored()) {
+            device->timeoutExpired(when);
+        }
+    }
+}
+
+void InputReader::handleConfigurationChangedLocked(nsecs_t when) {
+    // Reset global meta state because it depends on the list of all configured devices.
+    updateGlobalMetaStateLocked();
+
+    // Enqueue configuration changed.
+    NotifyConfigurationChangedArgs args(when);
+    mQueuedListener->notifyConfigurationChanged(&args);
+}
+
+void InputReader::refreshConfigurationLocked(uint32_t changes) {
+    mPolicy->getReaderConfiguration(&mConfig);
+    mEventHub->setExcludedDevices(mConfig.excludedDeviceNames);
+
+    if (changes) {
+        ALOGI("Reconfiguring input devices.  changes=0x%08x", changes);
+        nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+
+        if (changes & InputReaderConfiguration::CHANGE_MUST_REOPEN) {
+            mEventHub->requestReopenDevices();
+        } else {
+            for (size_t i = 0; i < mDevices.size(); i++) {
+                InputDevice* device = mDevices.valueAt(i);
+                device->configure(now, &mConfig, changes);
+            }
+        }
+    }
+}
+
+void InputReader::updateGlobalMetaStateLocked() {
+    mGlobalMetaState = 0;
+
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        InputDevice* device = mDevices.valueAt(i);
+        mGlobalMetaState |= device->getMetaState();
+    }
+}
+
+int32_t InputReader::getGlobalMetaStateLocked() {
+    return mGlobalMetaState;
+}
+
+void InputReader::disableVirtualKeysUntilLocked(nsecs_t time) {
+    mDisableVirtualKeysTimeout = time;
+}
+
+bool InputReader::shouldDropVirtualKeyLocked(nsecs_t now,
+        InputDevice* device, int32_t keyCode, int32_t scanCode) {
+    if (now < mDisableVirtualKeysTimeout) {
+        ALOGI("Dropping virtual key from device %s because virtual keys are "
+                "temporarily disabled for the next %0.3fms.  keyCode=%d, scanCode=%d",
+                device->getName().string(),
+                (mDisableVirtualKeysTimeout - now) * 0.000001,
+                keyCode, scanCode);
+        return true;
+    } else {
+        return false;
+    }
+}
+
+void InputReader::fadePointerLocked() {
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        InputDevice* device = mDevices.valueAt(i);
+        device->fadePointer();
+    }
+}
+
+void InputReader::requestTimeoutAtTimeLocked(nsecs_t when) {
+    if (when < mNextTimeout) {
+        mNextTimeout = when;
+        mEventHub->wake();
+    }
+}
+
+int32_t InputReader::bumpGenerationLocked() {
+    return ++mGeneration;
+}
+
+void InputReader::getInputDevices(Vector<InputDeviceInfo>& outInputDevices) {
+    AutoMutex _l(mLock);
+    getInputDevicesLocked(outInputDevices);
+}
+
+void InputReader::getInputDevicesLocked(Vector<InputDeviceInfo>& outInputDevices) {
+    outInputDevices.clear();
+
+    size_t numDevices = mDevices.size();
+    for (size_t i = 0; i < numDevices; i++) {
+        InputDevice* device = mDevices.valueAt(i);
+        if (!device->isIgnored()) {
+            outInputDevices.push();
+            device->getDeviceInfo(&outInputDevices.editTop());
+        }
+    }
+}
+
+int32_t InputReader::getKeyCodeState(int32_t deviceId, uint32_t sourceMask,
+        int32_t keyCode) {
+    AutoMutex _l(mLock);
+
+    return getStateLocked(deviceId, sourceMask, keyCode, &InputDevice::getKeyCodeState);
+}
+
+int32_t InputReader::getScanCodeState(int32_t deviceId, uint32_t sourceMask,
+        int32_t scanCode) {
+    AutoMutex _l(mLock);
+
+    return getStateLocked(deviceId, sourceMask, scanCode, &InputDevice::getScanCodeState);
+}
+
+int32_t InputReader::getSwitchState(int32_t deviceId, uint32_t sourceMask, int32_t switchCode) {
+    AutoMutex _l(mLock);
+
+    return getStateLocked(deviceId, sourceMask, switchCode, &InputDevice::getSwitchState);
+}
+
+int32_t InputReader::getStateLocked(int32_t deviceId, uint32_t sourceMask, int32_t code,
+        GetStateFunc getStateFunc) {
+    int32_t result = AKEY_STATE_UNKNOWN;
+    if (deviceId >= 0) {
+        ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+        if (deviceIndex >= 0) {
+            InputDevice* device = mDevices.valueAt(deviceIndex);
+            if (! device->isIgnored() && sourcesMatchMask(device->getSources(), sourceMask)) {
+                result = (device->*getStateFunc)(sourceMask, code);
+            }
+        }
+    } else {
+        size_t numDevices = mDevices.size();
+        for (size_t i = 0; i < numDevices; i++) {
+            InputDevice* device = mDevices.valueAt(i);
+            if (! device->isIgnored() && sourcesMatchMask(device->getSources(), sourceMask)) {
+                // If any device reports AKEY_STATE_DOWN or AKEY_STATE_VIRTUAL, return that
+                // value.  Otherwise, return AKEY_STATE_UP as long as one device reports it.
+                int32_t currentResult = (device->*getStateFunc)(sourceMask, code);
+                if (currentResult >= AKEY_STATE_DOWN) {
+                    return currentResult;
+                } else if (currentResult == AKEY_STATE_UP) {
+                    result = currentResult;
+                }
+            }
+        }
+    }
+    return result;
+}
+
+bool InputReader::hasKeys(int32_t deviceId, uint32_t sourceMask,
+        size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) {
+    AutoMutex _l(mLock);
+
+    memset(outFlags, 0, numCodes);
+    return markSupportedKeyCodesLocked(deviceId, sourceMask, numCodes, keyCodes, outFlags);
+}
+
+bool InputReader::markSupportedKeyCodesLocked(int32_t deviceId, uint32_t sourceMask,
+        size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) {
+    bool result = false;
+    if (deviceId >= 0) {
+        ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+        if (deviceIndex >= 0) {
+            InputDevice* device = mDevices.valueAt(deviceIndex);
+            if (! device->isIgnored() && sourcesMatchMask(device->getSources(), sourceMask)) {
+                result = device->markSupportedKeyCodes(sourceMask,
+                        numCodes, keyCodes, outFlags);
+            }
+        }
+    } else {
+        size_t numDevices = mDevices.size();
+        for (size_t i = 0; i < numDevices; i++) {
+            InputDevice* device = mDevices.valueAt(i);
+            if (! device->isIgnored() && sourcesMatchMask(device->getSources(), sourceMask)) {
+                result |= device->markSupportedKeyCodes(sourceMask,
+                        numCodes, keyCodes, outFlags);
+            }
+        }
+    }
+    return result;
+}
+
+void InputReader::requestRefreshConfiguration(uint32_t changes) {
+    AutoMutex _l(mLock);
+
+    if (changes) {
+        bool needWake = !mConfigurationChangesToRefresh;
+        mConfigurationChangesToRefresh |= changes;
+
+        if (needWake) {
+            mEventHub->wake();
+        }
+    }
+}
+
+void InputReader::vibrate(int32_t deviceId, const nsecs_t* pattern, size_t patternSize,
+        ssize_t repeat, int32_t token) {
+    AutoMutex _l(mLock);
+
+    ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+    if (deviceIndex >= 0) {
+        InputDevice* device = mDevices.valueAt(deviceIndex);
+        device->vibrate(pattern, patternSize, repeat, token);
+    }
+}
+
+void InputReader::cancelVibrate(int32_t deviceId, int32_t token) {
+    AutoMutex _l(mLock);
+
+    ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
+    if (deviceIndex >= 0) {
+        InputDevice* device = mDevices.valueAt(deviceIndex);
+        device->cancelVibrate(token);
+    }
+}
+
+void InputReader::dump(String8& dump) {
+    AutoMutex _l(mLock);
+
+    mEventHub->dump(dump);
+    dump.append("\n");
+
+    dump.append("Input Reader State:\n");
+
+    for (size_t i = 0; i < mDevices.size(); i++) {
+        mDevices.valueAt(i)->dump(dump);
+    }
+
+    dump.append(INDENT "Configuration:\n");
+    dump.append(INDENT2 "ExcludedDeviceNames: [");
+    for (size_t i = 0; i < mConfig.excludedDeviceNames.size(); i++) {
+        if (i != 0) {
+            dump.append(", ");
+        }
+        dump.append(mConfig.excludedDeviceNames.itemAt(i).string());
+    }
+    dump.append("]\n");
+    dump.appendFormat(INDENT2 "VirtualKeyQuietTime: %0.1fms\n",
+            mConfig.virtualKeyQuietTime * 0.000001f);
+
+    dump.appendFormat(INDENT2 "PointerVelocityControlParameters: "
+            "scale=%0.3f, lowThreshold=%0.3f, highThreshold=%0.3f, acceleration=%0.3f\n",
+            mConfig.pointerVelocityControlParameters.scale,
+            mConfig.pointerVelocityControlParameters.lowThreshold,
+            mConfig.pointerVelocityControlParameters.highThreshold,
+            mConfig.pointerVelocityControlParameters.acceleration);
+
+    dump.appendFormat(INDENT2 "WheelVelocityControlParameters: "
+            "scale=%0.3f, lowThreshold=%0.3f, highThreshold=%0.3f, acceleration=%0.3f\n",
+            mConfig.wheelVelocityControlParameters.scale,
+            mConfig.wheelVelocityControlParameters.lowThreshold,
+            mConfig.wheelVelocityControlParameters.highThreshold,
+            mConfig.wheelVelocityControlParameters.acceleration);
+
+    dump.appendFormat(INDENT2 "PointerGesture:\n");
+    dump.appendFormat(INDENT3 "Enabled: %s\n",
+            toString(mConfig.pointerGesturesEnabled));
+    dump.appendFormat(INDENT3 "QuietInterval: %0.1fms\n",
+            mConfig.pointerGestureQuietInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "DragMinSwitchSpeed: %0.1fpx/s\n",
+            mConfig.pointerGestureDragMinSwitchSpeed);
+    dump.appendFormat(INDENT3 "TapInterval: %0.1fms\n",
+            mConfig.pointerGestureTapInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "TapDragInterval: %0.1fms\n",
+            mConfig.pointerGestureTapDragInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "TapSlop: %0.1fpx\n",
+            mConfig.pointerGestureTapSlop);
+    dump.appendFormat(INDENT3 "MultitouchSettleInterval: %0.1fms\n",
+            mConfig.pointerGestureMultitouchSettleInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "MultitouchMinDistance: %0.1fpx\n",
+            mConfig.pointerGestureMultitouchMinDistance);
+    dump.appendFormat(INDENT3 "SwipeTransitionAngleCosine: %0.1f\n",
+            mConfig.pointerGestureSwipeTransitionAngleCosine);
+    dump.appendFormat(INDENT3 "SwipeMaxWidthRatio: %0.1f\n",
+            mConfig.pointerGestureSwipeMaxWidthRatio);
+    dump.appendFormat(INDENT3 "MovementSpeedRatio: %0.1f\n",
+            mConfig.pointerGestureMovementSpeedRatio);
+    dump.appendFormat(INDENT3 "ZoomSpeedRatio: %0.1f\n",
+            mConfig.pointerGestureZoomSpeedRatio);
+}
+
+void InputReader::monitor() {
+    // Acquire and release the lock to ensure that the reader has not deadlocked.
+    mLock.lock();
+    mEventHub->wake();
+    mReaderIsAliveCondition.wait(mLock);
+    mLock.unlock();
+
+    // Check the EventHub
+    mEventHub->monitor();
+}
+
+
+// --- InputReader::ContextImpl ---
+
+InputReader::ContextImpl::ContextImpl(InputReader* reader) :
+        mReader(reader) {
+}
+
+void InputReader::ContextImpl::updateGlobalMetaState() {
+    // lock is already held by the input loop
+    mReader->updateGlobalMetaStateLocked();
+}
+
+int32_t InputReader::ContextImpl::getGlobalMetaState() {
+    // lock is already held by the input loop
+    return mReader->getGlobalMetaStateLocked();
+}
+
+void InputReader::ContextImpl::disableVirtualKeysUntil(nsecs_t time) {
+    // lock is already held by the input loop
+    mReader->disableVirtualKeysUntilLocked(time);
+}
+
+bool InputReader::ContextImpl::shouldDropVirtualKey(nsecs_t now,
+        InputDevice* device, int32_t keyCode, int32_t scanCode) {
+    // lock is already held by the input loop
+    return mReader->shouldDropVirtualKeyLocked(now, device, keyCode, scanCode);
+}
+
+void InputReader::ContextImpl::fadePointer() {
+    // lock is already held by the input loop
+    mReader->fadePointerLocked();
+}
+
+void InputReader::ContextImpl::requestTimeoutAtTime(nsecs_t when) {
+    // lock is already held by the input loop
+    mReader->requestTimeoutAtTimeLocked(when);
+}
+
+int32_t InputReader::ContextImpl::bumpGeneration() {
+    // lock is already held by the input loop
+    return mReader->bumpGenerationLocked();
+}
+
+InputReaderPolicyInterface* InputReader::ContextImpl::getPolicy() {
+    return mReader->mPolicy.get();
+}
+
+InputListenerInterface* InputReader::ContextImpl::getListener() {
+    return mReader->mQueuedListener.get();
+}
+
+EventHubInterface* InputReader::ContextImpl::getEventHub() {
+    return mReader->mEventHub.get();
+}
+
+
+// --- InputReaderThread ---
+
+InputReaderThread::InputReaderThread(const sp<InputReaderInterface>& reader) :
+        Thread(/*canCallJava*/ true), mReader(reader) {
+}
+
+InputReaderThread::~InputReaderThread() {
+}
+
+bool InputReaderThread::threadLoop() {
+    mReader->loopOnce();
+    return true;
+}
+
+
+// --- InputDevice ---
+
+InputDevice::InputDevice(InputReaderContext* context, int32_t id, int32_t generation,
+        int32_t controllerNumber, const InputDeviceIdentifier& identifier, uint32_t classes) :
+        mContext(context), mId(id), mGeneration(generation), mControllerNumber(controllerNumber),
+        mIdentifier(identifier), mClasses(classes),
+        mSources(0), mIsExternal(false), mDropUntilNextSync(false) {
+}
+
+InputDevice::~InputDevice() {
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        delete mMappers[i];
+    }
+    mMappers.clear();
+}
+
+void InputDevice::dump(String8& dump) {
+    InputDeviceInfo deviceInfo;
+    getDeviceInfo(& deviceInfo);
+
+    dump.appendFormat(INDENT "Device %d: %s\n", deviceInfo.getId(),
+            deviceInfo.getDisplayName().string());
+    dump.appendFormat(INDENT2 "Generation: %d\n", mGeneration);
+    dump.appendFormat(INDENT2 "IsExternal: %s\n", toString(mIsExternal));
+    dump.appendFormat(INDENT2 "Sources: 0x%08x\n", deviceInfo.getSources());
+    dump.appendFormat(INDENT2 "KeyboardType: %d\n", deviceInfo.getKeyboardType());
+
+    const Vector<InputDeviceInfo::MotionRange>& ranges = deviceInfo.getMotionRanges();
+    if (!ranges.isEmpty()) {
+        dump.append(INDENT2 "Motion Ranges:\n");
+        for (size_t i = 0; i < ranges.size(); i++) {
+            const InputDeviceInfo::MotionRange& range = ranges.itemAt(i);
+            const char* label = getAxisLabel(range.axis);
+            char name[32];
+            if (label) {
+                strncpy(name, label, sizeof(name));
+                name[sizeof(name) - 1] = '\0';
+            } else {
+                snprintf(name, sizeof(name), "%d", range.axis);
+            }
+            dump.appendFormat(INDENT3 "%s: source=0x%08x, "
+                    "min=%0.3f, max=%0.3f, flat=%0.3f, fuzz=%0.3f, resolution=%0.3f\n",
+                    name, range.source, range.min, range.max, range.flat, range.fuzz,
+                    range.resolution);
+        }
+    }
+
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->dump(dump);
+    }
+}
+
+void InputDevice::addMapper(InputMapper* mapper) {
+    mMappers.add(mapper);
+}
+
+void InputDevice::configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) {
+    mSources = 0;
+
+    if (!isIgnored()) {
+        if (!changes) { // first time only
+            mContext->getEventHub()->getConfiguration(mId, &mConfiguration);
+        }
+
+        if (!changes || (changes & InputReaderConfiguration::CHANGE_KEYBOARD_LAYOUTS)) {
+            if (!(mClasses & INPUT_DEVICE_CLASS_VIRTUAL)) {
+                sp<KeyCharacterMap> keyboardLayout =
+                        mContext->getPolicy()->getKeyboardLayoutOverlay(mIdentifier);
+                if (mContext->getEventHub()->setKeyboardLayoutOverlay(mId, keyboardLayout)) {
+                    bumpGeneration();
+                }
+            }
+        }
+
+        if (!changes || (changes & InputReaderConfiguration::CHANGE_DEVICE_ALIAS)) {
+            if (!(mClasses & INPUT_DEVICE_CLASS_VIRTUAL)) {
+                String8 alias = mContext->getPolicy()->getDeviceAlias(mIdentifier);
+                if (mAlias != alias) {
+                    mAlias = alias;
+                    bumpGeneration();
+                }
+            }
+        }
+
+        size_t numMappers = mMappers.size();
+        for (size_t i = 0; i < numMappers; i++) {
+            InputMapper* mapper = mMappers[i];
+            mapper->configure(when, config, changes);
+            mSources |= mapper->getSources();
+        }
+    }
+}
+
+void InputDevice::reset(nsecs_t when) {
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->reset(when);
+    }
+
+    mContext->updateGlobalMetaState();
+
+    notifyReset(when);
+}
+
+void InputDevice::process(const RawEvent* rawEvents, size_t count) {
+    // Process all of the events in order for each mapper.
+    // We cannot simply ask each mapper to process them in bulk because mappers may
+    // have side-effects that must be interleaved.  For example, joystick movement events and
+    // gamepad button presses are handled by different mappers but they should be dispatched
+    // in the order received.
+    size_t numMappers = mMappers.size();
+    for (const RawEvent* rawEvent = rawEvents; count--; rawEvent++) {
+#if DEBUG_RAW_EVENTS
+        ALOGD("Input event: device=%d type=0x%04x code=0x%04x value=0x%08x when=%lld",
+                rawEvent->deviceId, rawEvent->type, rawEvent->code, rawEvent->value,
+                rawEvent->when);
+#endif
+
+        if (mDropUntilNextSync) {
+            if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) {
+                mDropUntilNextSync = false;
+#if DEBUG_RAW_EVENTS
+                ALOGD("Recovered from input event buffer overrun.");
+#endif
+            } else {
+#if DEBUG_RAW_EVENTS
+                ALOGD("Dropped input event while waiting for next input sync.");
+#endif
+            }
+        } else if (rawEvent->type == EV_SYN && rawEvent->code == SYN_DROPPED) {
+            ALOGI("Detected input event buffer overrun for device %s.", getName().string());
+            mDropUntilNextSync = true;
+            reset(rawEvent->when);
+        } else {
+            for (size_t i = 0; i < numMappers; i++) {
+                InputMapper* mapper = mMappers[i];
+                mapper->process(rawEvent);
+            }
+        }
+    }
+}
+
+void InputDevice::timeoutExpired(nsecs_t when) {
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->timeoutExpired(when);
+    }
+}
+
+void InputDevice::getDeviceInfo(InputDeviceInfo* outDeviceInfo) {
+    outDeviceInfo->initialize(mId, mGeneration, mControllerNumber, mIdentifier, mAlias,
+            mIsExternal);
+
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->populateDeviceInfo(outDeviceInfo);
+    }
+}
+
+int32_t InputDevice::getKeyCodeState(uint32_t sourceMask, int32_t keyCode) {
+    return getState(sourceMask, keyCode, & InputMapper::getKeyCodeState);
+}
+
+int32_t InputDevice::getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
+    return getState(sourceMask, scanCode, & InputMapper::getScanCodeState);
+}
+
+int32_t InputDevice::getSwitchState(uint32_t sourceMask, int32_t switchCode) {
+    return getState(sourceMask, switchCode, & InputMapper::getSwitchState);
+}
+
+int32_t InputDevice::getState(uint32_t sourceMask, int32_t code, GetStateFunc getStateFunc) {
+    int32_t result = AKEY_STATE_UNKNOWN;
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        if (sourcesMatchMask(mapper->getSources(), sourceMask)) {
+            // If any mapper reports AKEY_STATE_DOWN or AKEY_STATE_VIRTUAL, return that
+            // value.  Otherwise, return AKEY_STATE_UP as long as one mapper reports it.
+            int32_t currentResult = (mapper->*getStateFunc)(sourceMask, code);
+            if (currentResult >= AKEY_STATE_DOWN) {
+                return currentResult;
+            } else if (currentResult == AKEY_STATE_UP) {
+                result = currentResult;
+            }
+        }
+    }
+    return result;
+}
+
+bool InputDevice::markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+        const int32_t* keyCodes, uint8_t* outFlags) {
+    bool result = false;
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        if (sourcesMatchMask(mapper->getSources(), sourceMask)) {
+            result |= mapper->markSupportedKeyCodes(sourceMask, numCodes, keyCodes, outFlags);
+        }
+    }
+    return result;
+}
+
+void InputDevice::vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat,
+        int32_t token) {
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->vibrate(pattern, patternSize, repeat, token);
+    }
+}
+
+void InputDevice::cancelVibrate(int32_t token) {
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->cancelVibrate(token);
+    }
+}
+
+int32_t InputDevice::getMetaState() {
+    int32_t result = 0;
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        result |= mapper->getMetaState();
+    }
+    return result;
+}
+
+void InputDevice::fadePointer() {
+    size_t numMappers = mMappers.size();
+    for (size_t i = 0; i < numMappers; i++) {
+        InputMapper* mapper = mMappers[i];
+        mapper->fadePointer();
+    }
+}
+
+void InputDevice::bumpGeneration() {
+    mGeneration = mContext->bumpGeneration();
+}
+
+void InputDevice::notifyReset(nsecs_t when) {
+    NotifyDeviceResetArgs args(when, mId);
+    mContext->getListener()->notifyDeviceReset(&args);
+}
+
+
+// --- CursorButtonAccumulator ---
+
+CursorButtonAccumulator::CursorButtonAccumulator() {
+    clearButtons();
+}
+
+void CursorButtonAccumulator::reset(InputDevice* device) {
+    mBtnLeft = device->isKeyPressed(BTN_LEFT);
+    mBtnRight = device->isKeyPressed(BTN_RIGHT);
+    mBtnMiddle = device->isKeyPressed(BTN_MIDDLE);
+    mBtnBack = device->isKeyPressed(BTN_BACK);
+    mBtnSide = device->isKeyPressed(BTN_SIDE);
+    mBtnForward = device->isKeyPressed(BTN_FORWARD);
+    mBtnExtra = device->isKeyPressed(BTN_EXTRA);
+    mBtnTask = device->isKeyPressed(BTN_TASK);
+}
+
+void CursorButtonAccumulator::clearButtons() {
+    mBtnLeft = 0;
+    mBtnRight = 0;
+    mBtnMiddle = 0;
+    mBtnBack = 0;
+    mBtnSide = 0;
+    mBtnForward = 0;
+    mBtnExtra = 0;
+    mBtnTask = 0;
+}
+
+void CursorButtonAccumulator::process(const RawEvent* rawEvent) {
+    if (rawEvent->type == EV_KEY) {
+        switch (rawEvent->code) {
+        case BTN_LEFT:
+            mBtnLeft = rawEvent->value;
+            break;
+        case BTN_RIGHT:
+            mBtnRight = rawEvent->value;
+            break;
+        case BTN_MIDDLE:
+            mBtnMiddle = rawEvent->value;
+            break;
+        case BTN_BACK:
+            mBtnBack = rawEvent->value;
+            break;
+        case BTN_SIDE:
+            mBtnSide = rawEvent->value;
+            break;
+        case BTN_FORWARD:
+            mBtnForward = rawEvent->value;
+            break;
+        case BTN_EXTRA:
+            mBtnExtra = rawEvent->value;
+            break;
+        case BTN_TASK:
+            mBtnTask = rawEvent->value;
+            break;
+        }
+    }
+}
+
+uint32_t CursorButtonAccumulator::getButtonState() const {
+    uint32_t result = 0;
+    if (mBtnLeft) {
+        result |= AMOTION_EVENT_BUTTON_PRIMARY;
+    }
+    if (mBtnRight) {
+        result |= AMOTION_EVENT_BUTTON_SECONDARY;
+    }
+    if (mBtnMiddle) {
+        result |= AMOTION_EVENT_BUTTON_TERTIARY;
+    }
+    if (mBtnBack || mBtnSide) {
+        result |= AMOTION_EVENT_BUTTON_BACK;
+    }
+    if (mBtnForward || mBtnExtra) {
+        result |= AMOTION_EVENT_BUTTON_FORWARD;
+    }
+    return result;
+}
+
+
+// --- CursorMotionAccumulator ---
+
+CursorMotionAccumulator::CursorMotionAccumulator() {
+    clearRelativeAxes();
+}
+
+void CursorMotionAccumulator::reset(InputDevice* device) {
+    clearRelativeAxes();
+}
+
+void CursorMotionAccumulator::clearRelativeAxes() {
+    mRelX = 0;
+    mRelY = 0;
+}
+
+void CursorMotionAccumulator::process(const RawEvent* rawEvent) {
+    if (rawEvent->type == EV_REL) {
+        switch (rawEvent->code) {
+        case REL_X:
+            mRelX = rawEvent->value;
+            break;
+        case REL_Y:
+            mRelY = rawEvent->value;
+            break;
+        }
+    }
+}
+
+void CursorMotionAccumulator::finishSync() {
+    clearRelativeAxes();
+}
+
+
+// --- CursorScrollAccumulator ---
+
+CursorScrollAccumulator::CursorScrollAccumulator() :
+        mHaveRelWheel(false), mHaveRelHWheel(false) {
+    clearRelativeAxes();
+}
+
+void CursorScrollAccumulator::configure(InputDevice* device) {
+    mHaveRelWheel = device->getEventHub()->hasRelativeAxis(device->getId(), REL_WHEEL);
+    mHaveRelHWheel = device->getEventHub()->hasRelativeAxis(device->getId(), REL_HWHEEL);
+}
+
+void CursorScrollAccumulator::reset(InputDevice* device) {
+    clearRelativeAxes();
+}
+
+void CursorScrollAccumulator::clearRelativeAxes() {
+    mRelWheel = 0;
+    mRelHWheel = 0;
+}
+
+void CursorScrollAccumulator::process(const RawEvent* rawEvent) {
+    if (rawEvent->type == EV_REL) {
+        switch (rawEvent->code) {
+        case REL_WHEEL:
+            mRelWheel = rawEvent->value;
+            break;
+        case REL_HWHEEL:
+            mRelHWheel = rawEvent->value;
+            break;
+        }
+    }
+}
+
+void CursorScrollAccumulator::finishSync() {
+    clearRelativeAxes();
+}
+
+
+// --- TouchButtonAccumulator ---
+
+TouchButtonAccumulator::TouchButtonAccumulator() :
+        mHaveBtnTouch(false), mHaveStylus(false) {
+    clearButtons();
+}
+
+void TouchButtonAccumulator::configure(InputDevice* device) {
+    mHaveBtnTouch = device->hasKey(BTN_TOUCH);
+    mHaveStylus = device->hasKey(BTN_TOOL_PEN)
+            || device->hasKey(BTN_TOOL_RUBBER)
+            || device->hasKey(BTN_TOOL_BRUSH)
+            || device->hasKey(BTN_TOOL_PENCIL)
+            || device->hasKey(BTN_TOOL_AIRBRUSH);
+}
+
+void TouchButtonAccumulator::reset(InputDevice* device) {
+    mBtnTouch = device->isKeyPressed(BTN_TOUCH);
+    mBtnStylus = device->isKeyPressed(BTN_STYLUS);
+    mBtnStylus2 = device->isKeyPressed(BTN_STYLUS);
+    mBtnToolFinger = device->isKeyPressed(BTN_TOOL_FINGER);
+    mBtnToolPen = device->isKeyPressed(BTN_TOOL_PEN);
+    mBtnToolRubber = device->isKeyPressed(BTN_TOOL_RUBBER);
+    mBtnToolBrush = device->isKeyPressed(BTN_TOOL_BRUSH);
+    mBtnToolPencil = device->isKeyPressed(BTN_TOOL_PENCIL);
+    mBtnToolAirbrush = device->isKeyPressed(BTN_TOOL_AIRBRUSH);
+    mBtnToolMouse = device->isKeyPressed(BTN_TOOL_MOUSE);
+    mBtnToolLens = device->isKeyPressed(BTN_TOOL_LENS);
+    mBtnToolDoubleTap = device->isKeyPressed(BTN_TOOL_DOUBLETAP);
+    mBtnToolTripleTap = device->isKeyPressed(BTN_TOOL_TRIPLETAP);
+    mBtnToolQuadTap = device->isKeyPressed(BTN_TOOL_QUADTAP);
+}
+
+void TouchButtonAccumulator::clearButtons() {
+    mBtnTouch = 0;
+    mBtnStylus = 0;
+    mBtnStylus2 = 0;
+    mBtnToolFinger = 0;
+    mBtnToolPen = 0;
+    mBtnToolRubber = 0;
+    mBtnToolBrush = 0;
+    mBtnToolPencil = 0;
+    mBtnToolAirbrush = 0;
+    mBtnToolMouse = 0;
+    mBtnToolLens = 0;
+    mBtnToolDoubleTap = 0;
+    mBtnToolTripleTap = 0;
+    mBtnToolQuadTap = 0;
+}
+
+void TouchButtonAccumulator::process(const RawEvent* rawEvent) {
+    if (rawEvent->type == EV_KEY) {
+        switch (rawEvent->code) {
+        case BTN_TOUCH:
+            mBtnTouch = rawEvent->value;
+            break;
+        case BTN_STYLUS:
+            mBtnStylus = rawEvent->value;
+            break;
+        case BTN_STYLUS2:
+            mBtnStylus2 = rawEvent->value;
+            break;
+        case BTN_TOOL_FINGER:
+            mBtnToolFinger = rawEvent->value;
+            break;
+        case BTN_TOOL_PEN:
+            mBtnToolPen = rawEvent->value;
+            break;
+        case BTN_TOOL_RUBBER:
+            mBtnToolRubber = rawEvent->value;
+            break;
+        case BTN_TOOL_BRUSH:
+            mBtnToolBrush = rawEvent->value;
+            break;
+        case BTN_TOOL_PENCIL:
+            mBtnToolPencil = rawEvent->value;
+            break;
+        case BTN_TOOL_AIRBRUSH:
+            mBtnToolAirbrush = rawEvent->value;
+            break;
+        case BTN_TOOL_MOUSE:
+            mBtnToolMouse = rawEvent->value;
+            break;
+        case BTN_TOOL_LENS:
+            mBtnToolLens = rawEvent->value;
+            break;
+        case BTN_TOOL_DOUBLETAP:
+            mBtnToolDoubleTap = rawEvent->value;
+            break;
+        case BTN_TOOL_TRIPLETAP:
+            mBtnToolTripleTap = rawEvent->value;
+            break;
+        case BTN_TOOL_QUADTAP:
+            mBtnToolQuadTap = rawEvent->value;
+            break;
+        }
+    }
+}
+
+uint32_t TouchButtonAccumulator::getButtonState() const {
+    uint32_t result = 0;
+    if (mBtnStylus) {
+        result |= AMOTION_EVENT_BUTTON_SECONDARY;
+    }
+    if (mBtnStylus2) {
+        result |= AMOTION_EVENT_BUTTON_TERTIARY;
+    }
+    return result;
+}
+
+int32_t TouchButtonAccumulator::getToolType() const {
+    if (mBtnToolMouse || mBtnToolLens) {
+        return AMOTION_EVENT_TOOL_TYPE_MOUSE;
+    }
+    if (mBtnToolRubber) {
+        return AMOTION_EVENT_TOOL_TYPE_ERASER;
+    }
+    if (mBtnToolPen || mBtnToolBrush || mBtnToolPencil || mBtnToolAirbrush) {
+        return AMOTION_EVENT_TOOL_TYPE_STYLUS;
+    }
+    if (mBtnToolFinger || mBtnToolDoubleTap || mBtnToolTripleTap || mBtnToolQuadTap) {
+        return AMOTION_EVENT_TOOL_TYPE_FINGER;
+    }
+    return AMOTION_EVENT_TOOL_TYPE_UNKNOWN;
+}
+
+bool TouchButtonAccumulator::isToolActive() const {
+    return mBtnTouch || mBtnToolFinger || mBtnToolPen || mBtnToolRubber
+            || mBtnToolBrush || mBtnToolPencil || mBtnToolAirbrush
+            || mBtnToolMouse || mBtnToolLens
+            || mBtnToolDoubleTap || mBtnToolTripleTap || mBtnToolQuadTap;
+}
+
+bool TouchButtonAccumulator::isHovering() const {
+    return mHaveBtnTouch && !mBtnTouch;
+}
+
+bool TouchButtonAccumulator::hasStylus() const {
+    return mHaveStylus;
+}
+
+
+// --- RawPointerAxes ---
+
+RawPointerAxes::RawPointerAxes() {
+    clear();
+}
+
+void RawPointerAxes::clear() {
+    x.clear();
+    y.clear();
+    pressure.clear();
+    touchMajor.clear();
+    touchMinor.clear();
+    toolMajor.clear();
+    toolMinor.clear();
+    orientation.clear();
+    distance.clear();
+    tiltX.clear();
+    tiltY.clear();
+    trackingId.clear();
+    slot.clear();
+}
+
+
+// --- RawPointerData ---
+
+RawPointerData::RawPointerData() {
+    clear();
+}
+
+void RawPointerData::clear() {
+    pointerCount = 0;
+    clearIdBits();
+}
+
+void RawPointerData::copyFrom(const RawPointerData& other) {
+    pointerCount = other.pointerCount;
+    hoveringIdBits = other.hoveringIdBits;
+    touchingIdBits = other.touchingIdBits;
+
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        pointers[i] = other.pointers[i];
+
+        int id = pointers[i].id;
+        idToIndex[id] = other.idToIndex[id];
+    }
+}
+
+void RawPointerData::getCentroidOfTouchingPointers(float* outX, float* outY) const {
+    float x = 0, y = 0;
+    uint32_t count = touchingIdBits.count();
+    if (count) {
+        for (BitSet32 idBits(touchingIdBits); !idBits.isEmpty(); ) {
+            uint32_t id = idBits.clearFirstMarkedBit();
+            const Pointer& pointer = pointerForId(id);
+            x += pointer.x;
+            y += pointer.y;
+        }
+        x /= count;
+        y /= count;
+    }
+    *outX = x;
+    *outY = y;
+}
+
+
+// --- CookedPointerData ---
+
+CookedPointerData::CookedPointerData() {
+    clear();
+}
+
+void CookedPointerData::clear() {
+    pointerCount = 0;
+    hoveringIdBits.clear();
+    touchingIdBits.clear();
+}
+
+void CookedPointerData::copyFrom(const CookedPointerData& other) {
+    pointerCount = other.pointerCount;
+    hoveringIdBits = other.hoveringIdBits;
+    touchingIdBits = other.touchingIdBits;
+
+    for (uint32_t i = 0; i < pointerCount; i++) {
+        pointerProperties[i].copyFrom(other.pointerProperties[i]);
+        pointerCoords[i].copyFrom(other.pointerCoords[i]);
+
+        int id = pointerProperties[i].id;
+        idToIndex[id] = other.idToIndex[id];
+    }
+}
+
+
+// --- SingleTouchMotionAccumulator ---
+
+SingleTouchMotionAccumulator::SingleTouchMotionAccumulator() {
+    clearAbsoluteAxes();
+}
+
+void SingleTouchMotionAccumulator::reset(InputDevice* device) {
+    mAbsX = device->getAbsoluteAxisValue(ABS_X);
+    mAbsY = device->getAbsoluteAxisValue(ABS_Y);
+    mAbsPressure = device->getAbsoluteAxisValue(ABS_PRESSURE);
+    mAbsToolWidth = device->getAbsoluteAxisValue(ABS_TOOL_WIDTH);
+    mAbsDistance = device->getAbsoluteAxisValue(ABS_DISTANCE);
+    mAbsTiltX = device->getAbsoluteAxisValue(ABS_TILT_X);
+    mAbsTiltY = device->getAbsoluteAxisValue(ABS_TILT_Y);
+}
+
+void SingleTouchMotionAccumulator::clearAbsoluteAxes() {
+    mAbsX = 0;
+    mAbsY = 0;
+    mAbsPressure = 0;
+    mAbsToolWidth = 0;
+    mAbsDistance = 0;
+    mAbsTiltX = 0;
+    mAbsTiltY = 0;
+}
+
+void SingleTouchMotionAccumulator::process(const RawEvent* rawEvent) {
+    if (rawEvent->type == EV_ABS) {
+        switch (rawEvent->code) {
+        case ABS_X:
+            mAbsX = rawEvent->value;
+            break;
+        case ABS_Y:
+            mAbsY = rawEvent->value;
+            break;
+        case ABS_PRESSURE:
+            mAbsPressure = rawEvent->value;
+            break;
+        case ABS_TOOL_WIDTH:
+            mAbsToolWidth = rawEvent->value;
+            break;
+        case ABS_DISTANCE:
+            mAbsDistance = rawEvent->value;
+            break;
+        case ABS_TILT_X:
+            mAbsTiltX = rawEvent->value;
+            break;
+        case ABS_TILT_Y:
+            mAbsTiltY = rawEvent->value;
+            break;
+        }
+    }
+}
+
+
+// --- MultiTouchMotionAccumulator ---
+
+MultiTouchMotionAccumulator::MultiTouchMotionAccumulator() :
+        mCurrentSlot(-1), mSlots(NULL), mSlotCount(0), mUsingSlotsProtocol(false),
+        mHaveStylus(false) {
+}
+
+MultiTouchMotionAccumulator::~MultiTouchMotionAccumulator() {
+    delete[] mSlots;
+}
+
+void MultiTouchMotionAccumulator::configure(InputDevice* device,
+        size_t slotCount, bool usingSlotsProtocol) {
+    mSlotCount = slotCount;
+    mUsingSlotsProtocol = usingSlotsProtocol;
+    mHaveStylus = device->hasAbsoluteAxis(ABS_MT_TOOL_TYPE);
+
+    delete[] mSlots;
+    mSlots = new Slot[slotCount];
+}
+
+void MultiTouchMotionAccumulator::reset(InputDevice* device) {
+    // Unfortunately there is no way to read the initial contents of the slots.
+    // So when we reset the accumulator, we must assume they are all zeroes.
+    if (mUsingSlotsProtocol) {
+        // Query the driver for the current slot index and use it as the initial slot
+        // before we start reading events from the device.  It is possible that the
+        // current slot index will not be the same as it was when the first event was
+        // written into the evdev buffer, which means the input mapper could start
+        // out of sync with the initial state of the events in the evdev buffer.
+        // In the extremely unlikely case that this happens, the data from
+        // two slots will be confused until the next ABS_MT_SLOT event is received.
+        // This can cause the touch point to "jump", but at least there will be
+        // no stuck touches.
+        int32_t initialSlot;
+        status_t status = device->getEventHub()->getAbsoluteAxisValue(device->getId(),
+                ABS_MT_SLOT, &initialSlot);
+        if (status) {
+            ALOGD("Could not retrieve current multitouch slot index.  status=%d", status);
+            initialSlot = -1;
+        }
+        clearSlots(initialSlot);
+    } else {
+        clearSlots(-1);
+    }
+}
+
+void MultiTouchMotionAccumulator::clearSlots(int32_t initialSlot) {
+    if (mSlots) {
+        for (size_t i = 0; i < mSlotCount; i++) {
+            mSlots[i].clear();
+        }
+    }
+    mCurrentSlot = initialSlot;
+}
+
+void MultiTouchMotionAccumulator::process(const RawEvent* rawEvent) {
+    if (rawEvent->type == EV_ABS) {
+        bool newSlot = false;
+        if (mUsingSlotsProtocol) {
+            if (rawEvent->code == ABS_MT_SLOT) {
+                mCurrentSlot = rawEvent->value;
+                newSlot = true;
+            }
+        } else if (mCurrentSlot < 0) {
+            mCurrentSlot = 0;
+        }
+
+        if (mCurrentSlot < 0 || size_t(mCurrentSlot) >= mSlotCount) {
+#if DEBUG_POINTERS
+            if (newSlot) {
+                ALOGW("MultiTouch device emitted invalid slot index %d but it "
+                        "should be between 0 and %d; ignoring this slot.",
+                        mCurrentSlot, mSlotCount - 1);
+            }
+#endif
+        } else {
+            Slot* slot = &mSlots[mCurrentSlot];
+
+            switch (rawEvent->code) {
+            case ABS_MT_POSITION_X:
+                slot->mInUse = true;
+                slot->mAbsMTPositionX = rawEvent->value;
+                break;
+            case ABS_MT_POSITION_Y:
+                slot->mInUse = true;
+                slot->mAbsMTPositionY = rawEvent->value;
+                break;
+            case ABS_MT_TOUCH_MAJOR:
+                slot->mInUse = true;
+                slot->mAbsMTTouchMajor = rawEvent->value;
+                break;
+            case ABS_MT_TOUCH_MINOR:
+                slot->mInUse = true;
+                slot->mAbsMTTouchMinor = rawEvent->value;
+                slot->mHaveAbsMTTouchMinor = true;
+                break;
+            case ABS_MT_WIDTH_MAJOR:
+                slot->mInUse = true;
+                slot->mAbsMTWidthMajor = rawEvent->value;
+                break;
+            case ABS_MT_WIDTH_MINOR:
+                slot->mInUse = true;
+                slot->mAbsMTWidthMinor = rawEvent->value;
+                slot->mHaveAbsMTWidthMinor = true;
+                break;
+            case ABS_MT_ORIENTATION:
+                slot->mInUse = true;
+                slot->mAbsMTOrientation = rawEvent->value;
+                break;
+            case ABS_MT_TRACKING_ID:
+                if (mUsingSlotsProtocol && rawEvent->value < 0) {
+                    // The slot is no longer in use but it retains its previous contents,
+                    // which may be reused for subsequent touches.
+                    slot->mInUse = false;
+                } else {
+                    slot->mInUse = true;
+                    slot->mAbsMTTrackingId = rawEvent->value;
+                }
+                break;
+            case ABS_MT_PRESSURE:
+                slot->mInUse = true;
+                slot->mAbsMTPressure = rawEvent->value;
+                break;
+            case ABS_MT_DISTANCE:
+                slot->mInUse = true;
+                slot->mAbsMTDistance = rawEvent->value;
+                break;
+            case ABS_MT_TOOL_TYPE:
+                slot->mInUse = true;
+                slot->mAbsMTToolType = rawEvent->value;
+                slot->mHaveAbsMTToolType = true;
+                break;
+            }
+        }
+    } else if (rawEvent->type == EV_SYN && rawEvent->code == SYN_MT_REPORT) {
+        // MultiTouch Sync: The driver has returned all data for *one* of the pointers.
+        mCurrentSlot += 1;
+    }
+}
+
+void MultiTouchMotionAccumulator::finishSync() {
+    if (!mUsingSlotsProtocol) {
+        clearSlots(-1);
+    }
+}
+
+bool MultiTouchMotionAccumulator::hasStylus() const {
+    return mHaveStylus;
+}
+
+
+// --- MultiTouchMotionAccumulator::Slot ---
+
+MultiTouchMotionAccumulator::Slot::Slot() {
+    clear();
+}
+
+void MultiTouchMotionAccumulator::Slot::clear() {
+    mInUse = false;
+    mHaveAbsMTTouchMinor = false;
+    mHaveAbsMTWidthMinor = false;
+    mHaveAbsMTToolType = false;
+    mAbsMTPositionX = 0;
+    mAbsMTPositionY = 0;
+    mAbsMTTouchMajor = 0;
+    mAbsMTTouchMinor = 0;
+    mAbsMTWidthMajor = 0;
+    mAbsMTWidthMinor = 0;
+    mAbsMTOrientation = 0;
+    mAbsMTTrackingId = -1;
+    mAbsMTPressure = 0;
+    mAbsMTDistance = 0;
+    mAbsMTToolType = 0;
+}
+
+int32_t MultiTouchMotionAccumulator::Slot::getToolType() const {
+    if (mHaveAbsMTToolType) {
+        switch (mAbsMTToolType) {
+        case MT_TOOL_FINGER:
+            return AMOTION_EVENT_TOOL_TYPE_FINGER;
+        case MT_TOOL_PEN:
+            return AMOTION_EVENT_TOOL_TYPE_STYLUS;
+        }
+    }
+    return AMOTION_EVENT_TOOL_TYPE_UNKNOWN;
+}
+
+
+// --- InputMapper ---
+
+InputMapper::InputMapper(InputDevice* device) :
+        mDevice(device), mContext(device->getContext()) {
+}
+
+InputMapper::~InputMapper() {
+}
+
+void InputMapper::populateDeviceInfo(InputDeviceInfo* info) {
+    info->addSource(getSources());
+}
+
+void InputMapper::dump(String8& dump) {
+}
+
+void InputMapper::configure(nsecs_t when,
+        const InputReaderConfiguration* config, uint32_t changes) {
+}
+
+void InputMapper::reset(nsecs_t when) {
+}
+
+void InputMapper::timeoutExpired(nsecs_t when) {
+}
+
+int32_t InputMapper::getKeyCodeState(uint32_t sourceMask, int32_t keyCode) {
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t InputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t InputMapper::getSwitchState(uint32_t sourceMask, int32_t switchCode) {
+    return AKEY_STATE_UNKNOWN;
+}
+
+bool InputMapper::markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+        const int32_t* keyCodes, uint8_t* outFlags) {
+    return false;
+}
+
+void InputMapper::vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat,
+        int32_t token) {
+}
+
+void InputMapper::cancelVibrate(int32_t token) {
+}
+
+int32_t InputMapper::getMetaState() {
+    return 0;
+}
+
+void InputMapper::fadePointer() {
+}
+
+status_t InputMapper::getAbsoluteAxisInfo(int32_t axis, RawAbsoluteAxisInfo* axisInfo) {
+    return getEventHub()->getAbsoluteAxisInfo(getDeviceId(), axis, axisInfo);
+}
+
+void InputMapper::bumpGeneration() {
+    mDevice->bumpGeneration();
+}
+
+void InputMapper::dumpRawAbsoluteAxisInfo(String8& dump,
+        const RawAbsoluteAxisInfo& axis, const char* name) {
+    if (axis.valid) {
+        dump.appendFormat(INDENT4 "%s: min=%d, max=%d, flat=%d, fuzz=%d, resolution=%d\n",
+                name, axis.minValue, axis.maxValue, axis.flat, axis.fuzz, axis.resolution);
+    } else {
+        dump.appendFormat(INDENT4 "%s: unknown range\n", name);
+    }
+}
+
+
+// --- SwitchInputMapper ---
+
+SwitchInputMapper::SwitchInputMapper(InputDevice* device) :
+        InputMapper(device), mUpdatedSwitchValues(0), mUpdatedSwitchMask(0) {
+}
+
+SwitchInputMapper::~SwitchInputMapper() {
+}
+
+uint32_t SwitchInputMapper::getSources() {
+    return AINPUT_SOURCE_SWITCH;
+}
+
+void SwitchInputMapper::process(const RawEvent* rawEvent) {
+    switch (rawEvent->type) {
+    case EV_SW:
+        processSwitch(rawEvent->code, rawEvent->value);
+        break;
+
+    case EV_SYN:
+        if (rawEvent->code == SYN_REPORT) {
+            sync(rawEvent->when);
+        }
+    }
+}
+
+void SwitchInputMapper::processSwitch(int32_t switchCode, int32_t switchValue) {
+    if (switchCode >= 0 && switchCode < 32) {
+        if (switchValue) {
+            mUpdatedSwitchValues |= 1 << switchCode;
+        }
+        mUpdatedSwitchMask |= 1 << switchCode;
+    }
+}
+
+void SwitchInputMapper::sync(nsecs_t when) {
+    if (mUpdatedSwitchMask) {
+        NotifySwitchArgs args(when, 0, mUpdatedSwitchValues, mUpdatedSwitchMask);
+        getListener()->notifySwitch(&args);
+
+        mUpdatedSwitchValues = 0;
+        mUpdatedSwitchMask = 0;
+    }
+}
+
+int32_t SwitchInputMapper::getSwitchState(uint32_t sourceMask, int32_t switchCode) {
+    return getEventHub()->getSwitchState(getDeviceId(), switchCode);
+}
+
+
+// --- VibratorInputMapper ---
+
+VibratorInputMapper::VibratorInputMapper(InputDevice* device) :
+        InputMapper(device), mVibrating(false) {
+}
+
+VibratorInputMapper::~VibratorInputMapper() {
+}
+
+uint32_t VibratorInputMapper::getSources() {
+    return 0;
+}
+
+void VibratorInputMapper::populateDeviceInfo(InputDeviceInfo* info) {
+    InputMapper::populateDeviceInfo(info);
+
+    info->setVibrator(true);
+}
+
+void VibratorInputMapper::process(const RawEvent* rawEvent) {
+    // TODO: Handle FF_STATUS, although it does not seem to be widely supported.
+}
+
+void VibratorInputMapper::vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat,
+        int32_t token) {
+#if DEBUG_VIBRATOR
+    String8 patternStr;
+    for (size_t i = 0; i < patternSize; i++) {
+        if (i != 0) {
+            patternStr.append(", ");
+        }
+        patternStr.appendFormat("%lld", pattern[i]);
+    }
+    ALOGD("vibrate: deviceId=%d, pattern=[%s], repeat=%ld, token=%d",
+            getDeviceId(), patternStr.string(), repeat, token);
+#endif
+
+    mVibrating = true;
+    memcpy(mPattern, pattern, patternSize * sizeof(nsecs_t));
+    mPatternSize = patternSize;
+    mRepeat = repeat;
+    mToken = token;
+    mIndex = -1;
+
+    nextStep();
+}
+
+void VibratorInputMapper::cancelVibrate(int32_t token) {
+#if DEBUG_VIBRATOR
+    ALOGD("cancelVibrate: deviceId=%d, token=%d", getDeviceId(), token);
+#endif
+
+    if (mVibrating && mToken == token) {
+        stopVibrating();
+    }
+}
+
+void VibratorInputMapper::timeoutExpired(nsecs_t when) {
+    if (mVibrating) {
+        if (when >= mNextStepTime) {
+            nextStep();
+        } else {
+            getContext()->requestTimeoutAtTime(mNextStepTime);
+        }
+    }
+}
+
+void VibratorInputMapper::nextStep() {
+    mIndex += 1;
+    if (size_t(mIndex) >= mPatternSize) {
+        if (mRepeat < 0) {
+            // We are done.
+            stopVibrating();
+            return;
+        }
+        mIndex = mRepeat;
+    }
+
+    bool vibratorOn = mIndex & 1;
+    nsecs_t duration = mPattern[mIndex];
+    if (vibratorOn) {
+#if DEBUG_VIBRATOR
+        ALOGD("nextStep: sending vibrate deviceId=%d, duration=%lld",
+                getDeviceId(), duration);
+#endif
+        getEventHub()->vibrate(getDeviceId(), duration);
+    } else {
+#if DEBUG_VIBRATOR
+        ALOGD("nextStep: sending cancel vibrate deviceId=%d", getDeviceId());
+#endif
+        getEventHub()->cancelVibrate(getDeviceId());
+    }
+    nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+    mNextStepTime = now + duration;
+    getContext()->requestTimeoutAtTime(mNextStepTime);
+#if DEBUG_VIBRATOR
+    ALOGD("nextStep: scheduled timeout in %0.3fms", duration * 0.000001f);
+#endif
+}
+
+void VibratorInputMapper::stopVibrating() {
+    mVibrating = false;
+#if DEBUG_VIBRATOR
+    ALOGD("stopVibrating: sending cancel vibrate deviceId=%d", getDeviceId());
+#endif
+    getEventHub()->cancelVibrate(getDeviceId());
+}
+
+void VibratorInputMapper::dump(String8& dump) {
+    dump.append(INDENT2 "Vibrator Input Mapper:\n");
+    dump.appendFormat(INDENT3 "Vibrating: %s\n", toString(mVibrating));
+}
+
+
+// --- KeyboardInputMapper ---
+
+KeyboardInputMapper::KeyboardInputMapper(InputDevice* device,
+        uint32_t source, int32_t keyboardType) :
+        InputMapper(device), mSource(source),
+        mKeyboardType(keyboardType) {
+}
+
+KeyboardInputMapper::~KeyboardInputMapper() {
+}
+
+uint32_t KeyboardInputMapper::getSources() {
+    return mSource;
+}
+
+void KeyboardInputMapper::populateDeviceInfo(InputDeviceInfo* info) {
+    InputMapper::populateDeviceInfo(info);
+
+    info->setKeyboardType(mKeyboardType);
+    info->setKeyCharacterMap(getEventHub()->getKeyCharacterMap(getDeviceId()));
+}
+
+void KeyboardInputMapper::dump(String8& dump) {
+    dump.append(INDENT2 "Keyboard Input Mapper:\n");
+    dumpParameters(dump);
+    dump.appendFormat(INDENT3 "KeyboardType: %d\n", mKeyboardType);
+    dump.appendFormat(INDENT3 "Orientation: %d\n", mOrientation);
+    dump.appendFormat(INDENT3 "KeyDowns: %zu keys currently down\n", mKeyDowns.size());
+    dump.appendFormat(INDENT3 "MetaState: 0x%0x\n", mMetaState);
+    dump.appendFormat(INDENT3 "DownTime: %lld\n", (long long)mDownTime);
+}
+
+
+void KeyboardInputMapper::configure(nsecs_t when,
+        const InputReaderConfiguration* config, uint32_t changes) {
+    InputMapper::configure(when, config, changes);
+
+    if (!changes) { // first time only
+        // Configure basic parameters.
+        configureParameters();
+    }
+
+    if (!changes || (changes & InputReaderConfiguration::CHANGE_DISPLAY_INFO)) {
+        if (mParameters.orientationAware && mParameters.hasAssociatedDisplay) {
+            DisplayViewport v;
+            if (config->getDisplayInfo(false /*external*/, &v)) {
+                mOrientation = v.orientation;
+            } else {
+                mOrientation = DISPLAY_ORIENTATION_0;
+            }
+        } else {
+            mOrientation = DISPLAY_ORIENTATION_0;
+        }
+    }
+}
+
+void KeyboardInputMapper::configureParameters() {
+    mParameters.orientationAware = false;
+    getDevice()->getConfiguration().tryGetProperty(String8("keyboard.orientationAware"),
+            mParameters.orientationAware);
+
+    mParameters.hasAssociatedDisplay = false;
+    if (mParameters.orientationAware) {
+        mParameters.hasAssociatedDisplay = true;
+    }
+
+    mParameters.handlesKeyRepeat = false;
+    getDevice()->getConfiguration().tryGetProperty(String8("keyboard.handlesKeyRepeat"),
+            mParameters.handlesKeyRepeat);
+}
+
+void KeyboardInputMapper::dumpParameters(String8& dump) {
+    dump.append(INDENT3 "Parameters:\n");
+    dump.appendFormat(INDENT4 "HasAssociatedDisplay: %s\n",
+            toString(mParameters.hasAssociatedDisplay));
+    dump.appendFormat(INDENT4 "OrientationAware: %s\n",
+            toString(mParameters.orientationAware));
+    dump.appendFormat(INDENT4 "HandlesKeyRepeat: %s\n",
+            toString(mParameters.handlesKeyRepeat));
+}
+
+void KeyboardInputMapper::reset(nsecs_t when) {
+    mMetaState = AMETA_NONE;
+    mDownTime = 0;
+    mKeyDowns.clear();
+    mCurrentHidUsage = 0;
+
+    resetLedState();
+
+    InputMapper::reset(when);
+}
+
+void KeyboardInputMapper::process(const RawEvent* rawEvent) {
+    switch (rawEvent->type) {
+    case EV_KEY: {
+        int32_t scanCode = rawEvent->code;
+        int32_t usageCode = mCurrentHidUsage;
+        mCurrentHidUsage = 0;
+
+        if (isKeyboardOrGamepadKey(scanCode)) {
+            int32_t keyCode;
+            uint32_t flags;
+            if (getEventHub()->mapKey(getDeviceId(), scanCode, usageCode, &keyCode, &flags)) {
+                keyCode = AKEYCODE_UNKNOWN;
+                flags = 0;
+            }
+            processKey(rawEvent->when, rawEvent->value != 0, keyCode, scanCode, flags);
+        }
+        break;
+    }
+    case EV_MSC: {
+        if (rawEvent->code == MSC_SCAN) {
+            mCurrentHidUsage = rawEvent->value;
+        }
+        break;
+    }
+    case EV_SYN: {
+        if (rawEvent->code == SYN_REPORT) {
+            mCurrentHidUsage = 0;
+        }
+    }
+    }
+}
+
+bool KeyboardInputMapper::isKeyboardOrGamepadKey(int32_t scanCode) {
+    return scanCode < BTN_MOUSE
+        || scanCode >= KEY_OK
+        || (scanCode >= BTN_MISC && scanCode < BTN_MOUSE)
+        || (scanCode >= BTN_JOYSTICK && scanCode < BTN_DIGI);
+}
+
+void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
+        int32_t scanCode, uint32_t policyFlags) {
+
+    if (down) {
+        // Rotate key codes according to orientation if needed.
+        if (mParameters.orientationAware && mParameters.hasAssociatedDisplay) {
+            keyCode = rotateKeyCode(keyCode, mOrientation);
+        }
+
+        // Add key down.
+        ssize_t keyDownIndex = findKeyDown(scanCode);
+        if (keyDownIndex >= 0) {
+            // key repeat, be sure to use same keycode as before in case of rotation
+            keyCode = mKeyDowns.itemAt(keyDownIndex).keyCode;
+        } else {
+            // key down
+            if ((policyFlags & POLICY_FLAG_VIRTUAL)
+                    && mContext->shouldDropVirtualKey(when,
+                            getDevice(), keyCode, scanCode)) {
+                return;
+            }
+
+            mKeyDowns.push();
+            KeyDown& keyDown = mKeyDowns.editTop();
+            keyDown.keyCode = keyCode;
+            keyDown.scanCode = scanCode;
+        }
+
+        mDownTime = when;
+    } else {
+        // Remove key down.
+        ssize_t keyDownIndex = findKeyDown(scanCode);
+        if (keyDownIndex >= 0) {
+            // key up, be sure to use same keycode as before in case of rotation
+            keyCode = mKeyDowns.itemAt(keyDownIndex).keyCode;
+            mKeyDowns.removeAt(size_t(keyDownIndex));
+        } else {
+            // key was not actually down
+            ALOGI("Dropping key up from device %s because the key was not down.  "
+                    "keyCode=%d, scanCode=%d",
+                    getDeviceName().string(), keyCode, scanCode);
+            return;
+        }
+    }
+
+    int32_t oldMetaState = mMetaState;
+    int32_t newMetaState = updateMetaState(keyCode, down, oldMetaState);
+    bool metaStateChanged = oldMetaState != newMetaState;
+    if (metaStateChanged) {
+        mMetaState = newMetaState;
+        updateLedState(false);
+    }
+
+    nsecs_t downTime = mDownTime;
+
+    // Key down on external an keyboard should wake the device.
+    // We don't do this for internal keyboards to prevent them from waking up in your pocket.
+    // For internal keyboards, the key layout file should specify the policy flags for
+    // each wake key individually.
+    // TODO: Use the input device configuration to control this behavior more finely.
+    if (down && getDevice()->isExternal()) {
+        policyFlags |= POLICY_FLAG_WAKE;
+    }
+
+    if (mParameters.handlesKeyRepeat) {
+        policyFlags |= POLICY_FLAG_DISABLE_KEY_REPEAT;
+    }
+
+    if (metaStateChanged) {
+        getContext()->updateGlobalMetaState();
+    }
+
+    if (down && !isMetaKey(keyCode)) {
+        getContext()->fadePointer();
+    }
+
+    NotifyKeyArgs args(when, getDeviceId(), mSource, policyFlags,
+            down ? AKEY_EVENT_ACTION_DOWN : AKEY_EVENT_ACTION_UP,
+            AKEY_EVENT_FLAG_FROM_SYSTEM, keyCode, scanCode, newMetaState, downTime);
+    getListener()->notifyKey(&args);
+}
+
+ssize_t KeyboardInputMapper::findKeyDown(int32_t scanCode) {
+    size_t n = mKeyDowns.size();
+    for (size_t i = 0; i < n; i++) {
+        if (mKeyDowns[i].scanCode == scanCode) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+int32_t KeyboardInputMapper::getKeyCodeState(uint32_t sourceMask, int32_t keyCode) {
+    return getEventHub()->getKeyCodeState(getDeviceId(), keyCode);
+}
+
+int32_t KeyboardInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
+    return getEventHub()->getScanCodeState(getDeviceId(), scanCode);
+}
+
+bool KeyboardInputMapper::markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+        const int32_t* keyCodes, uint8_t* outFlags) {
+    return getEventHub()->markSupportedKeyCodes(getDeviceId(), numCodes, keyCodes, outFlags);
+}
+
+int32_t KeyboardInputMapper::getMetaState() {
+    return mMetaState;
+}
+
+void KeyboardInputMapper::resetLedState() {
+    initializeLedState(mCapsLockLedState, ALED_CAPS_LOCK);
+    initializeLedState(mNumLockLedState, ALED_NUM_LOCK);
+    initializeLedState(mScrollLockLedState, ALED_SCROLL_LOCK);
+
+    updateLedState(true);
+}
+
+void KeyboardInputMapper::initializeLedState(LedState& ledState, int32_t led) {
+    ledState.avail = getEventHub()->hasLed(getDeviceId(), led);
+    ledState.on = false;
+}
+
+void KeyboardInputMapper::updateLedState(bool reset) {
+    updateLedStateForModifier(mCapsLockLedState, ALED_CAPS_LOCK,
+            AMETA_CAPS_LOCK_ON, reset);
+    updateLedStateForModifier(mNumLockLedState, ALED_NUM_LOCK,
+            AMETA_NUM_LOCK_ON, reset);
+    updateLedStateForModifier(mScrollLockLedState, ALED_SCROLL_LOCK,
+            AMETA_SCROLL_LOCK_ON, reset);
+}
+
+void KeyboardInputMapper::updateLedStateForModifier(LedState& ledState,
+        int32_t led, int32_t modifier, bool reset) {
+    if (ledState.avail) {
+        bool desiredState = (mMetaState & modifier) != 0;
+        if (reset || ledState.on != desiredState) {
+            getEventHub()->setLedState(getDeviceId(), led, desiredState);
+            ledState.on = desiredState;
+        }
+    }
+}
+
+
+// --- CursorInputMapper ---
+
+CursorInputMapper::CursorInputMapper(InputDevice* device) :
+        InputMapper(device) {
+}
+
+CursorInputMapper::~CursorInputMapper() {
+}
+
+uint32_t CursorInputMapper::getSources() {
+    return mSource;
+}
+
+void CursorInputMapper::populateDeviceInfo(InputDeviceInfo* info) {
+    InputMapper::populateDeviceInfo(info);
+
+    if (mParameters.mode == Parameters::MODE_POINTER) {
+        float minX, minY, maxX, maxY;
+        if (mPointerController->getBounds(&minX, &minY, &maxX, &maxY)) {
+            info->addMotionRange(AMOTION_EVENT_AXIS_X, mSource, minX, maxX, 0.0f, 0.0f, 0.0f);
+            info->addMotionRange(AMOTION_EVENT_AXIS_Y, mSource, minY, maxY, 0.0f, 0.0f, 0.0f);
+        }
+    } else {
+        info->addMotionRange(AMOTION_EVENT_AXIS_X, mSource, -1.0f, 1.0f, 0.0f, mXScale, 0.0f);
+        info->addMotionRange(AMOTION_EVENT_AXIS_Y, mSource, -1.0f, 1.0f, 0.0f, mYScale, 0.0f);
+    }
+    info->addMotionRange(AMOTION_EVENT_AXIS_PRESSURE, mSource, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f);
+
+    if (mCursorScrollAccumulator.haveRelativeVWheel()) {
+        info->addMotionRange(AMOTION_EVENT_AXIS_VSCROLL, mSource, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f);
+    }
+    if (mCursorScrollAccumulator.haveRelativeHWheel()) {
+        info->addMotionRange(AMOTION_EVENT_AXIS_HSCROLL, mSource, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f);
+    }
+}
+
+void CursorInputMapper::dump(String8& dump) {
+    dump.append(INDENT2 "Cursor Input Mapper:\n");
+    dumpParameters(dump);
+    dump.appendFormat(INDENT3 "XScale: %0.3f\n", mXScale);
+    dump.appendFormat(INDENT3 "YScale: %0.3f\n", mYScale);
+    dump.appendFormat(INDENT3 "XPrecision: %0.3f\n", mXPrecision);
+    dump.appendFormat(INDENT3 "YPrecision: %0.3f\n", mYPrecision);
+    dump.appendFormat(INDENT3 "HaveVWheel: %s\n",
+            toString(mCursorScrollAccumulator.haveRelativeVWheel()));
+    dump.appendFormat(INDENT3 "HaveHWheel: %s\n",
+            toString(mCursorScrollAccumulator.haveRelativeHWheel()));
+    dump.appendFormat(INDENT3 "VWheelScale: %0.3f\n", mVWheelScale);
+    dump.appendFormat(INDENT3 "HWheelScale: %0.3f\n", mHWheelScale);
+    dump.appendFormat(INDENT3 "Orientation: %d\n", mOrientation);
+    dump.appendFormat(INDENT3 "ButtonState: 0x%08x\n", mButtonState);
+    dump.appendFormat(INDENT3 "Down: %s\n", toString(isPointerDown(mButtonState)));
+    dump.appendFormat(INDENT3 "DownTime: %lld\n", (long long)mDownTime);
+}
+
+void CursorInputMapper::configure(nsecs_t when,
+        const InputReaderConfiguration* config, uint32_t changes) {
+    InputMapper::configure(when, config, changes);
+
+    if (!changes) { // first time only
+        mCursorScrollAccumulator.configure(getDevice());
+
+        // Configure basic parameters.
+        configureParameters();
+
+        // Configure device mode.
+        switch (mParameters.mode) {
+        case Parameters::MODE_POINTER:
+            mSource = AINPUT_SOURCE_MOUSE;
+            mXPrecision = 1.0f;
+            mYPrecision = 1.0f;
+            mXScale = 1.0f;
+            mYScale = 1.0f;
+            mPointerController = getPolicy()->obtainPointerController(getDeviceId());
+            break;
+        case Parameters::MODE_NAVIGATION:
+            mSource = AINPUT_SOURCE_TRACKBALL;
+            mXPrecision = TRACKBALL_MOVEMENT_THRESHOLD;
+            mYPrecision = TRACKBALL_MOVEMENT_THRESHOLD;
+            mXScale = 1.0f / TRACKBALL_MOVEMENT_THRESHOLD;
+            mYScale = 1.0f / TRACKBALL_MOVEMENT_THRESHOLD;
+            break;
+        }
+
+        mVWheelScale = 1.0f;
+        mHWheelScale = 1.0f;
+    }
+
+    if (!changes || (changes & InputReaderConfiguration::CHANGE_POINTER_SPEED)) {
+        mPointerVelocityControl.setParameters(config->pointerVelocityControlParameters);
+        mWheelXVelocityControl.setParameters(config->wheelVelocityControlParameters);
+        mWheelYVelocityControl.setParameters(config->wheelVelocityControlParameters);
+    }
+
+    if (!changes || (changes & InputReaderConfiguration::CHANGE_DISPLAY_INFO)) {
+        if (mParameters.orientationAware && mParameters.hasAssociatedDisplay) {
+            DisplayViewport v;
+            if (config->getDisplayInfo(false /*external*/, &v)) {
+                mOrientation = v.orientation;
+            } else {
+                mOrientation = DISPLAY_ORIENTATION_0;
+            }
+        } else {
+            mOrientation = DISPLAY_ORIENTATION_0;
+        }
+        bumpGeneration();
+    }
+}
+
+void CursorInputMapper::configureParameters() {
+    mParameters.mode = Parameters::MODE_POINTER;
+    String8 cursorModeString;
+    if (getDevice()->getConfiguration().tryGetProperty(String8("cursor.mode"), cursorModeString)) {
+        if (cursorModeString == "navigation") {
+            mParameters.mode = Parameters::MODE_NAVIGATION;
+        } else if (cursorModeString != "pointer" && cursorModeString != "default") {
+            ALOGW("Invalid value for cursor.mode: '%s'", cursorModeString.string());
+        }
+    }
+
+    mParameters.orientationAware = false;
+    getDevice()->getConfiguration().tryGetProperty(String8("cursor.orientationAware"),
+            mParameters.orientationAware);
+
+    mParameters.hasAssociatedDisplay = false;
+    if (mParameters.mode == Parameters::MODE_POINTER || mParameters.orientationAware) {
+        mParameters.hasAssociatedDisplay = true;
+    }
+}
+
+void CursorInputMapper::dumpParameters(String8& dump) {
+    dump.append(INDENT3 "Parameters:\n");
+    dump.appendFormat(INDENT4 "HasAssociatedDisplay: %s\n",
+            toString(mParameters.hasAssociatedDisplay));
+
+    switch (mParameters.mode) {
+    case Parameters::MODE_POINTER:
+        dump.append(INDENT4 "Mode: pointer\n");
+        break;
+    case Parameters::MODE_NAVIGATION:
+        dump.append(INDENT4 "Mode: navigation\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+
+    dump.appendFormat(INDENT4 "OrientationAware: %s\n",
+            toString(mParameters.orientationAware));
+}
+
+void CursorInputMapper::reset(nsecs_t when) {
+    mButtonState = 0;
+    mDownTime = 0;
+
+    mPointerVelocityControl.reset();
+    mWheelXVelocityControl.reset();
+    mWheelYVelocityControl.reset();
+
+    mCursorButtonAccumulator.reset(getDevice());
+    mCursorMotionAccumulator.reset(getDevice());
+    mCursorScrollAccumulator.reset(getDevice());
+
+    InputMapper::reset(when);
+}
+
+void CursorInputMapper::process(const RawEvent* rawEvent) {
+    mCursorButtonAccumulator.process(rawEvent);
+    mCursorMotionAccumulator.process(rawEvent);
+    mCursorScrollAccumulator.process(rawEvent);
+
+    if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) {
+        sync(rawEvent->when);
+    }
+}
+
+void CursorInputMapper::sync(nsecs_t when) {
+    int32_t lastButtonState = mButtonState;
+    int32_t currentButtonState = mCursorButtonAccumulator.getButtonState();
+    mButtonState = currentButtonState;
+
+    bool wasDown = isPointerDown(lastButtonState);
+    bool down = isPointerDown(currentButtonState);
+    bool downChanged;
+    if (!wasDown && down) {
+        mDownTime = when;
+        downChanged = true;
+    } else if (wasDown && !down) {
+        downChanged = true;
+    } else {
+        downChanged = false;
+    }
+    nsecs_t downTime = mDownTime;
+    bool buttonsChanged = currentButtonState != lastButtonState;
+    bool buttonsPressed = currentButtonState & ~lastButtonState;
+
+    float deltaX = mCursorMotionAccumulator.getRelativeX() * mXScale;
+    float deltaY = mCursorMotionAccumulator.getRelativeY() * mYScale;
+    bool moved = deltaX != 0 || deltaY != 0;
+
+    // Rotate delta according to orientation if needed.
+    if (mParameters.orientationAware && mParameters.hasAssociatedDisplay
+            && (deltaX != 0.0f || deltaY != 0.0f)) {
+        rotateDelta(mOrientation, &deltaX, &deltaY);
+    }
+
+    // Move the pointer.
+    PointerProperties pointerProperties;
+    pointerProperties.clear();
+    pointerProperties.id = 0;
+    pointerProperties.toolType = AMOTION_EVENT_TOOL_TYPE_MOUSE;
+
+    PointerCoords pointerCoords;
+    pointerCoords.clear();
+
+    float vscroll = mCursorScrollAccumulator.getRelativeVWheel();
+    float hscroll = mCursorScrollAccumulator.getRelativeHWheel();
+    bool scrolled = vscroll != 0 || hscroll != 0;
+
+    mWheelYVelocityControl.move(when, NULL, &vscroll);
+    mWheelXVelocityControl.move(when, &hscroll, NULL);
+
+    mPointerVelocityControl.move(when, &deltaX, &deltaY);
+
+    int32_t displayId;
+    if (mPointerController != NULL) {
+        if (moved || scrolled || buttonsChanged) {
+            mPointerController->setPresentation(
+                    PointerControllerInterface::PRESENTATION_POINTER);
+
+            if (moved) {
+                mPointerController->move(deltaX, deltaY);
+            }
+
+            if (buttonsChanged) {
+                mPointerController->setButtonState(currentButtonState);
+            }
+
+            mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
+        }
+
+        float x, y;
+        mPointerController->getPosition(&x, &y);
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+        displayId = ADISPLAY_ID_DEFAULT;
+    } else {
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_X, deltaX);
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, deltaY);
+        displayId = ADISPLAY_ID_NONE;
+    }
+
+    pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, down ? 1.0f : 0.0f);
+
+    // Moving an external trackball or mouse should wake the device.
+    // We don't do this for internal cursor devices to prevent them from waking up
+    // the device in your pocket.
+    // TODO: Use the input device configuration to control this behavior more finely.
+    uint32_t policyFlags = 0;
+    if ((buttonsPressed || moved || scrolled) && getDevice()->isExternal()) {
+        policyFlags |= POLICY_FLAG_WAKE;
+    }
+
+    // Synthesize key down from buttons if needed.
+    synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
+            policyFlags, lastButtonState, currentButtonState);
+
+    // Send motion event.
+    if (downChanged || moved || scrolled || buttonsChanged) {
+        int32_t metaState = mContext->getGlobalMetaState();
+        int32_t motionEventAction;
+        if (downChanged) {
+            motionEventAction = down ? AMOTION_EVENT_ACTION_DOWN : AMOTION_EVENT_ACTION_UP;
+        } else if (down || mPointerController == NULL) {
+            motionEventAction = AMOTION_EVENT_ACTION_MOVE;
+        } else {
+            motionEventAction = AMOTION_EVENT_ACTION_HOVER_MOVE;
+        }
+
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                motionEventAction, 0, metaState, currentButtonState, 0,
+                displayId, 1, &pointerProperties, &pointerCoords,
+                mXPrecision, mYPrecision, downTime);
+        getListener()->notifyMotion(&args);
+
+        // Send hover move after UP to tell the application that the mouse is hovering now.
+        if (motionEventAction == AMOTION_EVENT_ACTION_UP
+                && mPointerController != NULL) {
+            NotifyMotionArgs hoverArgs(when, getDeviceId(), mSource, policyFlags,
+                    AMOTION_EVENT_ACTION_HOVER_MOVE, 0,
+                    metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE,
+                    displayId, 1, &pointerProperties, &pointerCoords,
+                    mXPrecision, mYPrecision, downTime);
+            getListener()->notifyMotion(&hoverArgs);
+        }
+
+        // Send scroll events.
+        if (scrolled) {
+            pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_VSCROLL, vscroll);
+            pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_HSCROLL, hscroll);
+
+            NotifyMotionArgs scrollArgs(when, getDeviceId(), mSource, policyFlags,
+                    AMOTION_EVENT_ACTION_SCROLL, 0, metaState, currentButtonState,
+                    AMOTION_EVENT_EDGE_FLAG_NONE,
+                    displayId, 1, &pointerProperties, &pointerCoords,
+                    mXPrecision, mYPrecision, downTime);
+            getListener()->notifyMotion(&scrollArgs);
+        }
+    }
+
+    // Synthesize key up from buttons if needed.
+    synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
+            policyFlags, lastButtonState, currentButtonState);
+
+    mCursorMotionAccumulator.finishSync();
+    mCursorScrollAccumulator.finishSync();
+}
+
+int32_t CursorInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
+    if (scanCode >= BTN_MOUSE && scanCode < BTN_JOYSTICK) {
+        return getEventHub()->getScanCodeState(getDeviceId(), scanCode);
+    } else {
+        return AKEY_STATE_UNKNOWN;
+    }
+}
+
+void CursorInputMapper::fadePointer() {
+    if (mPointerController != NULL) {
+        mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+    }
+}
+
+
+// --- TouchInputMapper ---
+
+TouchInputMapper::TouchInputMapper(InputDevice* device) :
+        InputMapper(device),
+        mSource(0), mDeviceMode(DEVICE_MODE_DISABLED),
+        mSurfaceWidth(-1), mSurfaceHeight(-1), mSurfaceLeft(0), mSurfaceTop(0),
+        mSurfaceOrientation(DISPLAY_ORIENTATION_0) {
+}
+
+TouchInputMapper::~TouchInputMapper() {
+}
+
+uint32_t TouchInputMapper::getSources() {
+    return mSource;
+}
+
+void TouchInputMapper::populateDeviceInfo(InputDeviceInfo* info) {
+    InputMapper::populateDeviceInfo(info);
+
+    if (mDeviceMode != DEVICE_MODE_DISABLED) {
+        info->addMotionRange(mOrientedRanges.x);
+        info->addMotionRange(mOrientedRanges.y);
+        info->addMotionRange(mOrientedRanges.pressure);
+
+        if (mOrientedRanges.haveSize) {
+            info->addMotionRange(mOrientedRanges.size);
+        }
+
+        if (mOrientedRanges.haveTouchSize) {
+            info->addMotionRange(mOrientedRanges.touchMajor);
+            info->addMotionRange(mOrientedRanges.touchMinor);
+        }
+
+        if (mOrientedRanges.haveToolSize) {
+            info->addMotionRange(mOrientedRanges.toolMajor);
+            info->addMotionRange(mOrientedRanges.toolMinor);
+        }
+
+        if (mOrientedRanges.haveOrientation) {
+            info->addMotionRange(mOrientedRanges.orientation);
+        }
+
+        if (mOrientedRanges.haveDistance) {
+            info->addMotionRange(mOrientedRanges.distance);
+        }
+
+        if (mOrientedRanges.haveTilt) {
+            info->addMotionRange(mOrientedRanges.tilt);
+        }
+
+        if (mCursorScrollAccumulator.haveRelativeVWheel()) {
+            info->addMotionRange(AMOTION_EVENT_AXIS_VSCROLL, mSource, -1.0f, 1.0f, 0.0f, 0.0f,
+                    0.0f);
+        }
+        if (mCursorScrollAccumulator.haveRelativeHWheel()) {
+            info->addMotionRange(AMOTION_EVENT_AXIS_HSCROLL, mSource, -1.0f, 1.0f, 0.0f, 0.0f,
+                    0.0f);
+        }
+        if (mCalibration.coverageCalibration == Calibration::COVERAGE_CALIBRATION_BOX) {
+            const InputDeviceInfo::MotionRange& x = mOrientedRanges.x;
+            const InputDeviceInfo::MotionRange& y = mOrientedRanges.y;
+            info->addMotionRange(AMOTION_EVENT_AXIS_GENERIC_1, mSource, x.min, x.max, x.flat,
+                    x.fuzz, x.resolution);
+            info->addMotionRange(AMOTION_EVENT_AXIS_GENERIC_2, mSource, y.min, y.max, y.flat,
+                    y.fuzz, y.resolution);
+            info->addMotionRange(AMOTION_EVENT_AXIS_GENERIC_3, mSource, x.min, x.max, x.flat,
+                    x.fuzz, x.resolution);
+            info->addMotionRange(AMOTION_EVENT_AXIS_GENERIC_4, mSource, y.min, y.max, y.flat,
+                    y.fuzz, y.resolution);
+        }
+        info->setButtonUnderPad(mParameters.hasButtonUnderPad);
+    }
+}
+
+void TouchInputMapper::dump(String8& dump) {
+    dump.append(INDENT2 "Touch Input Mapper:\n");
+    dumpParameters(dump);
+    dumpVirtualKeys(dump);
+    dumpRawPointerAxes(dump);
+    dumpCalibration(dump);
+    dumpAffineTransformation(dump);
+    dumpSurface(dump);
+
+    dump.appendFormat(INDENT3 "Translation and Scaling Factors:\n");
+    dump.appendFormat(INDENT4 "XTranslate: %0.3f\n", mXTranslate);
+    dump.appendFormat(INDENT4 "YTranslate: %0.3f\n", mYTranslate);
+    dump.appendFormat(INDENT4 "XScale: %0.3f\n", mXScale);
+    dump.appendFormat(INDENT4 "YScale: %0.3f\n", mYScale);
+    dump.appendFormat(INDENT4 "XPrecision: %0.3f\n", mXPrecision);
+    dump.appendFormat(INDENT4 "YPrecision: %0.3f\n", mYPrecision);
+    dump.appendFormat(INDENT4 "GeometricScale: %0.3f\n", mGeometricScale);
+    dump.appendFormat(INDENT4 "PressureScale: %0.3f\n", mPressureScale);
+    dump.appendFormat(INDENT4 "SizeScale: %0.3f\n", mSizeScale);
+    dump.appendFormat(INDENT4 "OrientationScale: %0.3f\n", mOrientationScale);
+    dump.appendFormat(INDENT4 "DistanceScale: %0.3f\n", mDistanceScale);
+    dump.appendFormat(INDENT4 "HaveTilt: %s\n", toString(mHaveTilt));
+    dump.appendFormat(INDENT4 "TiltXCenter: %0.3f\n", mTiltXCenter);
+    dump.appendFormat(INDENT4 "TiltXScale: %0.3f\n", mTiltXScale);
+    dump.appendFormat(INDENT4 "TiltYCenter: %0.3f\n", mTiltYCenter);
+    dump.appendFormat(INDENT4 "TiltYScale: %0.3f\n", mTiltYScale);
+
+    dump.appendFormat(INDENT3 "Last Button State: 0x%08x\n", mLastButtonState);
+
+    dump.appendFormat(INDENT3 "Last Raw Touch: pointerCount=%d\n",
+            mLastRawPointerData.pointerCount);
+    for (uint32_t i = 0; i < mLastRawPointerData.pointerCount; i++) {
+        const RawPointerData::Pointer& pointer = mLastRawPointerData.pointers[i];
+        dump.appendFormat(INDENT4 "[%d]: id=%d, x=%d, y=%d, pressure=%d, "
+                "touchMajor=%d, touchMinor=%d, toolMajor=%d, toolMinor=%d, "
+                "orientation=%d, tiltX=%d, tiltY=%d, distance=%d, "
+                "toolType=%d, isHovering=%s\n", i,
+                pointer.id, pointer.x, pointer.y, pointer.pressure,
+                pointer.touchMajor, pointer.touchMinor,
+                pointer.toolMajor, pointer.toolMinor,
+                pointer.orientation, pointer.tiltX, pointer.tiltY, pointer.distance,
+                pointer.toolType, toString(pointer.isHovering));
+    }
+
+    dump.appendFormat(INDENT3 "Last Cooked Touch: pointerCount=%d\n",
+            mLastCookedPointerData.pointerCount);
+    for (uint32_t i = 0; i < mLastCookedPointerData.pointerCount; i++) {
+        const PointerProperties& pointerProperties = mLastCookedPointerData.pointerProperties[i];
+        const PointerCoords& pointerCoords = mLastCookedPointerData.pointerCoords[i];
+        dump.appendFormat(INDENT4 "[%d]: id=%d, x=%0.3f, y=%0.3f, pressure=%0.3f, "
+                "touchMajor=%0.3f, touchMinor=%0.3f, toolMajor=%0.3f, toolMinor=%0.3f, "
+                "orientation=%0.3f, tilt=%0.3f, distance=%0.3f, "
+                "toolType=%d, isHovering=%s\n", i,
+                pointerProperties.id,
+                pointerCoords.getX(),
+                pointerCoords.getY(),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_ORIENTATION),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_TILT),
+                pointerCoords.getAxisValue(AMOTION_EVENT_AXIS_DISTANCE),
+                pointerProperties.toolType,
+                toString(mLastCookedPointerData.isHovering(i)));
+    }
+
+    if (mDeviceMode == DEVICE_MODE_POINTER) {
+        dump.appendFormat(INDENT3 "Pointer Gesture Detector:\n");
+        dump.appendFormat(INDENT4 "XMovementScale: %0.3f\n",
+                mPointerXMovementScale);
+        dump.appendFormat(INDENT4 "YMovementScale: %0.3f\n",
+                mPointerYMovementScale);
+        dump.appendFormat(INDENT4 "XZoomScale: %0.3f\n",
+                mPointerXZoomScale);
+        dump.appendFormat(INDENT4 "YZoomScale: %0.3f\n",
+                mPointerYZoomScale);
+        dump.appendFormat(INDENT4 "MaxSwipeWidth: %f\n",
+                mPointerGestureMaxSwipeWidth);
+    }
+}
+
+void TouchInputMapper::configure(nsecs_t when,
+        const InputReaderConfiguration* config, uint32_t changes) {
+    InputMapper::configure(when, config, changes);
+
+    mConfig = *config;
+
+    if (!changes) { // first time only
+        // Configure basic parameters.
+        configureParameters();
+
+        // Configure common accumulators.
+        mCursorScrollAccumulator.configure(getDevice());
+        mTouchButtonAccumulator.configure(getDevice());
+
+        // Configure absolute axis information.
+        configureRawPointerAxes();
+
+        // Prepare input device calibration.
+        parseCalibration();
+        resolveCalibration();
+    }
+
+    if (!changes || (changes & InputReaderConfiguration::TOUCH_AFFINE_TRANSFORMATION)) {
+        // Update location calibration to reflect current settings
+        updateAffineTransformation();
+    }
+
+    if (!changes || (changes & InputReaderConfiguration::CHANGE_POINTER_SPEED)) {
+        // Update pointer speed.
+        mPointerVelocityControl.setParameters(mConfig.pointerVelocityControlParameters);
+        mWheelXVelocityControl.setParameters(mConfig.wheelVelocityControlParameters);
+        mWheelYVelocityControl.setParameters(mConfig.wheelVelocityControlParameters);
+    }
+
+    bool resetNeeded = false;
+    if (!changes || (changes & (InputReaderConfiguration::CHANGE_DISPLAY_INFO
+            | InputReaderConfiguration::CHANGE_POINTER_GESTURE_ENABLEMENT
+            | InputReaderConfiguration::CHANGE_SHOW_TOUCHES))) {
+        // Configure device sources, surface dimensions, orientation and
+        // scaling factors.
+        configureSurface(when, &resetNeeded);
+    }
+
+    if (changes && resetNeeded) {
+        // Send reset, unless this is the first time the device has been configured,
+        // in which case the reader will call reset itself after all mappers are ready.
+        getDevice()->notifyReset(when);
+    }
+}
+
+void TouchInputMapper::configureParameters() {
+    // Use the pointer presentation mode for devices that do not support distinct
+    // multitouch.  The spot-based presentation relies on being able to accurately
+    // locate two or more fingers on the touch pad.
+    mParameters.gestureMode = getEventHub()->hasInputProperty(getDeviceId(), INPUT_PROP_SEMI_MT)
+            ? Parameters::GESTURE_MODE_POINTER : Parameters::GESTURE_MODE_SPOTS;
+
+    String8 gestureModeString;
+    if (getDevice()->getConfiguration().tryGetProperty(String8("touch.gestureMode"),
+            gestureModeString)) {
+        if (gestureModeString == "pointer") {
+            mParameters.gestureMode = Parameters::GESTURE_MODE_POINTER;
+        } else if (gestureModeString == "spots") {
+            mParameters.gestureMode = Parameters::GESTURE_MODE_SPOTS;
+        } else if (gestureModeString != "default") {
+            ALOGW("Invalid value for touch.gestureMode: '%s'", gestureModeString.string());
+        }
+    }
+
+    if (getEventHub()->hasInputProperty(getDeviceId(), INPUT_PROP_DIRECT)) {
+        // The device is a touch screen.
+        mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_SCREEN;
+    } else if (getEventHub()->hasInputProperty(getDeviceId(), INPUT_PROP_POINTER)) {
+        // The device is a pointing device like a track pad.
+        mParameters.deviceType = Parameters::DEVICE_TYPE_POINTER;
+    } else if (getEventHub()->hasRelativeAxis(getDeviceId(), REL_X)
+            || getEventHub()->hasRelativeAxis(getDeviceId(), REL_Y)) {
+        // The device is a cursor device with a touch pad attached.
+        // By default don't use the touch pad to move the pointer.
+        mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_PAD;
+    } else {
+        // The device is a touch pad of unknown purpose.
+        mParameters.deviceType = Parameters::DEVICE_TYPE_POINTER;
+    }
+
+    mParameters.hasButtonUnderPad=
+            getEventHub()->hasInputProperty(getDeviceId(), INPUT_PROP_BUTTONPAD);
+
+    String8 deviceTypeString;
+    if (getDevice()->getConfiguration().tryGetProperty(String8("touch.deviceType"),
+            deviceTypeString)) {
+        if (deviceTypeString == "touchScreen") {
+            mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_SCREEN;
+        } else if (deviceTypeString == "touchPad") {
+            mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_PAD;
+        } else if (deviceTypeString == "touchNavigation") {
+            mParameters.deviceType = Parameters::DEVICE_TYPE_TOUCH_NAVIGATION;
+        } else if (deviceTypeString == "pointer") {
+            mParameters.deviceType = Parameters::DEVICE_TYPE_POINTER;
+        } else if (deviceTypeString != "default") {
+            ALOGW("Invalid value for touch.deviceType: '%s'", deviceTypeString.string());
+        }
+    }
+
+    mParameters.orientationAware = mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN;
+    getDevice()->getConfiguration().tryGetProperty(String8("touch.orientationAware"),
+            mParameters.orientationAware);
+
+    mParameters.hasAssociatedDisplay = false;
+    mParameters.associatedDisplayIsExternal = false;
+    if (mParameters.orientationAware
+            || mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
+            || mParameters.deviceType == Parameters::DEVICE_TYPE_POINTER) {
+        mParameters.hasAssociatedDisplay = true;
+        mParameters.associatedDisplayIsExternal =
+                mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
+                        && getDevice()->isExternal();
+    }
+
+    // Initial downs on external touch devices should wake the device.
+    // Normally we don't do this for internal touch screens to prevent them from waking
+    // up in your pocket but you can enable it using the input device configuration.
+    mParameters.wake = getDevice()->isExternal();
+    getDevice()->getConfiguration().tryGetProperty(String8("touch.wake"),
+            mParameters.wake);
+}
+
+void TouchInputMapper::dumpParameters(String8& dump) {
+    dump.append(INDENT3 "Parameters:\n");
+
+    switch (mParameters.gestureMode) {
+    case Parameters::GESTURE_MODE_POINTER:
+        dump.append(INDENT4 "GestureMode: pointer\n");
+        break;
+    case Parameters::GESTURE_MODE_SPOTS:
+        dump.append(INDENT4 "GestureMode: spots\n");
+        break;
+    default:
+        assert(false);
+    }
+
+    switch (mParameters.deviceType) {
+    case Parameters::DEVICE_TYPE_TOUCH_SCREEN:
+        dump.append(INDENT4 "DeviceType: touchScreen\n");
+        break;
+    case Parameters::DEVICE_TYPE_TOUCH_PAD:
+        dump.append(INDENT4 "DeviceType: touchPad\n");
+        break;
+    case Parameters::DEVICE_TYPE_TOUCH_NAVIGATION:
+        dump.append(INDENT4 "DeviceType: touchNavigation\n");
+        break;
+    case Parameters::DEVICE_TYPE_POINTER:
+        dump.append(INDENT4 "DeviceType: pointer\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+
+    dump.appendFormat(INDENT4 "AssociatedDisplay: hasAssociatedDisplay=%s, isExternal=%s\n",
+            toString(mParameters.hasAssociatedDisplay),
+            toString(mParameters.associatedDisplayIsExternal));
+    dump.appendFormat(INDENT4 "OrientationAware: %s\n",
+            toString(mParameters.orientationAware));
+}
+
+void TouchInputMapper::configureRawPointerAxes() {
+    mRawPointerAxes.clear();
+}
+
+void TouchInputMapper::dumpRawPointerAxes(String8& dump) {
+    dump.append(INDENT3 "Raw Touch Axes:\n");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.x, "X");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.y, "Y");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.pressure, "Pressure");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.touchMajor, "TouchMajor");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.touchMinor, "TouchMinor");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.toolMajor, "ToolMajor");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.toolMinor, "ToolMinor");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.orientation, "Orientation");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.distance, "Distance");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.tiltX, "TiltX");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.tiltY, "TiltY");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.trackingId, "TrackingId");
+    dumpRawAbsoluteAxisInfo(dump, mRawPointerAxes.slot, "Slot");
+}
+
+void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
+    int32_t oldDeviceMode = mDeviceMode;
+
+    // Determine device mode.
+    if (mParameters.deviceType == Parameters::DEVICE_TYPE_POINTER
+            && mConfig.pointerGesturesEnabled) {
+        mSource = AINPUT_SOURCE_MOUSE;
+        mDeviceMode = DEVICE_MODE_POINTER;
+        if (hasStylus()) {
+            mSource |= AINPUT_SOURCE_STYLUS;
+        }
+    } else if (mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_SCREEN
+            && mParameters.hasAssociatedDisplay) {
+        mSource = AINPUT_SOURCE_TOUCHSCREEN;
+        mDeviceMode = DEVICE_MODE_DIRECT;
+        if (hasStylus()) {
+            mSource |= AINPUT_SOURCE_STYLUS;
+        }
+    } else if (mParameters.deviceType == Parameters::DEVICE_TYPE_TOUCH_NAVIGATION) {
+        mSource = AINPUT_SOURCE_TOUCH_NAVIGATION;
+        mDeviceMode = DEVICE_MODE_NAVIGATION;
+    } else {
+        mSource = AINPUT_SOURCE_TOUCHPAD;
+        mDeviceMode = DEVICE_MODE_UNSCALED;
+    }
+
+    // Ensure we have valid X and Y axes.
+    if (!mRawPointerAxes.x.valid || !mRawPointerAxes.y.valid) {
+        ALOGW(INDENT "Touch device '%s' did not report support for X or Y axis!  "
+                "The device will be inoperable.", getDeviceName().string());
+        mDeviceMode = DEVICE_MODE_DISABLED;
+        return;
+    }
+
+    // Raw width and height in the natural orientation.
+    int32_t rawWidth = mRawPointerAxes.x.maxValue - mRawPointerAxes.x.minValue + 1;
+    int32_t rawHeight = mRawPointerAxes.y.maxValue - mRawPointerAxes.y.minValue + 1;
+
+    // Get associated display dimensions.
+    DisplayViewport newViewport;
+    if (mParameters.hasAssociatedDisplay) {
+        if (!mConfig.getDisplayInfo(mParameters.associatedDisplayIsExternal, &newViewport)) {
+            ALOGI(INDENT "Touch device '%s' could not query the properties of its associated "
+                    "display.  The device will be inoperable until the display size "
+                    "becomes available.",
+                    getDeviceName().string());
+            mDeviceMode = DEVICE_MODE_DISABLED;
+            return;
+        }
+    } else {
+        newViewport.setNonDisplayViewport(rawWidth, rawHeight);
+    }
+    bool viewportChanged = mViewport != newViewport;
+    if (viewportChanged) {
+        mViewport = newViewport;
+
+        if (mDeviceMode == DEVICE_MODE_DIRECT || mDeviceMode == DEVICE_MODE_POINTER) {
+            // Convert rotated viewport to natural surface coordinates.
+            int32_t naturalLogicalWidth, naturalLogicalHeight;
+            int32_t naturalPhysicalWidth, naturalPhysicalHeight;
+            int32_t naturalPhysicalLeft, naturalPhysicalTop;
+            int32_t naturalDeviceWidth, naturalDeviceHeight;
+            switch (mViewport.orientation) {
+            case DISPLAY_ORIENTATION_90:
+                naturalLogicalWidth = mViewport.logicalBottom - mViewport.logicalTop;
+                naturalLogicalHeight = mViewport.logicalRight - mViewport.logicalLeft;
+                naturalPhysicalWidth = mViewport.physicalBottom - mViewport.physicalTop;
+                naturalPhysicalHeight = mViewport.physicalRight - mViewport.physicalLeft;
+                naturalPhysicalLeft = mViewport.deviceHeight - mViewport.physicalBottom;
+                naturalPhysicalTop = mViewport.physicalLeft;
+                naturalDeviceWidth = mViewport.deviceHeight;
+                naturalDeviceHeight = mViewport.deviceWidth;
+                break;
+            case DISPLAY_ORIENTATION_180:
+                naturalLogicalWidth = mViewport.logicalRight - mViewport.logicalLeft;
+                naturalLogicalHeight = mViewport.logicalBottom - mViewport.logicalTop;
+                naturalPhysicalWidth = mViewport.physicalRight - mViewport.physicalLeft;
+                naturalPhysicalHeight = mViewport.physicalBottom - mViewport.physicalTop;
+                naturalPhysicalLeft = mViewport.deviceWidth - mViewport.physicalRight;
+                naturalPhysicalTop = mViewport.deviceHeight - mViewport.physicalBottom;
+                naturalDeviceWidth = mViewport.deviceWidth;
+                naturalDeviceHeight = mViewport.deviceHeight;
+                break;
+            case DISPLAY_ORIENTATION_270:
+                naturalLogicalWidth = mViewport.logicalBottom - mViewport.logicalTop;
+                naturalLogicalHeight = mViewport.logicalRight - mViewport.logicalLeft;
+                naturalPhysicalWidth = mViewport.physicalBottom - mViewport.physicalTop;
+                naturalPhysicalHeight = mViewport.physicalRight - mViewport.physicalLeft;
+                naturalPhysicalLeft = mViewport.physicalTop;
+                naturalPhysicalTop = mViewport.deviceWidth - mViewport.physicalRight;
+                naturalDeviceWidth = mViewport.deviceHeight;
+                naturalDeviceHeight = mViewport.deviceWidth;
+                break;
+            case DISPLAY_ORIENTATION_0:
+            default:
+                naturalLogicalWidth = mViewport.logicalRight - mViewport.logicalLeft;
+                naturalLogicalHeight = mViewport.logicalBottom - mViewport.logicalTop;
+                naturalPhysicalWidth = mViewport.physicalRight - mViewport.physicalLeft;
+                naturalPhysicalHeight = mViewport.physicalBottom - mViewport.physicalTop;
+                naturalPhysicalLeft = mViewport.physicalLeft;
+                naturalPhysicalTop = mViewport.physicalTop;
+                naturalDeviceWidth = mViewport.deviceWidth;
+                naturalDeviceHeight = mViewport.deviceHeight;
+                break;
+            }
+
+            mSurfaceWidth = naturalLogicalWidth * naturalDeviceWidth / naturalPhysicalWidth;
+            mSurfaceHeight = naturalLogicalHeight * naturalDeviceHeight / naturalPhysicalHeight;
+            mSurfaceLeft = naturalPhysicalLeft * naturalLogicalWidth / naturalPhysicalWidth;
+            mSurfaceTop = naturalPhysicalTop * naturalLogicalHeight / naturalPhysicalHeight;
+
+            mSurfaceOrientation = mParameters.orientationAware ?
+                    mViewport.orientation : DISPLAY_ORIENTATION_0;
+        } else {
+            mSurfaceWidth = rawWidth;
+            mSurfaceHeight = rawHeight;
+            mSurfaceLeft = 0;
+            mSurfaceTop = 0;
+            mSurfaceOrientation = DISPLAY_ORIENTATION_0;
+        }
+    }
+
+    // If moving between pointer modes, need to reset some state.
+    bool deviceModeChanged = mDeviceMode != oldDeviceMode;
+    if (deviceModeChanged) {
+        mOrientedRanges.clear();
+    }
+
+    // Create pointer controller if needed.
+    if (mDeviceMode == DEVICE_MODE_POINTER ||
+            (mDeviceMode == DEVICE_MODE_DIRECT && mConfig.showTouches)) {
+        if (mPointerController == NULL) {
+            mPointerController = getPolicy()->obtainPointerController(getDeviceId());
+        }
+    } else {
+        mPointerController.clear();
+    }
+
+    if (viewportChanged || deviceModeChanged) {
+        ALOGI("Device reconfigured: id=%d, name='%s', size %dx%d, orientation %d, mode %d, "
+                "display id %d",
+                getDeviceId(), getDeviceName().string(), mSurfaceWidth, mSurfaceHeight,
+                mSurfaceOrientation, mDeviceMode, mViewport.displayId);
+
+        // Configure X and Y factors.
+        mXScale = float(mSurfaceWidth) / rawWidth;
+        mYScale = float(mSurfaceHeight) / rawHeight;
+        mXTranslate = -mSurfaceLeft;
+        mYTranslate = -mSurfaceTop;
+        mXPrecision = 1.0f / mXScale;
+        mYPrecision = 1.0f / mYScale;
+
+        mOrientedRanges.x.axis = AMOTION_EVENT_AXIS_X;
+        mOrientedRanges.x.source = mSource;
+        mOrientedRanges.y.axis = AMOTION_EVENT_AXIS_Y;
+        mOrientedRanges.y.source = mSource;
+
+        configureVirtualKeys();
+
+        // Scale factor for terms that are not oriented in a particular axis.
+        // If the pixels are square then xScale == yScale otherwise we fake it
+        // by choosing an average.
+        mGeometricScale = avg(mXScale, mYScale);
+
+        // Size of diagonal axis.
+        float diagonalSize = hypotf(mSurfaceWidth, mSurfaceHeight);
+
+        // Size factors.
+        if (mCalibration.sizeCalibration != Calibration::SIZE_CALIBRATION_NONE) {
+            if (mRawPointerAxes.touchMajor.valid
+                    && mRawPointerAxes.touchMajor.maxValue != 0) {
+                mSizeScale = 1.0f / mRawPointerAxes.touchMajor.maxValue;
+            } else if (mRawPointerAxes.toolMajor.valid
+                    && mRawPointerAxes.toolMajor.maxValue != 0) {
+                mSizeScale = 1.0f / mRawPointerAxes.toolMajor.maxValue;
+            } else {
+                mSizeScale = 0.0f;
+            }
+
+            mOrientedRanges.haveTouchSize = true;
+            mOrientedRanges.haveToolSize = true;
+            mOrientedRanges.haveSize = true;
+
+            mOrientedRanges.touchMajor.axis = AMOTION_EVENT_AXIS_TOUCH_MAJOR;
+            mOrientedRanges.touchMajor.source = mSource;
+            mOrientedRanges.touchMajor.min = 0;
+            mOrientedRanges.touchMajor.max = diagonalSize;
+            mOrientedRanges.touchMajor.flat = 0;
+            mOrientedRanges.touchMajor.fuzz = 0;
+            mOrientedRanges.touchMajor.resolution = 0;
+
+            mOrientedRanges.touchMinor = mOrientedRanges.touchMajor;
+            mOrientedRanges.touchMinor.axis = AMOTION_EVENT_AXIS_TOUCH_MINOR;
+
+            mOrientedRanges.toolMajor.axis = AMOTION_EVENT_AXIS_TOOL_MAJOR;
+            mOrientedRanges.toolMajor.source = mSource;
+            mOrientedRanges.toolMajor.min = 0;
+            mOrientedRanges.toolMajor.max = diagonalSize;
+            mOrientedRanges.toolMajor.flat = 0;
+            mOrientedRanges.toolMajor.fuzz = 0;
+            mOrientedRanges.toolMajor.resolution = 0;
+
+            mOrientedRanges.toolMinor = mOrientedRanges.toolMajor;
+            mOrientedRanges.toolMinor.axis = AMOTION_EVENT_AXIS_TOOL_MINOR;
+
+            mOrientedRanges.size.axis = AMOTION_EVENT_AXIS_SIZE;
+            mOrientedRanges.size.source = mSource;
+            mOrientedRanges.size.min = 0;
+            mOrientedRanges.size.max = 1.0;
+            mOrientedRanges.size.flat = 0;
+            mOrientedRanges.size.fuzz = 0;
+            mOrientedRanges.size.resolution = 0;
+        } else {
+            mSizeScale = 0.0f;
+        }
+
+        // Pressure factors.
+        mPressureScale = 0;
+        if (mCalibration.pressureCalibration == Calibration::PRESSURE_CALIBRATION_PHYSICAL
+                || mCalibration.pressureCalibration
+                        == Calibration::PRESSURE_CALIBRATION_AMPLITUDE) {
+            if (mCalibration.havePressureScale) {
+                mPressureScale = mCalibration.pressureScale;
+            } else if (mRawPointerAxes.pressure.valid
+                    && mRawPointerAxes.pressure.maxValue != 0) {
+                mPressureScale = 1.0f / mRawPointerAxes.pressure.maxValue;
+            }
+        }
+
+        mOrientedRanges.pressure.axis = AMOTION_EVENT_AXIS_PRESSURE;
+        mOrientedRanges.pressure.source = mSource;
+        mOrientedRanges.pressure.min = 0;
+        mOrientedRanges.pressure.max = 1.0;
+        mOrientedRanges.pressure.flat = 0;
+        mOrientedRanges.pressure.fuzz = 0;
+        mOrientedRanges.pressure.resolution = 0;
+
+        // Tilt
+        mTiltXCenter = 0;
+        mTiltXScale = 0;
+        mTiltYCenter = 0;
+        mTiltYScale = 0;
+        mHaveTilt = mRawPointerAxes.tiltX.valid && mRawPointerAxes.tiltY.valid;
+        if (mHaveTilt) {
+            mTiltXCenter = avg(mRawPointerAxes.tiltX.minValue,
+                    mRawPointerAxes.tiltX.maxValue);
+            mTiltYCenter = avg(mRawPointerAxes.tiltY.minValue,
+                    mRawPointerAxes.tiltY.maxValue);
+            mTiltXScale = M_PI / 180;
+            mTiltYScale = M_PI / 180;
+
+            mOrientedRanges.haveTilt = true;
+
+            mOrientedRanges.tilt.axis = AMOTION_EVENT_AXIS_TILT;
+            mOrientedRanges.tilt.source = mSource;
+            mOrientedRanges.tilt.min = 0;
+            mOrientedRanges.tilt.max = M_PI_2;
+            mOrientedRanges.tilt.flat = 0;
+            mOrientedRanges.tilt.fuzz = 0;
+            mOrientedRanges.tilt.resolution = 0;
+        }
+
+        // Orientation
+        mOrientationScale = 0;
+        if (mHaveTilt) {
+            mOrientedRanges.haveOrientation = true;
+
+            mOrientedRanges.orientation.axis = AMOTION_EVENT_AXIS_ORIENTATION;
+            mOrientedRanges.orientation.source = mSource;
+            mOrientedRanges.orientation.min = -M_PI;
+            mOrientedRanges.orientation.max = M_PI;
+            mOrientedRanges.orientation.flat = 0;
+            mOrientedRanges.orientation.fuzz = 0;
+            mOrientedRanges.orientation.resolution = 0;
+        } else if (mCalibration.orientationCalibration !=
+                Calibration::ORIENTATION_CALIBRATION_NONE) {
+            if (mCalibration.orientationCalibration
+                    == Calibration::ORIENTATION_CALIBRATION_INTERPOLATED) {
+                if (mRawPointerAxes.orientation.valid) {
+                    if (mRawPointerAxes.orientation.maxValue > 0) {
+                        mOrientationScale = M_PI_2 / mRawPointerAxes.orientation.maxValue;
+                    } else if (mRawPointerAxes.orientation.minValue < 0) {
+                        mOrientationScale = -M_PI_2 / mRawPointerAxes.orientation.minValue;
+                    } else {
+                        mOrientationScale = 0;
+                    }
+                }
+            }
+
+            mOrientedRanges.haveOrientation = true;
+
+            mOrientedRanges.orientation.axis = AMOTION_EVENT_AXIS_ORIENTATION;
+            mOrientedRanges.orientation.source = mSource;
+            mOrientedRanges.orientation.min = -M_PI_2;
+            mOrientedRanges.orientation.max = M_PI_2;
+            mOrientedRanges.orientation.flat = 0;
+            mOrientedRanges.orientation.fuzz = 0;
+            mOrientedRanges.orientation.resolution = 0;
+        }
+
+        // Distance
+        mDistanceScale = 0;
+        if (mCalibration.distanceCalibration != Calibration::DISTANCE_CALIBRATION_NONE) {
+            if (mCalibration.distanceCalibration
+                    == Calibration::DISTANCE_CALIBRATION_SCALED) {
+                if (mCalibration.haveDistanceScale) {
+                    mDistanceScale = mCalibration.distanceScale;
+                } else {
+                    mDistanceScale = 1.0f;
+                }
+            }
+
+            mOrientedRanges.haveDistance = true;
+
+            mOrientedRanges.distance.axis = AMOTION_EVENT_AXIS_DISTANCE;
+            mOrientedRanges.distance.source = mSource;
+            mOrientedRanges.distance.min =
+                    mRawPointerAxes.distance.minValue * mDistanceScale;
+            mOrientedRanges.distance.max =
+                    mRawPointerAxes.distance.maxValue * mDistanceScale;
+            mOrientedRanges.distance.flat = 0;
+            mOrientedRanges.distance.fuzz =
+                    mRawPointerAxes.distance.fuzz * mDistanceScale;
+            mOrientedRanges.distance.resolution = 0;
+        }
+
+        // Compute oriented precision, scales and ranges.
+        // Note that the maximum value reported is an inclusive maximum value so it is one
+        // unit less than the total width or height of surface.
+        switch (mSurfaceOrientation) {
+        case DISPLAY_ORIENTATION_90:
+        case DISPLAY_ORIENTATION_270:
+            mOrientedXPrecision = mYPrecision;
+            mOrientedYPrecision = mXPrecision;
+
+            mOrientedRanges.x.min = mYTranslate;
+            mOrientedRanges.x.max = mSurfaceHeight + mYTranslate - 1;
+            mOrientedRanges.x.flat = 0;
+            mOrientedRanges.x.fuzz = 0;
+            mOrientedRanges.x.resolution = mRawPointerAxes.y.resolution * mYScale;
+
+            mOrientedRanges.y.min = mXTranslate;
+            mOrientedRanges.y.max = mSurfaceWidth + mXTranslate - 1;
+            mOrientedRanges.y.flat = 0;
+            mOrientedRanges.y.fuzz = 0;
+            mOrientedRanges.y.resolution = mRawPointerAxes.x.resolution * mXScale;
+            break;
+
+        default:
+            mOrientedXPrecision = mXPrecision;
+            mOrientedYPrecision = mYPrecision;
+
+            mOrientedRanges.x.min = mXTranslate;
+            mOrientedRanges.x.max = mSurfaceWidth + mXTranslate - 1;
+            mOrientedRanges.x.flat = 0;
+            mOrientedRanges.x.fuzz = 0;
+            mOrientedRanges.x.resolution = mRawPointerAxes.x.resolution * mXScale;
+
+            mOrientedRanges.y.min = mYTranslate;
+            mOrientedRanges.y.max = mSurfaceHeight + mYTranslate - 1;
+            mOrientedRanges.y.flat = 0;
+            mOrientedRanges.y.fuzz = 0;
+            mOrientedRanges.y.resolution = mRawPointerAxes.y.resolution * mYScale;
+            break;
+        }
+
+        // Location
+        updateAffineTransformation();
+
+        if (mDeviceMode == DEVICE_MODE_POINTER) {
+            // Compute pointer gesture detection parameters.
+            float rawDiagonal = hypotf(rawWidth, rawHeight);
+            float displayDiagonal = hypotf(mSurfaceWidth, mSurfaceHeight);
+
+            // Scale movements such that one whole swipe of the touch pad covers a
+            // given area relative to the diagonal size of the display when no acceleration
+            // is applied.
+            // Assume that the touch pad has a square aspect ratio such that movements in
+            // X and Y of the same number of raw units cover the same physical distance.
+            mPointerXMovementScale = mConfig.pointerGestureMovementSpeedRatio
+                    * displayDiagonal / rawDiagonal;
+            mPointerYMovementScale = mPointerXMovementScale;
+
+            // Scale zooms to cover a smaller range of the display than movements do.
+            // This value determines the area around the pointer that is affected by freeform
+            // pointer gestures.
+            mPointerXZoomScale = mConfig.pointerGestureZoomSpeedRatio
+                    * displayDiagonal / rawDiagonal;
+            mPointerYZoomScale = mPointerXZoomScale;
+
+            // Max width between pointers to detect a swipe gesture is more than some fraction
+            // of the diagonal axis of the touch pad.  Touches that are wider than this are
+            // translated into freeform gestures.
+            mPointerGestureMaxSwipeWidth =
+                    mConfig.pointerGestureSwipeMaxWidthRatio * rawDiagonal;
+
+            // Abort current pointer usages because the state has changed.
+            abortPointerUsage(when, 0 /*policyFlags*/);
+        }
+
+        // Inform the dispatcher about the changes.
+        *outResetNeeded = true;
+        bumpGeneration();
+    }
+}
+
+void TouchInputMapper::dumpSurface(String8& dump) {
+    dump.appendFormat(INDENT3 "Viewport: displayId=%d, orientation=%d, "
+            "logicalFrame=[%d, %d, %d, %d], "
+            "physicalFrame=[%d, %d, %d, %d], "
+            "deviceSize=[%d, %d]\n",
+            mViewport.displayId, mViewport.orientation,
+            mViewport.logicalLeft, mViewport.logicalTop,
+            mViewport.logicalRight, mViewport.logicalBottom,
+            mViewport.physicalLeft, mViewport.physicalTop,
+            mViewport.physicalRight, mViewport.physicalBottom,
+            mViewport.deviceWidth, mViewport.deviceHeight);
+
+    dump.appendFormat(INDENT3 "SurfaceWidth: %dpx\n", mSurfaceWidth);
+    dump.appendFormat(INDENT3 "SurfaceHeight: %dpx\n", mSurfaceHeight);
+    dump.appendFormat(INDENT3 "SurfaceLeft: %d\n", mSurfaceLeft);
+    dump.appendFormat(INDENT3 "SurfaceTop: %d\n", mSurfaceTop);
+    dump.appendFormat(INDENT3 "SurfaceOrientation: %d\n", mSurfaceOrientation);
+}
+
+void TouchInputMapper::configureVirtualKeys() {
+    Vector<VirtualKeyDefinition> virtualKeyDefinitions;
+    getEventHub()->getVirtualKeyDefinitions(getDeviceId(), virtualKeyDefinitions);
+
+    mVirtualKeys.clear();
+
+    if (virtualKeyDefinitions.size() == 0) {
+        return;
+    }
+
+    mVirtualKeys.setCapacity(virtualKeyDefinitions.size());
+
+    int32_t touchScreenLeft = mRawPointerAxes.x.minValue;
+    int32_t touchScreenTop = mRawPointerAxes.y.minValue;
+    int32_t touchScreenWidth = mRawPointerAxes.x.maxValue - mRawPointerAxes.x.minValue + 1;
+    int32_t touchScreenHeight = mRawPointerAxes.y.maxValue - mRawPointerAxes.y.minValue + 1;
+
+    for (size_t i = 0; i < virtualKeyDefinitions.size(); i++) {
+        const VirtualKeyDefinition& virtualKeyDefinition =
+                virtualKeyDefinitions[i];
+
+        mVirtualKeys.add();
+        VirtualKey& virtualKey = mVirtualKeys.editTop();
+
+        virtualKey.scanCode = virtualKeyDefinition.scanCode;
+        int32_t keyCode;
+        uint32_t flags;
+        if (getEventHub()->mapKey(getDeviceId(), virtualKey.scanCode, 0, &keyCode, &flags)) {
+            ALOGW(INDENT "VirtualKey %d: could not obtain key code, ignoring",
+                    virtualKey.scanCode);
+            mVirtualKeys.pop(); // drop the key
+            continue;
+        }
+
+        virtualKey.keyCode = keyCode;
+        virtualKey.flags = flags;
+
+        // convert the key definition's display coordinates into touch coordinates for a hit box
+        int32_t halfWidth = virtualKeyDefinition.width / 2;
+        int32_t halfHeight = virtualKeyDefinition.height / 2;
+
+        virtualKey.hitLeft = (virtualKeyDefinition.centerX - halfWidth)
+                * touchScreenWidth / mSurfaceWidth + touchScreenLeft;
+        virtualKey.hitRight= (virtualKeyDefinition.centerX + halfWidth)
+                * touchScreenWidth / mSurfaceWidth + touchScreenLeft;
+        virtualKey.hitTop = (virtualKeyDefinition.centerY - halfHeight)
+                * touchScreenHeight / mSurfaceHeight + touchScreenTop;
+        virtualKey.hitBottom = (virtualKeyDefinition.centerY + halfHeight)
+                * touchScreenHeight / mSurfaceHeight + touchScreenTop;
+    }
+}
+
+void TouchInputMapper::dumpVirtualKeys(String8& dump) {
+    if (!mVirtualKeys.isEmpty()) {
+        dump.append(INDENT3 "Virtual Keys:\n");
+
+        for (size_t i = 0; i < mVirtualKeys.size(); i++) {
+            const VirtualKey& virtualKey = mVirtualKeys.itemAt(i);
+            dump.appendFormat(INDENT4 "%zu: scanCode=%d, keyCode=%d, "
+                    "hitLeft=%d, hitRight=%d, hitTop=%d, hitBottom=%d\n",
+                    i, virtualKey.scanCode, virtualKey.keyCode,
+                    virtualKey.hitLeft, virtualKey.hitRight,
+                    virtualKey.hitTop, virtualKey.hitBottom);
+        }
+    }
+}
+
+void TouchInputMapper::parseCalibration() {
+    const PropertyMap& in = getDevice()->getConfiguration();
+    Calibration& out = mCalibration;
+
+    // Size
+    out.sizeCalibration = Calibration::SIZE_CALIBRATION_DEFAULT;
+    String8 sizeCalibrationString;
+    if (in.tryGetProperty(String8("touch.size.calibration"), sizeCalibrationString)) {
+        if (sizeCalibrationString == "none") {
+            out.sizeCalibration = Calibration::SIZE_CALIBRATION_NONE;
+        } else if (sizeCalibrationString == "geometric") {
+            out.sizeCalibration = Calibration::SIZE_CALIBRATION_GEOMETRIC;
+        } else if (sizeCalibrationString == "diameter") {
+            out.sizeCalibration = Calibration::SIZE_CALIBRATION_DIAMETER;
+        } else if (sizeCalibrationString == "box") {
+            out.sizeCalibration = Calibration::SIZE_CALIBRATION_BOX;
+        } else if (sizeCalibrationString == "area") {
+            out.sizeCalibration = Calibration::SIZE_CALIBRATION_AREA;
+        } else if (sizeCalibrationString != "default") {
+            ALOGW("Invalid value for touch.size.calibration: '%s'",
+                    sizeCalibrationString.string());
+        }
+    }
+
+    out.haveSizeScale = in.tryGetProperty(String8("touch.size.scale"),
+            out.sizeScale);
+    out.haveSizeBias = in.tryGetProperty(String8("touch.size.bias"),
+            out.sizeBias);
+    out.haveSizeIsSummed = in.tryGetProperty(String8("touch.size.isSummed"),
+            out.sizeIsSummed);
+
+    // Pressure
+    out.pressureCalibration = Calibration::PRESSURE_CALIBRATION_DEFAULT;
+    String8 pressureCalibrationString;
+    if (in.tryGetProperty(String8("touch.pressure.calibration"), pressureCalibrationString)) {
+        if (pressureCalibrationString == "none") {
+            out.pressureCalibration = Calibration::PRESSURE_CALIBRATION_NONE;
+        } else if (pressureCalibrationString == "physical") {
+            out.pressureCalibration = Calibration::PRESSURE_CALIBRATION_PHYSICAL;
+        } else if (pressureCalibrationString == "amplitude") {
+            out.pressureCalibration = Calibration::PRESSURE_CALIBRATION_AMPLITUDE;
+        } else if (pressureCalibrationString != "default") {
+            ALOGW("Invalid value for touch.pressure.calibration: '%s'",
+                    pressureCalibrationString.string());
+        }
+    }
+
+    out.havePressureScale = in.tryGetProperty(String8("touch.pressure.scale"),
+            out.pressureScale);
+
+    // Orientation
+    out.orientationCalibration = Calibration::ORIENTATION_CALIBRATION_DEFAULT;
+    String8 orientationCalibrationString;
+    if (in.tryGetProperty(String8("touch.orientation.calibration"), orientationCalibrationString)) {
+        if (orientationCalibrationString == "none") {
+            out.orientationCalibration = Calibration::ORIENTATION_CALIBRATION_NONE;
+        } else if (orientationCalibrationString == "interpolated") {
+            out.orientationCalibration = Calibration::ORIENTATION_CALIBRATION_INTERPOLATED;
+        } else if (orientationCalibrationString == "vector") {
+            out.orientationCalibration = Calibration::ORIENTATION_CALIBRATION_VECTOR;
+        } else if (orientationCalibrationString != "default") {
+            ALOGW("Invalid value for touch.orientation.calibration: '%s'",
+                    orientationCalibrationString.string());
+        }
+    }
+
+    // Distance
+    out.distanceCalibration = Calibration::DISTANCE_CALIBRATION_DEFAULT;
+    String8 distanceCalibrationString;
+    if (in.tryGetProperty(String8("touch.distance.calibration"), distanceCalibrationString)) {
+        if (distanceCalibrationString == "none") {
+            out.distanceCalibration = Calibration::DISTANCE_CALIBRATION_NONE;
+        } else if (distanceCalibrationString == "scaled") {
+            out.distanceCalibration = Calibration::DISTANCE_CALIBRATION_SCALED;
+        } else if (distanceCalibrationString != "default") {
+            ALOGW("Invalid value for touch.distance.calibration: '%s'",
+                    distanceCalibrationString.string());
+        }
+    }
+
+    out.haveDistanceScale = in.tryGetProperty(String8("touch.distance.scale"),
+            out.distanceScale);
+
+    out.coverageCalibration = Calibration::COVERAGE_CALIBRATION_DEFAULT;
+    String8 coverageCalibrationString;
+    if (in.tryGetProperty(String8("touch.coverage.calibration"), coverageCalibrationString)) {
+        if (coverageCalibrationString == "none") {
+            out.coverageCalibration = Calibration::COVERAGE_CALIBRATION_NONE;
+        } else if (coverageCalibrationString == "box") {
+            out.coverageCalibration = Calibration::COVERAGE_CALIBRATION_BOX;
+        } else if (coverageCalibrationString != "default") {
+            ALOGW("Invalid value for touch.coverage.calibration: '%s'",
+                    coverageCalibrationString.string());
+        }
+    }
+}
+
+void TouchInputMapper::resolveCalibration() {
+    // Size
+    if (mRawPointerAxes.touchMajor.valid || mRawPointerAxes.toolMajor.valid) {
+        if (mCalibration.sizeCalibration == Calibration::SIZE_CALIBRATION_DEFAULT) {
+            mCalibration.sizeCalibration = Calibration::SIZE_CALIBRATION_GEOMETRIC;
+        }
+    } else {
+        mCalibration.sizeCalibration = Calibration::SIZE_CALIBRATION_NONE;
+    }
+
+    // Pressure
+    if (mRawPointerAxes.pressure.valid) {
+        if (mCalibration.pressureCalibration == Calibration::PRESSURE_CALIBRATION_DEFAULT) {
+            mCalibration.pressureCalibration = Calibration::PRESSURE_CALIBRATION_PHYSICAL;
+        }
+    } else {
+        mCalibration.pressureCalibration = Calibration::PRESSURE_CALIBRATION_NONE;
+    }
+
+    // Orientation
+    if (mRawPointerAxes.orientation.valid) {
+        if (mCalibration.orientationCalibration == Calibration::ORIENTATION_CALIBRATION_DEFAULT) {
+            mCalibration.orientationCalibration = Calibration::ORIENTATION_CALIBRATION_INTERPOLATED;
+        }
+    } else {
+        mCalibration.orientationCalibration = Calibration::ORIENTATION_CALIBRATION_NONE;
+    }
+
+    // Distance
+    if (mRawPointerAxes.distance.valid) {
+        if (mCalibration.distanceCalibration == Calibration::DISTANCE_CALIBRATION_DEFAULT) {
+            mCalibration.distanceCalibration = Calibration::DISTANCE_CALIBRATION_SCALED;
+        }
+    } else {
+        mCalibration.distanceCalibration = Calibration::DISTANCE_CALIBRATION_NONE;
+    }
+
+    // Coverage
+    if (mCalibration.coverageCalibration == Calibration::COVERAGE_CALIBRATION_DEFAULT) {
+        mCalibration.coverageCalibration = Calibration::COVERAGE_CALIBRATION_NONE;
+    }
+}
+
+void TouchInputMapper::dumpCalibration(String8& dump) {
+    dump.append(INDENT3 "Calibration:\n");
+
+    // Size
+    switch (mCalibration.sizeCalibration) {
+    case Calibration::SIZE_CALIBRATION_NONE:
+        dump.append(INDENT4 "touch.size.calibration: none\n");
+        break;
+    case Calibration::SIZE_CALIBRATION_GEOMETRIC:
+        dump.append(INDENT4 "touch.size.calibration: geometric\n");
+        break;
+    case Calibration::SIZE_CALIBRATION_DIAMETER:
+        dump.append(INDENT4 "touch.size.calibration: diameter\n");
+        break;
+    case Calibration::SIZE_CALIBRATION_BOX:
+        dump.append(INDENT4 "touch.size.calibration: box\n");
+        break;
+    case Calibration::SIZE_CALIBRATION_AREA:
+        dump.append(INDENT4 "touch.size.calibration: area\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+
+    if (mCalibration.haveSizeScale) {
+        dump.appendFormat(INDENT4 "touch.size.scale: %0.3f\n",
+                mCalibration.sizeScale);
+    }
+
+    if (mCalibration.haveSizeBias) {
+        dump.appendFormat(INDENT4 "touch.size.bias: %0.3f\n",
+                mCalibration.sizeBias);
+    }
+
+    if (mCalibration.haveSizeIsSummed) {
+        dump.appendFormat(INDENT4 "touch.size.isSummed: %s\n",
+                toString(mCalibration.sizeIsSummed));
+    }
+
+    // Pressure
+    switch (mCalibration.pressureCalibration) {
+    case Calibration::PRESSURE_CALIBRATION_NONE:
+        dump.append(INDENT4 "touch.pressure.calibration: none\n");
+        break;
+    case Calibration::PRESSURE_CALIBRATION_PHYSICAL:
+        dump.append(INDENT4 "touch.pressure.calibration: physical\n");
+        break;
+    case Calibration::PRESSURE_CALIBRATION_AMPLITUDE:
+        dump.append(INDENT4 "touch.pressure.calibration: amplitude\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+
+    if (mCalibration.havePressureScale) {
+        dump.appendFormat(INDENT4 "touch.pressure.scale: %0.3f\n",
+                mCalibration.pressureScale);
+    }
+
+    // Orientation
+    switch (mCalibration.orientationCalibration) {
+    case Calibration::ORIENTATION_CALIBRATION_NONE:
+        dump.append(INDENT4 "touch.orientation.calibration: none\n");
+        break;
+    case Calibration::ORIENTATION_CALIBRATION_INTERPOLATED:
+        dump.append(INDENT4 "touch.orientation.calibration: interpolated\n");
+        break;
+    case Calibration::ORIENTATION_CALIBRATION_VECTOR:
+        dump.append(INDENT4 "touch.orientation.calibration: vector\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+
+    // Distance
+    switch (mCalibration.distanceCalibration) {
+    case Calibration::DISTANCE_CALIBRATION_NONE:
+        dump.append(INDENT4 "touch.distance.calibration: none\n");
+        break;
+    case Calibration::DISTANCE_CALIBRATION_SCALED:
+        dump.append(INDENT4 "touch.distance.calibration: scaled\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+
+    if (mCalibration.haveDistanceScale) {
+        dump.appendFormat(INDENT4 "touch.distance.scale: %0.3f\n",
+                mCalibration.distanceScale);
+    }
+
+    switch (mCalibration.coverageCalibration) {
+    case Calibration::COVERAGE_CALIBRATION_NONE:
+        dump.append(INDENT4 "touch.coverage.calibration: none\n");
+        break;
+    case Calibration::COVERAGE_CALIBRATION_BOX:
+        dump.append(INDENT4 "touch.coverage.calibration: box\n");
+        break;
+    default:
+        ALOG_ASSERT(false);
+    }
+}
+
+void TouchInputMapper::dumpAffineTransformation(String8& dump) {
+    dump.append(INDENT3 "Affine Transformation:\n");
+
+    dump.appendFormat(INDENT4 "X scale: %0.3f\n", mAffineTransform.x_scale);
+    dump.appendFormat(INDENT4 "X ymix: %0.3f\n", mAffineTransform.x_ymix);
+    dump.appendFormat(INDENT4 "X offset: %0.3f\n", mAffineTransform.x_offset);
+    dump.appendFormat(INDENT4 "Y xmix: %0.3f\n", mAffineTransform.y_xmix);
+    dump.appendFormat(INDENT4 "Y scale: %0.3f\n", mAffineTransform.y_scale);
+    dump.appendFormat(INDENT4 "Y offset: %0.3f\n", mAffineTransform.y_offset);
+}
+
+void TouchInputMapper::updateAffineTransformation() {
+    mAffineTransform = getPolicy()->getTouchAffineTransformation(mDevice->getDescriptor(),
+            mSurfaceOrientation);
+}
+
+void TouchInputMapper::reset(nsecs_t when) {
+    mCursorButtonAccumulator.reset(getDevice());
+    mCursorScrollAccumulator.reset(getDevice());
+    mTouchButtonAccumulator.reset(getDevice());
+
+    mPointerVelocityControl.reset();
+    mWheelXVelocityControl.reset();
+    mWheelYVelocityControl.reset();
+
+    mCurrentRawPointerData.clear();
+    mLastRawPointerData.clear();
+    mCurrentCookedPointerData.clear();
+    mLastCookedPointerData.clear();
+    mCurrentButtonState = 0;
+    mLastButtonState = 0;
+    mCurrentRawVScroll = 0;
+    mCurrentRawHScroll = 0;
+    mCurrentFingerIdBits.clear();
+    mLastFingerIdBits.clear();
+    mCurrentStylusIdBits.clear();
+    mLastStylusIdBits.clear();
+    mCurrentMouseIdBits.clear();
+    mLastMouseIdBits.clear();
+    mPointerUsage = POINTER_USAGE_NONE;
+    mSentHoverEnter = false;
+    mDownTime = 0;
+
+    mCurrentVirtualKey.down = false;
+
+    mPointerGesture.reset();
+    mPointerSimple.reset();
+
+    if (mPointerController != NULL) {
+        mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+        mPointerController->clearSpots();
+    }
+
+    InputMapper::reset(when);
+}
+
+void TouchInputMapper::process(const RawEvent* rawEvent) {
+    mCursorButtonAccumulator.process(rawEvent);
+    mCursorScrollAccumulator.process(rawEvent);
+    mTouchButtonAccumulator.process(rawEvent);
+
+    if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) {
+        sync(rawEvent->when);
+    }
+}
+
+void TouchInputMapper::sync(nsecs_t when) {
+    // Sync button state.
+    mCurrentButtonState = mTouchButtonAccumulator.getButtonState()
+            | mCursorButtonAccumulator.getButtonState();
+
+    // Sync scroll state.
+    mCurrentRawVScroll = mCursorScrollAccumulator.getRelativeVWheel();
+    mCurrentRawHScroll = mCursorScrollAccumulator.getRelativeHWheel();
+    mCursorScrollAccumulator.finishSync();
+
+    // Sync touch state.
+    bool havePointerIds = true;
+    mCurrentRawPointerData.clear();
+    syncTouch(when, &havePointerIds);
+
+#if DEBUG_RAW_EVENTS
+    if (!havePointerIds) {
+        ALOGD("syncTouch: pointerCount %d -> %d, no pointer ids",
+                mLastRawPointerData.pointerCount,
+                mCurrentRawPointerData.pointerCount);
+    } else {
+        ALOGD("syncTouch: pointerCount %d -> %d, touching ids 0x%08x -> 0x%08x, "
+                "hovering ids 0x%08x -> 0x%08x",
+                mLastRawPointerData.pointerCount,
+                mCurrentRawPointerData.pointerCount,
+                mLastRawPointerData.touchingIdBits.value,
+                mCurrentRawPointerData.touchingIdBits.value,
+                mLastRawPointerData.hoveringIdBits.value,
+                mCurrentRawPointerData.hoveringIdBits.value);
+    }
+#endif
+
+    // Reset state that we will compute below.
+    mCurrentFingerIdBits.clear();
+    mCurrentStylusIdBits.clear();
+    mCurrentMouseIdBits.clear();
+    mCurrentCookedPointerData.clear();
+
+    if (mDeviceMode == DEVICE_MODE_DISABLED) {
+        // Drop all input if the device is disabled.
+        mCurrentRawPointerData.clear();
+        mCurrentButtonState = 0;
+    } else {
+        // Preprocess pointer data.
+        if (!havePointerIds) {
+            assignPointerIds();
+        }
+
+        // Handle policy on initial down or hover events.
+        uint32_t policyFlags = 0;
+        bool initialDown = mLastRawPointerData.pointerCount == 0
+                && mCurrentRawPointerData.pointerCount != 0;
+        bool buttonsPressed = mCurrentButtonState & ~mLastButtonState;
+        if (initialDown || buttonsPressed) {
+            // If this is a touch screen, hide the pointer on an initial down.
+            if (mDeviceMode == DEVICE_MODE_DIRECT) {
+                getContext()->fadePointer();
+            }
+
+            if (mParameters.wake) {
+                policyFlags |= POLICY_FLAG_WAKE;
+            }
+        }
+
+        // Synthesize key down from raw buttons if needed.
+        synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
+                policyFlags, mLastButtonState, mCurrentButtonState);
+
+        // Consume raw off-screen touches before cooking pointer data.
+        // If touches are consumed, subsequent code will not receive any pointer data.
+        if (consumeRawTouches(when, policyFlags)) {
+            mCurrentRawPointerData.clear();
+        }
+
+        // Cook pointer data.  This call populates the mCurrentCookedPointerData structure
+        // with cooked pointer data that has the same ids and indices as the raw data.
+        // The following code can use either the raw or cooked data, as needed.
+        cookPointerData();
+
+        // Dispatch the touches either directly or by translation through a pointer on screen.
+        if (mDeviceMode == DEVICE_MODE_POINTER) {
+            for (BitSet32 idBits(mCurrentRawPointerData.touchingIdBits); !idBits.isEmpty(); ) {
+                uint32_t id = idBits.clearFirstMarkedBit();
+                const RawPointerData::Pointer& pointer = mCurrentRawPointerData.pointerForId(id);
+                if (pointer.toolType == AMOTION_EVENT_TOOL_TYPE_STYLUS
+                        || pointer.toolType == AMOTION_EVENT_TOOL_TYPE_ERASER) {
+                    mCurrentStylusIdBits.markBit(id);
+                } else if (pointer.toolType == AMOTION_EVENT_TOOL_TYPE_FINGER
+                        || pointer.toolType == AMOTION_EVENT_TOOL_TYPE_UNKNOWN) {
+                    mCurrentFingerIdBits.markBit(id);
+                } else if (pointer.toolType == AMOTION_EVENT_TOOL_TYPE_MOUSE) {
+                    mCurrentMouseIdBits.markBit(id);
+                }
+            }
+            for (BitSet32 idBits(mCurrentRawPointerData.hoveringIdBits); !idBits.isEmpty(); ) {
+                uint32_t id = idBits.clearFirstMarkedBit();
+                const RawPointerData::Pointer& pointer = mCurrentRawPointerData.pointerForId(id);
+                if (pointer.toolType == AMOTION_EVENT_TOOL_TYPE_STYLUS
+                        || pointer.toolType == AMOTION_EVENT_TOOL_TYPE_ERASER) {
+                    mCurrentStylusIdBits.markBit(id);
+                }
+            }
+
+            // Stylus takes precedence over all tools, then mouse, then finger.
+            PointerUsage pointerUsage = mPointerUsage;
+            if (!mCurrentStylusIdBits.isEmpty()) {
+                mCurrentMouseIdBits.clear();
+                mCurrentFingerIdBits.clear();
+                pointerUsage = POINTER_USAGE_STYLUS;
+            } else if (!mCurrentMouseIdBits.isEmpty()) {
+                mCurrentFingerIdBits.clear();
+                pointerUsage = POINTER_USAGE_MOUSE;
+            } else if (!mCurrentFingerIdBits.isEmpty() || isPointerDown(mCurrentButtonState)) {
+                pointerUsage = POINTER_USAGE_GESTURES;
+            }
+
+            dispatchPointerUsage(when, policyFlags, pointerUsage);
+        } else {
+            if (mDeviceMode == DEVICE_MODE_DIRECT
+                    && mConfig.showTouches && mPointerController != NULL) {
+                mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_SPOT);
+                mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+
+                mPointerController->setButtonState(mCurrentButtonState);
+                mPointerController->setSpots(mCurrentCookedPointerData.pointerCoords,
+                        mCurrentCookedPointerData.idToIndex,
+                        mCurrentCookedPointerData.touchingIdBits);
+            }
+
+            dispatchHoverExit(when, policyFlags);
+            dispatchTouches(when, policyFlags);
+            dispatchHoverEnterAndMove(when, policyFlags);
+        }
+
+        // Synthesize key up from raw buttons if needed.
+        synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
+                policyFlags, mLastButtonState, mCurrentButtonState);
+    }
+
+    // Copy current touch to last touch in preparation for the next cycle.
+    mLastRawPointerData.copyFrom(mCurrentRawPointerData);
+    mLastCookedPointerData.copyFrom(mCurrentCookedPointerData);
+    mLastButtonState = mCurrentButtonState;
+    mLastFingerIdBits = mCurrentFingerIdBits;
+    mLastStylusIdBits = mCurrentStylusIdBits;
+    mLastMouseIdBits = mCurrentMouseIdBits;
+
+    // Clear some transient state.
+    mCurrentRawVScroll = 0;
+    mCurrentRawHScroll = 0;
+}
+
+void TouchInputMapper::timeoutExpired(nsecs_t when) {
+    if (mDeviceMode == DEVICE_MODE_POINTER) {
+        if (mPointerUsage == POINTER_USAGE_GESTURES) {
+            dispatchPointerGestures(when, 0 /*policyFlags*/, true /*isTimeout*/);
+        }
+    }
+}
+
+bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) {
+    // Check for release of a virtual key.
+    if (mCurrentVirtualKey.down) {
+        if (mCurrentRawPointerData.touchingIdBits.isEmpty()) {
+            // Pointer went up while virtual key was down.
+            mCurrentVirtualKey.down = false;
+            if (!mCurrentVirtualKey.ignored) {
+#if DEBUG_VIRTUAL_KEYS
+                ALOGD("VirtualKeys: Generating key up: keyCode=%d, scanCode=%d",
+                        mCurrentVirtualKey.keyCode, mCurrentVirtualKey.scanCode);
+#endif
+                dispatchVirtualKey(when, policyFlags,
+                        AKEY_EVENT_ACTION_UP,
+                        AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY);
+            }
+            return true;
+        }
+
+        if (mCurrentRawPointerData.touchingIdBits.count() == 1) {
+            uint32_t id = mCurrentRawPointerData.touchingIdBits.firstMarkedBit();
+            const RawPointerData::Pointer& pointer = mCurrentRawPointerData.pointerForId(id);
+            const VirtualKey* virtualKey = findVirtualKeyHit(pointer.x, pointer.y);
+            if (virtualKey && virtualKey->keyCode == mCurrentVirtualKey.keyCode) {
+                // Pointer is still within the space of the virtual key.
+                return true;
+            }
+        }
+
+        // Pointer left virtual key area or another pointer also went down.
+        // Send key cancellation but do not consume the touch yet.
+        // This is useful when the user swipes through from the virtual key area
+        // into the main display surface.
+        mCurrentVirtualKey.down = false;
+        if (!mCurrentVirtualKey.ignored) {
+#if DEBUG_VIRTUAL_KEYS
+            ALOGD("VirtualKeys: Canceling key: keyCode=%d, scanCode=%d",
+                    mCurrentVirtualKey.keyCode, mCurrentVirtualKey.scanCode);
+#endif
+            dispatchVirtualKey(when, policyFlags,
+                    AKEY_EVENT_ACTION_UP,
+                    AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY
+                            | AKEY_EVENT_FLAG_CANCELED);
+        }
+    }
+
+    if (mLastRawPointerData.touchingIdBits.isEmpty()
+            && !mCurrentRawPointerData.touchingIdBits.isEmpty()) {
+        // Pointer just went down.  Check for virtual key press or off-screen touches.
+        uint32_t id = mCurrentRawPointerData.touchingIdBits.firstMarkedBit();
+        const RawPointerData::Pointer& pointer = mCurrentRawPointerData.pointerForId(id);
+        if (!isPointInsideSurface(pointer.x, pointer.y)) {
+            // If exactly one pointer went down, check for virtual key hit.
+            // Otherwise we will drop the entire stroke.
+            if (mCurrentRawPointerData.touchingIdBits.count() == 1) {
+                const VirtualKey* virtualKey = findVirtualKeyHit(pointer.x, pointer.y);
+                if (virtualKey) {
+                    mCurrentVirtualKey.down = true;
+                    mCurrentVirtualKey.downTime = when;
+                    mCurrentVirtualKey.keyCode = virtualKey->keyCode;
+                    mCurrentVirtualKey.scanCode = virtualKey->scanCode;
+                    mCurrentVirtualKey.ignored = mContext->shouldDropVirtualKey(
+                            when, getDevice(), virtualKey->keyCode, virtualKey->scanCode);
+
+                    if (!mCurrentVirtualKey.ignored) {
+#if DEBUG_VIRTUAL_KEYS
+                        ALOGD("VirtualKeys: Generating key down: keyCode=%d, scanCode=%d",
+                                mCurrentVirtualKey.keyCode,
+                                mCurrentVirtualKey.scanCode);
+#endif
+                        dispatchVirtualKey(when, policyFlags,
+                                AKEY_EVENT_ACTION_DOWN,
+                                AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY);
+                    }
+                }
+            }
+            return true;
+        }
+    }
+
+    // Disable all virtual key touches that happen within a short time interval of the
+    // most recent touch within the screen area.  The idea is to filter out stray
+    // virtual key presses when interacting with the touch screen.
+    //
+    // Problems we're trying to solve:
+    //
+    // 1. While scrolling a list or dragging the window shade, the user swipes down into a
+    //    virtual key area that is implemented by a separate touch panel and accidentally
+    //    triggers a virtual key.
+    //
+    // 2. While typing in the on screen keyboard, the user taps slightly outside the screen
+    //    area and accidentally triggers a virtual key.  This often happens when virtual keys
+    //    are layed out below the screen near to where the on screen keyboard's space bar
+    //    is displayed.
+    if (mConfig.virtualKeyQuietTime > 0 && !mCurrentRawPointerData.touchingIdBits.isEmpty()) {
+        mContext->disableVirtualKeysUntil(when + mConfig.virtualKeyQuietTime);
+    }
+    return false;
+}
+
+void TouchInputMapper::dispatchVirtualKey(nsecs_t when, uint32_t policyFlags,
+        int32_t keyEventAction, int32_t keyEventFlags) {
+    int32_t keyCode = mCurrentVirtualKey.keyCode;
+    int32_t scanCode = mCurrentVirtualKey.scanCode;
+    nsecs_t downTime = mCurrentVirtualKey.downTime;
+    int32_t metaState = mContext->getGlobalMetaState();
+    policyFlags |= POLICY_FLAG_VIRTUAL;
+
+    NotifyKeyArgs args(when, getDeviceId(), AINPUT_SOURCE_KEYBOARD, policyFlags,
+            keyEventAction, keyEventFlags, keyCode, scanCode, metaState, downTime);
+    getListener()->notifyKey(&args);
+}
+
+void TouchInputMapper::dispatchTouches(nsecs_t when, uint32_t policyFlags) {
+    BitSet32 currentIdBits = mCurrentCookedPointerData.touchingIdBits;
+    BitSet32 lastIdBits = mLastCookedPointerData.touchingIdBits;
+    int32_t metaState = getContext()->getGlobalMetaState();
+    int32_t buttonState = mCurrentButtonState;
+
+    if (currentIdBits == lastIdBits) {
+        if (!currentIdBits.isEmpty()) {
+            // No pointer id changes so this is a move event.
+            // The listener takes care of batching moves so we don't have to deal with that here.
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_MOVE, 0, metaState, buttonState,
+                    AMOTION_EVENT_EDGE_FLAG_NONE,
+                    mCurrentCookedPointerData.pointerProperties,
+                    mCurrentCookedPointerData.pointerCoords,
+                    mCurrentCookedPointerData.idToIndex,
+                    currentIdBits, -1,
+                    mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+        }
+    } else {
+        // There may be pointers going up and pointers going down and pointers moving
+        // all at the same time.
+        BitSet32 upIdBits(lastIdBits.value & ~currentIdBits.value);
+        BitSet32 downIdBits(currentIdBits.value & ~lastIdBits.value);
+        BitSet32 moveIdBits(lastIdBits.value & currentIdBits.value);
+        BitSet32 dispatchedIdBits(lastIdBits.value);
+
+        // Update last coordinates of pointers that have moved so that we observe the new
+        // pointer positions at the same time as other pointers that have just gone up.
+        bool moveNeeded = updateMovedPointers(
+                mCurrentCookedPointerData.pointerProperties,
+                mCurrentCookedPointerData.pointerCoords,
+                mCurrentCookedPointerData.idToIndex,
+                mLastCookedPointerData.pointerProperties,
+                mLastCookedPointerData.pointerCoords,
+                mLastCookedPointerData.idToIndex,
+                moveIdBits);
+        if (buttonState != mLastButtonState) {
+            moveNeeded = true;
+        }
+
+        // Dispatch pointer up events.
+        while (!upIdBits.isEmpty()) {
+            uint32_t upId = upIdBits.clearFirstMarkedBit();
+
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_POINTER_UP, 0, metaState, buttonState, 0,
+                    mLastCookedPointerData.pointerProperties,
+                    mLastCookedPointerData.pointerCoords,
+                    mLastCookedPointerData.idToIndex,
+                    dispatchedIdBits, upId,
+                    mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+            dispatchedIdBits.clearBit(upId);
+        }
+
+        // Dispatch move events if any of the remaining pointers moved from their old locations.
+        // Although applications receive new locations as part of individual pointer up
+        // events, they do not generally handle them except when presented in a move event.
+        if (moveNeeded) {
+            ALOG_ASSERT(moveIdBits.value == dispatchedIdBits.value);
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_MOVE, 0, metaState, buttonState, 0,
+                    mCurrentCookedPointerData.pointerProperties,
+                    mCurrentCookedPointerData.pointerCoords,
+                    mCurrentCookedPointerData.idToIndex,
+                    dispatchedIdBits, -1,
+                    mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+        }
+
+        // Dispatch pointer down events using the new pointer locations.
+        while (!downIdBits.isEmpty()) {
+            uint32_t downId = downIdBits.clearFirstMarkedBit();
+            dispatchedIdBits.markBit(downId);
+
+            if (dispatchedIdBits.count() == 1) {
+                // First pointer is going down.  Set down time.
+                mDownTime = when;
+            }
+
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_POINTER_DOWN, 0, metaState, buttonState, 0,
+                    mCurrentCookedPointerData.pointerProperties,
+                    mCurrentCookedPointerData.pointerCoords,
+                    mCurrentCookedPointerData.idToIndex,
+                    dispatchedIdBits, downId,
+                    mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+        }
+    }
+}
+
+void TouchInputMapper::dispatchHoverExit(nsecs_t when, uint32_t policyFlags) {
+    if (mSentHoverEnter &&
+            (mCurrentCookedPointerData.hoveringIdBits.isEmpty()
+                    || !mCurrentCookedPointerData.touchingIdBits.isEmpty())) {
+        int32_t metaState = getContext()->getGlobalMetaState();
+        dispatchMotion(when, policyFlags, mSource,
+                AMOTION_EVENT_ACTION_HOVER_EXIT, 0, metaState, mLastButtonState, 0,
+                mLastCookedPointerData.pointerProperties,
+                mLastCookedPointerData.pointerCoords,
+                mLastCookedPointerData.idToIndex,
+                mLastCookedPointerData.hoveringIdBits, -1,
+                mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+        mSentHoverEnter = false;
+    }
+}
+
+void TouchInputMapper::dispatchHoverEnterAndMove(nsecs_t when, uint32_t policyFlags) {
+    if (mCurrentCookedPointerData.touchingIdBits.isEmpty()
+            && !mCurrentCookedPointerData.hoveringIdBits.isEmpty()) {
+        int32_t metaState = getContext()->getGlobalMetaState();
+        if (!mSentHoverEnter) {
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_HOVER_ENTER, 0, metaState, mCurrentButtonState, 0,
+                    mCurrentCookedPointerData.pointerProperties,
+                    mCurrentCookedPointerData.pointerCoords,
+                    mCurrentCookedPointerData.idToIndex,
+                    mCurrentCookedPointerData.hoveringIdBits, -1,
+                    mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+            mSentHoverEnter = true;
+        }
+
+        dispatchMotion(when, policyFlags, mSource,
+                AMOTION_EVENT_ACTION_HOVER_MOVE, 0, metaState, mCurrentButtonState, 0,
+                mCurrentCookedPointerData.pointerProperties,
+                mCurrentCookedPointerData.pointerCoords,
+                mCurrentCookedPointerData.idToIndex,
+                mCurrentCookedPointerData.hoveringIdBits, -1,
+                mOrientedXPrecision, mOrientedYPrecision, mDownTime);
+    }
+}
+
+void TouchInputMapper::cookPointerData() {
+    uint32_t currentPointerCount = mCurrentRawPointerData.pointerCount;
+
+    mCurrentCookedPointerData.clear();
+    mCurrentCookedPointerData.pointerCount = currentPointerCount;
+    mCurrentCookedPointerData.hoveringIdBits = mCurrentRawPointerData.hoveringIdBits;
+    mCurrentCookedPointerData.touchingIdBits = mCurrentRawPointerData.touchingIdBits;
+
+    // Walk through the the active pointers and map device coordinates onto
+    // surface coordinates and adjust for display orientation.
+    for (uint32_t i = 0; i < currentPointerCount; i++) {
+        const RawPointerData::Pointer& in = mCurrentRawPointerData.pointers[i];
+
+        // Size
+        float touchMajor, touchMinor, toolMajor, toolMinor, size;
+        switch (mCalibration.sizeCalibration) {
+        case Calibration::SIZE_CALIBRATION_GEOMETRIC:
+        case Calibration::SIZE_CALIBRATION_DIAMETER:
+        case Calibration::SIZE_CALIBRATION_BOX:
+        case Calibration::SIZE_CALIBRATION_AREA:
+            if (mRawPointerAxes.touchMajor.valid && mRawPointerAxes.toolMajor.valid) {
+                touchMajor = in.touchMajor;
+                touchMinor = mRawPointerAxes.touchMinor.valid ? in.touchMinor : in.touchMajor;
+                toolMajor = in.toolMajor;
+                toolMinor = mRawPointerAxes.toolMinor.valid ? in.toolMinor : in.toolMajor;
+                size = mRawPointerAxes.touchMinor.valid
+                        ? avg(in.touchMajor, in.touchMinor) : in.touchMajor;
+            } else if (mRawPointerAxes.touchMajor.valid) {
+                toolMajor = touchMajor = in.touchMajor;
+                toolMinor = touchMinor = mRawPointerAxes.touchMinor.valid
+                        ? in.touchMinor : in.touchMajor;
+                size = mRawPointerAxes.touchMinor.valid
+                        ? avg(in.touchMajor, in.touchMinor) : in.touchMajor;
+            } else if (mRawPointerAxes.toolMajor.valid) {
+                touchMajor = toolMajor = in.toolMajor;
+                touchMinor = toolMinor = mRawPointerAxes.toolMinor.valid
+                        ? in.toolMinor : in.toolMajor;
+                size = mRawPointerAxes.toolMinor.valid
+                        ? avg(in.toolMajor, in.toolMinor) : in.toolMajor;
+            } else {
+                ALOG_ASSERT(false, "No touch or tool axes.  "
+                        "Size calibration should have been resolved to NONE.");
+                touchMajor = 0;
+                touchMinor = 0;
+                toolMajor = 0;
+                toolMinor = 0;
+                size = 0;
+            }
+
+            if (mCalibration.haveSizeIsSummed && mCalibration.sizeIsSummed) {
+                uint32_t touchingCount = mCurrentRawPointerData.touchingIdBits.count();
+                if (touchingCount > 1) {
+                    touchMajor /= touchingCount;
+                    touchMinor /= touchingCount;
+                    toolMajor /= touchingCount;
+                    toolMinor /= touchingCount;
+                    size /= touchingCount;
+                }
+            }
+
+            if (mCalibration.sizeCalibration == Calibration::SIZE_CALIBRATION_GEOMETRIC) {
+                touchMajor *= mGeometricScale;
+                touchMinor *= mGeometricScale;
+                toolMajor *= mGeometricScale;
+                toolMinor *= mGeometricScale;
+            } else if (mCalibration.sizeCalibration == Calibration::SIZE_CALIBRATION_AREA) {
+                touchMajor = touchMajor > 0 ? sqrtf(touchMajor) : 0;
+                touchMinor = touchMajor;
+                toolMajor = toolMajor > 0 ? sqrtf(toolMajor) : 0;
+                toolMinor = toolMajor;
+            } else if (mCalibration.sizeCalibration == Calibration::SIZE_CALIBRATION_DIAMETER) {
+                touchMinor = touchMajor;
+                toolMinor = toolMajor;
+            }
+
+            mCalibration.applySizeScaleAndBias(&touchMajor);
+            mCalibration.applySizeScaleAndBias(&touchMinor);
+            mCalibration.applySizeScaleAndBias(&toolMajor);
+            mCalibration.applySizeScaleAndBias(&toolMinor);
+            size *= mSizeScale;
+            break;
+        default:
+            touchMajor = 0;
+            touchMinor = 0;
+            toolMajor = 0;
+            toolMinor = 0;
+            size = 0;
+            break;
+        }
+
+        // Pressure
+        float pressure;
+        switch (mCalibration.pressureCalibration) {
+        case Calibration::PRESSURE_CALIBRATION_PHYSICAL:
+        case Calibration::PRESSURE_CALIBRATION_AMPLITUDE:
+            pressure = in.pressure * mPressureScale;
+            break;
+        default:
+            pressure = in.isHovering ? 0 : 1;
+            break;
+        }
+
+        // Tilt and Orientation
+        float tilt;
+        float orientation;
+        if (mHaveTilt) {
+            float tiltXAngle = (in.tiltX - mTiltXCenter) * mTiltXScale;
+            float tiltYAngle = (in.tiltY - mTiltYCenter) * mTiltYScale;
+            orientation = atan2f(-sinf(tiltXAngle), sinf(tiltYAngle));
+            tilt = acosf(cosf(tiltXAngle) * cosf(tiltYAngle));
+        } else {
+            tilt = 0;
+
+            switch (mCalibration.orientationCalibration) {
+            case Calibration::ORIENTATION_CALIBRATION_INTERPOLATED:
+                orientation = in.orientation * mOrientationScale;
+                break;
+            case Calibration::ORIENTATION_CALIBRATION_VECTOR: {
+                int32_t c1 = signExtendNybble((in.orientation & 0xf0) >> 4);
+                int32_t c2 = signExtendNybble(in.orientation & 0x0f);
+                if (c1 != 0 || c2 != 0) {
+                    orientation = atan2f(c1, c2) * 0.5f;
+                    float confidence = hypotf(c1, c2);
+                    float scale = 1.0f + confidence / 16.0f;
+                    touchMajor *= scale;
+                    touchMinor /= scale;
+                    toolMajor *= scale;
+                    toolMinor /= scale;
+                } else {
+                    orientation = 0;
+                }
+                break;
+            }
+            default:
+                orientation = 0;
+            }
+        }
+
+        // Distance
+        float distance;
+        switch (mCalibration.distanceCalibration) {
+        case Calibration::DISTANCE_CALIBRATION_SCALED:
+            distance = in.distance * mDistanceScale;
+            break;
+        default:
+            distance = 0;
+        }
+
+        // Coverage
+        int32_t rawLeft, rawTop, rawRight, rawBottom;
+        switch (mCalibration.coverageCalibration) {
+        case Calibration::COVERAGE_CALIBRATION_BOX:
+            rawLeft = (in.toolMinor & 0xffff0000) >> 16;
+            rawRight = in.toolMinor & 0x0000ffff;
+            rawBottom = in.toolMajor & 0x0000ffff;
+            rawTop = (in.toolMajor & 0xffff0000) >> 16;
+            break;
+        default:
+            rawLeft = rawTop = rawRight = rawBottom = 0;
+            break;
+        }
+
+        // Adjust X,Y coords for device calibration
+        // TODO: Adjust coverage coords?
+        float xTransformed = in.x, yTransformed = in.y;
+        mAffineTransform.applyTo(xTransformed, yTransformed);
+
+        // Adjust X, Y, and coverage coords for surface orientation.
+        float x, y;
+        float left, top, right, bottom;
+
+        switch (mSurfaceOrientation) {
+        case DISPLAY_ORIENTATION_90:
+            x = float(yTransformed - mRawPointerAxes.y.minValue) * mYScale + mYTranslate;
+            y = float(mRawPointerAxes.x.maxValue - xTransformed) * mXScale + mXTranslate;
+            left = float(rawTop - mRawPointerAxes.y.minValue) * mYScale + mYTranslate;
+            right = float(rawBottom- mRawPointerAxes.y.minValue) * mYScale + mYTranslate;
+            bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate;
+            top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate;
+            orientation -= M_PI_2;
+            if (orientation < mOrientedRanges.orientation.min) {
+                orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
+            }
+            break;
+        case DISPLAY_ORIENTATION_180:
+            x = float(mRawPointerAxes.x.maxValue - xTransformed) * mXScale + mXTranslate;
+            y = float(mRawPointerAxes.y.maxValue - yTransformed) * mYScale + mYTranslate;
+            left = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate;
+            right = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate;
+            bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate;
+            top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate;
+            orientation -= M_PI;
+            if (orientation < mOrientedRanges.orientation.min) {
+                orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
+            }
+            break;
+        case DISPLAY_ORIENTATION_270:
+            x = float(mRawPointerAxes.y.maxValue - yTransformed) * mYScale + mYTranslate;
+            y = float(xTransformed - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
+            left = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate;
+            right = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate;
+            bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
+            top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
+            orientation += M_PI_2;
+            if (orientation > mOrientedRanges.orientation.max) {
+                orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min);
+            }
+            break;
+        default:
+            x = float(xTransformed - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
+            y = float(yTransformed - mRawPointerAxes.y.minValue) * mYScale + mYTranslate;
+            left = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
+            right = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate;
+            bottom = float(rawBottom - mRawPointerAxes.y.minValue) * mYScale + mYTranslate;
+            top = float(rawTop - mRawPointerAxes.y.minValue) * mYScale + mYTranslate;
+            break;
+        }
+
+        // Write output coords.
+        PointerCoords& out = mCurrentCookedPointerData.pointerCoords[i];
+        out.clear();
+        out.setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        out.setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+        out.setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, pressure);
+        out.setAxisValue(AMOTION_EVENT_AXIS_SIZE, size);
+        out.setAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR, touchMajor);
+        out.setAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR, touchMinor);
+        out.setAxisValue(AMOTION_EVENT_AXIS_ORIENTATION, orientation);
+        out.setAxisValue(AMOTION_EVENT_AXIS_TILT, tilt);
+        out.setAxisValue(AMOTION_EVENT_AXIS_DISTANCE, distance);
+        if (mCalibration.coverageCalibration == Calibration::COVERAGE_CALIBRATION_BOX) {
+            out.setAxisValue(AMOTION_EVENT_AXIS_GENERIC_1, left);
+            out.setAxisValue(AMOTION_EVENT_AXIS_GENERIC_2, top);
+            out.setAxisValue(AMOTION_EVENT_AXIS_GENERIC_3, right);
+            out.setAxisValue(AMOTION_EVENT_AXIS_GENERIC_4, bottom);
+        } else {
+            out.setAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR, toolMajor);
+            out.setAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR, toolMinor);
+        }
+
+        // Write output properties.
+        PointerProperties& properties = mCurrentCookedPointerData.pointerProperties[i];
+        uint32_t id = in.id;
+        properties.clear();
+        properties.id = id;
+        properties.toolType = in.toolType;
+
+        // Write id index.
+        mCurrentCookedPointerData.idToIndex[id] = i;
+    }
+}
+
+void TouchInputMapper::dispatchPointerUsage(nsecs_t when, uint32_t policyFlags,
+        PointerUsage pointerUsage) {
+    if (pointerUsage != mPointerUsage) {
+        abortPointerUsage(when, policyFlags);
+        mPointerUsage = pointerUsage;
+    }
+
+    switch (mPointerUsage) {
+    case POINTER_USAGE_GESTURES:
+        dispatchPointerGestures(when, policyFlags, false /*isTimeout*/);
+        break;
+    case POINTER_USAGE_STYLUS:
+        dispatchPointerStylus(when, policyFlags);
+        break;
+    case POINTER_USAGE_MOUSE:
+        dispatchPointerMouse(when, policyFlags);
+        break;
+    default:
+        break;
+    }
+}
+
+void TouchInputMapper::abortPointerUsage(nsecs_t when, uint32_t policyFlags) {
+    switch (mPointerUsage) {
+    case POINTER_USAGE_GESTURES:
+        abortPointerGestures(when, policyFlags);
+        break;
+    case POINTER_USAGE_STYLUS:
+        abortPointerStylus(when, policyFlags);
+        break;
+    case POINTER_USAGE_MOUSE:
+        abortPointerMouse(when, policyFlags);
+        break;
+    default:
+        break;
+    }
+
+    mPointerUsage = POINTER_USAGE_NONE;
+}
+
+void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlags,
+        bool isTimeout) {
+    // Update current gesture coordinates.
+    bool cancelPreviousGesture, finishPreviousGesture;
+    bool sendEvents = preparePointerGestures(when,
+            &cancelPreviousGesture, &finishPreviousGesture, isTimeout);
+    if (!sendEvents) {
+        return;
+    }
+    if (finishPreviousGesture) {
+        cancelPreviousGesture = false;
+    }
+
+    // Update the pointer presentation and spots.
+    if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
+        mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_SPOT);
+        if (finishPreviousGesture || cancelPreviousGesture) {
+            mPointerController->clearSpots();
+        }
+        mPointerController->setSpots(mPointerGesture.currentGestureCoords,
+                mPointerGesture.currentGestureIdToIndex,
+                mPointerGesture.currentGestureIdBits);
+    } else {
+        mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_POINTER);
+    }
+
+    // Show or hide the pointer if needed.
+    switch (mPointerGesture.currentGestureMode) {
+    case PointerGesture::NEUTRAL:
+    case PointerGesture::QUIET:
+        if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS
+                && (mPointerGesture.lastGestureMode == PointerGesture::SWIPE
+                        || mPointerGesture.lastGestureMode == PointerGesture::FREEFORM)) {
+            // Remind the user of where the pointer is after finishing a gesture with spots.
+            mPointerController->unfade(PointerControllerInterface::TRANSITION_GRADUAL);
+        }
+        break;
+    case PointerGesture::TAP:
+    case PointerGesture::TAP_DRAG:
+    case PointerGesture::BUTTON_CLICK_OR_DRAG:
+    case PointerGesture::HOVER:
+    case PointerGesture::PRESS:
+        // Unfade the pointer when the current gesture manipulates the
+        // area directly under the pointer.
+        mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
+        break;
+    case PointerGesture::SWIPE:
+    case PointerGesture::FREEFORM:
+        // Fade the pointer when the current gesture manipulates a different
+        // area and there are spots to guide the user experience.
+        if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
+            mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+        } else {
+            mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
+        }
+        break;
+    }
+
+    // Send events!
+    int32_t metaState = getContext()->getGlobalMetaState();
+    int32_t buttonState = mCurrentButtonState;
+
+    // Update last coordinates of pointers that have moved so that we observe the new
+    // pointer positions at the same time as other pointers that have just gone up.
+    bool down = mPointerGesture.currentGestureMode == PointerGesture::TAP
+            || mPointerGesture.currentGestureMode == PointerGesture::TAP_DRAG
+            || mPointerGesture.currentGestureMode == PointerGesture::BUTTON_CLICK_OR_DRAG
+            || mPointerGesture.currentGestureMode == PointerGesture::PRESS
+            || mPointerGesture.currentGestureMode == PointerGesture::SWIPE
+            || mPointerGesture.currentGestureMode == PointerGesture::FREEFORM;
+    bool moveNeeded = false;
+    if (down && !cancelPreviousGesture && !finishPreviousGesture
+            && !mPointerGesture.lastGestureIdBits.isEmpty()
+            && !mPointerGesture.currentGestureIdBits.isEmpty()) {
+        BitSet32 movedGestureIdBits(mPointerGesture.currentGestureIdBits.value
+                & mPointerGesture.lastGestureIdBits.value);
+        moveNeeded = updateMovedPointers(mPointerGesture.currentGestureProperties,
+                mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
+                mPointerGesture.lastGestureProperties,
+                mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
+                movedGestureIdBits);
+        if (buttonState != mLastButtonState) {
+            moveNeeded = true;
+        }
+    }
+
+    // Send motion events for all pointers that went up or were canceled.
+    BitSet32 dispatchedGestureIdBits(mPointerGesture.lastGestureIdBits);
+    if (!dispatchedGestureIdBits.isEmpty()) {
+        if (cancelPreviousGesture) {
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_CANCEL, 0, metaState, buttonState,
+                    AMOTION_EVENT_EDGE_FLAG_NONE,
+                    mPointerGesture.lastGestureProperties,
+                    mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
+                    dispatchedGestureIdBits, -1,
+                    0, 0, mPointerGesture.downTime);
+
+            dispatchedGestureIdBits.clear();
+        } else {
+            BitSet32 upGestureIdBits;
+            if (finishPreviousGesture) {
+                upGestureIdBits = dispatchedGestureIdBits;
+            } else {
+                upGestureIdBits.value = dispatchedGestureIdBits.value
+                        & ~mPointerGesture.currentGestureIdBits.value;
+            }
+            while (!upGestureIdBits.isEmpty()) {
+                uint32_t id = upGestureIdBits.clearFirstMarkedBit();
+
+                dispatchMotion(when, policyFlags, mSource,
+                        AMOTION_EVENT_ACTION_POINTER_UP, 0,
+                        metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE,
+                        mPointerGesture.lastGestureProperties,
+                        mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
+                        dispatchedGestureIdBits, id,
+                        0, 0, mPointerGesture.downTime);
+
+                dispatchedGestureIdBits.clearBit(id);
+            }
+        }
+    }
+
+    // Send motion events for all pointers that moved.
+    if (moveNeeded) {
+        dispatchMotion(when, policyFlags, mSource,
+                AMOTION_EVENT_ACTION_MOVE, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE,
+                mPointerGesture.currentGestureProperties,
+                mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
+                dispatchedGestureIdBits, -1,
+                0, 0, mPointerGesture.downTime);
+    }
+
+    // Send motion events for all pointers that went down.
+    if (down) {
+        BitSet32 downGestureIdBits(mPointerGesture.currentGestureIdBits.value
+                & ~dispatchedGestureIdBits.value);
+        while (!downGestureIdBits.isEmpty()) {
+            uint32_t id = downGestureIdBits.clearFirstMarkedBit();
+            dispatchedGestureIdBits.markBit(id);
+
+            if (dispatchedGestureIdBits.count() == 1) {
+                mPointerGesture.downTime = when;
+            }
+
+            dispatchMotion(when, policyFlags, mSource,
+                    AMOTION_EVENT_ACTION_POINTER_DOWN, 0, metaState, buttonState, 0,
+                    mPointerGesture.currentGestureProperties,
+                    mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
+                    dispatchedGestureIdBits, id,
+                    0, 0, mPointerGesture.downTime);
+        }
+    }
+
+    // Send motion events for hover.
+    if (mPointerGesture.currentGestureMode == PointerGesture::HOVER) {
+        dispatchMotion(when, policyFlags, mSource,
+                AMOTION_EVENT_ACTION_HOVER_MOVE, 0,
+                metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE,
+                mPointerGesture.currentGestureProperties,
+                mPointerGesture.currentGestureCoords, mPointerGesture.currentGestureIdToIndex,
+                mPointerGesture.currentGestureIdBits, -1,
+                0, 0, mPointerGesture.downTime);
+    } else if (dispatchedGestureIdBits.isEmpty()
+            && !mPointerGesture.lastGestureIdBits.isEmpty()) {
+        // Synthesize a hover move event after all pointers go up to indicate that
+        // the pointer is hovering again even if the user is not currently touching
+        // the touch pad.  This ensures that a view will receive a fresh hover enter
+        // event after a tap.
+        float x, y;
+        mPointerController->getPosition(&x, &y);
+
+        PointerProperties pointerProperties;
+        pointerProperties.clear();
+        pointerProperties.id = 0;
+        pointerProperties.toolType = AMOTION_EVENT_TOOL_TYPE_FINGER;
+
+        PointerCoords pointerCoords;
+        pointerCoords.clear();
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                AMOTION_EVENT_ACTION_HOVER_MOVE, 0,
+                metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE,
+                mViewport.displayId, 1, &pointerProperties, &pointerCoords,
+                0, 0, mPointerGesture.downTime);
+        getListener()->notifyMotion(&args);
+    }
+
+    // Update state.
+    mPointerGesture.lastGestureMode = mPointerGesture.currentGestureMode;
+    if (!down) {
+        mPointerGesture.lastGestureIdBits.clear();
+    } else {
+        mPointerGesture.lastGestureIdBits = mPointerGesture.currentGestureIdBits;
+        for (BitSet32 idBits(mPointerGesture.currentGestureIdBits); !idBits.isEmpty(); ) {
+            uint32_t id = idBits.clearFirstMarkedBit();
+            uint32_t index = mPointerGesture.currentGestureIdToIndex[id];
+            mPointerGesture.lastGestureProperties[index].copyFrom(
+                    mPointerGesture.currentGestureProperties[index]);
+            mPointerGesture.lastGestureCoords[index].copyFrom(
+                    mPointerGesture.currentGestureCoords[index]);
+            mPointerGesture.lastGestureIdToIndex[id] = index;
+        }
+    }
+}
+
+void TouchInputMapper::abortPointerGestures(nsecs_t when, uint32_t policyFlags) {
+    // Cancel previously dispatches pointers.
+    if (!mPointerGesture.lastGestureIdBits.isEmpty()) {
+        int32_t metaState = getContext()->getGlobalMetaState();
+        int32_t buttonState = mCurrentButtonState;
+        dispatchMotion(when, policyFlags, mSource,
+                AMOTION_EVENT_ACTION_CANCEL, 0, metaState, buttonState,
+                AMOTION_EVENT_EDGE_FLAG_NONE,
+                mPointerGesture.lastGestureProperties,
+                mPointerGesture.lastGestureCoords, mPointerGesture.lastGestureIdToIndex,
+                mPointerGesture.lastGestureIdBits, -1,
+                0, 0, mPointerGesture.downTime);
+    }
+
+    // Reset the current pointer gesture.
+    mPointerGesture.reset();
+    mPointerVelocityControl.reset();
+
+    // Remove any current spots.
+    if (mPointerController != NULL) {
+        mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+        mPointerController->clearSpots();
+    }
+}
+
+bool TouchInputMapper::preparePointerGestures(nsecs_t when,
+        bool* outCancelPreviousGesture, bool* outFinishPreviousGesture, bool isTimeout) {
+    *outCancelPreviousGesture = false;
+    *outFinishPreviousGesture = false;
+
+    // Handle TAP timeout.
+    if (isTimeout) {
+#if DEBUG_GESTURES
+        ALOGD("Gestures: Processing timeout");
+#endif
+
+        if (mPointerGesture.lastGestureMode == PointerGesture::TAP) {
+            if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
+                // The tap/drag timeout has not yet expired.
+                getContext()->requestTimeoutAtTime(mPointerGesture.tapUpTime
+                        + mConfig.pointerGestureTapDragInterval);
+            } else {
+                // The tap is finished.
+#if DEBUG_GESTURES
+                ALOGD("Gestures: TAP finished");
+#endif
+                *outFinishPreviousGesture = true;
+
+                mPointerGesture.activeGestureId = -1;
+                mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL;
+                mPointerGesture.currentGestureIdBits.clear();
+
+                mPointerVelocityControl.reset();
+                return true;
+            }
+        }
+
+        // We did not handle this timeout.
+        return false;
+    }
+
+    const uint32_t currentFingerCount = mCurrentFingerIdBits.count();
+    const uint32_t lastFingerCount = mLastFingerIdBits.count();
+
+    // Update the velocity tracker.
+    {
+        VelocityTracker::Position positions[MAX_POINTERS];
+        uint32_t count = 0;
+        for (BitSet32 idBits(mCurrentFingerIdBits); !idBits.isEmpty(); count++) {
+            uint32_t id = idBits.clearFirstMarkedBit();
+            const RawPointerData::Pointer& pointer = mCurrentRawPointerData.pointerForId(id);
+            positions[count].x = pointer.x * mPointerXMovementScale;
+            positions[count].y = pointer.y * mPointerYMovementScale;
+        }
+        mPointerGesture.velocityTracker.addMovement(when,
+                mCurrentFingerIdBits, positions);
+    }
+
+    // If the gesture ever enters a mode other than TAP, HOVER or TAP_DRAG, without first returning
+    // to NEUTRAL, then we should not generate tap event.
+    if (mPointerGesture.lastGestureMode != PointerGesture::HOVER
+            && mPointerGesture.lastGestureMode != PointerGesture::TAP
+            && mPointerGesture.lastGestureMode != PointerGesture::TAP_DRAG) {
+        mPointerGesture.resetTap();
+    }
+
+    // Pick a new active touch id if needed.
+    // Choose an arbitrary pointer that just went down, if there is one.
+    // Otherwise choose an arbitrary remaining pointer.
+    // This guarantees we always have an active touch id when there is at least one pointer.
+    // We keep the same active touch id for as long as possible.
+    bool activeTouchChanged = false;
+    int32_t lastActiveTouchId = mPointerGesture.activeTouchId;
+    int32_t activeTouchId = lastActiveTouchId;
+    if (activeTouchId < 0) {
+        if (!mCurrentFingerIdBits.isEmpty()) {
+            activeTouchChanged = true;
+            activeTouchId = mPointerGesture.activeTouchId =
+                    mCurrentFingerIdBits.firstMarkedBit();
+            mPointerGesture.firstTouchTime = when;
+        }
+    } else if (!mCurrentFingerIdBits.hasBit(activeTouchId)) {
+        activeTouchChanged = true;
+        if (!mCurrentFingerIdBits.isEmpty()) {
+            activeTouchId = mPointerGesture.activeTouchId =
+                    mCurrentFingerIdBits.firstMarkedBit();
+        } else {
+            activeTouchId = mPointerGesture.activeTouchId = -1;
+        }
+    }
+
+    // Determine whether we are in quiet time.
+    bool isQuietTime = false;
+    if (activeTouchId < 0) {
+        mPointerGesture.resetQuietTime();
+    } else {
+        isQuietTime = when < mPointerGesture.quietTime + mConfig.pointerGestureQuietInterval;
+        if (!isQuietTime) {
+            if ((mPointerGesture.lastGestureMode == PointerGesture::PRESS
+                    || mPointerGesture.lastGestureMode == PointerGesture::SWIPE
+                    || mPointerGesture.lastGestureMode == PointerGesture::FREEFORM)
+                    && currentFingerCount < 2) {
+                // Enter quiet time when exiting swipe or freeform state.
+                // This is to prevent accidentally entering the hover state and flinging the
+                // pointer when finishing a swipe and there is still one pointer left onscreen.
+                isQuietTime = true;
+            } else if (mPointerGesture.lastGestureMode == PointerGesture::BUTTON_CLICK_OR_DRAG
+                    && currentFingerCount >= 2
+                    && !isPointerDown(mCurrentButtonState)) {
+                // Enter quiet time when releasing the button and there are still two or more
+                // fingers down.  This may indicate that one finger was used to press the button
+                // but it has not gone up yet.
+                isQuietTime = true;
+            }
+            if (isQuietTime) {
+                mPointerGesture.quietTime = when;
+            }
+        }
+    }
+
+    // Switch states based on button and pointer state.
+    if (isQuietTime) {
+        // Case 1: Quiet time. (QUIET)
+#if DEBUG_GESTURES
+        ALOGD("Gestures: QUIET for next %0.3fms", (mPointerGesture.quietTime
+                + mConfig.pointerGestureQuietInterval - when) * 0.000001f);
+#endif
+        if (mPointerGesture.lastGestureMode != PointerGesture::QUIET) {
+            *outFinishPreviousGesture = true;
+        }
+
+        mPointerGesture.activeGestureId = -1;
+        mPointerGesture.currentGestureMode = PointerGesture::QUIET;
+        mPointerGesture.currentGestureIdBits.clear();
+
+        mPointerVelocityControl.reset();
+    } else if (isPointerDown(mCurrentButtonState)) {
+        // Case 2: Button is pressed. (BUTTON_CLICK_OR_DRAG)
+        // The pointer follows the active touch point.
+        // Emit DOWN, MOVE, UP events at the pointer location.
+        //
+        // Only the active touch matters; other fingers are ignored.  This policy helps
+        // to handle the case where the user places a second finger on the touch pad
+        // to apply the necessary force to depress an integrated button below the surface.
+        // We don't want the second finger to be delivered to applications.
+        //
+        // For this to work well, we need to make sure to track the pointer that is really
+        // active.  If the user first puts one finger down to click then adds another
+        // finger to drag then the active pointer should switch to the finger that is
+        // being dragged.
+#if DEBUG_GESTURES
+        ALOGD("Gestures: BUTTON_CLICK_OR_DRAG activeTouchId=%d, "
+                "currentFingerCount=%d", activeTouchId, currentFingerCount);
+#endif
+        // Reset state when just starting.
+        if (mPointerGesture.lastGestureMode != PointerGesture::BUTTON_CLICK_OR_DRAG) {
+            *outFinishPreviousGesture = true;
+            mPointerGesture.activeGestureId = 0;
+        }
+
+        // Switch pointers if needed.
+        // Find the fastest pointer and follow it.
+        if (activeTouchId >= 0 && currentFingerCount > 1) {
+            int32_t bestId = -1;
+            float bestSpeed = mConfig.pointerGestureDragMinSwitchSpeed;
+            for (BitSet32 idBits(mCurrentFingerIdBits); !idBits.isEmpty(); ) {
+                uint32_t id = idBits.clearFirstMarkedBit();
+                float vx, vy;
+                if (mPointerGesture.velocityTracker.getVelocity(id, &vx, &vy)) {
+                    float speed = hypotf(vx, vy);
+                    if (speed > bestSpeed) {
+                        bestId = id;
+                        bestSpeed = speed;
+                    }
+                }
+            }
+            if (bestId >= 0 && bestId != activeTouchId) {
+                mPointerGesture.activeTouchId = activeTouchId = bestId;
+                activeTouchChanged = true;
+#if DEBUG_GESTURES
+                ALOGD("Gestures: BUTTON_CLICK_OR_DRAG switched pointers, "
+                        "bestId=%d, bestSpeed=%0.3f", bestId, bestSpeed);
+#endif
+            }
+        }
+
+        if (activeTouchId >= 0 && mLastFingerIdBits.hasBit(activeTouchId)) {
+            const RawPointerData::Pointer& currentPointer =
+                    mCurrentRawPointerData.pointerForId(activeTouchId);
+            const RawPointerData::Pointer& lastPointer =
+                    mLastRawPointerData.pointerForId(activeTouchId);
+            float deltaX = (currentPointer.x - lastPointer.x) * mPointerXMovementScale;
+            float deltaY = (currentPointer.y - lastPointer.y) * mPointerYMovementScale;
+
+            rotateDelta(mSurfaceOrientation, &deltaX, &deltaY);
+            mPointerVelocityControl.move(when, &deltaX, &deltaY);
+
+            // Move the pointer using a relative motion.
+            // When using spots, the click will occur at the position of the anchor
+            // spot and all other spots will move there.
+            mPointerController->move(deltaX, deltaY);
+        } else {
+            mPointerVelocityControl.reset();
+        }
+
+        float x, y;
+        mPointerController->getPosition(&x, &y);
+
+        mPointerGesture.currentGestureMode = PointerGesture::BUTTON_CLICK_OR_DRAG;
+        mPointerGesture.currentGestureIdBits.clear();
+        mPointerGesture.currentGestureIdBits.markBit(mPointerGesture.activeGestureId);
+        mPointerGesture.currentGestureIdToIndex[mPointerGesture.activeGestureId] = 0;
+        mPointerGesture.currentGestureProperties[0].clear();
+        mPointerGesture.currentGestureProperties[0].id = mPointerGesture.activeGestureId;
+        mPointerGesture.currentGestureProperties[0].toolType = AMOTION_EVENT_TOOL_TYPE_FINGER;
+        mPointerGesture.currentGestureCoords[0].clear();
+        mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+        mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
+    } else if (currentFingerCount == 0) {
+        // Case 3. No fingers down and button is not pressed. (NEUTRAL)
+        if (mPointerGesture.lastGestureMode != PointerGesture::NEUTRAL) {
+            *outFinishPreviousGesture = true;
+        }
+
+        // Watch for taps coming out of HOVER or TAP_DRAG mode.
+        // Checking for taps after TAP_DRAG allows us to detect double-taps.
+        bool tapped = false;
+        if ((mPointerGesture.lastGestureMode == PointerGesture::HOVER
+                || mPointerGesture.lastGestureMode == PointerGesture::TAP_DRAG)
+                && lastFingerCount == 1) {
+            if (when <= mPointerGesture.tapDownTime + mConfig.pointerGestureTapInterval) {
+                float x, y;
+                mPointerController->getPosition(&x, &y);
+                if (fabs(x - mPointerGesture.tapX) <= mConfig.pointerGestureTapSlop
+                        && fabs(y - mPointerGesture.tapY) <= mConfig.pointerGestureTapSlop) {
+#if DEBUG_GESTURES
+                    ALOGD("Gestures: TAP");
+#endif
+
+                    mPointerGesture.tapUpTime = when;
+                    getContext()->requestTimeoutAtTime(when
+                            + mConfig.pointerGestureTapDragInterval);
+
+                    mPointerGesture.activeGestureId = 0;
+                    mPointerGesture.currentGestureMode = PointerGesture::TAP;
+                    mPointerGesture.currentGestureIdBits.clear();
+                    mPointerGesture.currentGestureIdBits.markBit(
+                            mPointerGesture.activeGestureId);
+                    mPointerGesture.currentGestureIdToIndex[
+                            mPointerGesture.activeGestureId] = 0;
+                    mPointerGesture.currentGestureProperties[0].clear();
+                    mPointerGesture.currentGestureProperties[0].id =
+                            mPointerGesture.activeGestureId;
+                    mPointerGesture.currentGestureProperties[0].toolType =
+                            AMOTION_EVENT_TOOL_TYPE_FINGER;
+                    mPointerGesture.currentGestureCoords[0].clear();
+                    mPointerGesture.currentGestureCoords[0].setAxisValue(
+                            AMOTION_EVENT_AXIS_X, mPointerGesture.tapX);
+                    mPointerGesture.currentGestureCoords[0].setAxisValue(
+                            AMOTION_EVENT_AXIS_Y, mPointerGesture.tapY);
+                    mPointerGesture.currentGestureCoords[0].setAxisValue(
+                            AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
+
+                    tapped = true;
+                } else {
+#if DEBUG_GESTURES
+                    ALOGD("Gestures: Not a TAP, deltaX=%f, deltaY=%f",
+                            x - mPointerGesture.tapX,
+                            y - mPointerGesture.tapY);
+#endif
+                }
+            } else {
+#if DEBUG_GESTURES
+                if (mPointerGesture.tapDownTime != LLONG_MIN) {
+                    ALOGD("Gestures: Not a TAP, %0.3fms since down",
+                            (when - mPointerGesture.tapDownTime) * 0.000001f);
+                } else {
+                    ALOGD("Gestures: Not a TAP, incompatible mode transitions");
+                }
+#endif
+            }
+        }
+
+        mPointerVelocityControl.reset();
+
+        if (!tapped) {
+#if DEBUG_GESTURES
+            ALOGD("Gestures: NEUTRAL");
+#endif
+            mPointerGesture.activeGestureId = -1;
+            mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL;
+            mPointerGesture.currentGestureIdBits.clear();
+        }
+    } else if (currentFingerCount == 1) {
+        // Case 4. Exactly one finger down, button is not pressed. (HOVER or TAP_DRAG)
+        // The pointer follows the active touch point.
+        // When in HOVER, emit HOVER_MOVE events at the pointer location.
+        // When in TAP_DRAG, emit MOVE events at the pointer location.
+        ALOG_ASSERT(activeTouchId >= 0);
+
+        mPointerGesture.currentGestureMode = PointerGesture::HOVER;
+        if (mPointerGesture.lastGestureMode == PointerGesture::TAP) {
+            if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
+                float x, y;
+                mPointerController->getPosition(&x, &y);
+                if (fabs(x - mPointerGesture.tapX) <= mConfig.pointerGestureTapSlop
+                        && fabs(y - mPointerGesture.tapY) <= mConfig.pointerGestureTapSlop) {
+                    mPointerGesture.currentGestureMode = PointerGesture::TAP_DRAG;
+                } else {
+#if DEBUG_GESTURES
+                    ALOGD("Gestures: Not a TAP_DRAG, deltaX=%f, deltaY=%f",
+                            x - mPointerGesture.tapX,
+                            y - mPointerGesture.tapY);
+#endif
+                }
+            } else {
+#if DEBUG_GESTURES
+                ALOGD("Gestures: Not a TAP_DRAG, %0.3fms time since up",
+                        (when - mPointerGesture.tapUpTime) * 0.000001f);
+#endif
+            }
+        } else if (mPointerGesture.lastGestureMode == PointerGesture::TAP_DRAG) {
+            mPointerGesture.currentGestureMode = PointerGesture::TAP_DRAG;
+        }
+
+        if (mLastFingerIdBits.hasBit(activeTouchId)) {
+            const RawPointerData::Pointer& currentPointer =
+                    mCurrentRawPointerData.pointerForId(activeTouchId);
+            const RawPointerData::Pointer& lastPointer =
+                    mLastRawPointerData.pointerForId(activeTouchId);
+            float deltaX = (currentPointer.x - lastPointer.x)
+                    * mPointerXMovementScale;
+            float deltaY = (currentPointer.y - lastPointer.y)
+                    * mPointerYMovementScale;
+
+            rotateDelta(mSurfaceOrientation, &deltaX, &deltaY);
+            mPointerVelocityControl.move(when, &deltaX, &deltaY);
+
+            // Move the pointer using a relative motion.
+            // When using spots, the hover or drag will occur at the position of the anchor spot.
+            mPointerController->move(deltaX, deltaY);
+        } else {
+            mPointerVelocityControl.reset();
+        }
+
+        bool down;
+        if (mPointerGesture.currentGestureMode == PointerGesture::TAP_DRAG) {
+#if DEBUG_GESTURES
+            ALOGD("Gestures: TAP_DRAG");
+#endif
+            down = true;
+        } else {
+#if DEBUG_GESTURES
+            ALOGD("Gestures: HOVER");
+#endif
+            if (mPointerGesture.lastGestureMode != PointerGesture::HOVER) {
+                *outFinishPreviousGesture = true;
+            }
+            mPointerGesture.activeGestureId = 0;
+            down = false;
+        }
+
+        float x, y;
+        mPointerController->getPosition(&x, &y);
+
+        mPointerGesture.currentGestureIdBits.clear();
+        mPointerGesture.currentGestureIdBits.markBit(mPointerGesture.activeGestureId);
+        mPointerGesture.currentGestureIdToIndex[mPointerGesture.activeGestureId] = 0;
+        mPointerGesture.currentGestureProperties[0].clear();
+        mPointerGesture.currentGestureProperties[0].id = mPointerGesture.activeGestureId;
+        mPointerGesture.currentGestureProperties[0].toolType =
+                AMOTION_EVENT_TOOL_TYPE_FINGER;
+        mPointerGesture.currentGestureCoords[0].clear();
+        mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+        mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE,
+                down ? 1.0f : 0.0f);
+
+        if (lastFingerCount == 0 && currentFingerCount != 0) {
+            mPointerGesture.resetTap();
+            mPointerGesture.tapDownTime = when;
+            mPointerGesture.tapX = x;
+            mPointerGesture.tapY = y;
+        }
+    } else {
+        // Case 5. At least two fingers down, button is not pressed. (PRESS, SWIPE or FREEFORM)
+        // We need to provide feedback for each finger that goes down so we cannot wait
+        // for the fingers to move before deciding what to do.
+        //
+        // The ambiguous case is deciding what to do when there are two fingers down but they
+        // have not moved enough to determine whether they are part of a drag or part of a
+        // freeform gesture, or just a press or long-press at the pointer location.
+        //
+        // When there are two fingers we start with the PRESS hypothesis and we generate a
+        // down at the pointer location.
+        //
+        // When the two fingers move enough or when additional fingers are added, we make
+        // a decision to transition into SWIPE or FREEFORM mode accordingly.
+        ALOG_ASSERT(activeTouchId >= 0);
+
+        bool settled = when >= mPointerGesture.firstTouchTime
+                + mConfig.pointerGestureMultitouchSettleInterval;
+        if (mPointerGesture.lastGestureMode != PointerGesture::PRESS
+                && mPointerGesture.lastGestureMode != PointerGesture::SWIPE
+                && mPointerGesture.lastGestureMode != PointerGesture::FREEFORM) {
+            *outFinishPreviousGesture = true;
+        } else if (!settled && currentFingerCount > lastFingerCount) {
+            // Additional pointers have gone down but not yet settled.
+            // Reset the gesture.
+#if DEBUG_GESTURES
+            ALOGD("Gestures: Resetting gesture since additional pointers went down for MULTITOUCH, "
+                    "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime
+                            + mConfig.pointerGestureMultitouchSettleInterval - when)
+                            * 0.000001f);
+#endif
+            *outCancelPreviousGesture = true;
+        } else {
+            // Continue previous gesture.
+            mPointerGesture.currentGestureMode = mPointerGesture.lastGestureMode;
+        }
+
+        if (*outFinishPreviousGesture || *outCancelPreviousGesture) {
+            mPointerGesture.currentGestureMode = PointerGesture::PRESS;
+            mPointerGesture.activeGestureId = 0;
+            mPointerGesture.referenceIdBits.clear();
+            mPointerVelocityControl.reset();
+
+            // Use the centroid and pointer location as the reference points for the gesture.
+#if DEBUG_GESTURES
+            ALOGD("Gestures: Using centroid as reference for MULTITOUCH, "
+                    "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime
+                            + mConfig.pointerGestureMultitouchSettleInterval - when)
+                            * 0.000001f);
+#endif
+            mCurrentRawPointerData.getCentroidOfTouchingPointers(
+                    &mPointerGesture.referenceTouchX,
+                    &mPointerGesture.referenceTouchY);
+            mPointerController->getPosition(&mPointerGesture.referenceGestureX,
+                    &mPointerGesture.referenceGestureY);
+        }
+
+        // Clear the reference deltas for fingers not yet included in the reference calculation.
+        for (BitSet32 idBits(mCurrentFingerIdBits.value
+                & ~mPointerGesture.referenceIdBits.value); !idBits.isEmpty(); ) {
+            uint32_t id = idBits.clearFirstMarkedBit();
+            mPointerGesture.referenceDeltas[id].dx = 0;
+            mPointerGesture.referenceDeltas[id].dy = 0;
+        }
+        mPointerGesture.referenceIdBits = mCurrentFingerIdBits;
+
+        // Add delta for all fingers and calculate a common movement delta.
+        float commonDeltaX = 0, commonDeltaY = 0;
+        BitSet32 commonIdBits(mLastFingerIdBits.value
+                & mCurrentFingerIdBits.value);
+        for (BitSet32 idBits(commonIdBits); !idBits.isEmpty(); ) {
+            bool first = (idBits == commonIdBits);
+            uint32_t id = idBits.clearFirstMarkedBit();
+            const RawPointerData::Pointer& cpd = mCurrentRawPointerData.pointerForId(id);
+            const RawPointerData::Pointer& lpd = mLastRawPointerData.pointerForId(id);
+            PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
+            delta.dx += cpd.x - lpd.x;
+            delta.dy += cpd.y - lpd.y;
+
+            if (first) {
+                commonDeltaX = delta.dx;
+                commonDeltaY = delta.dy;
+            } else {
+                commonDeltaX = calculateCommonVector(commonDeltaX, delta.dx);
+                commonDeltaY = calculateCommonVector(commonDeltaY, delta.dy);
+            }
+        }
+
+        // Consider transitions from PRESS to SWIPE or MULTITOUCH.
+        if (mPointerGesture.currentGestureMode == PointerGesture::PRESS) {
+            float dist[MAX_POINTER_ID + 1];
+            int32_t distOverThreshold = 0;
+            for (BitSet32 idBits(mPointerGesture.referenceIdBits); !idBits.isEmpty(); ) {
+                uint32_t id = idBits.clearFirstMarkedBit();
+                PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
+                dist[id] = hypotf(delta.dx * mPointerXZoomScale,
+                        delta.dy * mPointerYZoomScale);
+                if (dist[id] > mConfig.pointerGestureMultitouchMinDistance) {
+                    distOverThreshold += 1;
+                }
+            }
+
+            // Only transition when at least two pointers have moved further than
+            // the minimum distance threshold.
+            if (distOverThreshold >= 2) {
+                if (currentFingerCount > 2) {
+                    // There are more than two pointers, switch to FREEFORM.
+#if DEBUG_GESTURES
+                    ALOGD("Gestures: PRESS transitioned to FREEFORM, number of pointers %d > 2",
+                            currentFingerCount);
+#endif
+                    *outCancelPreviousGesture = true;
+                    mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                } else {
+                    // There are exactly two pointers.
+                    BitSet32 idBits(mCurrentFingerIdBits);
+                    uint32_t id1 = idBits.clearFirstMarkedBit();
+                    uint32_t id2 = idBits.firstMarkedBit();
+                    const RawPointerData::Pointer& p1 = mCurrentRawPointerData.pointerForId(id1);
+                    const RawPointerData::Pointer& p2 = mCurrentRawPointerData.pointerForId(id2);
+                    float mutualDistance = distance(p1.x, p1.y, p2.x, p2.y);
+                    if (mutualDistance > mPointerGestureMaxSwipeWidth) {
+                        // There are two pointers but they are too far apart for a SWIPE,
+                        // switch to FREEFORM.
+#if DEBUG_GESTURES
+                        ALOGD("Gestures: PRESS transitioned to FREEFORM, distance %0.3f > %0.3f",
+                                mutualDistance, mPointerGestureMaxSwipeWidth);
+#endif
+                        *outCancelPreviousGesture = true;
+                        mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                    } else {
+                        // There are two pointers.  Wait for both pointers to start moving
+                        // before deciding whether this is a SWIPE or FREEFORM gesture.
+                        float dist1 = dist[id1];
+                        float dist2 = dist[id2];
+                        if (dist1 >= mConfig.pointerGestureMultitouchMinDistance
+                                && dist2 >= mConfig.pointerGestureMultitouchMinDistance) {
+                            // Calculate the dot product of the displacement vectors.
+                            // When the vectors are oriented in approximately the same direction,
+                            // the angle betweeen them is near zero and the cosine of the angle
+                            // approches 1.0.  Recall that dot(v1, v2) = cos(angle) * mag(v1) * mag(v2).
+                            PointerGesture::Delta& delta1 = mPointerGesture.referenceDeltas[id1];
+                            PointerGesture::Delta& delta2 = mPointerGesture.referenceDeltas[id2];
+                            float dx1 = delta1.dx * mPointerXZoomScale;
+                            float dy1 = delta1.dy * mPointerYZoomScale;
+                            float dx2 = delta2.dx * mPointerXZoomScale;
+                            float dy2 = delta2.dy * mPointerYZoomScale;
+                            float dot = dx1 * dx2 + dy1 * dy2;
+                            float cosine = dot / (dist1 * dist2); // denominator always > 0
+                            if (cosine >= mConfig.pointerGestureSwipeTransitionAngleCosine) {
+                                // Pointers are moving in the same direction.  Switch to SWIPE.
+#if DEBUG_GESTURES
+                                ALOGD("Gestures: PRESS transitioned to SWIPE, "
+                                        "dist1 %0.3f >= %0.3f, dist2 %0.3f >= %0.3f, "
+                                        "cosine %0.3f >= %0.3f",
+                                        dist1, mConfig.pointerGestureMultitouchMinDistance,
+                                        dist2, mConfig.pointerGestureMultitouchMinDistance,
+                                        cosine, mConfig.pointerGestureSwipeTransitionAngleCosine);
+#endif
+                                mPointerGesture.currentGestureMode = PointerGesture::SWIPE;
+                            } else {
+                                // Pointers are moving in different directions.  Switch to FREEFORM.
+#if DEBUG_GESTURES
+                                ALOGD("Gestures: PRESS transitioned to FREEFORM, "
+                                        "dist1 %0.3f >= %0.3f, dist2 %0.3f >= %0.3f, "
+                                        "cosine %0.3f < %0.3f",
+                                        dist1, mConfig.pointerGestureMultitouchMinDistance,
+                                        dist2, mConfig.pointerGestureMultitouchMinDistance,
+                                        cosine, mConfig.pointerGestureSwipeTransitionAngleCosine);
+#endif
+                                *outCancelPreviousGesture = true;
+                                mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                            }
+                        }
+                    }
+                }
+            }
+        } else if (mPointerGesture.currentGestureMode == PointerGesture::SWIPE) {
+            // Switch from SWIPE to FREEFORM if additional pointers go down.
+            // Cancel previous gesture.
+            if (currentFingerCount > 2) {
+#if DEBUG_GESTURES
+                ALOGD("Gestures: SWIPE transitioned to FREEFORM, number of pointers %d > 2",
+                        currentFingerCount);
+#endif
+                *outCancelPreviousGesture = true;
+                mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+            }
+        }
+
+        // Move the reference points based on the overall group motion of the fingers
+        // except in PRESS mode while waiting for a transition to occur.
+        if (mPointerGesture.currentGestureMode != PointerGesture::PRESS
+                && (commonDeltaX || commonDeltaY)) {
+            for (BitSet32 idBits(mPointerGesture.referenceIdBits); !idBits.isEmpty(); ) {
+                uint32_t id = idBits.clearFirstMarkedBit();
+                PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
+                delta.dx = 0;
+                delta.dy = 0;
+            }
+
+            mPointerGesture.referenceTouchX += commonDeltaX;
+            mPointerGesture.referenceTouchY += commonDeltaY;
+
+            commonDeltaX *= mPointerXMovementScale;
+            commonDeltaY *= mPointerYMovementScale;
+
+            rotateDelta(mSurfaceOrientation, &commonDeltaX, &commonDeltaY);
+            mPointerVelocityControl.move(when, &commonDeltaX, &commonDeltaY);
+
+            mPointerGesture.referenceGestureX += commonDeltaX;
+            mPointerGesture.referenceGestureY += commonDeltaY;
+        }
+
+        // Report gestures.
+        if (mPointerGesture.currentGestureMode == PointerGesture::PRESS
+                || mPointerGesture.currentGestureMode == PointerGesture::SWIPE) {
+            // PRESS or SWIPE mode.
+#if DEBUG_GESTURES
+            ALOGD("Gestures: PRESS or SWIPE activeTouchId=%d,"
+                    "activeGestureId=%d, currentTouchPointerCount=%d",
+                    activeTouchId, mPointerGesture.activeGestureId, currentFingerCount);
+#endif
+            ALOG_ASSERT(mPointerGesture.activeGestureId >= 0);
+
+            mPointerGesture.currentGestureIdBits.clear();
+            mPointerGesture.currentGestureIdBits.markBit(mPointerGesture.activeGestureId);
+            mPointerGesture.currentGestureIdToIndex[mPointerGesture.activeGestureId] = 0;
+            mPointerGesture.currentGestureProperties[0].clear();
+            mPointerGesture.currentGestureProperties[0].id = mPointerGesture.activeGestureId;
+            mPointerGesture.currentGestureProperties[0].toolType =
+                    AMOTION_EVENT_TOOL_TYPE_FINGER;
+            mPointerGesture.currentGestureCoords[0].clear();
+            mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X,
+                    mPointerGesture.referenceGestureX);
+            mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y,
+                    mPointerGesture.referenceGestureY);
+            mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
+        } else if (mPointerGesture.currentGestureMode == PointerGesture::FREEFORM) {
+            // FREEFORM mode.
+#if DEBUG_GESTURES
+            ALOGD("Gestures: FREEFORM activeTouchId=%d,"
+                    "activeGestureId=%d, currentTouchPointerCount=%d",
+                    activeTouchId, mPointerGesture.activeGestureId, currentFingerCount);
+#endif
+            ALOG_ASSERT(mPointerGesture.activeGestureId >= 0);
+
+            mPointerGesture.currentGestureIdBits.clear();
+
+            BitSet32 mappedTouchIdBits;
+            BitSet32 usedGestureIdBits;
+            if (mPointerGesture.lastGestureMode != PointerGesture::FREEFORM) {
+                // Initially, assign the active gesture id to the active touch point
+                // if there is one.  No other touch id bits are mapped yet.
+                if (!*outCancelPreviousGesture) {
+                    mappedTouchIdBits.markBit(activeTouchId);
+                    usedGestureIdBits.markBit(mPointerGesture.activeGestureId);
+                    mPointerGesture.freeformTouchToGestureIdMap[activeTouchId] =
+                            mPointerGesture.activeGestureId;
+                } else {
+                    mPointerGesture.activeGestureId = -1;
+                }
+            } else {
+                // Otherwise, assume we mapped all touches from the previous frame.
+                // Reuse all mappings that are still applicable.
+                mappedTouchIdBits.value = mLastFingerIdBits.value
+                        & mCurrentFingerIdBits.value;
+                usedGestureIdBits = mPointerGesture.lastGestureIdBits;
+
+                // Check whether we need to choose a new active gesture id because the
+                // current went went up.
+                for (BitSet32 upTouchIdBits(mLastFingerIdBits.value
+                        & ~mCurrentFingerIdBits.value);
+                        !upTouchIdBits.isEmpty(); ) {
+                    uint32_t upTouchId = upTouchIdBits.clearFirstMarkedBit();
+                    uint32_t upGestureId = mPointerGesture.freeformTouchToGestureIdMap[upTouchId];
+                    if (upGestureId == uint32_t(mPointerGesture.activeGestureId)) {
+                        mPointerGesture.activeGestureId = -1;
+                        break;
+                    }
+                }
+            }
+
+#if DEBUG_GESTURES
+            ALOGD("Gestures: FREEFORM follow up "
+                    "mappedTouchIdBits=0x%08x, usedGestureIdBits=0x%08x, "
+                    "activeGestureId=%d",
+                    mappedTouchIdBits.value, usedGestureIdBits.value,
+                    mPointerGesture.activeGestureId);
+#endif
+
+            BitSet32 idBits(mCurrentFingerIdBits);
+            for (uint32_t i = 0; i < currentFingerCount; i++) {
+                uint32_t touchId = idBits.clearFirstMarkedBit();
+                uint32_t gestureId;
+                if (!mappedTouchIdBits.hasBit(touchId)) {
+                    gestureId = usedGestureIdBits.markFirstUnmarkedBit();
+                    mPointerGesture.freeformTouchToGestureIdMap[touchId] = gestureId;
+#if DEBUG_GESTURES
+                    ALOGD("Gestures: FREEFORM "
+                            "new mapping for touch id %d -> gesture id %d",
+                            touchId, gestureId);
+#endif
+                } else {
+                    gestureId = mPointerGesture.freeformTouchToGestureIdMap[touchId];
+#if DEBUG_GESTURES
+                    ALOGD("Gestures: FREEFORM "
+                            "existing mapping for touch id %d -> gesture id %d",
+                            touchId, gestureId);
+#endif
+                }
+                mPointerGesture.currentGestureIdBits.markBit(gestureId);
+                mPointerGesture.currentGestureIdToIndex[gestureId] = i;
+
+                const RawPointerData::Pointer& pointer =
+                        mCurrentRawPointerData.pointerForId(touchId);
+                float deltaX = (pointer.x - mPointerGesture.referenceTouchX)
+                        * mPointerXZoomScale;
+                float deltaY = (pointer.y - mPointerGesture.referenceTouchY)
+                        * mPointerYZoomScale;
+                rotateDelta(mSurfaceOrientation, &deltaX, &deltaY);
+
+                mPointerGesture.currentGestureProperties[i].clear();
+                mPointerGesture.currentGestureProperties[i].id = gestureId;
+                mPointerGesture.currentGestureProperties[i].toolType =
+                        AMOTION_EVENT_TOOL_TYPE_FINGER;
+                mPointerGesture.currentGestureCoords[i].clear();
+                mPointerGesture.currentGestureCoords[i].setAxisValue(
+                        AMOTION_EVENT_AXIS_X, mPointerGesture.referenceGestureX + deltaX);
+                mPointerGesture.currentGestureCoords[i].setAxisValue(
+                        AMOTION_EVENT_AXIS_Y, mPointerGesture.referenceGestureY + deltaY);
+                mPointerGesture.currentGestureCoords[i].setAxisValue(
+                        AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
+            }
+
+            if (mPointerGesture.activeGestureId < 0) {
+                mPointerGesture.activeGestureId =
+                        mPointerGesture.currentGestureIdBits.firstMarkedBit();
+#if DEBUG_GESTURES
+                ALOGD("Gestures: FREEFORM new "
+                        "activeGestureId=%d", mPointerGesture.activeGestureId);
+#endif
+            }
+        }
+    }
+
+    mPointerController->setButtonState(mCurrentButtonState);
+
+#if DEBUG_GESTURES
+    ALOGD("Gestures: finishPreviousGesture=%s, cancelPreviousGesture=%s, "
+            "currentGestureMode=%d, currentGestureIdBits=0x%08x, "
+            "lastGestureMode=%d, lastGestureIdBits=0x%08x",
+            toString(*outFinishPreviousGesture), toString(*outCancelPreviousGesture),
+            mPointerGesture.currentGestureMode, mPointerGesture.currentGestureIdBits.value,
+            mPointerGesture.lastGestureMode, mPointerGesture.lastGestureIdBits.value);
+    for (BitSet32 idBits = mPointerGesture.currentGestureIdBits; !idBits.isEmpty(); ) {
+        uint32_t id = idBits.clearFirstMarkedBit();
+        uint32_t index = mPointerGesture.currentGestureIdToIndex[id];
+        const PointerProperties& properties = mPointerGesture.currentGestureProperties[index];
+        const PointerCoords& coords = mPointerGesture.currentGestureCoords[index];
+        ALOGD("  currentGesture[%d]: index=%d, toolType=%d, "
+                "x=%0.3f, y=%0.3f, pressure=%0.3f",
+                id, index, properties.toolType,
+                coords.getAxisValue(AMOTION_EVENT_AXIS_X),
+                coords.getAxisValue(AMOTION_EVENT_AXIS_Y),
+                coords.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE));
+    }
+    for (BitSet32 idBits = mPointerGesture.lastGestureIdBits; !idBits.isEmpty(); ) {
+        uint32_t id = idBits.clearFirstMarkedBit();
+        uint32_t index = mPointerGesture.lastGestureIdToIndex[id];
+        const PointerProperties& properties = mPointerGesture.lastGestureProperties[index];
+        const PointerCoords& coords = mPointerGesture.lastGestureCoords[index];
+        ALOGD("  lastGesture[%d]: index=%d, toolType=%d, "
+                "x=%0.3f, y=%0.3f, pressure=%0.3f",
+                id, index, properties.toolType,
+                coords.getAxisValue(AMOTION_EVENT_AXIS_X),
+                coords.getAxisValue(AMOTION_EVENT_AXIS_Y),
+                coords.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE));
+    }
+#endif
+    return true;
+}
+
+void TouchInputMapper::dispatchPointerStylus(nsecs_t when, uint32_t policyFlags) {
+    mPointerSimple.currentCoords.clear();
+    mPointerSimple.currentProperties.clear();
+
+    bool down, hovering;
+    if (!mCurrentStylusIdBits.isEmpty()) {
+        uint32_t id = mCurrentStylusIdBits.firstMarkedBit();
+        uint32_t index = mCurrentCookedPointerData.idToIndex[id];
+        float x = mCurrentCookedPointerData.pointerCoords[index].getX();
+        float y = mCurrentCookedPointerData.pointerCoords[index].getY();
+        mPointerController->setPosition(x, y);
+
+        hovering = mCurrentCookedPointerData.hoveringIdBits.hasBit(id);
+        down = !hovering;
+
+        mPointerController->getPosition(&x, &y);
+        mPointerSimple.currentCoords.copyFrom(mCurrentCookedPointerData.pointerCoords[index]);
+        mPointerSimple.currentCoords.setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        mPointerSimple.currentCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+        mPointerSimple.currentProperties.id = 0;
+        mPointerSimple.currentProperties.toolType =
+                mCurrentCookedPointerData.pointerProperties[index].toolType;
+    } else {
+        down = false;
+        hovering = false;
+    }
+
+    dispatchPointerSimple(when, policyFlags, down, hovering);
+}
+
+void TouchInputMapper::abortPointerStylus(nsecs_t when, uint32_t policyFlags) {
+    abortPointerSimple(when, policyFlags);
+}
+
+void TouchInputMapper::dispatchPointerMouse(nsecs_t when, uint32_t policyFlags) {
+    mPointerSimple.currentCoords.clear();
+    mPointerSimple.currentProperties.clear();
+
+    bool down, hovering;
+    if (!mCurrentMouseIdBits.isEmpty()) {
+        uint32_t id = mCurrentMouseIdBits.firstMarkedBit();
+        uint32_t currentIndex = mCurrentRawPointerData.idToIndex[id];
+        if (mLastMouseIdBits.hasBit(id)) {
+            uint32_t lastIndex = mCurrentRawPointerData.idToIndex[id];
+            float deltaX = (mCurrentRawPointerData.pointers[currentIndex].x
+                    - mLastRawPointerData.pointers[lastIndex].x)
+                    * mPointerXMovementScale;
+            float deltaY = (mCurrentRawPointerData.pointers[currentIndex].y
+                    - mLastRawPointerData.pointers[lastIndex].y)
+                    * mPointerYMovementScale;
+
+            rotateDelta(mSurfaceOrientation, &deltaX, &deltaY);
+            mPointerVelocityControl.move(when, &deltaX, &deltaY);
+
+            mPointerController->move(deltaX, deltaY);
+        } else {
+            mPointerVelocityControl.reset();
+        }
+
+        down = isPointerDown(mCurrentButtonState);
+        hovering = !down;
+
+        float x, y;
+        mPointerController->getPosition(&x, &y);
+        mPointerSimple.currentCoords.copyFrom(
+                mCurrentCookedPointerData.pointerCoords[currentIndex]);
+        mPointerSimple.currentCoords.setAxisValue(AMOTION_EVENT_AXIS_X, x);
+        mPointerSimple.currentCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, y);
+        mPointerSimple.currentCoords.setAxisValue(AMOTION_EVENT_AXIS_PRESSURE,
+                hovering ? 0.0f : 1.0f);
+        mPointerSimple.currentProperties.id = 0;
+        mPointerSimple.currentProperties.toolType =
+                mCurrentCookedPointerData.pointerProperties[currentIndex].toolType;
+    } else {
+        mPointerVelocityControl.reset();
+
+        down = false;
+        hovering = false;
+    }
+
+    dispatchPointerSimple(when, policyFlags, down, hovering);
+}
+
+void TouchInputMapper::abortPointerMouse(nsecs_t when, uint32_t policyFlags) {
+    abortPointerSimple(when, policyFlags);
+
+    mPointerVelocityControl.reset();
+}
+
+void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
+        bool down, bool hovering) {
+    int32_t metaState = getContext()->getGlobalMetaState();
+
+    if (mPointerController != NULL) {
+        if (down || hovering) {
+            mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_POINTER);
+            mPointerController->clearSpots();
+            mPointerController->setButtonState(mCurrentButtonState);
+            mPointerController->unfade(PointerControllerInterface::TRANSITION_IMMEDIATE);
+        } else if (!down && !hovering && (mPointerSimple.down || mPointerSimple.hovering)) {
+            mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+        }
+    }
+
+    if (mPointerSimple.down && !down) {
+        mPointerSimple.down = false;
+
+        // Send up.
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                 AMOTION_EVENT_ACTION_UP, 0, metaState, mLastButtonState, 0,
+                 mViewport.displayId,
+                 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords,
+                 mOrientedXPrecision, mOrientedYPrecision,
+                 mPointerSimple.downTime);
+        getListener()->notifyMotion(&args);
+    }
+
+    if (mPointerSimple.hovering && !hovering) {
+        mPointerSimple.hovering = false;
+
+        // Send hover exit.
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                AMOTION_EVENT_ACTION_HOVER_EXIT, 0, metaState, mLastButtonState, 0,
+                mViewport.displayId,
+                1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords,
+                mOrientedXPrecision, mOrientedYPrecision,
+                mPointerSimple.downTime);
+        getListener()->notifyMotion(&args);
+    }
+
+    if (down) {
+        if (!mPointerSimple.down) {
+            mPointerSimple.down = true;
+            mPointerSimple.downTime = when;
+
+            // Send down.
+            NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                    AMOTION_EVENT_ACTION_DOWN, 0, metaState, mCurrentButtonState, 0,
+                    mViewport.displayId,
+                    1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords,
+                    mOrientedXPrecision, mOrientedYPrecision,
+                    mPointerSimple.downTime);
+            getListener()->notifyMotion(&args);
+        }
+
+        // Send move.
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                AMOTION_EVENT_ACTION_MOVE, 0, metaState, mCurrentButtonState, 0,
+                mViewport.displayId,
+                1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords,
+                mOrientedXPrecision, mOrientedYPrecision,
+                mPointerSimple.downTime);
+        getListener()->notifyMotion(&args);
+    }
+
+    if (hovering) {
+        if (!mPointerSimple.hovering) {
+            mPointerSimple.hovering = true;
+
+            // Send hover enter.
+            NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                    AMOTION_EVENT_ACTION_HOVER_ENTER, 0, metaState, mCurrentButtonState, 0,
+                    mViewport.displayId,
+                    1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords,
+                    mOrientedXPrecision, mOrientedYPrecision,
+                    mPointerSimple.downTime);
+            getListener()->notifyMotion(&args);
+        }
+
+        // Send hover move.
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                AMOTION_EVENT_ACTION_HOVER_MOVE, 0, metaState, mCurrentButtonState, 0,
+                mViewport.displayId,
+                1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords,
+                mOrientedXPrecision, mOrientedYPrecision,
+                mPointerSimple.downTime);
+        getListener()->notifyMotion(&args);
+    }
+
+    if (mCurrentRawVScroll || mCurrentRawHScroll) {
+        float vscroll = mCurrentRawVScroll;
+        float hscroll = mCurrentRawHScroll;
+        mWheelYVelocityControl.move(when, NULL, &vscroll);
+        mWheelXVelocityControl.move(when, &hscroll, NULL);
+
+        // Send scroll.
+        PointerCoords pointerCoords;
+        pointerCoords.copyFrom(mPointerSimple.currentCoords);
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_VSCROLL, vscroll);
+        pointerCoords.setAxisValue(AMOTION_EVENT_AXIS_HSCROLL, hscroll);
+
+        NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
+                AMOTION_EVENT_ACTION_SCROLL, 0, metaState, mCurrentButtonState, 0,
+                mViewport.displayId,
+                1, &mPointerSimple.currentProperties, &pointerCoords,
+                mOrientedXPrecision, mOrientedYPrecision,
+                mPointerSimple.downTime);
+        getListener()->notifyMotion(&args);
+    }
+
+    // Save state.
+    if (down || hovering) {
+        mPointerSimple.lastCoords.copyFrom(mPointerSimple.currentCoords);
+        mPointerSimple.lastProperties.copyFrom(mPointerSimple.currentProperties);
+    } else {
+        mPointerSimple.reset();
+    }
+}
+
+void TouchInputMapper::abortPointerSimple(nsecs_t when, uint32_t policyFlags) {
+    mPointerSimple.currentCoords.clear();
+    mPointerSimple.currentProperties.clear();
+
+    dispatchPointerSimple(when, policyFlags, false, false);
+}
+
+void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source,
+        int32_t action, int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags,
+        const PointerProperties* properties, const PointerCoords* coords,
+        const uint32_t* idToIndex, BitSet32 idBits,
+        int32_t changedId, float xPrecision, float yPrecision, nsecs_t downTime) {
+    PointerCoords pointerCoords[MAX_POINTERS];
+    PointerProperties pointerProperties[MAX_POINTERS];
+    uint32_t pointerCount = 0;
+    while (!idBits.isEmpty()) {
+        uint32_t id = idBits.clearFirstMarkedBit();
+        uint32_t index = idToIndex[id];
+        pointerProperties[pointerCount].copyFrom(properties[index]);
+        pointerCoords[pointerCount].copyFrom(coords[index]);
+
+        if (changedId >= 0 && id == uint32_t(changedId)) {
+            action |= pointerCount << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
+        }
+
+        pointerCount += 1;
+    }
+
+    ALOG_ASSERT(pointerCount != 0);
+
+    if (changedId >= 0 && pointerCount == 1) {
+        // Replace initial down and final up action.
+        // We can compare the action without masking off the changed pointer index
+        // because we know the index is 0.
+        if (action == AMOTION_EVENT_ACTION_POINTER_DOWN) {
+            action = AMOTION_EVENT_ACTION_DOWN;
+        } else if (action == AMOTION_EVENT_ACTION_POINTER_UP) {
+            action = AMOTION_EVENT_ACTION_UP;
+        } else {
+            // Can't happen.
+            ALOG_ASSERT(false);
+        }
+    }
+
+    NotifyMotionArgs args(when, getDeviceId(), source, policyFlags,
+            action, flags, metaState, buttonState, edgeFlags,
+            mViewport.displayId, pointerCount, pointerProperties, pointerCoords,
+            xPrecision, yPrecision, downTime);
+    getListener()->notifyMotion(&args);
+}
+
+bool TouchInputMapper::updateMovedPointers(const PointerProperties* inProperties,
+        const PointerCoords* inCoords, const uint32_t* inIdToIndex,
+        PointerProperties* outProperties, PointerCoords* outCoords, const uint32_t* outIdToIndex,
+        BitSet32 idBits) const {
+    bool changed = false;
+    while (!idBits.isEmpty()) {
+        uint32_t id = idBits.clearFirstMarkedBit();
+        uint32_t inIndex = inIdToIndex[id];
+        uint32_t outIndex = outIdToIndex[id];
+
+        const PointerProperties& curInProperties = inProperties[inIndex];
+        const PointerCoords& curInCoords = inCoords[inIndex];
+        PointerProperties& curOutProperties = outProperties[outIndex];
+        PointerCoords& curOutCoords = outCoords[outIndex];
+
+        if (curInProperties != curOutProperties) {
+            curOutProperties.copyFrom(curInProperties);
+            changed = true;
+        }
+
+        if (curInCoords != curOutCoords) {
+            curOutCoords.copyFrom(curInCoords);
+            changed = true;
+        }
+    }
+    return changed;
+}
+
+void TouchInputMapper::fadePointer() {
+    if (mPointerController != NULL) {
+        mPointerController->fade(PointerControllerInterface::TRANSITION_GRADUAL);
+    }
+}
+
+bool TouchInputMapper::isPointInsideSurface(int32_t x, int32_t y) {
+    return x >= mRawPointerAxes.x.minValue && x <= mRawPointerAxes.x.maxValue
+            && y >= mRawPointerAxes.y.minValue && y <= mRawPointerAxes.y.maxValue;
+}
+
+const TouchInputMapper::VirtualKey* TouchInputMapper::findVirtualKeyHit(
+        int32_t x, int32_t y) {
+    size_t numVirtualKeys = mVirtualKeys.size();
+    for (size_t i = 0; i < numVirtualKeys; i++) {
+        const VirtualKey& virtualKey = mVirtualKeys[i];
+
+#if DEBUG_VIRTUAL_KEYS
+        ALOGD("VirtualKeys: Hit test (%d, %d): keyCode=%d, scanCode=%d, "
+                "left=%d, top=%d, right=%d, bottom=%d",
+                x, y,
+                virtualKey.keyCode, virtualKey.scanCode,
+                virtualKey.hitLeft, virtualKey.hitTop,
+                virtualKey.hitRight, virtualKey.hitBottom);
+#endif
+
+        if (virtualKey.isHit(x, y)) {
+            return & virtualKey;
+        }
+    }
+
+    return NULL;
+}
+
+void TouchInputMapper::assignPointerIds() {
+    uint32_t currentPointerCount = mCurrentRawPointerData.pointerCount;
+    uint32_t lastPointerCount = mLastRawPointerData.pointerCount;
+
+    mCurrentRawPointerData.clearIdBits();
+
+    if (currentPointerCount == 0) {
+        // No pointers to assign.
+        return;
+    }
+
+    if (lastPointerCount == 0) {
+        // All pointers are new.
+        for (uint32_t i = 0; i < currentPointerCount; i++) {
+            uint32_t id = i;
+            mCurrentRawPointerData.pointers[i].id = id;
+            mCurrentRawPointerData.idToIndex[id] = i;
+            mCurrentRawPointerData.markIdBit(id, mCurrentRawPointerData.isHovering(i));
+        }
+        return;
+    }
+
+    if (currentPointerCount == 1 && lastPointerCount == 1
+            && mCurrentRawPointerData.pointers[0].toolType
+                    == mLastRawPointerData.pointers[0].toolType) {
+        // Only one pointer and no change in count so it must have the same id as before.
+        uint32_t id = mLastRawPointerData.pointers[0].id;
+        mCurrentRawPointerData.pointers[0].id = id;
+        mCurrentRawPointerData.idToIndex[id] = 0;
+        mCurrentRawPointerData.markIdBit(id, mCurrentRawPointerData.isHovering(0));
+        return;
+    }
+
+    // General case.
+    // We build a heap of squared euclidean distances between current and last pointers
+    // associated with the current and last pointer indices.  Then, we find the best
+    // match (by distance) for each current pointer.
+    // The pointers must have the same tool type but it is possible for them to
+    // transition from hovering to touching or vice-versa while retaining the same id.
+    PointerDistanceHeapElement heap[MAX_POINTERS * MAX_POINTERS];
+
+    uint32_t heapSize = 0;
+    for (uint32_t currentPointerIndex = 0; currentPointerIndex < currentPointerCount;
+            currentPointerIndex++) {
+        for (uint32_t lastPointerIndex = 0; lastPointerIndex < lastPointerCount;
+                lastPointerIndex++) {
+            const RawPointerData::Pointer& currentPointer =
+                    mCurrentRawPointerData.pointers[currentPointerIndex];
+            const RawPointerData::Pointer& lastPointer =
+                    mLastRawPointerData.pointers[lastPointerIndex];
+            if (currentPointer.toolType == lastPointer.toolType) {
+                int64_t deltaX = currentPointer.x - lastPointer.x;
+                int64_t deltaY = currentPointer.y - lastPointer.y;
+
+                uint64_t distance = uint64_t(deltaX * deltaX + deltaY * deltaY);
+
+                // Insert new element into the heap (sift up).
+                heap[heapSize].currentPointerIndex = currentPointerIndex;
+                heap[heapSize].lastPointerIndex = lastPointerIndex;
+                heap[heapSize].distance = distance;
+                heapSize += 1;
+            }
+        }
+    }
+
+    // Heapify
+    for (uint32_t startIndex = heapSize / 2; startIndex != 0; ) {
+        startIndex -= 1;
+        for (uint32_t parentIndex = startIndex; ;) {
+            uint32_t childIndex = parentIndex * 2 + 1;
+            if (childIndex >= heapSize) {
+                break;
+            }
+
+            if (childIndex + 1 < heapSize
+                    && heap[childIndex + 1].distance < heap[childIndex].distance) {
+                childIndex += 1;
+            }
+
+            if (heap[parentIndex].distance <= heap[childIndex].distance) {
+                break;
+            }
+
+            swap(heap[parentIndex], heap[childIndex]);
+            parentIndex = childIndex;
+        }
+    }
+
+#if DEBUG_POINTER_ASSIGNMENT
+    ALOGD("assignPointerIds - initial distance min-heap: size=%d", heapSize);
+    for (size_t i = 0; i < heapSize; i++) {
+        ALOGD("  heap[%d]: cur=%d, last=%d, distance=%lld",
+                i, heap[i].currentPointerIndex, heap[i].lastPointerIndex,
+                heap[i].distance);
+    }
+#endif
+
+    // Pull matches out by increasing order of distance.
+    // To avoid reassigning pointers that have already been matched, the loop keeps track
+    // of which last and current pointers have been matched using the matchedXXXBits variables.
+    // It also tracks the used pointer id bits.
+    BitSet32 matchedLastBits(0);
+    BitSet32 matchedCurrentBits(0);
+    BitSet32 usedIdBits(0);
+    bool first = true;
+    for (uint32_t i = min(currentPointerCount, lastPointerCount); heapSize > 0 && i > 0; i--) {
+        while (heapSize > 0) {
+            if (first) {
+                // The first time through the loop, we just consume the root element of
+                // the heap (the one with smallest distance).
+                first = false;
+            } else {
+                // Previous iterations consumed the root element of the heap.
+                // Pop root element off of the heap (sift down).
+                heap[0] = heap[heapSize];
+                for (uint32_t parentIndex = 0; ;) {
+                    uint32_t childIndex = parentIndex * 2 + 1;
+                    if (childIndex >= heapSize) {
+                        break;
+                    }
+
+                    if (childIndex + 1 < heapSize
+                            && heap[childIndex + 1].distance < heap[childIndex].distance) {
+                        childIndex += 1;
+                    }
+
+                    if (heap[parentIndex].distance <= heap[childIndex].distance) {
+                        break;
+                    }
+
+                    swap(heap[parentIndex], heap[childIndex]);
+                    parentIndex = childIndex;
+                }
+
+#if DEBUG_POINTER_ASSIGNMENT
+                ALOGD("assignPointerIds - reduced distance min-heap: size=%d", heapSize);
+                for (size_t i = 0; i < heapSize; i++) {
+                    ALOGD("  heap[%d]: cur=%d, last=%d, distance=%lld",
+                            i, heap[i].currentPointerIndex, heap[i].lastPointerIndex,
+                            heap[i].distance);
+                }
+#endif
+            }
+
+            heapSize -= 1;
+
+            uint32_t currentPointerIndex = heap[0].currentPointerIndex;
+            if (matchedCurrentBits.hasBit(currentPointerIndex)) continue; // already matched
+
+            uint32_t lastPointerIndex = heap[0].lastPointerIndex;
+            if (matchedLastBits.hasBit(lastPointerIndex)) continue; // already matched
+
+            matchedCurrentBits.markBit(currentPointerIndex);
+            matchedLastBits.markBit(lastPointerIndex);
+
+            uint32_t id = mLastRawPointerData.pointers[lastPointerIndex].id;
+            mCurrentRawPointerData.pointers[currentPointerIndex].id = id;
+            mCurrentRawPointerData.idToIndex[id] = currentPointerIndex;
+            mCurrentRawPointerData.markIdBit(id,
+                    mCurrentRawPointerData.isHovering(currentPointerIndex));
+            usedIdBits.markBit(id);
+
+#if DEBUG_POINTER_ASSIGNMENT
+            ALOGD("assignPointerIds - matched: cur=%d, last=%d, id=%d, distance=%lld",
+                    lastPointerIndex, currentPointerIndex, id, heap[0].distance);
+#endif
+            break;
+        }
+    }
+
+    // Assign fresh ids to pointers that were not matched in the process.
+    for (uint32_t i = currentPointerCount - matchedCurrentBits.count(); i != 0; i--) {
+        uint32_t currentPointerIndex = matchedCurrentBits.markFirstUnmarkedBit();
+        uint32_t id = usedIdBits.markFirstUnmarkedBit();
+
+        mCurrentRawPointerData.pointers[currentPointerIndex].id = id;
+        mCurrentRawPointerData.idToIndex[id] = currentPointerIndex;
+        mCurrentRawPointerData.markIdBit(id,
+                mCurrentRawPointerData.isHovering(currentPointerIndex));
+
+#if DEBUG_POINTER_ASSIGNMENT
+        ALOGD("assignPointerIds - assigned: cur=%d, id=%d",
+                currentPointerIndex, id);
+#endif
+    }
+}
+
+int32_t TouchInputMapper::getKeyCodeState(uint32_t sourceMask, int32_t keyCode) {
+    if (mCurrentVirtualKey.down && mCurrentVirtualKey.keyCode == keyCode) {
+        return AKEY_STATE_VIRTUAL;
+    }
+
+    size_t numVirtualKeys = mVirtualKeys.size();
+    for (size_t i = 0; i < numVirtualKeys; i++) {
+        const VirtualKey& virtualKey = mVirtualKeys[i];
+        if (virtualKey.keyCode == keyCode) {
+            return AKEY_STATE_UP;
+        }
+    }
+
+    return AKEY_STATE_UNKNOWN;
+}
+
+int32_t TouchInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
+    if (mCurrentVirtualKey.down && mCurrentVirtualKey.scanCode == scanCode) {
+        return AKEY_STATE_VIRTUAL;
+    }
+
+    size_t numVirtualKeys = mVirtualKeys.size();
+    for (size_t i = 0; i < numVirtualKeys; i++) {
+        const VirtualKey& virtualKey = mVirtualKeys[i];
+        if (virtualKey.scanCode == scanCode) {
+            return AKEY_STATE_UP;
+        }
+    }
+
+    return AKEY_STATE_UNKNOWN;
+}
+
+bool TouchInputMapper::markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+        const int32_t* keyCodes, uint8_t* outFlags) {
+    size_t numVirtualKeys = mVirtualKeys.size();
+    for (size_t i = 0; i < numVirtualKeys; i++) {
+        const VirtualKey& virtualKey = mVirtualKeys[i];
+
+        for (size_t i = 0; i < numCodes; i++) {
+            if (virtualKey.keyCode == keyCodes[i]) {
+                outFlags[i] = 1;
+            }
+        }
+    }
+
+    return true;
+}
+
+
+// --- SingleTouchInputMapper ---
+
+SingleTouchInputMapper::SingleTouchInputMapper(InputDevice* device) :
+        TouchInputMapper(device) {
+}
+
+SingleTouchInputMapper::~SingleTouchInputMapper() {
+}
+
+void SingleTouchInputMapper::reset(nsecs_t when) {
+    mSingleTouchMotionAccumulator.reset(getDevice());
+
+    TouchInputMapper::reset(when);
+}
+
+void SingleTouchInputMapper::process(const RawEvent* rawEvent) {
+    TouchInputMapper::process(rawEvent);
+
+    mSingleTouchMotionAccumulator.process(rawEvent);
+}
+
+void SingleTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
+    if (mTouchButtonAccumulator.isToolActive()) {
+        mCurrentRawPointerData.pointerCount = 1;
+        mCurrentRawPointerData.idToIndex[0] = 0;
+
+        bool isHovering = mTouchButtonAccumulator.getToolType() != AMOTION_EVENT_TOOL_TYPE_MOUSE
+                && (mTouchButtonAccumulator.isHovering()
+                        || (mRawPointerAxes.pressure.valid
+                                && mSingleTouchMotionAccumulator.getAbsolutePressure() <= 0));
+        mCurrentRawPointerData.markIdBit(0, isHovering);
+
+        RawPointerData::Pointer& outPointer = mCurrentRawPointerData.pointers[0];
+        outPointer.id = 0;
+        outPointer.x = mSingleTouchMotionAccumulator.getAbsoluteX();
+        outPointer.y = mSingleTouchMotionAccumulator.getAbsoluteY();
+        outPointer.pressure = mSingleTouchMotionAccumulator.getAbsolutePressure();
+        outPointer.touchMajor = 0;
+        outPointer.touchMinor = 0;
+        outPointer.toolMajor = mSingleTouchMotionAccumulator.getAbsoluteToolWidth();
+        outPointer.toolMinor = mSingleTouchMotionAccumulator.getAbsoluteToolWidth();
+        outPointer.orientation = 0;
+        outPointer.distance = mSingleTouchMotionAccumulator.getAbsoluteDistance();
+        outPointer.tiltX = mSingleTouchMotionAccumulator.getAbsoluteTiltX();
+        outPointer.tiltY = mSingleTouchMotionAccumulator.getAbsoluteTiltY();
+        outPointer.toolType = mTouchButtonAccumulator.getToolType();
+        if (outPointer.toolType == AMOTION_EVENT_TOOL_TYPE_UNKNOWN) {
+            outPointer.toolType = AMOTION_EVENT_TOOL_TYPE_FINGER;
+        }
+        outPointer.isHovering = isHovering;
+    }
+}
+
+void SingleTouchInputMapper::configureRawPointerAxes() {
+    TouchInputMapper::configureRawPointerAxes();
+
+    getAbsoluteAxisInfo(ABS_X, &mRawPointerAxes.x);
+    getAbsoluteAxisInfo(ABS_Y, &mRawPointerAxes.y);
+    getAbsoluteAxisInfo(ABS_PRESSURE, &mRawPointerAxes.pressure);
+    getAbsoluteAxisInfo(ABS_TOOL_WIDTH, &mRawPointerAxes.toolMajor);
+    getAbsoluteAxisInfo(ABS_DISTANCE, &mRawPointerAxes.distance);
+    getAbsoluteAxisInfo(ABS_TILT_X, &mRawPointerAxes.tiltX);
+    getAbsoluteAxisInfo(ABS_TILT_Y, &mRawPointerAxes.tiltY);
+}
+
+bool SingleTouchInputMapper::hasStylus() const {
+    return mTouchButtonAccumulator.hasStylus();
+}
+
+
+// --- MultiTouchInputMapper ---
+
+MultiTouchInputMapper::MultiTouchInputMapper(InputDevice* device) :
+        TouchInputMapper(device) {
+}
+
+MultiTouchInputMapper::~MultiTouchInputMapper() {
+}
+
+void MultiTouchInputMapper::reset(nsecs_t when) {
+    mMultiTouchMotionAccumulator.reset(getDevice());
+
+    mPointerIdBits.clear();
+
+    TouchInputMapper::reset(when);
+}
+
+void MultiTouchInputMapper::process(const RawEvent* rawEvent) {
+    TouchInputMapper::process(rawEvent);
+
+    mMultiTouchMotionAccumulator.process(rawEvent);
+}
+
+void MultiTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
+    size_t inCount = mMultiTouchMotionAccumulator.getSlotCount();
+    size_t outCount = 0;
+    BitSet32 newPointerIdBits;
+
+    for (size_t inIndex = 0; inIndex < inCount; inIndex++) {
+        const MultiTouchMotionAccumulator::Slot* inSlot =
+                mMultiTouchMotionAccumulator.getSlot(inIndex);
+        if (!inSlot->isInUse()) {
+            continue;
+        }
+
+        if (outCount >= MAX_POINTERS) {
+#if DEBUG_POINTERS
+            ALOGD("MultiTouch device %s emitted more than maximum of %d pointers; "
+                    "ignoring the rest.",
+                    getDeviceName().string(), MAX_POINTERS);
+#endif
+            break; // too many fingers!
+        }
+
+        RawPointerData::Pointer& outPointer = mCurrentRawPointerData.pointers[outCount];
+        outPointer.x = inSlot->getX();
+        outPointer.y = inSlot->getY();
+        outPointer.pressure = inSlot->getPressure();
+        outPointer.touchMajor = inSlot->getTouchMajor();
+        outPointer.touchMinor = inSlot->getTouchMinor();
+        outPointer.toolMajor = inSlot->getToolMajor();
+        outPointer.toolMinor = inSlot->getToolMinor();
+        outPointer.orientation = inSlot->getOrientation();
+        outPointer.distance = inSlot->getDistance();
+        outPointer.tiltX = 0;
+        outPointer.tiltY = 0;
+
+        outPointer.toolType = inSlot->getToolType();
+        if (outPointer.toolType == AMOTION_EVENT_TOOL_TYPE_UNKNOWN) {
+            outPointer.toolType = mTouchButtonAccumulator.getToolType();
+            if (outPointer.toolType == AMOTION_EVENT_TOOL_TYPE_UNKNOWN) {
+                outPointer.toolType = AMOTION_EVENT_TOOL_TYPE_FINGER;
+            }
+        }
+
+        bool isHovering = mTouchButtonAccumulator.getToolType() != AMOTION_EVENT_TOOL_TYPE_MOUSE
+                && (mTouchButtonAccumulator.isHovering()
+                        || (mRawPointerAxes.pressure.valid && inSlot->getPressure() <= 0));
+        outPointer.isHovering = isHovering;
+
+        // Assign pointer id using tracking id if available.
+        if (*outHavePointerIds) {
+            int32_t trackingId = inSlot->getTrackingId();
+            int32_t id = -1;
+            if (trackingId >= 0) {
+                for (BitSet32 idBits(mPointerIdBits); !idBits.isEmpty(); ) {
+                    uint32_t n = idBits.clearFirstMarkedBit();
+                    if (mPointerTrackingIdMap[n] == trackingId) {
+                        id = n;
+                    }
+                }
+
+                if (id < 0 && !mPointerIdBits.isFull()) {
+                    id = mPointerIdBits.markFirstUnmarkedBit();
+                    mPointerTrackingIdMap[id] = trackingId;
+                }
+            }
+            if (id < 0) {
+                *outHavePointerIds = false;
+                mCurrentRawPointerData.clearIdBits();
+                newPointerIdBits.clear();
+            } else {
+                outPointer.id = id;
+                mCurrentRawPointerData.idToIndex[id] = outCount;
+                mCurrentRawPointerData.markIdBit(id, isHovering);
+                newPointerIdBits.markBit(id);
+            }
+        }
+
+        outCount += 1;
+    }
+
+    mCurrentRawPointerData.pointerCount = outCount;
+    mPointerIdBits = newPointerIdBits;
+
+    mMultiTouchMotionAccumulator.finishSync();
+}
+
+void MultiTouchInputMapper::configureRawPointerAxes() {
+    TouchInputMapper::configureRawPointerAxes();
+
+    getAbsoluteAxisInfo(ABS_MT_POSITION_X, &mRawPointerAxes.x);
+    getAbsoluteAxisInfo(ABS_MT_POSITION_Y, &mRawPointerAxes.y);
+    getAbsoluteAxisInfo(ABS_MT_TOUCH_MAJOR, &mRawPointerAxes.touchMajor);
+    getAbsoluteAxisInfo(ABS_MT_TOUCH_MINOR, &mRawPointerAxes.touchMinor);
+    getAbsoluteAxisInfo(ABS_MT_WIDTH_MAJOR, &mRawPointerAxes.toolMajor);
+    getAbsoluteAxisInfo(ABS_MT_WIDTH_MINOR, &mRawPointerAxes.toolMinor);
+    getAbsoluteAxisInfo(ABS_MT_ORIENTATION, &mRawPointerAxes.orientation);
+    getAbsoluteAxisInfo(ABS_MT_PRESSURE, &mRawPointerAxes.pressure);
+    getAbsoluteAxisInfo(ABS_MT_DISTANCE, &mRawPointerAxes.distance);
+    getAbsoluteAxisInfo(ABS_MT_TRACKING_ID, &mRawPointerAxes.trackingId);
+    getAbsoluteAxisInfo(ABS_MT_SLOT, &mRawPointerAxes.slot);
+
+    if (mRawPointerAxes.trackingId.valid
+            && mRawPointerAxes.slot.valid
+            && mRawPointerAxes.slot.minValue == 0 && mRawPointerAxes.slot.maxValue > 0) {
+        size_t slotCount = mRawPointerAxes.slot.maxValue + 1;
+        if (slotCount > MAX_SLOTS) {
+            ALOGW("MultiTouch Device %s reported %zu slots but the framework "
+                    "only supports a maximum of %zu slots at this time.",
+                    getDeviceName().string(), slotCount, MAX_SLOTS);
+            slotCount = MAX_SLOTS;
+        }
+        mMultiTouchMotionAccumulator.configure(getDevice(),
+                slotCount, true /*usingSlotsProtocol*/);
+    } else {
+        mMultiTouchMotionAccumulator.configure(getDevice(),
+                MAX_POINTERS, false /*usingSlotsProtocol*/);
+    }
+}
+
+bool MultiTouchInputMapper::hasStylus() const {
+    return mMultiTouchMotionAccumulator.hasStylus()
+            || mTouchButtonAccumulator.hasStylus();
+}
+
+
+// --- JoystickInputMapper ---
+
+JoystickInputMapper::JoystickInputMapper(InputDevice* device) :
+        InputMapper(device) {
+}
+
+JoystickInputMapper::~JoystickInputMapper() {
+}
+
+uint32_t JoystickInputMapper::getSources() {
+    return AINPUT_SOURCE_JOYSTICK;
+}
+
+void JoystickInputMapper::populateDeviceInfo(InputDeviceInfo* info) {
+    InputMapper::populateDeviceInfo(info);
+
+    for (size_t i = 0; i < mAxes.size(); i++) {
+        const Axis& axis = mAxes.valueAt(i);
+        addMotionRange(axis.axisInfo.axis, axis, info);
+
+        if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) {
+            addMotionRange(axis.axisInfo.highAxis, axis, info);
+
+        }
+    }
+}
+
+void JoystickInputMapper::addMotionRange(int32_t axisId, const Axis& axis,
+        InputDeviceInfo* info) {
+    info->addMotionRange(axisId, AINPUT_SOURCE_JOYSTICK,
+            axis.min, axis.max, axis.flat, axis.fuzz, axis.resolution);
+    /* In order to ease the transition for developers from using the old axes
+     * to the newer, more semantically correct axes, we'll continue to register
+     * the old axes as duplicates of their corresponding new ones.  */
+    int32_t compatAxis = getCompatAxis(axisId);
+    if (compatAxis >= 0) {
+        info->addMotionRange(compatAxis, AINPUT_SOURCE_JOYSTICK,
+                axis.min, axis.max, axis.flat, axis.fuzz, axis.resolution);
+    }
+}
+
+/* A mapping from axes the joystick actually has to the axes that should be
+ * artificially created for compatibility purposes.
+ * Returns -1 if no compatibility axis is needed. */
+int32_t JoystickInputMapper::getCompatAxis(int32_t axis) {
+    switch(axis) {
+    case AMOTION_EVENT_AXIS_LTRIGGER:
+        return AMOTION_EVENT_AXIS_BRAKE;
+    case AMOTION_EVENT_AXIS_RTRIGGER:
+        return AMOTION_EVENT_AXIS_GAS;
+    }
+    return -1;
+}
+
+void JoystickInputMapper::dump(String8& dump) {
+    dump.append(INDENT2 "Joystick Input Mapper:\n");
+
+    dump.append(INDENT3 "Axes:\n");
+    size_t numAxes = mAxes.size();
+    for (size_t i = 0; i < numAxes; i++) {
+        const Axis& axis = mAxes.valueAt(i);
+        const char* label = getAxisLabel(axis.axisInfo.axis);
+        if (label) {
+            dump.appendFormat(INDENT4 "%s", label);
+        } else {
+            dump.appendFormat(INDENT4 "%d", axis.axisInfo.axis);
+        }
+        if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) {
+            label = getAxisLabel(axis.axisInfo.highAxis);
+            if (label) {
+                dump.appendFormat(" / %s (split at %d)", label, axis.axisInfo.splitValue);
+            } else {
+                dump.appendFormat(" / %d (split at %d)", axis.axisInfo.highAxis,
+                        axis.axisInfo.splitValue);
+            }
+        } else if (axis.axisInfo.mode == AxisInfo::MODE_INVERT) {
+            dump.append(" (invert)");
+        }
+
+        dump.appendFormat(": min=%0.5f, max=%0.5f, flat=%0.5f, fuzz=%0.5f, resolution=%0.5f\n",
+                axis.min, axis.max, axis.flat, axis.fuzz, axis.resolution);
+        dump.appendFormat(INDENT4 "  scale=%0.5f, offset=%0.5f, "
+                "highScale=%0.5f, highOffset=%0.5f\n",
+                axis.scale, axis.offset, axis.highScale, axis.highOffset);
+        dump.appendFormat(INDENT4 "  rawAxis=%d, rawMin=%d, rawMax=%d, "
+                "rawFlat=%d, rawFuzz=%d, rawResolution=%d\n",
+                mAxes.keyAt(i), axis.rawAxisInfo.minValue, axis.rawAxisInfo.maxValue,
+                axis.rawAxisInfo.flat, axis.rawAxisInfo.fuzz, axis.rawAxisInfo.resolution);
+    }
+}
+
+void JoystickInputMapper::configure(nsecs_t when,
+        const InputReaderConfiguration* config, uint32_t changes) {
+    InputMapper::configure(when, config, changes);
+
+    if (!changes) { // first time only
+        // Collect all axes.
+        for (int32_t abs = 0; abs <= ABS_MAX; abs++) {
+            if (!(getAbsAxisUsage(abs, getDevice()->getClasses())
+                    & INPUT_DEVICE_CLASS_JOYSTICK)) {
+                continue; // axis must be claimed by a different device
+            }
+
+            RawAbsoluteAxisInfo rawAxisInfo;
+            getAbsoluteAxisInfo(abs, &rawAxisInfo);
+            if (rawAxisInfo.valid) {
+                // Map axis.
+                AxisInfo axisInfo;
+                bool explicitlyMapped = !getEventHub()->mapAxis(getDeviceId(), abs, &axisInfo);
+                if (!explicitlyMapped) {
+                    // Axis is not explicitly mapped, will choose a generic axis later.
+                    axisInfo.mode = AxisInfo::MODE_NORMAL;
+                    axisInfo.axis = -1;
+                }
+
+                // Apply flat override.
+                int32_t rawFlat = axisInfo.flatOverride < 0
+                        ? rawAxisInfo.flat : axisInfo.flatOverride;
+
+                // Calculate scaling factors and limits.
+                Axis axis;
+                if (axisInfo.mode == AxisInfo::MODE_SPLIT) {
+                    float scale = 1.0f / (axisInfo.splitValue - rawAxisInfo.minValue);
+                    float highScale = 1.0f / (rawAxisInfo.maxValue - axisInfo.splitValue);
+                    axis.initialize(rawAxisInfo, axisInfo, explicitlyMapped,
+                            scale, 0.0f, highScale, 0.0f,
+                            0.0f, 1.0f, rawFlat * scale, rawAxisInfo.fuzz * scale,
+                            rawAxisInfo.resolution * scale);
+                } else if (isCenteredAxis(axisInfo.axis)) {
+                    float scale = 2.0f / (rawAxisInfo.maxValue - rawAxisInfo.minValue);
+                    float offset = avg(rawAxisInfo.minValue, rawAxisInfo.maxValue) * -scale;
+                    axis.initialize(rawAxisInfo, axisInfo, explicitlyMapped,
+                            scale, offset, scale, offset,
+                            -1.0f, 1.0f, rawFlat * scale, rawAxisInfo.fuzz * scale,
+                            rawAxisInfo.resolution * scale);
+                } else {
+                    float scale = 1.0f / (rawAxisInfo.maxValue - rawAxisInfo.minValue);
+                    axis.initialize(rawAxisInfo, axisInfo, explicitlyMapped,
+                            scale, 0.0f, scale, 0.0f,
+                            0.0f, 1.0f, rawFlat * scale, rawAxisInfo.fuzz * scale,
+                            rawAxisInfo.resolution * scale);
+                }
+
+                // To eliminate noise while the joystick is at rest, filter out small variations
+                // in axis values up front.
+                axis.filter = axis.fuzz ? axis.fuzz : axis.flat * 0.25f;
+
+                mAxes.add(abs, axis);
+            }
+        }
+
+        // If there are too many axes, start dropping them.
+        // Prefer to keep explicitly mapped axes.
+        if (mAxes.size() > PointerCoords::MAX_AXES) {
+            ALOGI("Joystick '%s' has %zu axes but the framework only supports a maximum of %d.",
+                    getDeviceName().string(), mAxes.size(), PointerCoords::MAX_AXES);
+            pruneAxes(true);
+            pruneAxes(false);
+        }
+
+        // Assign generic axis ids to remaining axes.
+        int32_t nextGenericAxisId = AMOTION_EVENT_AXIS_GENERIC_1;
+        size_t numAxes = mAxes.size();
+        for (size_t i = 0; i < numAxes; i++) {
+            Axis& axis = mAxes.editValueAt(i);
+            if (axis.axisInfo.axis < 0) {
+                while (nextGenericAxisId <= AMOTION_EVENT_AXIS_GENERIC_16
+                        && haveAxis(nextGenericAxisId)) {
+                    nextGenericAxisId += 1;
+                }
+
+                if (nextGenericAxisId <= AMOTION_EVENT_AXIS_GENERIC_16) {
+                    axis.axisInfo.axis = nextGenericAxisId;
+                    nextGenericAxisId += 1;
+                } else {
+                    ALOGI("Ignoring joystick '%s' axis %d because all of the generic axis ids "
+                            "have already been assigned to other axes.",
+                            getDeviceName().string(), mAxes.keyAt(i));
+                    mAxes.removeItemsAt(i--);
+                    numAxes -= 1;
+                }
+            }
+        }
+    }
+}
+
+bool JoystickInputMapper::haveAxis(int32_t axisId) {
+    size_t numAxes = mAxes.size();
+    for (size_t i = 0; i < numAxes; i++) {
+        const Axis& axis = mAxes.valueAt(i);
+        if (axis.axisInfo.axis == axisId
+                || (axis.axisInfo.mode == AxisInfo::MODE_SPLIT
+                        && axis.axisInfo.highAxis == axisId)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+void JoystickInputMapper::pruneAxes(bool ignoreExplicitlyMappedAxes) {
+    size_t i = mAxes.size();
+    while (mAxes.size() > PointerCoords::MAX_AXES && i-- > 0) {
+        if (ignoreExplicitlyMappedAxes && mAxes.valueAt(i).explicitlyMapped) {
+            continue;
+        }
+        ALOGI("Discarding joystick '%s' axis %d because there are too many axes.",
+                getDeviceName().string(), mAxes.keyAt(i));
+        mAxes.removeItemsAt(i);
+    }
+}
+
+bool JoystickInputMapper::isCenteredAxis(int32_t axis) {
+    switch (axis) {
+    case AMOTION_EVENT_AXIS_X:
+    case AMOTION_EVENT_AXIS_Y:
+    case AMOTION_EVENT_AXIS_Z:
+    case AMOTION_EVENT_AXIS_RX:
+    case AMOTION_EVENT_AXIS_RY:
+    case AMOTION_EVENT_AXIS_RZ:
+    case AMOTION_EVENT_AXIS_HAT_X:
+    case AMOTION_EVENT_AXIS_HAT_Y:
+    case AMOTION_EVENT_AXIS_ORIENTATION:
+    case AMOTION_EVENT_AXIS_RUDDER:
+    case AMOTION_EVENT_AXIS_WHEEL:
+        return true;
+    default:
+        return false;
+    }
+}
+
+void JoystickInputMapper::reset(nsecs_t when) {
+    // Recenter all axes.
+    size_t numAxes = mAxes.size();
+    for (size_t i = 0; i < numAxes; i++) {
+        Axis& axis = mAxes.editValueAt(i);
+        axis.resetValue();
+    }
+
+    InputMapper::reset(when);
+}
+
+void JoystickInputMapper::process(const RawEvent* rawEvent) {
+    switch (rawEvent->type) {
+    case EV_ABS: {
+        ssize_t index = mAxes.indexOfKey(rawEvent->code);
+        if (index >= 0) {
+            Axis& axis = mAxes.editValueAt(index);
+            float newValue, highNewValue;
+            switch (axis.axisInfo.mode) {
+            case AxisInfo::MODE_INVERT:
+                newValue = (axis.rawAxisInfo.maxValue - rawEvent->value)
+                        * axis.scale + axis.offset;
+                highNewValue = 0.0f;
+                break;
+            case AxisInfo::MODE_SPLIT:
+                if (rawEvent->value < axis.axisInfo.splitValue) {
+                    newValue = (axis.axisInfo.splitValue - rawEvent->value)
+                            * axis.scale + axis.offset;
+                    highNewValue = 0.0f;
+                } else if (rawEvent->value > axis.axisInfo.splitValue) {
+                    newValue = 0.0f;
+                    highNewValue = (rawEvent->value - axis.axisInfo.splitValue)
+                            * axis.highScale + axis.highOffset;
+                } else {
+                    newValue = 0.0f;
+                    highNewValue = 0.0f;
+                }
+                break;
+            default:
+                newValue = rawEvent->value * axis.scale + axis.offset;
+                highNewValue = 0.0f;
+                break;
+            }
+            axis.newValue = newValue;
+            axis.highNewValue = highNewValue;
+        }
+        break;
+    }
+
+    case EV_SYN:
+        switch (rawEvent->code) {
+        case SYN_REPORT:
+            sync(rawEvent->when, false /*force*/);
+            break;
+        }
+        break;
+    }
+}
+
+void JoystickInputMapper::sync(nsecs_t when, bool force) {
+    if (!filterAxes(force)) {
+        return;
+    }
+
+    int32_t metaState = mContext->getGlobalMetaState();
+    int32_t buttonState = 0;
+
+    PointerProperties pointerProperties;
+    pointerProperties.clear();
+    pointerProperties.id = 0;
+    pointerProperties.toolType = AMOTION_EVENT_TOOL_TYPE_UNKNOWN;
+
+    PointerCoords pointerCoords;
+    pointerCoords.clear();
+
+    size_t numAxes = mAxes.size();
+    for (size_t i = 0; i < numAxes; i++) {
+        const Axis& axis = mAxes.valueAt(i);
+        setPointerCoordsAxisValue(&pointerCoords, axis.axisInfo.axis, axis.currentValue);
+        if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) {
+            setPointerCoordsAxisValue(&pointerCoords, axis.axisInfo.highAxis,
+                    axis.highCurrentValue);
+        }
+    }
+
+    // Moving a joystick axis should not wake the device because joysticks can
+    // be fairly noisy even when not in use.  On the other hand, pushing a gamepad
+    // button will likely wake the device.
+    // TODO: Use the input device configuration to control this behavior more finely.
+    uint32_t policyFlags = 0;
+
+    NotifyMotionArgs args(when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, policyFlags,
+            AMOTION_EVENT_ACTION_MOVE, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE,
+            ADISPLAY_ID_NONE, 1, &pointerProperties, &pointerCoords, 0, 0, 0);
+    getListener()->notifyMotion(&args);
+}
+
+void JoystickInputMapper::setPointerCoordsAxisValue(PointerCoords* pointerCoords,
+        int32_t axis, float value) {
+    pointerCoords->setAxisValue(axis, value);
+    /* In order to ease the transition for developers from using the old axes
+     * to the newer, more semantically correct axes, we'll continue to produce
+     * values for the old axes as mirrors of the value of their corresponding
+     * new axes. */
+    int32_t compatAxis = getCompatAxis(axis);
+    if (compatAxis >= 0) {
+        pointerCoords->setAxisValue(compatAxis, value);
+    }
+}
+
+bool JoystickInputMapper::filterAxes(bool force) {
+    bool atLeastOneSignificantChange = force;
+    size_t numAxes = mAxes.size();
+    for (size_t i = 0; i < numAxes; i++) {
+        Axis& axis = mAxes.editValueAt(i);
+        if (force || hasValueChangedSignificantly(axis.filter,
+                axis.newValue, axis.currentValue, axis.min, axis.max)) {
+            axis.currentValue = axis.newValue;
+            atLeastOneSignificantChange = true;
+        }
+        if (axis.axisInfo.mode == AxisInfo::MODE_SPLIT) {
+            if (force || hasValueChangedSignificantly(axis.filter,
+                    axis.highNewValue, axis.highCurrentValue, axis.min, axis.max)) {
+                axis.highCurrentValue = axis.highNewValue;
+                atLeastOneSignificantChange = true;
+            }
+        }
+    }
+    return atLeastOneSignificantChange;
+}
+
+bool JoystickInputMapper::hasValueChangedSignificantly(
+        float filter, float newValue, float currentValue, float min, float max) {
+    if (newValue != currentValue) {
+        // Filter out small changes in value unless the value is converging on the axis
+        // bounds or center point.  This is intended to reduce the amount of information
+        // sent to applications by particularly noisy joysticks (such as PS3).
+        if (fabs(newValue - currentValue) > filter
+                || hasMovedNearerToValueWithinFilteredRange(filter, newValue, currentValue, min)
+                || hasMovedNearerToValueWithinFilteredRange(filter, newValue, currentValue, max)
+                || hasMovedNearerToValueWithinFilteredRange(filter, newValue, currentValue, 0)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+bool JoystickInputMapper::hasMovedNearerToValueWithinFilteredRange(
+        float filter, float newValue, float currentValue, float thresholdValue) {
+    float newDistance = fabs(newValue - thresholdValue);
+    if (newDistance < filter) {
+        float oldDistance = fabs(currentValue - thresholdValue);
+        if (newDistance < oldDistance) {
+            return true;
+        }
+    }
+    return false;
+}
+
+} // namespace android
diff --git a/services/inputflinger/InputReader.h b/services/inputflinger/InputReader.h
new file mode 100644
index 0000000..9e36e35
--- /dev/null
+++ b/services/inputflinger/InputReader.h
@@ -0,0 +1,1857 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_READER_H
+#define _UI_INPUT_READER_H
+
+#include "EventHub.h"
+#include "PointerControllerInterface.h"
+#include "InputListener.h"
+
+#include <input/Input.h>
+#include <input/VelocityControl.h>
+#include <input/VelocityTracker.h>
+#include <ui/DisplayInfo.h>
+#include <utils/KeyedVector.h>
+#include <utils/threads.h>
+#include <utils/Timers.h>
+#include <utils/RefBase.h>
+#include <utils/String8.h>
+#include <utils/BitSet.h>
+
+#include <stddef.h>
+#include <unistd.h>
+
+// Maximum supported size of a vibration pattern.
+// Must be at least 2.
+#define MAX_VIBRATE_PATTERN_SIZE 100
+
+// Maximum allowable delay value in a vibration pattern before
+// which the delay will be truncated.
+#define MAX_VIBRATE_PATTERN_DELAY_NSECS (1000000 * 1000000000LL)
+
+namespace android {
+
+class InputDevice;
+class InputMapper;
+
+/*
+ * Describes how coordinates are mapped on a physical display.
+ * See com.android.server.display.DisplayViewport.
+ */
+struct DisplayViewport {
+    int32_t displayId; // -1 if invalid
+    int32_t orientation;
+    int32_t logicalLeft;
+    int32_t logicalTop;
+    int32_t logicalRight;
+    int32_t logicalBottom;
+    int32_t physicalLeft;
+    int32_t physicalTop;
+    int32_t physicalRight;
+    int32_t physicalBottom;
+    int32_t deviceWidth;
+    int32_t deviceHeight;
+
+    DisplayViewport() :
+            displayId(ADISPLAY_ID_NONE), orientation(DISPLAY_ORIENTATION_0),
+            logicalLeft(0), logicalTop(0), logicalRight(0), logicalBottom(0),
+            physicalLeft(0), physicalTop(0), physicalRight(0), physicalBottom(0),
+            deviceWidth(0), deviceHeight(0) {
+    }
+
+    bool operator==(const DisplayViewport& other) const {
+        return displayId == other.displayId
+                && orientation == other.orientation
+                && logicalLeft == other.logicalLeft
+                && logicalTop == other.logicalTop
+                && logicalRight == other.logicalRight
+                && logicalBottom == other.logicalBottom
+                && physicalLeft == other.physicalLeft
+                && physicalTop == other.physicalTop
+                && physicalRight == other.physicalRight
+                && physicalBottom == other.physicalBottom
+                && deviceWidth == other.deviceWidth
+                && deviceHeight == other.deviceHeight;
+    }
+
+    bool operator!=(const DisplayViewport& other) const {
+        return !(*this == other);
+    }
+
+    inline bool isValid() const {
+        return displayId >= 0;
+    }
+
+    void setNonDisplayViewport(int32_t width, int32_t height) {
+        displayId = ADISPLAY_ID_NONE;
+        orientation = DISPLAY_ORIENTATION_0;
+        logicalLeft = 0;
+        logicalTop = 0;
+        logicalRight = width;
+        logicalBottom = height;
+        physicalLeft = 0;
+        physicalTop = 0;
+        physicalRight = width;
+        physicalBottom = height;
+        deviceWidth = width;
+        deviceHeight = height;
+    }
+};
+
+/*
+ * Input reader configuration.
+ *
+ * Specifies various options that modify the behavior of the input reader.
+ */
+struct InputReaderConfiguration {
+    // Describes changes that have occurred.
+    enum {
+        // The pointer speed changed.
+        CHANGE_POINTER_SPEED = 1 << 0,
+
+        // The pointer gesture control changed.
+        CHANGE_POINTER_GESTURE_ENABLEMENT = 1 << 1,
+
+        // The display size or orientation changed.
+        CHANGE_DISPLAY_INFO = 1 << 2,
+
+        // The visible touches option changed.
+        CHANGE_SHOW_TOUCHES = 1 << 3,
+
+        // The keyboard layouts must be reloaded.
+        CHANGE_KEYBOARD_LAYOUTS = 1 << 4,
+
+        // The device name alias supplied by the may have changed for some devices.
+        CHANGE_DEVICE_ALIAS = 1 << 5,
+
+        // The location calibration matrix changed.
+        TOUCH_AFFINE_TRANSFORMATION = 1 << 6,
+
+        // All devices must be reopened.
+        CHANGE_MUST_REOPEN = 1 << 31,
+    };
+
+    // Gets the amount of time to disable virtual keys after the screen is touched
+    // in order to filter out accidental virtual key presses due to swiping gestures
+    // or taps near the edge of the display.  May be 0 to disable the feature.
+    nsecs_t virtualKeyQuietTime;
+
+    // The excluded device names for the platform.
+    // Devices with these names will be ignored.
+    Vector<String8> excludedDeviceNames;
+
+    // Velocity control parameters for mouse pointer movements.
+    VelocityControlParameters pointerVelocityControlParameters;
+
+    // Velocity control parameters for mouse wheel movements.
+    VelocityControlParameters wheelVelocityControlParameters;
+
+    // True if pointer gestures are enabled.
+    bool pointerGesturesEnabled;
+
+    // Quiet time between certain pointer gesture transitions.
+    // Time to allow for all fingers or buttons to settle into a stable state before
+    // starting a new gesture.
+    nsecs_t pointerGestureQuietInterval;
+
+    // The minimum speed that a pointer must travel for us to consider switching the active
+    // touch pointer to it during a drag.  This threshold is set to avoid switching due
+    // to noise from a finger resting on the touch pad (perhaps just pressing it down).
+    float pointerGestureDragMinSwitchSpeed; // in pixels per second
+
+    // Tap gesture delay time.
+    // The time between down and up must be less than this to be considered a tap.
+    nsecs_t pointerGestureTapInterval;
+
+    // Tap drag gesture delay time.
+    // The time between the previous tap's up and the next down must be less than
+    // this to be considered a drag.  Otherwise, the previous tap is finished and a
+    // new tap begins.
+    //
+    // Note that the previous tap will be held down for this entire duration so this
+    // interval must be shorter than the long press timeout.
+    nsecs_t pointerGestureTapDragInterval;
+
+    // The distance in pixels that the pointer is allowed to move from initial down
+    // to up and still be called a tap.
+    float pointerGestureTapSlop; // in pixels
+
+    // Time after the first touch points go down to settle on an initial centroid.
+    // This is intended to be enough time to handle cases where the user puts down two
+    // fingers at almost but not quite exactly the same time.
+    nsecs_t pointerGestureMultitouchSettleInterval;
+
+    // The transition from PRESS to SWIPE or FREEFORM gesture mode is made when
+    // at least two pointers have moved at least this far from their starting place.
+    float pointerGestureMultitouchMinDistance; // in pixels
+
+    // The transition from PRESS to SWIPE gesture mode can only occur when the
+    // cosine of the angle between the two vectors is greater than or equal to than this value
+    // which indicates that the vectors are oriented in the same direction.
+    // When the vectors are oriented in the exactly same direction, the cosine is 1.0.
+    // (In exactly opposite directions, the cosine is -1.0.)
+    float pointerGestureSwipeTransitionAngleCosine;
+
+    // The transition from PRESS to SWIPE gesture mode can only occur when the
+    // fingers are no more than this far apart relative to the diagonal size of
+    // the touch pad.  For example, a ratio of 0.5 means that the fingers must be
+    // no more than half the diagonal size of the touch pad apart.
+    float pointerGestureSwipeMaxWidthRatio;
+
+    // The gesture movement speed factor relative to the size of the display.
+    // Movement speed applies when the fingers are moving in the same direction.
+    // Without acceleration, a full swipe of the touch pad diagonal in movement mode
+    // will cover this portion of the display diagonal.
+    float pointerGestureMovementSpeedRatio;
+
+    // The gesture zoom speed factor relative to the size of the display.
+    // Zoom speed applies when the fingers are mostly moving relative to each other
+    // to execute a scale gesture or similar.
+    // Without acceleration, a full swipe of the touch pad diagonal in zoom mode
+    // will cover this portion of the display diagonal.
+    float pointerGestureZoomSpeedRatio;
+
+    // True to show the location of touches on the touch screen as spots.
+    bool showTouches;
+
+    InputReaderConfiguration() :
+            virtualKeyQuietTime(0),
+            pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, 3.0f),
+            wheelVelocityControlParameters(1.0f, 15.0f, 50.0f, 4.0f),
+            pointerGesturesEnabled(true),
+            pointerGestureQuietInterval(100 * 1000000LL), // 100 ms
+            pointerGestureDragMinSwitchSpeed(50), // 50 pixels per second
+            pointerGestureTapInterval(150 * 1000000LL), // 150 ms
+            pointerGestureTapDragInterval(150 * 1000000LL), // 150 ms
+            pointerGestureTapSlop(10.0f), // 10 pixels
+            pointerGestureMultitouchSettleInterval(100 * 1000000LL), // 100 ms
+            pointerGestureMultitouchMinDistance(15), // 15 pixels
+            pointerGestureSwipeTransitionAngleCosine(0.2588f), // cosine of 75 degrees
+            pointerGestureSwipeMaxWidthRatio(0.25f),
+            pointerGestureMovementSpeedRatio(0.8f),
+            pointerGestureZoomSpeedRatio(0.3f),
+            showTouches(false) { }
+
+    bool getDisplayInfo(bool external, DisplayViewport* outViewport) const;
+    void setDisplayInfo(bool external, const DisplayViewport& viewport);
+
+private:
+    DisplayViewport mInternalDisplay;
+    DisplayViewport mExternalDisplay;
+};
+
+
+struct TouchAffineTransformation {
+    float x_scale;
+    float x_ymix;
+    float x_offset;
+    float y_xmix;
+    float y_scale;
+    float y_offset;
+
+    TouchAffineTransformation() :
+        x_scale(1.0f), x_ymix(0.0f), x_offset(0.0f),
+        y_xmix(0.0f), y_scale(1.0f), y_offset(0.0f) {
+    }
+
+    TouchAffineTransformation(float xscale, float xymix, float xoffset,
+            float yxmix, float yscale, float yoffset) :
+        x_scale(xscale), x_ymix(xymix), x_offset(xoffset),
+        y_xmix(yxmix), y_scale(yscale), y_offset(yoffset) {
+    }
+
+    void applyTo(float& x, float& y) const;
+};
+
+
+/*
+ * Input reader policy interface.
+ *
+ * The input reader policy is used by the input reader to interact with the Window Manager
+ * and other system components.
+ *
+ * The actual implementation is partially supported by callbacks into the DVM
+ * via JNI.  This interface is also mocked in the unit tests.
+ *
+ * These methods must NOT re-enter the input reader since they may be called while
+ * holding the input reader lock.
+ */
+class InputReaderPolicyInterface : public virtual RefBase {
+protected:
+    InputReaderPolicyInterface() { }
+    virtual ~InputReaderPolicyInterface() { }
+
+public:
+    /* Gets the input reader configuration. */
+    virtual void getReaderConfiguration(InputReaderConfiguration* outConfig) = 0;
+
+    /* Gets a pointer controller associated with the specified cursor device (ie. a mouse). */
+    virtual sp<PointerControllerInterface> obtainPointerController(int32_t deviceId) = 0;
+
+    /* Notifies the input reader policy that some input devices have changed
+     * and provides information about all current input devices.
+     */
+    virtual void notifyInputDevicesChanged(const Vector<InputDeviceInfo>& inputDevices) = 0;
+
+    /* Gets the keyboard layout for a particular input device. */
+    virtual sp<KeyCharacterMap> getKeyboardLayoutOverlay(
+            const InputDeviceIdentifier& identifier) = 0;
+
+    /* Gets a user-supplied alias for a particular input device, or an empty string if none. */
+    virtual String8 getDeviceAlias(const InputDeviceIdentifier& identifier) = 0;
+
+    /* Gets the affine calibration associated with the specified device. */
+    virtual TouchAffineTransformation getTouchAffineTransformation(
+            const String8& inputDeviceDescriptor, int32_t surfaceRotation) = 0;
+};
+
+
+/* Processes raw input events and sends cooked event data to an input listener. */
+class InputReaderInterface : public virtual RefBase {
+protected:
+    InputReaderInterface() { }
+    virtual ~InputReaderInterface() { }
+
+public:
+    /* Dumps the state of the input reader.
+     *
+     * This method may be called on any thread (usually by the input manager). */
+    virtual void dump(String8& dump) = 0;
+
+    /* Called by the heatbeat to ensures that the reader has not deadlocked. */
+    virtual void monitor() = 0;
+
+    /* Runs a single iteration of the processing loop.
+     * Nominally reads and processes one incoming message from the EventHub.
+     *
+     * This method should be called on the input reader thread.
+     */
+    virtual void loopOnce() = 0;
+
+    /* Gets information about all input devices.
+     *
+     * This method may be called on any thread (usually by the input manager).
+     */
+    virtual void getInputDevices(Vector<InputDeviceInfo>& outInputDevices) = 0;
+
+    /* Query current input state. */
+    virtual int32_t getScanCodeState(int32_t deviceId, uint32_t sourceMask,
+            int32_t scanCode) = 0;
+    virtual int32_t getKeyCodeState(int32_t deviceId, uint32_t sourceMask,
+            int32_t keyCode) = 0;
+    virtual int32_t getSwitchState(int32_t deviceId, uint32_t sourceMask,
+            int32_t sw) = 0;
+
+    /* Determine whether physical keys exist for the given framework-domain key codes. */
+    virtual bool hasKeys(int32_t deviceId, uint32_t sourceMask,
+            size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) = 0;
+
+    /* Requests that a reconfiguration of all input devices.
+     * The changes flag is a bitfield that indicates what has changed and whether
+     * the input devices must all be reopened. */
+    virtual void requestRefreshConfiguration(uint32_t changes) = 0;
+
+    /* Controls the vibrator of a particular input device. */
+    virtual void vibrate(int32_t deviceId, const nsecs_t* pattern, size_t patternSize,
+            ssize_t repeat, int32_t token) = 0;
+    virtual void cancelVibrate(int32_t deviceId, int32_t token) = 0;
+};
+
+
+/* Internal interface used by individual input devices to access global input device state
+ * and parameters maintained by the input reader.
+ */
+class InputReaderContext {
+public:
+    InputReaderContext() { }
+    virtual ~InputReaderContext() { }
+
+    virtual void updateGlobalMetaState() = 0;
+    virtual int32_t getGlobalMetaState() = 0;
+
+    virtual void disableVirtualKeysUntil(nsecs_t time) = 0;
+    virtual bool shouldDropVirtualKey(nsecs_t now,
+            InputDevice* device, int32_t keyCode, int32_t scanCode) = 0;
+
+    virtual void fadePointer() = 0;
+
+    virtual void requestTimeoutAtTime(nsecs_t when) = 0;
+    virtual int32_t bumpGeneration() = 0;
+
+    virtual InputReaderPolicyInterface* getPolicy() = 0;
+    virtual InputListenerInterface* getListener() = 0;
+    virtual EventHubInterface* getEventHub() = 0;
+};
+
+
+/* The input reader reads raw event data from the event hub and processes it into input events
+ * that it sends to the input listener.  Some functions of the input reader, such as early
+ * event filtering in low power states, are controlled by a separate policy object.
+ *
+ * The InputReader owns a collection of InputMappers.  Most of the work it does happens
+ * on the input reader thread but the InputReader can receive queries from other system
+ * components running on arbitrary threads.  To keep things manageable, the InputReader
+ * uses a single Mutex to guard its state.  The Mutex may be held while calling into the
+ * EventHub or the InputReaderPolicy but it is never held while calling into the
+ * InputListener.
+ */
+class InputReader : public InputReaderInterface {
+public:
+    InputReader(const sp<EventHubInterface>& eventHub,
+            const sp<InputReaderPolicyInterface>& policy,
+            const sp<InputListenerInterface>& listener);
+    virtual ~InputReader();
+
+    virtual void dump(String8& dump);
+    virtual void monitor();
+
+    virtual void loopOnce();
+
+    virtual void getInputDevices(Vector<InputDeviceInfo>& outInputDevices);
+
+    virtual int32_t getScanCodeState(int32_t deviceId, uint32_t sourceMask,
+            int32_t scanCode);
+    virtual int32_t getKeyCodeState(int32_t deviceId, uint32_t sourceMask,
+            int32_t keyCode);
+    virtual int32_t getSwitchState(int32_t deviceId, uint32_t sourceMask,
+            int32_t sw);
+
+    virtual bool hasKeys(int32_t deviceId, uint32_t sourceMask,
+            size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags);
+
+    virtual void requestRefreshConfiguration(uint32_t changes);
+
+    virtual void vibrate(int32_t deviceId, const nsecs_t* pattern, size_t patternSize,
+            ssize_t repeat, int32_t token);
+    virtual void cancelVibrate(int32_t deviceId, int32_t token);
+
+protected:
+    // These members are protected so they can be instrumented by test cases.
+    virtual InputDevice* createDeviceLocked(int32_t deviceId, int32_t controllerNumber,
+            const InputDeviceIdentifier& identifier, uint32_t classes);
+
+    class ContextImpl : public InputReaderContext {
+        InputReader* mReader;
+
+    public:
+        ContextImpl(InputReader* reader);
+
+        virtual void updateGlobalMetaState();
+        virtual int32_t getGlobalMetaState();
+        virtual void disableVirtualKeysUntil(nsecs_t time);
+        virtual bool shouldDropVirtualKey(nsecs_t now,
+                InputDevice* device, int32_t keyCode, int32_t scanCode);
+        virtual void fadePointer();
+        virtual void requestTimeoutAtTime(nsecs_t when);
+        virtual int32_t bumpGeneration();
+        virtual InputReaderPolicyInterface* getPolicy();
+        virtual InputListenerInterface* getListener();
+        virtual EventHubInterface* getEventHub();
+    } mContext;
+
+    friend class ContextImpl;
+
+private:
+    Mutex mLock;
+
+    Condition mReaderIsAliveCondition;
+
+    sp<EventHubInterface> mEventHub;
+    sp<InputReaderPolicyInterface> mPolicy;
+    sp<QueuedInputListener> mQueuedListener;
+
+    InputReaderConfiguration mConfig;
+
+    // The event queue.
+    static const int EVENT_BUFFER_SIZE = 256;
+    RawEvent mEventBuffer[EVENT_BUFFER_SIZE];
+
+    KeyedVector<int32_t, InputDevice*> mDevices;
+
+    // low-level input event decoding and device management
+    void processEventsLocked(const RawEvent* rawEvents, size_t count);
+
+    void addDeviceLocked(nsecs_t when, int32_t deviceId);
+    void removeDeviceLocked(nsecs_t when, int32_t deviceId);
+    void processEventsForDeviceLocked(int32_t deviceId, const RawEvent* rawEvents, size_t count);
+    void timeoutExpiredLocked(nsecs_t when);
+
+    void handleConfigurationChangedLocked(nsecs_t when);
+
+    int32_t mGlobalMetaState;
+    void updateGlobalMetaStateLocked();
+    int32_t getGlobalMetaStateLocked();
+
+    void fadePointerLocked();
+
+    int32_t mGeneration;
+    int32_t bumpGenerationLocked();
+
+    void getInputDevicesLocked(Vector<InputDeviceInfo>& outInputDevices);
+
+    nsecs_t mDisableVirtualKeysTimeout;
+    void disableVirtualKeysUntilLocked(nsecs_t time);
+    bool shouldDropVirtualKeyLocked(nsecs_t now,
+            InputDevice* device, int32_t keyCode, int32_t scanCode);
+
+    nsecs_t mNextTimeout;
+    void requestTimeoutAtTimeLocked(nsecs_t when);
+
+    uint32_t mConfigurationChangesToRefresh;
+    void refreshConfigurationLocked(uint32_t changes);
+
+    // state queries
+    typedef int32_t (InputDevice::*GetStateFunc)(uint32_t sourceMask, int32_t code);
+    int32_t getStateLocked(int32_t deviceId, uint32_t sourceMask, int32_t code,
+            GetStateFunc getStateFunc);
+    bool markSupportedKeyCodesLocked(int32_t deviceId, uint32_t sourceMask, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags);
+};
+
+
+/* Reads raw events from the event hub and processes them, endlessly. */
+class InputReaderThread : public Thread {
+public:
+    InputReaderThread(const sp<InputReaderInterface>& reader);
+    virtual ~InputReaderThread();
+
+private:
+    sp<InputReaderInterface> mReader;
+
+    virtual bool threadLoop();
+};
+
+
+/* Represents the state of a single input device. */
+class InputDevice {
+public:
+    InputDevice(InputReaderContext* context, int32_t id, int32_t generation, int32_t
+            controllerNumber, const InputDeviceIdentifier& identifier, uint32_t classes);
+    ~InputDevice();
+
+    inline InputReaderContext* getContext() { return mContext; }
+    inline int32_t getId() const { return mId; }
+    inline int32_t getControllerNumber() const { return mControllerNumber; }
+    inline int32_t getGeneration() const { return mGeneration; }
+    inline const String8& getName() const { return mIdentifier.name; }
+    inline const String8& getDescriptor() { return mIdentifier.descriptor; }
+    inline uint32_t getClasses() const { return mClasses; }
+    inline uint32_t getSources() const { return mSources; }
+
+    inline bool isExternal() { return mIsExternal; }
+    inline void setExternal(bool external) { mIsExternal = external; }
+
+    inline bool isIgnored() { return mMappers.isEmpty(); }
+
+    void dump(String8& dump);
+    void addMapper(InputMapper* mapper);
+    void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
+    void reset(nsecs_t when);
+    void process(const RawEvent* rawEvents, size_t count);
+    void timeoutExpired(nsecs_t when);
+
+    void getDeviceInfo(InputDeviceInfo* outDeviceInfo);
+    int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode);
+    int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
+    int32_t getSwitchState(uint32_t sourceMask, int32_t switchCode);
+    bool markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags);
+    void vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat, int32_t token);
+    void cancelVibrate(int32_t token);
+
+    int32_t getMetaState();
+
+    void fadePointer();
+
+    void bumpGeneration();
+
+    void notifyReset(nsecs_t when);
+
+    inline const PropertyMap& getConfiguration() { return mConfiguration; }
+    inline EventHubInterface* getEventHub() { return mContext->getEventHub(); }
+
+    bool hasKey(int32_t code) {
+        return getEventHub()->hasScanCode(mId, code);
+    }
+
+    bool hasAbsoluteAxis(int32_t code) {
+        RawAbsoluteAxisInfo info;
+        getEventHub()->getAbsoluteAxisInfo(mId, code, &info);
+        return info.valid;
+    }
+
+    bool isKeyPressed(int32_t code) {
+        return getEventHub()->getScanCodeState(mId, code) == AKEY_STATE_DOWN;
+    }
+
+    int32_t getAbsoluteAxisValue(int32_t code) {
+        int32_t value;
+        getEventHub()->getAbsoluteAxisValue(mId, code, &value);
+        return value;
+    }
+
+private:
+    InputReaderContext* mContext;
+    int32_t mId;
+    int32_t mGeneration;
+    int32_t mControllerNumber;
+    InputDeviceIdentifier mIdentifier;
+    String8 mAlias;
+    uint32_t mClasses;
+
+    Vector<InputMapper*> mMappers;
+
+    uint32_t mSources;
+    bool mIsExternal;
+    bool mDropUntilNextSync;
+
+    typedef int32_t (InputMapper::*GetStateFunc)(uint32_t sourceMask, int32_t code);
+    int32_t getState(uint32_t sourceMask, int32_t code, GetStateFunc getStateFunc);
+
+    PropertyMap mConfiguration;
+};
+
+
+/* Keeps track of the state of mouse or touch pad buttons. */
+class CursorButtonAccumulator {
+public:
+    CursorButtonAccumulator();
+    void reset(InputDevice* device);
+
+    void process(const RawEvent* rawEvent);
+
+    uint32_t getButtonState() const;
+
+private:
+    bool mBtnLeft;
+    bool mBtnRight;
+    bool mBtnMiddle;
+    bool mBtnBack;
+    bool mBtnSide;
+    bool mBtnForward;
+    bool mBtnExtra;
+    bool mBtnTask;
+
+    void clearButtons();
+};
+
+
+/* Keeps track of cursor movements. */
+
+class CursorMotionAccumulator {
+public:
+    CursorMotionAccumulator();
+    void reset(InputDevice* device);
+
+    void process(const RawEvent* rawEvent);
+    void finishSync();
+
+    inline int32_t getRelativeX() const { return mRelX; }
+    inline int32_t getRelativeY() const { return mRelY; }
+
+private:
+    int32_t mRelX;
+    int32_t mRelY;
+
+    void clearRelativeAxes();
+};
+
+
+/* Keeps track of cursor scrolling motions. */
+
+class CursorScrollAccumulator {
+public:
+    CursorScrollAccumulator();
+    void configure(InputDevice* device);
+    void reset(InputDevice* device);
+
+    void process(const RawEvent* rawEvent);
+    void finishSync();
+
+    inline bool haveRelativeVWheel() const { return mHaveRelWheel; }
+    inline bool haveRelativeHWheel() const { return mHaveRelHWheel; }
+
+    inline int32_t getRelativeX() const { return mRelX; }
+    inline int32_t getRelativeY() const { return mRelY; }
+    inline int32_t getRelativeVWheel() const { return mRelWheel; }
+    inline int32_t getRelativeHWheel() const { return mRelHWheel; }
+
+private:
+    bool mHaveRelWheel;
+    bool mHaveRelHWheel;
+
+    int32_t mRelX;
+    int32_t mRelY;
+    int32_t mRelWheel;
+    int32_t mRelHWheel;
+
+    void clearRelativeAxes();
+};
+
+
+/* Keeps track of the state of touch, stylus and tool buttons. */
+class TouchButtonAccumulator {
+public:
+    TouchButtonAccumulator();
+    void configure(InputDevice* device);
+    void reset(InputDevice* device);
+
+    void process(const RawEvent* rawEvent);
+
+    uint32_t getButtonState() const;
+    int32_t getToolType() const;
+    bool isToolActive() const;
+    bool isHovering() const;
+    bool hasStylus() const;
+
+private:
+    bool mHaveBtnTouch;
+    bool mHaveStylus;
+
+    bool mBtnTouch;
+    bool mBtnStylus;
+    bool mBtnStylus2;
+    bool mBtnToolFinger;
+    bool mBtnToolPen;
+    bool mBtnToolRubber;
+    bool mBtnToolBrush;
+    bool mBtnToolPencil;
+    bool mBtnToolAirbrush;
+    bool mBtnToolMouse;
+    bool mBtnToolLens;
+    bool mBtnToolDoubleTap;
+    bool mBtnToolTripleTap;
+    bool mBtnToolQuadTap;
+
+    void clearButtons();
+};
+
+
+/* Raw axis information from the driver. */
+struct RawPointerAxes {
+    RawAbsoluteAxisInfo x;
+    RawAbsoluteAxisInfo y;
+    RawAbsoluteAxisInfo pressure;
+    RawAbsoluteAxisInfo touchMajor;
+    RawAbsoluteAxisInfo touchMinor;
+    RawAbsoluteAxisInfo toolMajor;
+    RawAbsoluteAxisInfo toolMinor;
+    RawAbsoluteAxisInfo orientation;
+    RawAbsoluteAxisInfo distance;
+    RawAbsoluteAxisInfo tiltX;
+    RawAbsoluteAxisInfo tiltY;
+    RawAbsoluteAxisInfo trackingId;
+    RawAbsoluteAxisInfo slot;
+
+    RawPointerAxes();
+    void clear();
+};
+
+
+/* Raw data for a collection of pointers including a pointer id mapping table. */
+struct RawPointerData {
+    struct Pointer {
+        uint32_t id;
+        int32_t x;
+        int32_t y;
+        int32_t pressure;
+        int32_t touchMajor;
+        int32_t touchMinor;
+        int32_t toolMajor;
+        int32_t toolMinor;
+        int32_t orientation;
+        int32_t distance;
+        int32_t tiltX;
+        int32_t tiltY;
+        int32_t toolType; // a fully decoded AMOTION_EVENT_TOOL_TYPE constant
+        bool isHovering;
+    };
+
+    uint32_t pointerCount;
+    Pointer pointers[MAX_POINTERS];
+    BitSet32 hoveringIdBits, touchingIdBits;
+    uint32_t idToIndex[MAX_POINTER_ID + 1];
+
+    RawPointerData();
+    void clear();
+    void copyFrom(const RawPointerData& other);
+    void getCentroidOfTouchingPointers(float* outX, float* outY) const;
+
+    inline void markIdBit(uint32_t id, bool isHovering) {
+        if (isHovering) {
+            hoveringIdBits.markBit(id);
+        } else {
+            touchingIdBits.markBit(id);
+        }
+    }
+
+    inline void clearIdBits() {
+        hoveringIdBits.clear();
+        touchingIdBits.clear();
+    }
+
+    inline const Pointer& pointerForId(uint32_t id) const {
+        return pointers[idToIndex[id]];
+    }
+
+    inline bool isHovering(uint32_t pointerIndex) {
+        return pointers[pointerIndex].isHovering;
+    }
+};
+
+
+/* Cooked data for a collection of pointers including a pointer id mapping table. */
+struct CookedPointerData {
+    uint32_t pointerCount;
+    PointerProperties pointerProperties[MAX_POINTERS];
+    PointerCoords pointerCoords[MAX_POINTERS];
+    BitSet32 hoveringIdBits, touchingIdBits;
+    uint32_t idToIndex[MAX_POINTER_ID + 1];
+
+    CookedPointerData();
+    void clear();
+    void copyFrom(const CookedPointerData& other);
+
+    inline const PointerCoords& pointerCoordsForId(uint32_t id) const {
+        return pointerCoords[idToIndex[id]];
+    }
+
+    inline bool isHovering(uint32_t pointerIndex) {
+        return hoveringIdBits.hasBit(pointerProperties[pointerIndex].id);
+    }
+};
+
+
+/* Keeps track of the state of single-touch protocol. */
+class SingleTouchMotionAccumulator {
+public:
+    SingleTouchMotionAccumulator();
+
+    void process(const RawEvent* rawEvent);
+    void reset(InputDevice* device);
+
+    inline int32_t getAbsoluteX() const { return mAbsX; }
+    inline int32_t getAbsoluteY() const { return mAbsY; }
+    inline int32_t getAbsolutePressure() const { return mAbsPressure; }
+    inline int32_t getAbsoluteToolWidth() const { return mAbsToolWidth; }
+    inline int32_t getAbsoluteDistance() const { return mAbsDistance; }
+    inline int32_t getAbsoluteTiltX() const { return mAbsTiltX; }
+    inline int32_t getAbsoluteTiltY() const { return mAbsTiltY; }
+
+private:
+    int32_t mAbsX;
+    int32_t mAbsY;
+    int32_t mAbsPressure;
+    int32_t mAbsToolWidth;
+    int32_t mAbsDistance;
+    int32_t mAbsTiltX;
+    int32_t mAbsTiltY;
+
+    void clearAbsoluteAxes();
+};
+
+
+/* Keeps track of the state of multi-touch protocol. */
+class MultiTouchMotionAccumulator {
+public:
+    class Slot {
+    public:
+        inline bool isInUse() const { return mInUse; }
+        inline int32_t getX() const { return mAbsMTPositionX; }
+        inline int32_t getY() const { return mAbsMTPositionY; }
+        inline int32_t getTouchMajor() const { return mAbsMTTouchMajor; }
+        inline int32_t getTouchMinor() const {
+            return mHaveAbsMTTouchMinor ? mAbsMTTouchMinor : mAbsMTTouchMajor; }
+        inline int32_t getToolMajor() const { return mAbsMTWidthMajor; }
+        inline int32_t getToolMinor() const {
+            return mHaveAbsMTWidthMinor ? mAbsMTWidthMinor : mAbsMTWidthMajor; }
+        inline int32_t getOrientation() const { return mAbsMTOrientation; }
+        inline int32_t getTrackingId() const { return mAbsMTTrackingId; }
+        inline int32_t getPressure() const { return mAbsMTPressure; }
+        inline int32_t getDistance() const { return mAbsMTDistance; }
+        inline int32_t getToolType() const;
+
+    private:
+        friend class MultiTouchMotionAccumulator;
+
+        bool mInUse;
+        bool mHaveAbsMTTouchMinor;
+        bool mHaveAbsMTWidthMinor;
+        bool mHaveAbsMTToolType;
+
+        int32_t mAbsMTPositionX;
+        int32_t mAbsMTPositionY;
+        int32_t mAbsMTTouchMajor;
+        int32_t mAbsMTTouchMinor;
+        int32_t mAbsMTWidthMajor;
+        int32_t mAbsMTWidthMinor;
+        int32_t mAbsMTOrientation;
+        int32_t mAbsMTTrackingId;
+        int32_t mAbsMTPressure;
+        int32_t mAbsMTDistance;
+        int32_t mAbsMTToolType;
+
+        Slot();
+        void clear();
+    };
+
+    MultiTouchMotionAccumulator();
+    ~MultiTouchMotionAccumulator();
+
+    void configure(InputDevice* device, size_t slotCount, bool usingSlotsProtocol);
+    void reset(InputDevice* device);
+    void process(const RawEvent* rawEvent);
+    void finishSync();
+    bool hasStylus() const;
+
+    inline size_t getSlotCount() const { return mSlotCount; }
+    inline const Slot* getSlot(size_t index) const { return &mSlots[index]; }
+
+private:
+    int32_t mCurrentSlot;
+    Slot* mSlots;
+    size_t mSlotCount;
+    bool mUsingSlotsProtocol;
+    bool mHaveStylus;
+
+    void clearSlots(int32_t initialSlot);
+};
+
+
+/* An input mapper transforms raw input events into cooked event data.
+ * A single input device can have multiple associated input mappers in order to interpret
+ * different classes of events.
+ *
+ * InputMapper lifecycle:
+ * - create
+ * - configure with 0 changes
+ * - reset
+ * - process, process, process (may occasionally reconfigure with non-zero changes or reset)
+ * - reset
+ * - destroy
+ */
+class InputMapper {
+public:
+    InputMapper(InputDevice* device);
+    virtual ~InputMapper();
+
+    inline InputDevice* getDevice() { return mDevice; }
+    inline int32_t getDeviceId() { return mDevice->getId(); }
+    inline const String8 getDeviceName() { return mDevice->getName(); }
+    inline InputReaderContext* getContext() { return mContext; }
+    inline InputReaderPolicyInterface* getPolicy() { return mContext->getPolicy(); }
+    inline InputListenerInterface* getListener() { return mContext->getListener(); }
+    inline EventHubInterface* getEventHub() { return mContext->getEventHub(); }
+
+    virtual uint32_t getSources() = 0;
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo);
+    virtual void dump(String8& dump);
+    virtual void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent) = 0;
+    virtual void timeoutExpired(nsecs_t when);
+
+    virtual int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode);
+    virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
+    virtual int32_t getSwitchState(uint32_t sourceMask, int32_t switchCode);
+    virtual bool markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags);
+    virtual void vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat,
+            int32_t token);
+    virtual void cancelVibrate(int32_t token);
+
+    virtual int32_t getMetaState();
+
+    virtual void fadePointer();
+
+protected:
+    InputDevice* mDevice;
+    InputReaderContext* mContext;
+
+    status_t getAbsoluteAxisInfo(int32_t axis, RawAbsoluteAxisInfo* axisInfo);
+    void bumpGeneration();
+
+    static void dumpRawAbsoluteAxisInfo(String8& dump,
+            const RawAbsoluteAxisInfo& axis, const char* name);
+};
+
+
+class SwitchInputMapper : public InputMapper {
+public:
+    SwitchInputMapper(InputDevice* device);
+    virtual ~SwitchInputMapper();
+
+    virtual uint32_t getSources();
+    virtual void process(const RawEvent* rawEvent);
+
+    virtual int32_t getSwitchState(uint32_t sourceMask, int32_t switchCode);
+
+private:
+    uint32_t mUpdatedSwitchValues;
+    uint32_t mUpdatedSwitchMask;
+
+    void processSwitch(int32_t switchCode, int32_t switchValue);
+    void sync(nsecs_t when);
+};
+
+
+class VibratorInputMapper : public InputMapper {
+public:
+    VibratorInputMapper(InputDevice* device);
+    virtual ~VibratorInputMapper();
+
+    virtual uint32_t getSources();
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo);
+    virtual void process(const RawEvent* rawEvent);
+
+    virtual void vibrate(const nsecs_t* pattern, size_t patternSize, ssize_t repeat,
+            int32_t token);
+    virtual void cancelVibrate(int32_t token);
+    virtual void timeoutExpired(nsecs_t when);
+    virtual void dump(String8& dump);
+
+private:
+    bool mVibrating;
+    nsecs_t mPattern[MAX_VIBRATE_PATTERN_SIZE];
+    size_t mPatternSize;
+    ssize_t mRepeat;
+    int32_t mToken;
+    ssize_t mIndex;
+    nsecs_t mNextStepTime;
+
+    void nextStep();
+    void stopVibrating();
+};
+
+
+class KeyboardInputMapper : public InputMapper {
+public:
+    KeyboardInputMapper(InputDevice* device, uint32_t source, int32_t keyboardType);
+    virtual ~KeyboardInputMapper();
+
+    virtual uint32_t getSources();
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo);
+    virtual void dump(String8& dump);
+    virtual void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent);
+
+    virtual int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode);
+    virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
+    virtual bool markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags);
+
+    virtual int32_t getMetaState();
+
+private:
+    struct KeyDown {
+        int32_t keyCode;
+        int32_t scanCode;
+    };
+
+    uint32_t mSource;
+    int32_t mKeyboardType;
+
+    int32_t mOrientation; // orientation for dpad keys
+
+    Vector<KeyDown> mKeyDowns; // keys that are down
+    int32_t mMetaState;
+    nsecs_t mDownTime; // time of most recent key down
+
+    int32_t mCurrentHidUsage; // most recent HID usage seen this packet, or 0 if none
+
+    struct LedState {
+        bool avail; // led is available
+        bool on;    // we think the led is currently on
+    };
+    LedState mCapsLockLedState;
+    LedState mNumLockLedState;
+    LedState mScrollLockLedState;
+
+    // Immutable configuration parameters.
+    struct Parameters {
+        bool hasAssociatedDisplay;
+        bool orientationAware;
+        bool handlesKeyRepeat;
+    } mParameters;
+
+    void configureParameters();
+    void dumpParameters(String8& dump);
+
+    bool isKeyboardOrGamepadKey(int32_t scanCode);
+
+    void processKey(nsecs_t when, bool down, int32_t keyCode, int32_t scanCode,
+            uint32_t policyFlags);
+
+    ssize_t findKeyDown(int32_t scanCode);
+
+    void resetLedState();
+    void initializeLedState(LedState& ledState, int32_t led);
+    void updateLedState(bool reset);
+    void updateLedStateForModifier(LedState& ledState, int32_t led,
+            int32_t modifier, bool reset);
+};
+
+
+class CursorInputMapper : public InputMapper {
+public:
+    CursorInputMapper(InputDevice* device);
+    virtual ~CursorInputMapper();
+
+    virtual uint32_t getSources();
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo);
+    virtual void dump(String8& dump);
+    virtual void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent);
+
+    virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
+
+    virtual void fadePointer();
+
+private:
+    // Amount that trackball needs to move in order to generate a key event.
+    static const int32_t TRACKBALL_MOVEMENT_THRESHOLD = 6;
+
+    // Immutable configuration parameters.
+    struct Parameters {
+        enum Mode {
+            MODE_POINTER,
+            MODE_NAVIGATION,
+        };
+
+        Mode mode;
+        bool hasAssociatedDisplay;
+        bool orientationAware;
+    } mParameters;
+
+    CursorButtonAccumulator mCursorButtonAccumulator;
+    CursorMotionAccumulator mCursorMotionAccumulator;
+    CursorScrollAccumulator mCursorScrollAccumulator;
+
+    int32_t mSource;
+    float mXScale;
+    float mYScale;
+    float mXPrecision;
+    float mYPrecision;
+
+    float mVWheelScale;
+    float mHWheelScale;
+
+    // Velocity controls for mouse pointer and wheel movements.
+    // The controls for X and Y wheel movements are separate to keep them decoupled.
+    VelocityControl mPointerVelocityControl;
+    VelocityControl mWheelXVelocityControl;
+    VelocityControl mWheelYVelocityControl;
+
+    int32_t mOrientation;
+
+    sp<PointerControllerInterface> mPointerController;
+
+    int32_t mButtonState;
+    nsecs_t mDownTime;
+
+    void configureParameters();
+    void dumpParameters(String8& dump);
+
+    void sync(nsecs_t when);
+};
+
+
+class TouchInputMapper : public InputMapper {
+public:
+    TouchInputMapper(InputDevice* device);
+    virtual ~TouchInputMapper();
+
+    virtual uint32_t getSources();
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo);
+    virtual void dump(String8& dump);
+    virtual void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent);
+
+    virtual int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode);
+    virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);
+    virtual bool markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags);
+
+    virtual void fadePointer();
+    virtual void timeoutExpired(nsecs_t when);
+
+protected:
+    CursorButtonAccumulator mCursorButtonAccumulator;
+    CursorScrollAccumulator mCursorScrollAccumulator;
+    TouchButtonAccumulator mTouchButtonAccumulator;
+
+    struct VirtualKey {
+        int32_t keyCode;
+        int32_t scanCode;
+        uint32_t flags;
+
+        // computed hit box, specified in touch screen coords based on known display size
+        int32_t hitLeft;
+        int32_t hitTop;
+        int32_t hitRight;
+        int32_t hitBottom;
+
+        inline bool isHit(int32_t x, int32_t y) const {
+            return x >= hitLeft && x <= hitRight && y >= hitTop && y <= hitBottom;
+        }
+    };
+
+    // Input sources and device mode.
+    uint32_t mSource;
+
+    enum DeviceMode {
+        DEVICE_MODE_DISABLED, // input is disabled
+        DEVICE_MODE_DIRECT, // direct mapping (touchscreen)
+        DEVICE_MODE_UNSCALED, // unscaled mapping (touchpad)
+        DEVICE_MODE_NAVIGATION, // unscaled mapping with assist gesture (touch navigation)
+        DEVICE_MODE_POINTER, // pointer mapping (pointer)
+    };
+    DeviceMode mDeviceMode;
+
+    // The reader's configuration.
+    InputReaderConfiguration mConfig;
+
+    // Immutable configuration parameters.
+    struct Parameters {
+        enum DeviceType {
+            DEVICE_TYPE_TOUCH_SCREEN,
+            DEVICE_TYPE_TOUCH_PAD,
+            DEVICE_TYPE_TOUCH_NAVIGATION,
+            DEVICE_TYPE_POINTER,
+        };
+
+        DeviceType deviceType;
+        bool hasAssociatedDisplay;
+        bool associatedDisplayIsExternal;
+        bool orientationAware;
+        bool hasButtonUnderPad;
+
+        enum GestureMode {
+            GESTURE_MODE_POINTER,
+            GESTURE_MODE_SPOTS,
+        };
+        GestureMode gestureMode;
+
+        bool wake;
+    } mParameters;
+
+    // Immutable calibration parameters in parsed form.
+    struct Calibration {
+        // Size
+        enum SizeCalibration {
+            SIZE_CALIBRATION_DEFAULT,
+            SIZE_CALIBRATION_NONE,
+            SIZE_CALIBRATION_GEOMETRIC,
+            SIZE_CALIBRATION_DIAMETER,
+            SIZE_CALIBRATION_BOX,
+            SIZE_CALIBRATION_AREA,
+        };
+
+        SizeCalibration sizeCalibration;
+
+        bool haveSizeScale;
+        float sizeScale;
+        bool haveSizeBias;
+        float sizeBias;
+        bool haveSizeIsSummed;
+        bool sizeIsSummed;
+
+        // Pressure
+        enum PressureCalibration {
+            PRESSURE_CALIBRATION_DEFAULT,
+            PRESSURE_CALIBRATION_NONE,
+            PRESSURE_CALIBRATION_PHYSICAL,
+            PRESSURE_CALIBRATION_AMPLITUDE,
+        };
+
+        PressureCalibration pressureCalibration;
+        bool havePressureScale;
+        float pressureScale;
+
+        // Orientation
+        enum OrientationCalibration {
+            ORIENTATION_CALIBRATION_DEFAULT,
+            ORIENTATION_CALIBRATION_NONE,
+            ORIENTATION_CALIBRATION_INTERPOLATED,
+            ORIENTATION_CALIBRATION_VECTOR,
+        };
+
+        OrientationCalibration orientationCalibration;
+
+        // Distance
+        enum DistanceCalibration {
+            DISTANCE_CALIBRATION_DEFAULT,
+            DISTANCE_CALIBRATION_NONE,
+            DISTANCE_CALIBRATION_SCALED,
+        };
+
+        DistanceCalibration distanceCalibration;
+        bool haveDistanceScale;
+        float distanceScale;
+
+        enum CoverageCalibration {
+            COVERAGE_CALIBRATION_DEFAULT,
+            COVERAGE_CALIBRATION_NONE,
+            COVERAGE_CALIBRATION_BOX,
+        };
+
+        CoverageCalibration coverageCalibration;
+
+        inline void applySizeScaleAndBias(float* outSize) const {
+            if (haveSizeScale) {
+                *outSize *= sizeScale;
+            }
+            if (haveSizeBias) {
+                *outSize += sizeBias;
+            }
+            if (*outSize < 0) {
+                *outSize = 0;
+            }
+        }
+    } mCalibration;
+
+    // Affine location transformation/calibration
+    struct TouchAffineTransformation mAffineTransform;
+
+    // Raw pointer axis information from the driver.
+    RawPointerAxes mRawPointerAxes;
+
+    // Raw pointer sample data.
+    RawPointerData mCurrentRawPointerData;
+    RawPointerData mLastRawPointerData;
+
+    // Cooked pointer sample data.
+    CookedPointerData mCurrentCookedPointerData;
+    CookedPointerData mLastCookedPointerData;
+
+    // Button state.
+    int32_t mCurrentButtonState;
+    int32_t mLastButtonState;
+
+    // Scroll state.
+    int32_t mCurrentRawVScroll;
+    int32_t mCurrentRawHScroll;
+
+    // Id bits used to differentiate fingers, stylus and mouse tools.
+    BitSet32 mCurrentFingerIdBits; // finger or unknown
+    BitSet32 mLastFingerIdBits;
+    BitSet32 mCurrentStylusIdBits; // stylus or eraser
+    BitSet32 mLastStylusIdBits;
+    BitSet32 mCurrentMouseIdBits; // mouse or lens
+    BitSet32 mLastMouseIdBits;
+
+    // True if we sent a HOVER_ENTER event.
+    bool mSentHoverEnter;
+
+    // The time the primary pointer last went down.
+    nsecs_t mDownTime;
+
+    // The pointer controller, or null if the device is not a pointer.
+    sp<PointerControllerInterface> mPointerController;
+
+    Vector<VirtualKey> mVirtualKeys;
+
+    virtual void configureParameters();
+    virtual void dumpParameters(String8& dump);
+    virtual void configureRawPointerAxes();
+    virtual void dumpRawPointerAxes(String8& dump);
+    virtual void configureSurface(nsecs_t when, bool* outResetNeeded);
+    virtual void dumpSurface(String8& dump);
+    virtual void configureVirtualKeys();
+    virtual void dumpVirtualKeys(String8& dump);
+    virtual void parseCalibration();
+    virtual void resolveCalibration();
+    virtual void dumpCalibration(String8& dump);
+    virtual void dumpAffineTransformation(String8& dump);
+    virtual bool hasStylus() const = 0;
+    virtual void updateAffineTransformation();
+
+    virtual void syncTouch(nsecs_t when, bool* outHavePointerIds) = 0;
+
+private:
+    // The current viewport.
+    // The components of the viewport are specified in the display's rotated orientation.
+    DisplayViewport mViewport;
+
+    // The surface orientation, width and height set by configureSurface().
+    // The width and height are derived from the viewport but are specified
+    // in the natural orientation.
+    // The surface origin specifies how the surface coordinates should be translated
+    // to align with the logical display coordinate space.
+    // The orientation may be different from the viewport orientation as it specifies
+    // the rotation of the surface coordinates required to produce the viewport's
+    // requested orientation, so it will depend on whether the device is orientation aware.
+    int32_t mSurfaceWidth;
+    int32_t mSurfaceHeight;
+    int32_t mSurfaceLeft;
+    int32_t mSurfaceTop;
+    int32_t mSurfaceOrientation;
+
+    // Translation and scaling factors, orientation-independent.
+    float mXTranslate;
+    float mXScale;
+    float mXPrecision;
+
+    float mYTranslate;
+    float mYScale;
+    float mYPrecision;
+
+    float mGeometricScale;
+
+    float mPressureScale;
+
+    float mSizeScale;
+
+    float mOrientationScale;
+
+    float mDistanceScale;
+
+    bool mHaveTilt;
+    float mTiltXCenter;
+    float mTiltXScale;
+    float mTiltYCenter;
+    float mTiltYScale;
+
+    // Oriented motion ranges for input device info.
+    struct OrientedRanges {
+        InputDeviceInfo::MotionRange x;
+        InputDeviceInfo::MotionRange y;
+        InputDeviceInfo::MotionRange pressure;
+
+        bool haveSize;
+        InputDeviceInfo::MotionRange size;
+
+        bool haveTouchSize;
+        InputDeviceInfo::MotionRange touchMajor;
+        InputDeviceInfo::MotionRange touchMinor;
+
+        bool haveToolSize;
+        InputDeviceInfo::MotionRange toolMajor;
+        InputDeviceInfo::MotionRange toolMinor;
+
+        bool haveOrientation;
+        InputDeviceInfo::MotionRange orientation;
+
+        bool haveDistance;
+        InputDeviceInfo::MotionRange distance;
+
+        bool haveTilt;
+        InputDeviceInfo::MotionRange tilt;
+
+        OrientedRanges() {
+            clear();
+        }
+
+        void clear() {
+            haveSize = false;
+            haveTouchSize = false;
+            haveToolSize = false;
+            haveOrientation = false;
+            haveDistance = false;
+            haveTilt = false;
+        }
+    } mOrientedRanges;
+
+    // Oriented dimensions and precision.
+    float mOrientedXPrecision;
+    float mOrientedYPrecision;
+
+    struct CurrentVirtualKeyState {
+        bool down;
+        bool ignored;
+        nsecs_t downTime;
+        int32_t keyCode;
+        int32_t scanCode;
+    } mCurrentVirtualKey;
+
+    // Scale factor for gesture or mouse based pointer movements.
+    float mPointerXMovementScale;
+    float mPointerYMovementScale;
+
+    // Scale factor for gesture based zooming and other freeform motions.
+    float mPointerXZoomScale;
+    float mPointerYZoomScale;
+
+    // The maximum swipe width.
+    float mPointerGestureMaxSwipeWidth;
+
+    struct PointerDistanceHeapElement {
+        uint32_t currentPointerIndex : 8;
+        uint32_t lastPointerIndex : 8;
+        uint64_t distance : 48; // squared distance
+    };
+
+    enum PointerUsage {
+        POINTER_USAGE_NONE,
+        POINTER_USAGE_GESTURES,
+        POINTER_USAGE_STYLUS,
+        POINTER_USAGE_MOUSE,
+    };
+    PointerUsage mPointerUsage;
+
+    struct PointerGesture {
+        enum Mode {
+            // No fingers, button is not pressed.
+            // Nothing happening.
+            NEUTRAL,
+
+            // No fingers, button is not pressed.
+            // Tap detected.
+            // Emits DOWN and UP events at the pointer location.
+            TAP,
+
+            // Exactly one finger dragging following a tap.
+            // Pointer follows the active finger.
+            // Emits DOWN, MOVE and UP events at the pointer location.
+            //
+            // Detect double-taps when the finger goes up while in TAP_DRAG mode.
+            TAP_DRAG,
+
+            // Button is pressed.
+            // Pointer follows the active finger if there is one.  Other fingers are ignored.
+            // Emits DOWN, MOVE and UP events at the pointer location.
+            BUTTON_CLICK_OR_DRAG,
+
+            // Exactly one finger, button is not pressed.
+            // Pointer follows the active finger.
+            // Emits HOVER_MOVE events at the pointer location.
+            //
+            // Detect taps when the finger goes up while in HOVER mode.
+            HOVER,
+
+            // Exactly two fingers but neither have moved enough to clearly indicate
+            // whether a swipe or freeform gesture was intended.  We consider the
+            // pointer to be pressed so this enables clicking or long-pressing on buttons.
+            // Pointer does not move.
+            // Emits DOWN, MOVE and UP events with a single stationary pointer coordinate.
+            PRESS,
+
+            // Exactly two fingers moving in the same direction, button is not pressed.
+            // Pointer does not move.
+            // Emits DOWN, MOVE and UP events with a single pointer coordinate that
+            // follows the midpoint between both fingers.
+            SWIPE,
+
+            // Two or more fingers moving in arbitrary directions, button is not pressed.
+            // Pointer does not move.
+            // Emits DOWN, POINTER_DOWN, MOVE, POINTER_UP and UP events that follow
+            // each finger individually relative to the initial centroid of the finger.
+            FREEFORM,
+
+            // Waiting for quiet time to end before starting the next gesture.
+            QUIET,
+        };
+
+        // Time the first finger went down.
+        nsecs_t firstTouchTime;
+
+        // The active pointer id from the raw touch data.
+        int32_t activeTouchId; // -1 if none
+
+        // The active pointer id from the gesture last delivered to the application.
+        int32_t activeGestureId; // -1 if none
+
+        // Pointer coords and ids for the current and previous pointer gesture.
+        Mode currentGestureMode;
+        BitSet32 currentGestureIdBits;
+        uint32_t currentGestureIdToIndex[MAX_POINTER_ID + 1];
+        PointerProperties currentGestureProperties[MAX_POINTERS];
+        PointerCoords currentGestureCoords[MAX_POINTERS];
+
+        Mode lastGestureMode;
+        BitSet32 lastGestureIdBits;
+        uint32_t lastGestureIdToIndex[MAX_POINTER_ID + 1];
+        PointerProperties lastGestureProperties[MAX_POINTERS];
+        PointerCoords lastGestureCoords[MAX_POINTERS];
+
+        // Time the pointer gesture last went down.
+        nsecs_t downTime;
+
+        // Time when the pointer went down for a TAP.
+        nsecs_t tapDownTime;
+
+        // Time when the pointer went up for a TAP.
+        nsecs_t tapUpTime;
+
+        // Location of initial tap.
+        float tapX, tapY;
+
+        // Time we started waiting for quiescence.
+        nsecs_t quietTime;
+
+        // Reference points for multitouch gestures.
+        float referenceTouchX;    // reference touch X/Y coordinates in surface units
+        float referenceTouchY;
+        float referenceGestureX;  // reference gesture X/Y coordinates in pixels
+        float referenceGestureY;
+
+        // Distance that each pointer has traveled which has not yet been
+        // subsumed into the reference gesture position.
+        BitSet32 referenceIdBits;
+        struct Delta {
+            float dx, dy;
+        };
+        Delta referenceDeltas[MAX_POINTER_ID + 1];
+
+        // Describes how touch ids are mapped to gesture ids for freeform gestures.
+        uint32_t freeformTouchToGestureIdMap[MAX_POINTER_ID + 1];
+
+        // A velocity tracker for determining whether to switch active pointers during drags.
+        VelocityTracker velocityTracker;
+
+        void reset() {
+            firstTouchTime = LLONG_MIN;
+            activeTouchId = -1;
+            activeGestureId = -1;
+            currentGestureMode = NEUTRAL;
+            currentGestureIdBits.clear();
+            lastGestureMode = NEUTRAL;
+            lastGestureIdBits.clear();
+            downTime = 0;
+            velocityTracker.clear();
+            resetTap();
+            resetQuietTime();
+        }
+
+        void resetTap() {
+            tapDownTime = LLONG_MIN;
+            tapUpTime = LLONG_MIN;
+        }
+
+        void resetQuietTime() {
+            quietTime = LLONG_MIN;
+        }
+    } mPointerGesture;
+
+    struct PointerSimple {
+        PointerCoords currentCoords;
+        PointerProperties currentProperties;
+        PointerCoords lastCoords;
+        PointerProperties lastProperties;
+
+        // True if the pointer is down.
+        bool down;
+
+        // True if the pointer is hovering.
+        bool hovering;
+
+        // Time the pointer last went down.
+        nsecs_t downTime;
+
+        void reset() {
+            currentCoords.clear();
+            currentProperties.clear();
+            lastCoords.clear();
+            lastProperties.clear();
+            down = false;
+            hovering = false;
+            downTime = 0;
+        }
+    } mPointerSimple;
+
+    // The pointer and scroll velocity controls.
+    VelocityControl mPointerVelocityControl;
+    VelocityControl mWheelXVelocityControl;
+    VelocityControl mWheelYVelocityControl;
+
+    void sync(nsecs_t when);
+
+    bool consumeRawTouches(nsecs_t when, uint32_t policyFlags);
+    void dispatchVirtualKey(nsecs_t when, uint32_t policyFlags,
+            int32_t keyEventAction, int32_t keyEventFlags);
+
+    void dispatchTouches(nsecs_t when, uint32_t policyFlags);
+    void dispatchHoverExit(nsecs_t when, uint32_t policyFlags);
+    void dispatchHoverEnterAndMove(nsecs_t when, uint32_t policyFlags);
+    void cookPointerData();
+
+    void dispatchPointerUsage(nsecs_t when, uint32_t policyFlags, PointerUsage pointerUsage);
+    void abortPointerUsage(nsecs_t when, uint32_t policyFlags);
+
+    void dispatchPointerGestures(nsecs_t when, uint32_t policyFlags, bool isTimeout);
+    void abortPointerGestures(nsecs_t when, uint32_t policyFlags);
+    bool preparePointerGestures(nsecs_t when,
+            bool* outCancelPreviousGesture, bool* outFinishPreviousGesture,
+            bool isTimeout);
+
+    void dispatchPointerStylus(nsecs_t when, uint32_t policyFlags);
+    void abortPointerStylus(nsecs_t when, uint32_t policyFlags);
+
+    void dispatchPointerMouse(nsecs_t when, uint32_t policyFlags);
+    void abortPointerMouse(nsecs_t when, uint32_t policyFlags);
+
+    void dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
+            bool down, bool hovering);
+    void abortPointerSimple(nsecs_t when, uint32_t policyFlags);
+
+    // Dispatches a motion event.
+    // If the changedId is >= 0 and the action is POINTER_DOWN or POINTER_UP, the
+    // method will take care of setting the index and transmuting the action to DOWN or UP
+    // it is the first / last pointer to go down / up.
+    void dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source,
+            int32_t action, int32_t flags, int32_t metaState, int32_t buttonState,
+            int32_t edgeFlags,
+            const PointerProperties* properties, const PointerCoords* coords,
+            const uint32_t* idToIndex, BitSet32 idBits,
+            int32_t changedId, float xPrecision, float yPrecision, nsecs_t downTime);
+
+    // Updates pointer coords and properties for pointers with specified ids that have moved.
+    // Returns true if any of them changed.
+    bool updateMovedPointers(const PointerProperties* inProperties,
+            const PointerCoords* inCoords, const uint32_t* inIdToIndex,
+            PointerProperties* outProperties, PointerCoords* outCoords,
+            const uint32_t* outIdToIndex, BitSet32 idBits) const;
+
+    bool isPointInsideSurface(int32_t x, int32_t y);
+    const VirtualKey* findVirtualKeyHit(int32_t x, int32_t y);
+
+    void assignPointerIds();
+};
+
+
+class SingleTouchInputMapper : public TouchInputMapper {
+public:
+    SingleTouchInputMapper(InputDevice* device);
+    virtual ~SingleTouchInputMapper();
+
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent);
+
+protected:
+    virtual void syncTouch(nsecs_t when, bool* outHavePointerIds);
+    virtual void configureRawPointerAxes();
+    virtual bool hasStylus() const;
+
+private:
+    SingleTouchMotionAccumulator mSingleTouchMotionAccumulator;
+};
+
+
+class MultiTouchInputMapper : public TouchInputMapper {
+public:
+    MultiTouchInputMapper(InputDevice* device);
+    virtual ~MultiTouchInputMapper();
+
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent);
+
+protected:
+    virtual void syncTouch(nsecs_t when, bool* outHavePointerIds);
+    virtual void configureRawPointerAxes();
+    virtual bool hasStylus() const;
+
+private:
+    MultiTouchMotionAccumulator mMultiTouchMotionAccumulator;
+
+    // Specifies the pointer id bits that are in use, and their associated tracking id.
+    BitSet32 mPointerIdBits;
+    int32_t mPointerTrackingIdMap[MAX_POINTER_ID + 1];
+};
+
+
+class JoystickInputMapper : public InputMapper {
+public:
+    JoystickInputMapper(InputDevice* device);
+    virtual ~JoystickInputMapper();
+
+    virtual uint32_t getSources();
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo);
+    virtual void dump(String8& dump);
+    virtual void configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes);
+    virtual void reset(nsecs_t when);
+    virtual void process(const RawEvent* rawEvent);
+
+private:
+    struct Axis {
+        RawAbsoluteAxisInfo rawAxisInfo;
+        AxisInfo axisInfo;
+
+        bool explicitlyMapped; // true if the axis was explicitly assigned an axis id
+
+        float scale;   // scale factor from raw to normalized values
+        float offset;  // offset to add after scaling for normalization
+        float highScale;  // scale factor from raw to normalized values of high split
+        float highOffset; // offset to add after scaling for normalization of high split
+
+        float min;        // normalized inclusive minimum
+        float max;        // normalized inclusive maximum
+        float flat;       // normalized flat region size
+        float fuzz;       // normalized error tolerance
+        float resolution; // normalized resolution in units/mm
+
+        float filter;  // filter out small variations of this size
+        float currentValue; // current value
+        float newValue; // most recent value
+        float highCurrentValue; // current value of high split
+        float highNewValue; // most recent value of high split
+
+        void initialize(const RawAbsoluteAxisInfo& rawAxisInfo, const AxisInfo& axisInfo,
+                bool explicitlyMapped, float scale, float offset,
+                float highScale, float highOffset,
+                float min, float max, float flat, float fuzz, float resolution) {
+            this->rawAxisInfo = rawAxisInfo;
+            this->axisInfo = axisInfo;
+            this->explicitlyMapped = explicitlyMapped;
+            this->scale = scale;
+            this->offset = offset;
+            this->highScale = highScale;
+            this->highOffset = highOffset;
+            this->min = min;
+            this->max = max;
+            this->flat = flat;
+            this->fuzz = fuzz;
+            this->resolution = resolution;
+            this->filter = 0;
+            resetValue();
+        }
+
+        void resetValue() {
+            this->currentValue = 0;
+            this->newValue = 0;
+            this->highCurrentValue = 0;
+            this->highNewValue = 0;
+        }
+    };
+
+    // Axes indexed by raw ABS_* axis index.
+    KeyedVector<int32_t, Axis> mAxes;
+
+    void sync(nsecs_t when, bool force);
+
+    bool haveAxis(int32_t axisId);
+    void pruneAxes(bool ignoreExplicitlyMappedAxes);
+    bool filterAxes(bool force);
+
+    static bool hasValueChangedSignificantly(float filter,
+            float newValue, float currentValue, float min, float max);
+    static bool hasMovedNearerToValueWithinFilteredRange(float filter,
+            float newValue, float currentValue, float thresholdValue);
+
+    static bool isCenteredAxis(int32_t axis);
+    static int32_t getCompatAxis(int32_t axis);
+
+    static void addMotionRange(int32_t axisId, const Axis& axis, InputDeviceInfo* info);
+    static void setPointerCoordsAxisValue(PointerCoords* pointerCoords, int32_t axis,
+            float value);
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_READER_H
diff --git a/services/inputflinger/InputWindow.cpp b/services/inputflinger/InputWindow.cpp
new file mode 100644
index 0000000..fda3ffa
--- /dev/null
+++ b/services/inputflinger/InputWindow.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "InputWindow"
+#define LOG_NDEBUG 0
+
+#include "InputWindow.h"
+
+#include <cutils/log.h>
+
+#include <ui/Rect.h>
+#include <ui/Region.h>
+
+namespace android {
+
+// --- InputWindowInfo ---
+void InputWindowInfo::addTouchableRegion(const Rect& region) {
+    touchableRegion.orSelf(region);
+}
+
+bool InputWindowInfo::touchableRegionContainsPoint(int32_t x, int32_t y) const {
+    return touchableRegion.contains(x,y);
+}
+
+bool InputWindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
+    return x >= frameLeft && x <= frameRight
+            && y >= frameTop && y <= frameBottom;
+}
+
+bool InputWindowInfo::isTrustedOverlay() const {
+    return layoutParamsType == TYPE_INPUT_METHOD
+            || layoutParamsType == TYPE_INPUT_METHOD_DIALOG
+            || layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
+            || layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY;
+}
+
+bool InputWindowInfo::supportsSplitTouch() const {
+    return layoutParamsFlags & FLAG_SPLIT_TOUCH;
+}
+
+
+// --- InputWindowHandle ---
+
+InputWindowHandle::InputWindowHandle(const sp<InputApplicationHandle>& inputApplicationHandle) :
+    inputApplicationHandle(inputApplicationHandle), mInfo(NULL) {
+}
+
+InputWindowHandle::~InputWindowHandle() {
+    delete mInfo;
+}
+
+void InputWindowHandle::releaseInfo() {
+    if (mInfo) {
+        delete mInfo;
+        mInfo = NULL;
+    }
+}
+
+} // namespace android
diff --git a/services/inputflinger/InputWindow.h b/services/inputflinger/InputWindow.h
new file mode 100644
index 0000000..5879c84
--- /dev/null
+++ b/services/inputflinger/InputWindow.h
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _UI_INPUT_WINDOW_H
+#define _UI_INPUT_WINDOW_H
+
+#include <input/Input.h>
+#include <input/InputTransport.h>
+#include <ui/Rect.h>
+#include <ui/Region.h>
+#include <utils/RefBase.h>
+#include <utils/Timers.h>
+#include <utils/String8.h>
+
+#include "InputApplication.h"
+
+namespace android {
+
+
+/*
+ * Describes the properties of a window that can receive input.
+ */
+struct InputWindowInfo {
+    // Window flags from WindowManager.LayoutParams
+    enum {
+        FLAG_ALLOW_LOCK_WHILE_SCREEN_ON     = 0x00000001,
+        FLAG_DIM_BEHIND        = 0x00000002,
+        FLAG_BLUR_BEHIND        = 0x00000004,
+        FLAG_NOT_FOCUSABLE      = 0x00000008,
+        FLAG_NOT_TOUCHABLE      = 0x00000010,
+        FLAG_NOT_TOUCH_MODAL    = 0x00000020,
+        FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040,
+        FLAG_KEEP_SCREEN_ON     = 0x00000080,
+        FLAG_LAYOUT_IN_SCREEN   = 0x00000100,
+        FLAG_LAYOUT_NO_LIMITS   = 0x00000200,
+        FLAG_FULLSCREEN      = 0x00000400,
+        FLAG_FORCE_NOT_FULLSCREEN   = 0x00000800,
+        FLAG_DITHER             = 0x00001000,
+        FLAG_SECURE             = 0x00002000,
+        FLAG_SCALED             = 0x00004000,
+        FLAG_IGNORE_CHEEK_PRESSES    = 0x00008000,
+        FLAG_LAYOUT_INSET_DECOR = 0x00010000,
+        FLAG_ALT_FOCUSABLE_IM = 0x00020000,
+        FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000,
+        FLAG_SHOW_WHEN_LOCKED = 0x00080000,
+        FLAG_SHOW_WALLPAPER = 0x00100000,
+        FLAG_TURN_SCREEN_ON = 0x00200000,
+        FLAG_DISMISS_KEYGUARD = 0x00400000,
+        FLAG_SPLIT_TOUCH = 0x00800000,
+        FLAG_SLIPPERY = 0x20000000,
+        FLAG_NEEDS_MENU_KEY = 0x40000000,
+    };
+
+    // Private Window flags from WindowManager.LayoutParams
+    enum {
+        PRIVATE_FLAG_SYSTEM_ERROR = 0x00000100,
+    };
+
+    // Window types from WindowManager.LayoutParams
+    enum {
+        FIRST_APPLICATION_WINDOW = 1,
+        TYPE_BASE_APPLICATION   = 1,
+        TYPE_APPLICATION        = 2,
+        TYPE_APPLICATION_STARTING = 3,
+        LAST_APPLICATION_WINDOW = 99,
+        FIRST_SUB_WINDOW        = 1000,
+        TYPE_APPLICATION_PANEL  = FIRST_SUB_WINDOW,
+        TYPE_APPLICATION_MEDIA  = FIRST_SUB_WINDOW+1,
+        TYPE_APPLICATION_SUB_PANEL = FIRST_SUB_WINDOW+2,
+        TYPE_APPLICATION_ATTACHED_DIALOG = FIRST_SUB_WINDOW+3,
+        TYPE_APPLICATION_MEDIA_OVERLAY  = FIRST_SUB_WINDOW+4,
+        LAST_SUB_WINDOW         = 1999,
+        FIRST_SYSTEM_WINDOW     = 2000,
+        TYPE_STATUS_BAR         = FIRST_SYSTEM_WINDOW,
+        TYPE_SEARCH_BAR         = FIRST_SYSTEM_WINDOW+1,
+        TYPE_PHONE              = FIRST_SYSTEM_WINDOW+2,
+        TYPE_SYSTEM_ALERT       = FIRST_SYSTEM_WINDOW+3,
+        TYPE_KEYGUARD           = FIRST_SYSTEM_WINDOW+4,
+        TYPE_TOAST              = FIRST_SYSTEM_WINDOW+5,
+        TYPE_SYSTEM_OVERLAY     = FIRST_SYSTEM_WINDOW+6,
+        TYPE_PRIORITY_PHONE     = FIRST_SYSTEM_WINDOW+7,
+        TYPE_SYSTEM_DIALOG      = FIRST_SYSTEM_WINDOW+8,
+        TYPE_KEYGUARD_DIALOG    = FIRST_SYSTEM_WINDOW+9,
+        TYPE_SYSTEM_ERROR       = FIRST_SYSTEM_WINDOW+10,
+        TYPE_INPUT_METHOD       = FIRST_SYSTEM_WINDOW+11,
+        TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12,
+        TYPE_WALLPAPER          = FIRST_SYSTEM_WINDOW+13,
+        TYPE_STATUS_BAR_PANEL   = FIRST_SYSTEM_WINDOW+14,
+        TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15,
+        TYPE_DRAG               = FIRST_SYSTEM_WINDOW+16,
+        TYPE_STATUS_BAR_SUB_PANEL  = FIRST_SYSTEM_WINDOW+17,
+        TYPE_POINTER            = FIRST_SYSTEM_WINDOW+18,
+        TYPE_NAVIGATION_BAR     = FIRST_SYSTEM_WINDOW+19,
+        TYPE_VOLUME_OVERLAY = FIRST_SYSTEM_WINDOW+20,
+        TYPE_BOOT_PROGRESS = FIRST_SYSTEM_WINDOW+21,
+        TYPE_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW+22,
+        LAST_SYSTEM_WINDOW      = 2999,
+    };
+
+    enum {
+        INPUT_FEATURE_DISABLE_TOUCH_PAD_GESTURES = 0x00000001,
+        INPUT_FEATURE_NO_INPUT_CHANNEL = 0x00000002,
+        INPUT_FEATURE_DISABLE_USER_ACTIVITY = 0x00000004,
+    };
+
+    sp<InputChannel> inputChannel;
+    String8 name;
+    int32_t layoutParamsFlags;
+    int32_t layoutParamsPrivateFlags;
+    int32_t layoutParamsType;
+    nsecs_t dispatchingTimeout;
+    int32_t frameLeft;
+    int32_t frameTop;
+    int32_t frameRight;
+    int32_t frameBottom;
+    float scaleFactor;
+    Region touchableRegion;
+    bool visible;
+    bool canReceiveKeys;
+    bool hasFocus;
+    bool hasWallpaper;
+    bool paused;
+    int32_t layer;
+    int32_t ownerPid;
+    int32_t ownerUid;
+    int32_t inputFeatures;
+    int32_t displayId;
+
+    void addTouchableRegion(const Rect& region);
+
+    bool touchableRegionContainsPoint(int32_t x, int32_t y) const;
+    bool frameContainsPoint(int32_t x, int32_t y) const;
+
+    /* Returns true if the window is of a trusted type that is allowed to silently
+     * overlay other windows for the purpose of implementing the secure views feature.
+     * Trusted overlays, such as IME windows, can partly obscure other windows without causing
+     * motion events to be delivered to them with AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED.
+     */
+    bool isTrustedOverlay() const;
+
+    bool supportsSplitTouch() const;
+};
+
+
+/*
+ * Handle for a window that can receive input.
+ *
+ * Used by the native input dispatcher to indirectly refer to the window manager objects
+ * that describe a window.
+ */
+class InputWindowHandle : public RefBase {
+public:
+    const sp<InputApplicationHandle> inputApplicationHandle;
+
+    inline const InputWindowInfo* getInfo() const {
+        return mInfo;
+    }
+
+    inline sp<InputChannel> getInputChannel() const {
+        return mInfo ? mInfo->inputChannel : NULL;
+    }
+
+    inline String8 getName() const {
+        return mInfo ? mInfo->name : String8("<invalid>");
+    }
+
+    inline nsecs_t getDispatchingTimeout(nsecs_t defaultValue) const {
+        return mInfo ? mInfo->dispatchingTimeout : defaultValue;
+    }
+
+    /**
+     * Requests that the state of this object be updated to reflect
+     * the most current available information about the application.
+     *
+     * This method should only be called from within the input dispatcher's
+     * critical section.
+     *
+     * Returns true on success, or false if the handle is no longer valid.
+     */
+    virtual bool updateInfo() = 0;
+
+    /**
+     * Releases the storage used by the associated information when it is
+     * no longer needed.
+     */
+    void releaseInfo();
+
+protected:
+    InputWindowHandle(const sp<InputApplicationHandle>& inputApplicationHandle);
+    virtual ~InputWindowHandle();
+
+    InputWindowInfo* mInfo;
+};
+
+} // namespace android
+
+#endif // _UI_INPUT_WINDOW_H
diff --git a/services/inputflinger/PointerControllerInterface.h b/services/inputflinger/PointerControllerInterface.h
new file mode 100644
index 0000000..e94dd94
--- /dev/null
+++ b/services/inputflinger/PointerControllerInterface.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _INPUTFLINGER_POINTER_CONTROLLER_INTERFACE_H
+#define _INPUTFLINGER_POINTER_CONTROLLER_INTERFACE_H
+
+#include <input/Input.h>
+#include <utils/BitSet.h>
+#include <utils/RefBase.h>
+
+namespace android {
+
+/**
+ * Interface for tracking a mouse / touch pad pointer and touch pad spots.
+ *
+ * The spots are sprites on screen that visually represent the positions of
+ * fingers
+ *
+ * The pointer controller is responsible for providing synchronization and for tracking
+ * display orientation changes if needed.
+ */
+class PointerControllerInterface : public virtual RefBase {
+protected:
+    PointerControllerInterface() { }
+    virtual ~PointerControllerInterface() { }
+
+public:
+    /* Gets the bounds of the region that the pointer can traverse.
+     * Returns true if the bounds are available. */
+    virtual bool getBounds(float* outMinX, float* outMinY,
+            float* outMaxX, float* outMaxY) const = 0;
+
+    /* Move the pointer. */
+    virtual void move(float deltaX, float deltaY) = 0;
+
+    /* Sets a mask that indicates which buttons are pressed. */
+    virtual void setButtonState(int32_t buttonState) = 0;
+
+    /* Gets a mask that indicates which buttons are pressed. */
+    virtual int32_t getButtonState() const = 0;
+
+    /* Sets the absolute location of the pointer. */
+    virtual void setPosition(float x, float y) = 0;
+
+    /* Gets the absolute location of the pointer. */
+    virtual void getPosition(float* outX, float* outY) const = 0;
+
+    enum Transition {
+        // Fade/unfade immediately.
+        TRANSITION_IMMEDIATE,
+        // Fade/unfade gradually.
+        TRANSITION_GRADUAL,
+    };
+
+    /* Fades the pointer out now. */
+    virtual void fade(Transition transition) = 0;
+
+    /* Makes the pointer visible if it has faded out.
+     * The pointer never unfades itself automatically.  This method must be called
+     * by the client whenever the pointer is moved or a button is pressed and it
+     * wants to ensure that the pointer becomes visible again. */
+    virtual void unfade(Transition transition) = 0;
+
+    enum Presentation {
+        // Show the mouse pointer.
+        PRESENTATION_POINTER,
+        // Show spots and a spot anchor in place of the mouse pointer.
+        PRESENTATION_SPOT,
+    };
+
+    /* Sets the mode of the pointer controller. */
+    virtual void setPresentation(Presentation presentation) = 0;
+
+    /* Sets the spots for the current gesture.
+     * The spots are not subject to the inactivity timeout like the pointer
+     * itself it since they are expected to remain visible for so long as
+     * the fingers are on the touch pad.
+     *
+     * The values of the AMOTION_EVENT_AXIS_PRESSURE axis is significant.
+     * For spotCoords, pressure != 0 indicates that the spot's location is being
+     * pressed (not hovering).
+     */
+    virtual void setSpots(const PointerCoords* spotCoords, const uint32_t* spotIdToIndex,
+            BitSet32 spotIdBits) = 0;
+
+    /* Removes all spots. */
+    virtual void clearSpots() = 0;
+};
+
+} // namespace android
+
+#endif // _INPUTFLINGER_POINTER_CONTROLLER_INTERFACE_H
diff --git a/services/inputflinger/main.cpp b/services/inputflinger/main.cpp
new file mode 100644
index 0000000..0a517cc
--- /dev/null
+++ b/services/inputflinger/main.cpp
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <binder/BinderService.h>
+#include "InputFlinger.h"
+
+using namespace android;
+
+int main(int, char**) {
+    ProcessState::self()->setThreadPoolMaxThreadCount(4);
+    BinderService<InputFlinger>::publishAndJoinThreadPool(true);
+    return 0;
+}
diff --git a/services/inputflinger/tests/Android.mk b/services/inputflinger/tests/Android.mk
new file mode 100644
index 0000000..6dae82f
--- /dev/null
+++ b/services/inputflinger/tests/Android.mk
@@ -0,0 +1,51 @@
+# Build the unit tests.
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# Build the unit tests.
+test_src_files := \
+    InputReader_test.cpp \
+    InputDispatcher_test.cpp
+
+shared_libraries := \
+    libcutils \
+    liblog \
+    libandroidfw \
+    libutils \
+    libhardware \
+    libhardware_legacy \
+    libui \
+    libskia \
+    libstlport \
+    libinput \
+    libinputflinger \
+    libinputservice
+
+static_libraries := \
+    libgtest \
+    libgtest_main
+
+c_includes := \
+    bionic \
+    bionic/libstdc++/include \
+    external/gtest/include \
+    external/stlport/stlport \
+    external/skia/include/core
+
+
+module_tags := eng tests
+
+$(foreach file,$(test_src_files), \
+    $(eval include $(CLEAR_VARS)) \
+    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
+    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
+    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
+	$(eval LOCAL_CFLAGS += -Wno-unused-parameter) \
+    $(eval LOCAL_SRC_FILES := $(file)) \
+    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
+    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
+    $(eval include $(BUILD_NATIVE_TEST)) \
+)
+
+# Build the manual test programs.
+include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/services/inputflinger/tests/InputDispatcher_test.cpp b/services/inputflinger/tests/InputDispatcher_test.cpp
new file mode 100644
index 0000000..7aac6ed
--- /dev/null
+++ b/services/inputflinger/tests/InputDispatcher_test.cpp
@@ -0,0 +1,258 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../InputDispatcher.h"
+
+#include <gtest/gtest.h>
+#include <linux/input.h>
+
+namespace android {
+
+// An arbitrary time value.
+static const nsecs_t ARBITRARY_TIME = 1234;
+
+// An arbitrary device id.
+static const int32_t DEVICE_ID = 1;
+
+// An arbitrary display id.
+static const int32_t DISPLAY_ID = 0;
+
+// An arbitrary injector pid / uid pair that has permission to inject events.
+static const int32_t INJECTOR_PID = 999;
+static const int32_t INJECTOR_UID = 1001;
+
+
+// --- FakeInputDispatcherPolicy ---
+
+class FakeInputDispatcherPolicy : public InputDispatcherPolicyInterface {
+    InputDispatcherConfiguration mConfig;
+
+protected:
+    virtual ~FakeInputDispatcherPolicy() {
+    }
+
+public:
+    FakeInputDispatcherPolicy() {
+    }
+
+private:
+    virtual void notifyConfigurationChanged(nsecs_t when) {
+    }
+
+    virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
+            const sp<InputWindowHandle>& inputWindowHandle,
+            const String8& reason) {
+        return 0;
+    }
+
+    virtual void notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle) {
+    }
+
+    virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) {
+        *outConfig = mConfig;
+    }
+
+    virtual bool filterInputEvent(const InputEvent* inputEvent, uint32_t policyFlags) {
+        return true;
+    }
+
+    virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags) {
+    }
+
+    virtual void interceptMotionBeforeQueueing(nsecs_t when, uint32_t& policyFlags) {
+    }
+
+    virtual nsecs_t interceptKeyBeforeDispatching(const sp<InputWindowHandle>& inputWindowHandle,
+            const KeyEvent* keyEvent, uint32_t policyFlags) {
+        return 0;
+    }
+
+    virtual bool dispatchUnhandledKey(const sp<InputWindowHandle>& inputWindowHandle,
+            const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) {
+        return false;
+    }
+
+    virtual void notifySwitch(nsecs_t when,
+            uint32_t switchValues, uint32_t switchMask, uint32_t policyFlags) {
+    }
+
+    virtual void pokeUserActivity(nsecs_t eventTime, int32_t eventType) {
+    }
+
+    virtual bool checkInjectEventsPermissionNonReentrant(
+            int32_t injectorPid, int32_t injectorUid) {
+        return false;
+    }
+};
+
+
+// --- InputDispatcherTest ---
+
+class InputDispatcherTest : public testing::Test {
+protected:
+    sp<FakeInputDispatcherPolicy> mFakePolicy;
+    sp<InputDispatcher> mDispatcher;
+
+    virtual void SetUp() {
+        mFakePolicy = new FakeInputDispatcherPolicy();
+        mDispatcher = new InputDispatcher(mFakePolicy);
+    }
+
+    virtual void TearDown() {
+        mFakePolicy.clear();
+        mDispatcher.clear();
+    }
+};
+
+
+TEST_F(InputDispatcherTest, InjectInputEvent_ValidatesKeyEvents) {
+    KeyEvent event;
+
+    // Rejects undefined key actions.
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_KEYBOARD,
+            /*action*/ -1, 0,
+            AKEYCODE_A, KEY_A, AMETA_NONE, 0, ARBITRARY_TIME, ARBITRARY_TIME);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject key events with undefined action.";
+
+    // Rejects ACTION_MULTIPLE since it is not supported despite being defined in the API.
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_KEYBOARD,
+            AKEY_EVENT_ACTION_MULTIPLE, 0,
+            AKEYCODE_A, KEY_A, AMETA_NONE, 0, ARBITRARY_TIME, ARBITRARY_TIME);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject key events with ACTION_MULTIPLE.";
+}
+
+TEST_F(InputDispatcherTest, InjectInputEvent_ValidatesMotionEvents) {
+    MotionEvent event;
+    PointerProperties pointerProperties[MAX_POINTERS + 1];
+    PointerCoords pointerCoords[MAX_POINTERS + 1];
+    for (int i = 0; i <= MAX_POINTERS; i++) {
+        pointerProperties[i].clear();
+        pointerProperties[i].id = i;
+        pointerCoords[i].clear();
+    }
+
+    // Rejects undefined motion actions.
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            /*action*/ -1, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with undefined action.";
+
+    // Rejects pointer down with invalid index.
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_POINTER_DOWN | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with pointer down index too large.";
+
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_POINTER_DOWN | (-1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with pointer down index too small.";
+
+    // Rejects pointer up with invalid index.
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_POINTER_UP | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with pointer up index too large.";
+
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_POINTER_UP | (-1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with pointer up index too small.";
+
+    // Rejects motion events with invalid number of pointers.
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_DOWN, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 0, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with 0 pointers.";
+
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_DOWN, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ MAX_POINTERS + 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with more than MAX_POINTERS pointers.";
+
+    // Rejects motion events with invalid pointer ids.
+    pointerProperties[0].id = -1;
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_DOWN, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with pointer ids less than 0.";
+
+    pointerProperties[0].id = MAX_POINTER_ID + 1;
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_DOWN, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 1, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with pointer ids greater than MAX_POINTER_ID.";
+
+    // Rejects motion events with duplicate pointer ids.
+    pointerProperties[0].id = 1;
+    pointerProperties[1].id = 1;
+    event.initialize(DEVICE_ID, AINPUT_SOURCE_TOUCHSCREEN,
+            AMOTION_EVENT_ACTION_DOWN, 0, 0, AMETA_NONE, 0, 0, 0, 0, 0,
+            ARBITRARY_TIME, ARBITRARY_TIME,
+            /*pointerCount*/ 2, pointerProperties, pointerCoords);
+    ASSERT_EQ(INPUT_EVENT_INJECTION_FAILED, mDispatcher->injectInputEvent(
+            &event, DISPLAY_ID,
+            INJECTOR_PID, INJECTOR_UID, INPUT_EVENT_INJECTION_SYNC_NONE, 0, 0))
+            << "Should reject motion events with duplicate pointer ids.";
+}
+
+} // namespace android
diff --git a/services/inputflinger/tests/InputReader_test.cpp b/services/inputflinger/tests/InputReader_test.cpp
new file mode 100644
index 0000000..c6eb1fd
--- /dev/null
+++ b/services/inputflinger/tests/InputReader_test.cpp
@@ -0,0 +1,5153 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../InputReader.h"
+
+#include <utils/List.h>
+#include <gtest/gtest.h>
+#include <math.h>
+
+namespace android {
+
+// An arbitrary time value.
+static const nsecs_t ARBITRARY_TIME = 1234;
+
+// Arbitrary display properties.
+static const int32_t DISPLAY_ID = 0;
+static const int32_t DISPLAY_WIDTH = 480;
+static const int32_t DISPLAY_HEIGHT = 800;
+
+// Error tolerance for floating point assertions.
+static const float EPSILON = 0.001f;
+
+template<typename T>
+static inline T min(T a, T b) {
+    return a < b ? a : b;
+}
+
+static inline float avg(float x, float y) {
+    return (x + y) / 2;
+}
+
+
+// --- FakePointerController ---
+
+class FakePointerController : public PointerControllerInterface {
+    bool mHaveBounds;
+    float mMinX, mMinY, mMaxX, mMaxY;
+    float mX, mY;
+    int32_t mButtonState;
+
+protected:
+    virtual ~FakePointerController() { }
+
+public:
+    FakePointerController() :
+        mHaveBounds(false), mMinX(0), mMinY(0), mMaxX(0), mMaxY(0), mX(0), mY(0),
+        mButtonState(0) {
+    }
+
+    void setBounds(float minX, float minY, float maxX, float maxY) {
+        mHaveBounds = true;
+        mMinX = minX;
+        mMinY = minY;
+        mMaxX = maxX;
+        mMaxY = maxY;
+    }
+
+    virtual void setPosition(float x, float y) {
+        mX = x;
+        mY = y;
+    }
+
+    virtual void setButtonState(int32_t buttonState) {
+        mButtonState = buttonState;
+    }
+
+    virtual int32_t getButtonState() const {
+        return mButtonState;
+    }
+
+    virtual void getPosition(float* outX, float* outY) const {
+        *outX = mX;
+        *outY = mY;
+    }
+
+private:
+    virtual bool getBounds(float* outMinX, float* outMinY, float* outMaxX, float* outMaxY) const {
+        *outMinX = mMinX;
+        *outMinY = mMinY;
+        *outMaxX = mMaxX;
+        *outMaxY = mMaxY;
+        return mHaveBounds;
+    }
+
+    virtual void move(float deltaX, float deltaY) {
+        mX += deltaX;
+        if (mX < mMinX) mX = mMinX;
+        if (mX > mMaxX) mX = mMaxX;
+        mY += deltaY;
+        if (mY < mMinY) mY = mMinY;
+        if (mY > mMaxY) mY = mMaxY;
+    }
+
+    virtual void fade(Transition transition) {
+    }
+
+    virtual void unfade(Transition transition) {
+    }
+
+    virtual void setPresentation(Presentation presentation) {
+    }
+
+    virtual void setSpots(const PointerCoords* spotCoords,
+            const uint32_t* spotIdToIndex, BitSet32 spotIdBits) {
+    }
+
+    virtual void clearSpots() {
+    }
+};
+
+
+// --- FakeInputReaderPolicy ---
+
+class FakeInputReaderPolicy : public InputReaderPolicyInterface {
+    InputReaderConfiguration mConfig;
+    KeyedVector<int32_t, sp<FakePointerController> > mPointerControllers;
+    Vector<InputDeviceInfo> mInputDevices;
+    TouchAffineTransformation transform;
+
+protected:
+    virtual ~FakeInputReaderPolicy() { }
+
+public:
+    FakeInputReaderPolicy() {
+    }
+
+    void setDisplayInfo(int32_t displayId, int32_t width, int32_t height, int32_t orientation) {
+        // Set the size of both the internal and external display at the same time.
+        bool isRotated = (orientation == DISPLAY_ORIENTATION_90
+                || orientation == DISPLAY_ORIENTATION_270);
+        DisplayViewport v;
+        v.displayId = displayId;
+        v.orientation = orientation;
+        v.logicalLeft = 0;
+        v.logicalTop = 0;
+        v.logicalRight = isRotated ? height : width;
+        v.logicalBottom = isRotated ? width : height;
+        v.physicalLeft = 0;
+        v.physicalTop = 0;
+        v.physicalRight = isRotated ? height : width;
+        v.physicalBottom = isRotated ? width : height;
+        v.deviceWidth = isRotated ? height : width;
+        v.deviceHeight = isRotated ? width : height;
+        mConfig.setDisplayInfo(false /*external*/, v);
+        mConfig.setDisplayInfo(true /*external*/, v);
+    }
+
+    void addExcludedDeviceName(const String8& deviceName) {
+        mConfig.excludedDeviceNames.push(deviceName);
+    }
+
+    void setPointerController(int32_t deviceId, const sp<FakePointerController>& controller) {
+        mPointerControllers.add(deviceId, controller);
+    }
+
+    const InputReaderConfiguration* getReaderConfiguration() const {
+        return &mConfig;
+    }
+
+    const Vector<InputDeviceInfo>& getInputDevices() const {
+        return mInputDevices;
+    }
+
+    TouchAffineTransformation getTouchAffineTransformation(const String8& inputDeviceDescriptor,
+            int32_t surfaceRotation) {
+        return transform;
+    }
+
+    void setTouchAffineTransformation(const TouchAffineTransformation t) {
+        transform = t;
+    }
+
+private:
+    virtual void getReaderConfiguration(InputReaderConfiguration* outConfig) {
+        *outConfig = mConfig;
+    }
+
+    virtual sp<PointerControllerInterface> obtainPointerController(int32_t deviceId) {
+        return mPointerControllers.valueFor(deviceId);
+    }
+
+    virtual void notifyInputDevicesChanged(const Vector<InputDeviceInfo>& inputDevices) {
+        mInputDevices = inputDevices;
+    }
+
+    virtual sp<KeyCharacterMap> getKeyboardLayoutOverlay(const InputDeviceIdentifier& identifier) {
+        return NULL;
+    }
+
+    virtual String8 getDeviceAlias(const InputDeviceIdentifier& identifier) {
+        return String8::empty();
+    }
+};
+
+
+// --- FakeInputListener ---
+
+class FakeInputListener : public InputListenerInterface {
+private:
+    List<NotifyConfigurationChangedArgs> mNotifyConfigurationChangedArgsQueue;
+    List<NotifyDeviceResetArgs> mNotifyDeviceResetArgsQueue;
+    List<NotifyKeyArgs> mNotifyKeyArgsQueue;
+    List<NotifyMotionArgs> mNotifyMotionArgsQueue;
+    List<NotifySwitchArgs> mNotifySwitchArgsQueue;
+
+protected:
+    virtual ~FakeInputListener() { }
+
+public:
+    FakeInputListener() {
+    }
+
+    void assertNotifyConfigurationChangedWasCalled(
+            NotifyConfigurationChangedArgs* outEventArgs = NULL) {
+        ASSERT_FALSE(mNotifyConfigurationChangedArgsQueue.empty())
+                << "Expected notifyConfigurationChanged() to have been called.";
+        if (outEventArgs) {
+            *outEventArgs = *mNotifyConfigurationChangedArgsQueue.begin();
+        }
+        mNotifyConfigurationChangedArgsQueue.erase(mNotifyConfigurationChangedArgsQueue.begin());
+    }
+
+    void assertNotifyDeviceResetWasCalled(
+            NotifyDeviceResetArgs* outEventArgs = NULL) {
+        ASSERT_FALSE(mNotifyDeviceResetArgsQueue.empty())
+                << "Expected notifyDeviceReset() to have been called.";
+        if (outEventArgs) {
+            *outEventArgs = *mNotifyDeviceResetArgsQueue.begin();
+        }
+        mNotifyDeviceResetArgsQueue.erase(mNotifyDeviceResetArgsQueue.begin());
+    }
+
+    void assertNotifyKeyWasCalled(NotifyKeyArgs* outEventArgs = NULL) {
+        ASSERT_FALSE(mNotifyKeyArgsQueue.empty())
+                << "Expected notifyKey() to have been called.";
+        if (outEventArgs) {
+            *outEventArgs = *mNotifyKeyArgsQueue.begin();
+        }
+        mNotifyKeyArgsQueue.erase(mNotifyKeyArgsQueue.begin());
+    }
+
+    void assertNotifyKeyWasNotCalled() {
+        ASSERT_TRUE(mNotifyKeyArgsQueue.empty())
+                << "Expected notifyKey() to not have been called.";
+    }
+
+    void assertNotifyMotionWasCalled(NotifyMotionArgs* outEventArgs = NULL) {
+        ASSERT_FALSE(mNotifyMotionArgsQueue.empty())
+                << "Expected notifyMotion() to have been called.";
+        if (outEventArgs) {
+            *outEventArgs = *mNotifyMotionArgsQueue.begin();
+        }
+        mNotifyMotionArgsQueue.erase(mNotifyMotionArgsQueue.begin());
+    }
+
+    void assertNotifyMotionWasNotCalled() {
+        ASSERT_TRUE(mNotifyMotionArgsQueue.empty())
+                << "Expected notifyMotion() to not have been called.";
+    }
+
+    void assertNotifySwitchWasCalled(NotifySwitchArgs* outEventArgs = NULL) {
+        ASSERT_FALSE(mNotifySwitchArgsQueue.empty())
+                << "Expected notifySwitch() to have been called.";
+        if (outEventArgs) {
+            *outEventArgs = *mNotifySwitchArgsQueue.begin();
+        }
+        mNotifySwitchArgsQueue.erase(mNotifySwitchArgsQueue.begin());
+    }
+
+private:
+    virtual void notifyConfigurationChanged(const NotifyConfigurationChangedArgs* args) {
+        mNotifyConfigurationChangedArgsQueue.push_back(*args);
+    }
+
+    virtual void notifyDeviceReset(const NotifyDeviceResetArgs* args) {
+        mNotifyDeviceResetArgsQueue.push_back(*args);
+    }
+
+    virtual void notifyKey(const NotifyKeyArgs* args) {
+        mNotifyKeyArgsQueue.push_back(*args);
+    }
+
+    virtual void notifyMotion(const NotifyMotionArgs* args) {
+        mNotifyMotionArgsQueue.push_back(*args);
+    }
+
+    virtual void notifySwitch(const NotifySwitchArgs* args) {
+        mNotifySwitchArgsQueue.push_back(*args);
+    }
+};
+
+
+// --- FakeEventHub ---
+
+class FakeEventHub : public EventHubInterface {
+    struct KeyInfo {
+        int32_t keyCode;
+        uint32_t flags;
+    };
+
+    struct Device {
+        InputDeviceIdentifier identifier;
+        uint32_t classes;
+        PropertyMap configuration;
+        KeyedVector<int, RawAbsoluteAxisInfo> absoluteAxes;
+        KeyedVector<int, bool> relativeAxes;
+        KeyedVector<int32_t, int32_t> keyCodeStates;
+        KeyedVector<int32_t, int32_t> scanCodeStates;
+        KeyedVector<int32_t, int32_t> switchStates;
+        KeyedVector<int32_t, int32_t> absoluteAxisValue;
+        KeyedVector<int32_t, KeyInfo> keysByScanCode;
+        KeyedVector<int32_t, KeyInfo> keysByUsageCode;
+        KeyedVector<int32_t, bool> leds;
+        Vector<VirtualKeyDefinition> virtualKeys;
+
+        Device(uint32_t classes) :
+                classes(classes) {
+        }
+    };
+
+    KeyedVector<int32_t, Device*> mDevices;
+    Vector<String8> mExcludedDevices;
+    List<RawEvent> mEvents;
+
+protected:
+    virtual ~FakeEventHub() {
+        for (size_t i = 0; i < mDevices.size(); i++) {
+            delete mDevices.valueAt(i);
+        }
+    }
+
+public:
+    FakeEventHub() { }
+
+    void addDevice(int32_t deviceId, const String8& name, uint32_t classes) {
+        Device* device = new Device(classes);
+        device->identifier.name = name;
+        mDevices.add(deviceId, device);
+
+        enqueueEvent(ARBITRARY_TIME, deviceId, EventHubInterface::DEVICE_ADDED, 0, 0);
+    }
+
+    void removeDevice(int32_t deviceId) {
+        delete mDevices.valueFor(deviceId);
+        mDevices.removeItem(deviceId);
+
+        enqueueEvent(ARBITRARY_TIME, deviceId, EventHubInterface::DEVICE_REMOVED, 0, 0);
+    }
+
+    void finishDeviceScan() {
+        enqueueEvent(ARBITRARY_TIME, 0, EventHubInterface::FINISHED_DEVICE_SCAN, 0, 0);
+    }
+
+    void addConfigurationProperty(int32_t deviceId, const String8& key, const String8& value) {
+        Device* device = getDevice(deviceId);
+        device->configuration.addProperty(key, value);
+    }
+
+    void addConfigurationMap(int32_t deviceId, const PropertyMap* configuration) {
+        Device* device = getDevice(deviceId);
+        device->configuration.addAll(configuration);
+    }
+
+    void addAbsoluteAxis(int32_t deviceId, int axis,
+            int32_t minValue, int32_t maxValue, int flat, int fuzz, int resolution = 0) {
+        Device* device = getDevice(deviceId);
+
+        RawAbsoluteAxisInfo info;
+        info.valid = true;
+        info.minValue = minValue;
+        info.maxValue = maxValue;
+        info.flat = flat;
+        info.fuzz = fuzz;
+        info.resolution = resolution;
+        device->absoluteAxes.add(axis, info);
+    }
+
+    void addRelativeAxis(int32_t deviceId, int32_t axis) {
+        Device* device = getDevice(deviceId);
+        device->relativeAxes.add(axis, true);
+    }
+
+    void setKeyCodeState(int32_t deviceId, int32_t keyCode, int32_t state) {
+        Device* device = getDevice(deviceId);
+        device->keyCodeStates.replaceValueFor(keyCode, state);
+    }
+
+    void setScanCodeState(int32_t deviceId, int32_t scanCode, int32_t state) {
+        Device* device = getDevice(deviceId);
+        device->scanCodeStates.replaceValueFor(scanCode, state);
+    }
+
+    void setSwitchState(int32_t deviceId, int32_t switchCode, int32_t state) {
+        Device* device = getDevice(deviceId);
+        device->switchStates.replaceValueFor(switchCode, state);
+    }
+
+    void setAbsoluteAxisValue(int32_t deviceId, int32_t axis, int32_t value) {
+        Device* device = getDevice(deviceId);
+        device->absoluteAxisValue.replaceValueFor(axis, value);
+    }
+
+    void addKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
+            int32_t keyCode, uint32_t flags) {
+        Device* device = getDevice(deviceId);
+        KeyInfo info;
+        info.keyCode = keyCode;
+        info.flags = flags;
+        if (scanCode) {
+            device->keysByScanCode.add(scanCode, info);
+        }
+        if (usageCode) {
+            device->keysByUsageCode.add(usageCode, info);
+        }
+    }
+
+    void addLed(int32_t deviceId, int32_t led, bool initialState) {
+        Device* device = getDevice(deviceId);
+        device->leds.add(led, initialState);
+    }
+
+    bool getLedState(int32_t deviceId, int32_t led) {
+        Device* device = getDevice(deviceId);
+        return device->leds.valueFor(led);
+    }
+
+    Vector<String8>& getExcludedDevices() {
+        return mExcludedDevices;
+    }
+
+    void addVirtualKeyDefinition(int32_t deviceId, const VirtualKeyDefinition& definition) {
+        Device* device = getDevice(deviceId);
+        device->virtualKeys.push(definition);
+    }
+
+    void enqueueEvent(nsecs_t when, int32_t deviceId, int32_t type,
+            int32_t code, int32_t value) {
+        RawEvent event;
+        event.when = when;
+        event.deviceId = deviceId;
+        event.type = type;
+        event.code = code;
+        event.value = value;
+        mEvents.push_back(event);
+
+        if (type == EV_ABS) {
+            setAbsoluteAxisValue(deviceId, code, value);
+        }
+    }
+
+    void assertQueueIsEmpty() {
+        ASSERT_EQ(size_t(0), mEvents.size())
+                << "Expected the event queue to be empty (fully consumed).";
+    }
+
+private:
+    Device* getDevice(int32_t deviceId) const {
+        ssize_t index = mDevices.indexOfKey(deviceId);
+        return index >= 0 ? mDevices.valueAt(index) : NULL;
+    }
+
+    virtual uint32_t getDeviceClasses(int32_t deviceId) const {
+        Device* device = getDevice(deviceId);
+        return device ? device->classes : 0;
+    }
+
+    virtual InputDeviceIdentifier getDeviceIdentifier(int32_t deviceId) const {
+        Device* device = getDevice(deviceId);
+        return device ? device->identifier : InputDeviceIdentifier();
+    }
+
+    virtual int32_t getDeviceControllerNumber(int32_t deviceId) const {
+        return 0;
+    }
+
+    virtual void getConfiguration(int32_t deviceId, PropertyMap* outConfiguration) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            *outConfiguration = device->configuration;
+        }
+    }
+
+    virtual status_t getAbsoluteAxisInfo(int32_t deviceId, int axis,
+            RawAbsoluteAxisInfo* outAxisInfo) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->absoluteAxes.indexOfKey(axis);
+            if (index >= 0) {
+                *outAxisInfo = device->absoluteAxes.valueAt(index);
+                return OK;
+            }
+        }
+        outAxisInfo->clear();
+        return -1;
+    }
+
+    virtual bool hasRelativeAxis(int32_t deviceId, int axis) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            return device->relativeAxes.indexOfKey(axis) >= 0;
+        }
+        return false;
+    }
+
+    virtual bool hasInputProperty(int32_t deviceId, int property) const {
+        return false;
+    }
+
+    virtual status_t mapKey(int32_t deviceId, int32_t scanCode, int32_t usageCode,
+            int32_t* outKeycode, uint32_t* outFlags) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            const KeyInfo* key = getKey(device, scanCode, usageCode);
+            if (key) {
+                if (outKeycode) {
+                    *outKeycode = key->keyCode;
+                }
+                if (outFlags) {
+                    *outFlags = key->flags;
+                }
+                return OK;
+            }
+        }
+        return NAME_NOT_FOUND;
+    }
+
+    const KeyInfo* getKey(Device* device, int32_t scanCode, int32_t usageCode) const {
+        if (usageCode) {
+            ssize_t index = device->keysByUsageCode.indexOfKey(usageCode);
+            if (index >= 0) {
+                return &device->keysByUsageCode.valueAt(index);
+            }
+        }
+        if (scanCode) {
+            ssize_t index = device->keysByScanCode.indexOfKey(scanCode);
+            if (index >= 0) {
+                return &device->keysByScanCode.valueAt(index);
+            }
+        }
+        return NULL;
+    }
+
+    virtual status_t mapAxis(int32_t deviceId, int32_t scanCode,
+            AxisInfo* outAxisInfo) const {
+        return NAME_NOT_FOUND;
+    }
+
+    virtual void setExcludedDevices(const Vector<String8>& devices) {
+        mExcludedDevices = devices;
+    }
+
+    virtual size_t getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSize) {
+        if (mEvents.empty()) {
+            return 0;
+        }
+
+        *buffer = *mEvents.begin();
+        mEvents.erase(mEvents.begin());
+        return 1;
+    }
+
+    virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->scanCodeStates.indexOfKey(scanCode);
+            if (index >= 0) {
+                return device->scanCodeStates.valueAt(index);
+            }
+        }
+        return AKEY_STATE_UNKNOWN;
+    }
+
+    virtual int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->keyCodeStates.indexOfKey(keyCode);
+            if (index >= 0) {
+                return device->keyCodeStates.valueAt(index);
+            }
+        }
+        return AKEY_STATE_UNKNOWN;
+    }
+
+    virtual int32_t getSwitchState(int32_t deviceId, int32_t sw) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->switchStates.indexOfKey(sw);
+            if (index >= 0) {
+                return device->switchStates.valueAt(index);
+            }
+        }
+        return AKEY_STATE_UNKNOWN;
+    }
+
+    virtual status_t getAbsoluteAxisValue(int32_t deviceId, int32_t axis,
+            int32_t* outValue) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->absoluteAxisValue.indexOfKey(axis);
+            if (index >= 0) {
+                *outValue = device->absoluteAxisValue.valueAt(index);
+                return OK;
+            }
+        }
+        *outValue = 0;
+        return -1;
+    }
+
+    virtual bool markSupportedKeyCodes(int32_t deviceId, size_t numCodes, const int32_t* keyCodes,
+            uint8_t* outFlags) const {
+        bool result = false;
+        Device* device = getDevice(deviceId);
+        if (device) {
+            for (size_t i = 0; i < numCodes; i++) {
+                for (size_t j = 0; j < device->keysByScanCode.size(); j++) {
+                    if (keyCodes[i] == device->keysByScanCode.valueAt(j).keyCode) {
+                        outFlags[i] = 1;
+                        result = true;
+                    }
+                }
+                for (size_t j = 0; j < device->keysByUsageCode.size(); j++) {
+                    if (keyCodes[i] == device->keysByUsageCode.valueAt(j).keyCode) {
+                        outFlags[i] = 1;
+                        result = true;
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
+    virtual bool hasScanCode(int32_t deviceId, int32_t scanCode) const {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->keysByScanCode.indexOfKey(scanCode);
+            return index >= 0;
+        }
+        return false;
+    }
+
+    virtual bool hasLed(int32_t deviceId, int32_t led) const {
+        Device* device = getDevice(deviceId);
+        return device && device->leds.indexOfKey(led) >= 0;
+    }
+
+    virtual void setLedState(int32_t deviceId, int32_t led, bool on) {
+        Device* device = getDevice(deviceId);
+        if (device) {
+            ssize_t index = device->leds.indexOfKey(led);
+            if (index >= 0) {
+                device->leds.replaceValueAt(led, on);
+            } else {
+                ADD_FAILURE()
+                        << "Attempted to set the state of an LED that the EventHub declared "
+                        "was not present.  led=" << led;
+            }
+        }
+    }
+
+    virtual void getVirtualKeyDefinitions(int32_t deviceId,
+            Vector<VirtualKeyDefinition>& outVirtualKeys) const {
+        outVirtualKeys.clear();
+
+        Device* device = getDevice(deviceId);
+        if (device) {
+            outVirtualKeys.appendVector(device->virtualKeys);
+        }
+    }
+
+    virtual sp<KeyCharacterMap> getKeyCharacterMap(int32_t deviceId) const {
+        return NULL;
+    }
+
+    virtual bool setKeyboardLayoutOverlay(int32_t deviceId, const sp<KeyCharacterMap>& map) {
+        return false;
+    }
+
+    virtual void vibrate(int32_t deviceId, nsecs_t duration) {
+    }
+
+    virtual void cancelVibrate(int32_t deviceId) {
+    }
+
+    virtual bool isExternal(int32_t deviceId) const {
+        return false;
+    }
+
+    virtual void dump(String8& dump) {
+    }
+
+    virtual void monitor() {
+    }
+
+    virtual void requestReopenDevices() {
+    }
+
+    virtual void wake() {
+    }
+};
+
+
+// --- FakeInputReaderContext ---
+
+class FakeInputReaderContext : public InputReaderContext {
+    sp<EventHubInterface> mEventHub;
+    sp<InputReaderPolicyInterface> mPolicy;
+    sp<InputListenerInterface> mListener;
+    int32_t mGlobalMetaState;
+    bool mUpdateGlobalMetaStateWasCalled;
+    int32_t mGeneration;
+
+public:
+    FakeInputReaderContext(const sp<EventHubInterface>& eventHub,
+            const sp<InputReaderPolicyInterface>& policy,
+            const sp<InputListenerInterface>& listener) :
+            mEventHub(eventHub), mPolicy(policy), mListener(listener),
+            mGlobalMetaState(0) {
+    }
+
+    virtual ~FakeInputReaderContext() { }
+
+    void assertUpdateGlobalMetaStateWasCalled() {
+        ASSERT_TRUE(mUpdateGlobalMetaStateWasCalled)
+                << "Expected updateGlobalMetaState() to have been called.";
+        mUpdateGlobalMetaStateWasCalled = false;
+    }
+
+    void setGlobalMetaState(int32_t state) {
+        mGlobalMetaState = state;
+    }
+
+private:
+    virtual void updateGlobalMetaState() {
+        mUpdateGlobalMetaStateWasCalled = true;
+    }
+
+    virtual int32_t getGlobalMetaState() {
+        return mGlobalMetaState;
+    }
+
+    virtual EventHubInterface* getEventHub() {
+        return mEventHub.get();
+    }
+
+    virtual InputReaderPolicyInterface* getPolicy() {
+        return mPolicy.get();
+    }
+
+    virtual InputListenerInterface* getListener() {
+        return mListener.get();
+    }
+
+    virtual void disableVirtualKeysUntil(nsecs_t time) {
+    }
+
+    virtual bool shouldDropVirtualKey(nsecs_t now,
+            InputDevice* device, int32_t keyCode, int32_t scanCode) {
+        return false;
+    }
+
+    virtual void fadePointer() {
+    }
+
+    virtual void requestTimeoutAtTime(nsecs_t when) {
+    }
+
+    virtual int32_t bumpGeneration() {
+        return ++mGeneration;
+    }
+};
+
+
+// --- FakeInputMapper ---
+
+class FakeInputMapper : public InputMapper {
+    uint32_t mSources;
+    int32_t mKeyboardType;
+    int32_t mMetaState;
+    KeyedVector<int32_t, int32_t> mKeyCodeStates;
+    KeyedVector<int32_t, int32_t> mScanCodeStates;
+    KeyedVector<int32_t, int32_t> mSwitchStates;
+    Vector<int32_t> mSupportedKeyCodes;
+    RawEvent mLastEvent;
+
+    bool mConfigureWasCalled;
+    bool mResetWasCalled;
+    bool mProcessWasCalled;
+
+public:
+    FakeInputMapper(InputDevice* device, uint32_t sources) :
+            InputMapper(device),
+            mSources(sources), mKeyboardType(AINPUT_KEYBOARD_TYPE_NONE),
+            mMetaState(0),
+            mConfigureWasCalled(false), mResetWasCalled(false), mProcessWasCalled(false) {
+    }
+
+    virtual ~FakeInputMapper() { }
+
+    void setKeyboardType(int32_t keyboardType) {
+        mKeyboardType = keyboardType;
+    }
+
+    void setMetaState(int32_t metaState) {
+        mMetaState = metaState;
+    }
+
+    void assertConfigureWasCalled() {
+        ASSERT_TRUE(mConfigureWasCalled)
+                << "Expected configure() to have been called.";
+        mConfigureWasCalled = false;
+    }
+
+    void assertResetWasCalled() {
+        ASSERT_TRUE(mResetWasCalled)
+                << "Expected reset() to have been called.";
+        mResetWasCalled = false;
+    }
+
+    void assertProcessWasCalled(RawEvent* outLastEvent = NULL) {
+        ASSERT_TRUE(mProcessWasCalled)
+                << "Expected process() to have been called.";
+        if (outLastEvent) {
+            *outLastEvent = mLastEvent;
+        }
+        mProcessWasCalled = false;
+    }
+
+    void setKeyCodeState(int32_t keyCode, int32_t state) {
+        mKeyCodeStates.replaceValueFor(keyCode, state);
+    }
+
+    void setScanCodeState(int32_t scanCode, int32_t state) {
+        mScanCodeStates.replaceValueFor(scanCode, state);
+    }
+
+    void setSwitchState(int32_t switchCode, int32_t state) {
+        mSwitchStates.replaceValueFor(switchCode, state);
+    }
+
+    void addSupportedKeyCode(int32_t keyCode) {
+        mSupportedKeyCodes.add(keyCode);
+    }
+
+private:
+    virtual uint32_t getSources() {
+        return mSources;
+    }
+
+    virtual void populateDeviceInfo(InputDeviceInfo* deviceInfo) {
+        InputMapper::populateDeviceInfo(deviceInfo);
+
+        if (mKeyboardType != AINPUT_KEYBOARD_TYPE_NONE) {
+            deviceInfo->setKeyboardType(mKeyboardType);
+        }
+    }
+
+    virtual void configure(nsecs_t when,
+            const InputReaderConfiguration* config, uint32_t changes) {
+        mConfigureWasCalled = true;
+    }
+
+    virtual void reset(nsecs_t when) {
+        mResetWasCalled = true;
+    }
+
+    virtual void process(const RawEvent* rawEvent) {
+        mLastEvent = *rawEvent;
+        mProcessWasCalled = true;
+    }
+
+    virtual int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode) {
+        ssize_t index = mKeyCodeStates.indexOfKey(keyCode);
+        return index >= 0 ? mKeyCodeStates.valueAt(index) : AKEY_STATE_UNKNOWN;
+    }
+
+    virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
+        ssize_t index = mScanCodeStates.indexOfKey(scanCode);
+        return index >= 0 ? mScanCodeStates.valueAt(index) : AKEY_STATE_UNKNOWN;
+    }
+
+    virtual int32_t getSwitchState(uint32_t sourceMask, int32_t switchCode) {
+        ssize_t index = mSwitchStates.indexOfKey(switchCode);
+        return index >= 0 ? mSwitchStates.valueAt(index) : AKEY_STATE_UNKNOWN;
+    }
+
+    virtual bool markSupportedKeyCodes(uint32_t sourceMask, size_t numCodes,
+            const int32_t* keyCodes, uint8_t* outFlags) {
+        bool result = false;
+        for (size_t i = 0; i < numCodes; i++) {
+            for (size_t j = 0; j < mSupportedKeyCodes.size(); j++) {
+                if (keyCodes[i] == mSupportedKeyCodes[j]) {
+                    outFlags[i] = 1;
+                    result = true;
+                }
+            }
+        }
+        return result;
+    }
+
+    virtual int32_t getMetaState() {
+        return mMetaState;
+    }
+
+    virtual void fadePointer() {
+    }
+};
+
+
+// --- InstrumentedInputReader ---
+
+class InstrumentedInputReader : public InputReader {
+    InputDevice* mNextDevice;
+
+public:
+    InstrumentedInputReader(const sp<EventHubInterface>& eventHub,
+            const sp<InputReaderPolicyInterface>& policy,
+            const sp<InputListenerInterface>& listener) :
+            InputReader(eventHub, policy, listener),
+            mNextDevice(NULL) {
+    }
+
+    virtual ~InstrumentedInputReader() {
+        if (mNextDevice) {
+            delete mNextDevice;
+        }
+    }
+
+    void setNextDevice(InputDevice* device) {
+        mNextDevice = device;
+    }
+
+    InputDevice* newDevice(int32_t deviceId, int32_t controllerNumber, const String8& name,
+            uint32_t classes) {
+        InputDeviceIdentifier identifier;
+        identifier.name = name;
+        int32_t generation = deviceId + 1;
+        return new InputDevice(&mContext, deviceId, generation, controllerNumber, identifier,
+                classes);
+    }
+
+protected:
+    virtual InputDevice* createDeviceLocked(int32_t deviceId, int32_t controllerNumber,
+            const InputDeviceIdentifier& identifier, uint32_t classes) {
+        if (mNextDevice) {
+            InputDevice* device = mNextDevice;
+            mNextDevice = NULL;
+            return device;
+        }
+        return InputReader::createDeviceLocked(deviceId, controllerNumber, identifier, classes);
+    }
+
+    friend class InputReaderTest;
+};
+
+
+// --- InputReaderTest ---
+
+class InputReaderTest : public testing::Test {
+protected:
+    sp<FakeInputListener> mFakeListener;
+    sp<FakeInputReaderPolicy> mFakePolicy;
+    sp<FakeEventHub> mFakeEventHub;
+    sp<InstrumentedInputReader> mReader;
+
+    virtual void SetUp() {
+        mFakeEventHub = new FakeEventHub();
+        mFakePolicy = new FakeInputReaderPolicy();
+        mFakeListener = new FakeInputListener();
+
+        mReader = new InstrumentedInputReader(mFakeEventHub, mFakePolicy, mFakeListener);
+    }
+
+    virtual void TearDown() {
+        mReader.clear();
+
+        mFakeListener.clear();
+        mFakePolicy.clear();
+        mFakeEventHub.clear();
+    }
+
+    void addDevice(int32_t deviceId, const String8& name, uint32_t classes,
+            const PropertyMap* configuration) {
+        mFakeEventHub->addDevice(deviceId, name, classes);
+
+        if (configuration) {
+            mFakeEventHub->addConfigurationMap(deviceId, configuration);
+        }
+        mFakeEventHub->finishDeviceScan();
+        mReader->loopOnce();
+        mReader->loopOnce();
+        mFakeEventHub->assertQueueIsEmpty();
+    }
+
+    FakeInputMapper* addDeviceWithFakeInputMapper(int32_t deviceId, int32_t controllerNumber,
+            const String8& name, uint32_t classes, uint32_t sources,
+            const PropertyMap* configuration) {
+        InputDevice* device = mReader->newDevice(deviceId, controllerNumber, name, classes);
+        FakeInputMapper* mapper = new FakeInputMapper(device, sources);
+        device->addMapper(mapper);
+        mReader->setNextDevice(device);
+        addDevice(deviceId, name, classes, configuration);
+        return mapper;
+    }
+};
+
+TEST_F(InputReaderTest, GetInputDevices) {
+    ASSERT_NO_FATAL_FAILURE(addDevice(1, String8("keyboard"),
+            INPUT_DEVICE_CLASS_KEYBOARD, NULL));
+    ASSERT_NO_FATAL_FAILURE(addDevice(2, String8("ignored"),
+            0, NULL)); // no classes so device will be ignored
+
+    Vector<InputDeviceInfo> inputDevices;
+    mReader->getInputDevices(inputDevices);
+
+    ASSERT_EQ(1U, inputDevices.size());
+    ASSERT_EQ(1, inputDevices[0].getId());
+    ASSERT_STREQ("keyboard", inputDevices[0].getIdentifier().name.string());
+    ASSERT_EQ(AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC, inputDevices[0].getKeyboardType());
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, inputDevices[0].getSources());
+    ASSERT_EQ(size_t(0), inputDevices[0].getMotionRanges().size());
+
+    // Should also have received a notification describing the new input devices.
+    inputDevices = mFakePolicy->getInputDevices();
+    ASSERT_EQ(1U, inputDevices.size());
+    ASSERT_EQ(1, inputDevices[0].getId());
+    ASSERT_STREQ("keyboard", inputDevices[0].getIdentifier().name.string());
+    ASSERT_EQ(AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC, inputDevices[0].getKeyboardType());
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, inputDevices[0].getSources());
+    ASSERT_EQ(size_t(0), inputDevices[0].getMotionRanges().size());
+}
+
+TEST_F(InputReaderTest, GetKeyCodeState_ForwardsRequestsToMappers) {
+    FakeInputMapper* mapper = NULL;
+    ASSERT_NO_FATAL_FAILURE(mapper = addDeviceWithFakeInputMapper(1, 0, String8("fake"),
+            INPUT_DEVICE_CLASS_KEYBOARD, AINPUT_SOURCE_KEYBOARD, NULL));
+    mapper->setKeyCodeState(AKEYCODE_A, AKEY_STATE_DOWN);
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getKeyCodeState(0,
+            AINPUT_SOURCE_ANY, AKEYCODE_A))
+            << "Should return unknown when the device id is >= 0 but unknown.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getKeyCodeState(1,
+            AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return unknown when the device id is valid but the sources are not supported by the device.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mReader->getKeyCodeState(1,
+            AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return value provided by mapper when device id is valid and the device supports some of the sources.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getKeyCodeState(-1,
+            AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return unknown when the device id is < 0 but the sources are not supported by any device.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mReader->getKeyCodeState(-1,
+            AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return value provided by mapper when device id is < 0 and one of the devices supports some of the sources.";
+}
+
+TEST_F(InputReaderTest, GetScanCodeState_ForwardsRequestsToMappers) {
+    FakeInputMapper* mapper = NULL;
+    ASSERT_NO_FATAL_FAILURE(mapper = addDeviceWithFakeInputMapper(1, 0, String8("fake"),
+            INPUT_DEVICE_CLASS_KEYBOARD, AINPUT_SOURCE_KEYBOARD, NULL));
+    mapper->setScanCodeState(KEY_A, AKEY_STATE_DOWN);
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getScanCodeState(0,
+            AINPUT_SOURCE_ANY, KEY_A))
+            << "Should return unknown when the device id is >= 0 but unknown.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getScanCodeState(1,
+            AINPUT_SOURCE_TRACKBALL, KEY_A))
+            << "Should return unknown when the device id is valid but the sources are not supported by the device.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mReader->getScanCodeState(1,
+            AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, KEY_A))
+            << "Should return value provided by mapper when device id is valid and the device supports some of the sources.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getScanCodeState(-1,
+            AINPUT_SOURCE_TRACKBALL, KEY_A))
+            << "Should return unknown when the device id is < 0 but the sources are not supported by any device.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mReader->getScanCodeState(-1,
+            AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, KEY_A))
+            << "Should return value provided by mapper when device id is < 0 and one of the devices supports some of the sources.";
+}
+
+TEST_F(InputReaderTest, GetSwitchState_ForwardsRequestsToMappers) {
+    FakeInputMapper* mapper = NULL;
+    ASSERT_NO_FATAL_FAILURE(mapper = addDeviceWithFakeInputMapper(1, 0, String8("fake"),
+            INPUT_DEVICE_CLASS_KEYBOARD, AINPUT_SOURCE_KEYBOARD, NULL));
+    mapper->setSwitchState(SW_LID, AKEY_STATE_DOWN);
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getSwitchState(0,
+            AINPUT_SOURCE_ANY, SW_LID))
+            << "Should return unknown when the device id is >= 0 but unknown.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getSwitchState(1,
+            AINPUT_SOURCE_TRACKBALL, SW_LID))
+            << "Should return unknown when the device id is valid but the sources are not supported by the device.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mReader->getSwitchState(1,
+            AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, SW_LID))
+            << "Should return value provided by mapper when device id is valid and the device supports some of the sources.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mReader->getSwitchState(-1,
+            AINPUT_SOURCE_TRACKBALL, SW_LID))
+            << "Should return unknown when the device id is < 0 but the sources are not supported by any device.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mReader->getSwitchState(-1,
+            AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, SW_LID))
+            << "Should return value provided by mapper when device id is < 0 and one of the devices supports some of the sources.";
+}
+
+TEST_F(InputReaderTest, MarkSupportedKeyCodes_ForwardsRequestsToMappers) {
+    FakeInputMapper* mapper = NULL;
+    ASSERT_NO_FATAL_FAILURE(mapper = addDeviceWithFakeInputMapper(1, 0, String8("fake"),
+            INPUT_DEVICE_CLASS_KEYBOARD, AINPUT_SOURCE_KEYBOARD, NULL));
+    mapper->addSupportedKeyCode(AKEYCODE_A);
+    mapper->addSupportedKeyCode(AKEYCODE_B);
+
+    const int32_t keyCodes[4] = { AKEYCODE_A, AKEYCODE_B, AKEYCODE_1, AKEYCODE_2 };
+    uint8_t flags[4] = { 0, 0, 0, 1 };
+
+    ASSERT_FALSE(mReader->hasKeys(0, AINPUT_SOURCE_ANY, 4, keyCodes, flags))
+            << "Should return false when device id is >= 0 but unknown.";
+    ASSERT_TRUE(!flags[0] && !flags[1] && !flags[2] && !flags[3]);
+
+    flags[3] = 1;
+    ASSERT_FALSE(mReader->hasKeys(1, AINPUT_SOURCE_TRACKBALL, 4, keyCodes, flags))
+            << "Should return false when device id is valid but the sources are not supported by the device.";
+    ASSERT_TRUE(!flags[0] && !flags[1] && !flags[2] && !flags[3]);
+
+    flags[3] = 1;
+    ASSERT_TRUE(mReader->hasKeys(1, AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, 4, keyCodes, flags))
+            << "Should return value provided by mapper when device id is valid and the device supports some of the sources.";
+    ASSERT_TRUE(flags[0] && flags[1] && !flags[2] && !flags[3]);
+
+    flags[3] = 1;
+    ASSERT_FALSE(mReader->hasKeys(-1, AINPUT_SOURCE_TRACKBALL, 4, keyCodes, flags))
+            << "Should return false when the device id is < 0 but the sources are not supported by any device.";
+    ASSERT_TRUE(!flags[0] && !flags[1] && !flags[2] && !flags[3]);
+
+    flags[3] = 1;
+    ASSERT_TRUE(mReader->hasKeys(-1, AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TRACKBALL, 4, keyCodes, flags))
+            << "Should return value provided by mapper when device id is < 0 and one of the devices supports some of the sources.";
+    ASSERT_TRUE(flags[0] && flags[1] && !flags[2] && !flags[3]);
+}
+
+TEST_F(InputReaderTest, LoopOnce_WhenDeviceScanFinished_SendsConfigurationChanged) {
+    addDevice(1, String8("ignored"), INPUT_DEVICE_CLASS_KEYBOARD, NULL);
+
+    NotifyConfigurationChangedArgs args;
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyConfigurationChangedWasCalled(&args));
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+}
+
+TEST_F(InputReaderTest, LoopOnce_ForwardsRawEventsToMappers) {
+    FakeInputMapper* mapper = NULL;
+    ASSERT_NO_FATAL_FAILURE(mapper = addDeviceWithFakeInputMapper(1, 0, String8("fake"),
+            INPUT_DEVICE_CLASS_KEYBOARD, AINPUT_SOURCE_KEYBOARD, NULL));
+
+    mFakeEventHub->enqueueEvent(0, 1, EV_KEY, KEY_A, 1);
+    mReader->loopOnce();
+    ASSERT_NO_FATAL_FAILURE(mFakeEventHub->assertQueueIsEmpty());
+
+    RawEvent event;
+    ASSERT_NO_FATAL_FAILURE(mapper->assertProcessWasCalled(&event));
+    ASSERT_EQ(0, event.when);
+    ASSERT_EQ(1, event.deviceId);
+    ASSERT_EQ(EV_KEY, event.type);
+    ASSERT_EQ(KEY_A, event.code);
+    ASSERT_EQ(1, event.value);
+}
+
+
+// --- InputDeviceTest ---
+
+class InputDeviceTest : public testing::Test {
+protected:
+    static const char* DEVICE_NAME;
+    static const int32_t DEVICE_ID;
+    static const int32_t DEVICE_GENERATION;
+    static const int32_t DEVICE_CONTROLLER_NUMBER;
+    static const uint32_t DEVICE_CLASSES;
+
+    sp<FakeEventHub> mFakeEventHub;
+    sp<FakeInputReaderPolicy> mFakePolicy;
+    sp<FakeInputListener> mFakeListener;
+    FakeInputReaderContext* mFakeContext;
+
+    InputDevice* mDevice;
+
+    virtual void SetUp() {
+        mFakeEventHub = new FakeEventHub();
+        mFakePolicy = new FakeInputReaderPolicy();
+        mFakeListener = new FakeInputListener();
+        mFakeContext = new FakeInputReaderContext(mFakeEventHub, mFakePolicy, mFakeListener);
+
+        mFakeEventHub->addDevice(DEVICE_ID, String8(DEVICE_NAME), 0);
+        InputDeviceIdentifier identifier;
+        identifier.name = DEVICE_NAME;
+        mDevice = new InputDevice(mFakeContext, DEVICE_ID, DEVICE_GENERATION,
+                DEVICE_CONTROLLER_NUMBER, identifier, DEVICE_CLASSES);
+    }
+
+    virtual void TearDown() {
+        delete mDevice;
+
+        delete mFakeContext;
+        mFakeListener.clear();
+        mFakePolicy.clear();
+        mFakeEventHub.clear();
+    }
+};
+
+const char* InputDeviceTest::DEVICE_NAME = "device";
+const int32_t InputDeviceTest::DEVICE_ID = 1;
+const int32_t InputDeviceTest::DEVICE_GENERATION = 2;
+const int32_t InputDeviceTest::DEVICE_CONTROLLER_NUMBER = 0;
+const uint32_t InputDeviceTest::DEVICE_CLASSES = INPUT_DEVICE_CLASS_KEYBOARD
+        | INPUT_DEVICE_CLASS_TOUCH | INPUT_DEVICE_CLASS_JOYSTICK;
+
+TEST_F(InputDeviceTest, ImmutableProperties) {
+    ASSERT_EQ(DEVICE_ID, mDevice->getId());
+    ASSERT_STREQ(DEVICE_NAME, mDevice->getName());
+    ASSERT_EQ(DEVICE_CLASSES, mDevice->getClasses());
+}
+
+TEST_F(InputDeviceTest, WhenNoMappersAreRegistered_DeviceIsIgnored) {
+    // Configuration.
+    InputReaderConfiguration config;
+    mDevice->configure(ARBITRARY_TIME, &config, 0);
+
+    // Reset.
+    mDevice->reset(ARBITRARY_TIME);
+
+    NotifyDeviceResetArgs resetArgs;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyDeviceResetWasCalled(&resetArgs));
+    ASSERT_EQ(ARBITRARY_TIME, resetArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, resetArgs.deviceId);
+
+    // Metadata.
+    ASSERT_TRUE(mDevice->isIgnored());
+    ASSERT_EQ(AINPUT_SOURCE_UNKNOWN, mDevice->getSources());
+
+    InputDeviceInfo info;
+    mDevice->getDeviceInfo(&info);
+    ASSERT_EQ(DEVICE_ID, info.getId());
+    ASSERT_STREQ(DEVICE_NAME, info.getIdentifier().name.string());
+    ASSERT_EQ(AINPUT_KEYBOARD_TYPE_NONE, info.getKeyboardType());
+    ASSERT_EQ(AINPUT_SOURCE_UNKNOWN, info.getSources());
+
+    // State queries.
+    ASSERT_EQ(0, mDevice->getMetaState());
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mDevice->getKeyCodeState(AINPUT_SOURCE_KEYBOARD, 0))
+            << "Ignored device should return unknown key code state.";
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mDevice->getScanCodeState(AINPUT_SOURCE_KEYBOARD, 0))
+            << "Ignored device should return unknown scan code state.";
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mDevice->getSwitchState(AINPUT_SOURCE_KEYBOARD, 0))
+            << "Ignored device should return unknown switch state.";
+
+    const int32_t keyCodes[2] = { AKEYCODE_A, AKEYCODE_B };
+    uint8_t flags[2] = { 0, 1 };
+    ASSERT_FALSE(mDevice->markSupportedKeyCodes(AINPUT_SOURCE_KEYBOARD, 2, keyCodes, flags))
+            << "Ignored device should never mark any key codes.";
+    ASSERT_EQ(0, flags[0]) << "Flag for unsupported key should be unchanged.";
+    ASSERT_EQ(1, flags[1]) << "Flag for unsupported key should be unchanged.";
+}
+
+TEST_F(InputDeviceTest, WhenMappersAreRegistered_DeviceIsNotIgnoredAndForwardsRequestsToMappers) {
+    // Configuration.
+    mFakeEventHub->addConfigurationProperty(DEVICE_ID, String8("key"), String8("value"));
+
+    FakeInputMapper* mapper1 = new FakeInputMapper(mDevice, AINPUT_SOURCE_KEYBOARD);
+    mapper1->setKeyboardType(AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    mapper1->setMetaState(AMETA_ALT_ON);
+    mapper1->addSupportedKeyCode(AKEYCODE_A);
+    mapper1->addSupportedKeyCode(AKEYCODE_B);
+    mapper1->setKeyCodeState(AKEYCODE_A, AKEY_STATE_DOWN);
+    mapper1->setKeyCodeState(AKEYCODE_B, AKEY_STATE_UP);
+    mapper1->setScanCodeState(2, AKEY_STATE_DOWN);
+    mapper1->setScanCodeState(3, AKEY_STATE_UP);
+    mapper1->setSwitchState(4, AKEY_STATE_DOWN);
+    mDevice->addMapper(mapper1);
+
+    FakeInputMapper* mapper2 = new FakeInputMapper(mDevice, AINPUT_SOURCE_TOUCHSCREEN);
+    mapper2->setMetaState(AMETA_SHIFT_ON);
+    mDevice->addMapper(mapper2);
+
+    InputReaderConfiguration config;
+    mDevice->configure(ARBITRARY_TIME, &config, 0);
+
+    String8 propertyValue;
+    ASSERT_TRUE(mDevice->getConfiguration().tryGetProperty(String8("key"), propertyValue))
+            << "Device should have read configuration during configuration phase.";
+    ASSERT_STREQ("value", propertyValue.string());
+
+    ASSERT_NO_FATAL_FAILURE(mapper1->assertConfigureWasCalled());
+    ASSERT_NO_FATAL_FAILURE(mapper2->assertConfigureWasCalled());
+
+    // Reset
+    mDevice->reset(ARBITRARY_TIME);
+    ASSERT_NO_FATAL_FAILURE(mapper1->assertResetWasCalled());
+    ASSERT_NO_FATAL_FAILURE(mapper2->assertResetWasCalled());
+
+    NotifyDeviceResetArgs resetArgs;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyDeviceResetWasCalled(&resetArgs));
+    ASSERT_EQ(ARBITRARY_TIME, resetArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, resetArgs.deviceId);
+
+    // Metadata.
+    ASSERT_FALSE(mDevice->isIgnored());
+    ASSERT_EQ(uint32_t(AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TOUCHSCREEN), mDevice->getSources());
+
+    InputDeviceInfo info;
+    mDevice->getDeviceInfo(&info);
+    ASSERT_EQ(DEVICE_ID, info.getId());
+    ASSERT_STREQ(DEVICE_NAME, info.getIdentifier().name.string());
+    ASSERT_EQ(AINPUT_KEYBOARD_TYPE_ALPHABETIC, info.getKeyboardType());
+    ASSERT_EQ(uint32_t(AINPUT_SOURCE_KEYBOARD | AINPUT_SOURCE_TOUCHSCREEN), info.getSources());
+
+    // State queries.
+    ASSERT_EQ(AMETA_ALT_ON | AMETA_SHIFT_ON, mDevice->getMetaState())
+            << "Should query mappers and combine meta states.";
+
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mDevice->getKeyCodeState(AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return unknown key code state when source not supported.";
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mDevice->getScanCodeState(AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return unknown scan code state when source not supported.";
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mDevice->getSwitchState(AINPUT_SOURCE_TRACKBALL, AKEYCODE_A))
+            << "Should return unknown switch state when source not supported.";
+
+    ASSERT_EQ(AKEY_STATE_DOWN, mDevice->getKeyCodeState(AINPUT_SOURCE_KEYBOARD, AKEYCODE_A))
+            << "Should query mapper when source is supported.";
+    ASSERT_EQ(AKEY_STATE_UP, mDevice->getScanCodeState(AINPUT_SOURCE_KEYBOARD, 3))
+            << "Should query mapper when source is supported.";
+    ASSERT_EQ(AKEY_STATE_DOWN, mDevice->getSwitchState(AINPUT_SOURCE_KEYBOARD, 4))
+            << "Should query mapper when source is supported.";
+
+    const int32_t keyCodes[4] = { AKEYCODE_A, AKEYCODE_B, AKEYCODE_1, AKEYCODE_2 };
+    uint8_t flags[4] = { 0, 0, 0, 1 };
+    ASSERT_FALSE(mDevice->markSupportedKeyCodes(AINPUT_SOURCE_TRACKBALL, 4, keyCodes, flags))
+            << "Should do nothing when source is unsupported.";
+    ASSERT_EQ(0, flags[0]) << "Flag should be unchanged when source is unsupported.";
+    ASSERT_EQ(0, flags[1]) << "Flag should be unchanged when source is unsupported.";
+    ASSERT_EQ(0, flags[2]) << "Flag should be unchanged when source is unsupported.";
+    ASSERT_EQ(1, flags[3]) << "Flag should be unchanged when source is unsupported.";
+
+    ASSERT_TRUE(mDevice->markSupportedKeyCodes(AINPUT_SOURCE_KEYBOARD, 4, keyCodes, flags))
+            << "Should query mapper when source is supported.";
+    ASSERT_EQ(1, flags[0]) << "Flag for supported key should be set.";
+    ASSERT_EQ(1, flags[1]) << "Flag for supported key should be set.";
+    ASSERT_EQ(0, flags[2]) << "Flag for unsupported key should be unchanged.";
+    ASSERT_EQ(1, flags[3]) << "Flag for unsupported key should be unchanged.";
+
+    // Event handling.
+    RawEvent event;
+    mDevice->process(&event, 1);
+
+    ASSERT_NO_FATAL_FAILURE(mapper1->assertProcessWasCalled());
+    ASSERT_NO_FATAL_FAILURE(mapper2->assertProcessWasCalled());
+}
+
+
+// --- InputMapperTest ---
+
+class InputMapperTest : public testing::Test {
+protected:
+    static const char* DEVICE_NAME;
+    static const int32_t DEVICE_ID;
+    static const int32_t DEVICE_GENERATION;
+    static const int32_t DEVICE_CONTROLLER_NUMBER;
+    static const uint32_t DEVICE_CLASSES;
+
+    sp<FakeEventHub> mFakeEventHub;
+    sp<FakeInputReaderPolicy> mFakePolicy;
+    sp<FakeInputListener> mFakeListener;
+    FakeInputReaderContext* mFakeContext;
+    InputDevice* mDevice;
+
+    virtual void SetUp() {
+        mFakeEventHub = new FakeEventHub();
+        mFakePolicy = new FakeInputReaderPolicy();
+        mFakeListener = new FakeInputListener();
+        mFakeContext = new FakeInputReaderContext(mFakeEventHub, mFakePolicy, mFakeListener);
+        InputDeviceIdentifier identifier;
+        identifier.name = DEVICE_NAME;
+        mDevice = new InputDevice(mFakeContext, DEVICE_ID, DEVICE_GENERATION,
+                DEVICE_CONTROLLER_NUMBER, identifier, DEVICE_CLASSES);
+
+        mFakeEventHub->addDevice(DEVICE_ID, String8(DEVICE_NAME), 0);
+    }
+
+    virtual void TearDown() {
+        delete mDevice;
+        delete mFakeContext;
+        mFakeListener.clear();
+        mFakePolicy.clear();
+        mFakeEventHub.clear();
+    }
+
+    void addConfigurationProperty(const char* key, const char* value) {
+        mFakeEventHub->addConfigurationProperty(DEVICE_ID, String8(key), String8(value));
+    }
+
+    void addMapperAndConfigure(InputMapper* mapper) {
+        mDevice->addMapper(mapper);
+        mDevice->configure(ARBITRARY_TIME, mFakePolicy->getReaderConfiguration(), 0);
+        mDevice->reset(ARBITRARY_TIME);
+    }
+
+    void setDisplayInfoAndReconfigure(int32_t displayId, int32_t width, int32_t height,
+            int32_t orientation) {
+        mFakePolicy->setDisplayInfo(displayId, width, height, orientation);
+        mDevice->configure(ARBITRARY_TIME, mFakePolicy->getReaderConfiguration(),
+                InputReaderConfiguration::CHANGE_DISPLAY_INFO);
+    }
+
+    static void process(InputMapper* mapper, nsecs_t when, int32_t deviceId, int32_t type,
+            int32_t code, int32_t value) {
+        RawEvent event;
+        event.when = when;
+        event.deviceId = deviceId;
+        event.type = type;
+        event.code = code;
+        event.value = value;
+        mapper->process(&event);
+    }
+
+    static void assertMotionRange(const InputDeviceInfo& info,
+            int32_t axis, uint32_t source, float min, float max, float flat, float fuzz) {
+        const InputDeviceInfo::MotionRange* range = info.getMotionRange(axis, source);
+        ASSERT_TRUE(range != NULL) << "Axis: " << axis << " Source: " << source;
+        ASSERT_EQ(axis, range->axis) << "Axis: " << axis << " Source: " << source;
+        ASSERT_EQ(source, range->source) << "Axis: " << axis << " Source: " << source;
+        ASSERT_NEAR(min, range->min, EPSILON) << "Axis: " << axis << " Source: " << source;
+        ASSERT_NEAR(max, range->max, EPSILON) << "Axis: " << axis << " Source: " << source;
+        ASSERT_NEAR(flat, range->flat, EPSILON) << "Axis: " << axis << " Source: " << source;
+        ASSERT_NEAR(fuzz, range->fuzz, EPSILON) << "Axis: " << axis << " Source: " << source;
+    }
+
+    static void assertPointerCoords(const PointerCoords& coords,
+            float x, float y, float pressure, float size,
+            float touchMajor, float touchMinor, float toolMajor, float toolMinor,
+            float orientation, float distance) {
+        ASSERT_NEAR(x, coords.getAxisValue(AMOTION_EVENT_AXIS_X), 1);
+        ASSERT_NEAR(y, coords.getAxisValue(AMOTION_EVENT_AXIS_Y), 1);
+        ASSERT_NEAR(pressure, coords.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE), EPSILON);
+        ASSERT_NEAR(size, coords.getAxisValue(AMOTION_EVENT_AXIS_SIZE), EPSILON);
+        ASSERT_NEAR(touchMajor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR), 1);
+        ASSERT_NEAR(touchMinor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR), 1);
+        ASSERT_NEAR(toolMajor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR), 1);
+        ASSERT_NEAR(toolMinor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR), 1);
+        ASSERT_NEAR(orientation, coords.getAxisValue(AMOTION_EVENT_AXIS_ORIENTATION), EPSILON);
+        ASSERT_NEAR(distance, coords.getAxisValue(AMOTION_EVENT_AXIS_DISTANCE), EPSILON);
+    }
+
+    static void assertPosition(const sp<FakePointerController>& controller, float x, float y) {
+        float actualX, actualY;
+        controller->getPosition(&actualX, &actualY);
+        ASSERT_NEAR(x, actualX, 1);
+        ASSERT_NEAR(y, actualY, 1);
+    }
+};
+
+const char* InputMapperTest::DEVICE_NAME = "device";
+const int32_t InputMapperTest::DEVICE_ID = 1;
+const int32_t InputMapperTest::DEVICE_GENERATION = 2;
+const int32_t InputMapperTest::DEVICE_CONTROLLER_NUMBER = 0;
+const uint32_t InputMapperTest::DEVICE_CLASSES = 0; // not needed for current tests
+
+
+// --- SwitchInputMapperTest ---
+
+class SwitchInputMapperTest : public InputMapperTest {
+protected:
+};
+
+TEST_F(SwitchInputMapperTest, GetSources) {
+    SwitchInputMapper* mapper = new SwitchInputMapper(mDevice);
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(uint32_t(AINPUT_SOURCE_SWITCH), mapper->getSources());
+}
+
+TEST_F(SwitchInputMapperTest, GetSwitchState) {
+    SwitchInputMapper* mapper = new SwitchInputMapper(mDevice);
+    addMapperAndConfigure(mapper);
+
+    mFakeEventHub->setSwitchState(DEVICE_ID, SW_LID, 1);
+    ASSERT_EQ(1, mapper->getSwitchState(AINPUT_SOURCE_ANY, SW_LID));
+
+    mFakeEventHub->setSwitchState(DEVICE_ID, SW_LID, 0);
+    ASSERT_EQ(0, mapper->getSwitchState(AINPUT_SOURCE_ANY, SW_LID));
+}
+
+TEST_F(SwitchInputMapperTest, Process) {
+    SwitchInputMapper* mapper = new SwitchInputMapper(mDevice);
+    addMapperAndConfigure(mapper);
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SW, SW_LID, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SW, SW_JACK_PHYSICAL_INSERT, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SW, SW_HEADPHONE_INSERT, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+
+    NotifySwitchArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifySwitchWasCalled(&args));
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ((1 << SW_LID) | (1 << SW_JACK_PHYSICAL_INSERT), args.switchValues);
+    ASSERT_EQ((1 << SW_LID) | (1 << SW_JACK_PHYSICAL_INSERT) | (1 << SW_HEADPHONE_INSERT),
+            args.switchMask);
+    ASSERT_EQ(uint32_t(0), args.policyFlags);
+}
+
+
+// --- KeyboardInputMapperTest ---
+
+class KeyboardInputMapperTest : public InputMapperTest {
+protected:
+    void testDPadKeyRotation(KeyboardInputMapper* mapper,
+            int32_t originalScanCode, int32_t originalKeyCode, int32_t rotatedKeyCode);
+};
+
+void KeyboardInputMapperTest::testDPadKeyRotation(KeyboardInputMapper* mapper,
+        int32_t originalScanCode, int32_t originalKeyCode, int32_t rotatedKeyCode) {
+    NotifyKeyArgs args;
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, originalScanCode, 1);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(originalScanCode, args.scanCode);
+    ASSERT_EQ(rotatedKeyCode, args.keyCode);
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, originalScanCode, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(originalScanCode, args.scanCode);
+    ASSERT_EQ(rotatedKeyCode, args.keyCode);
+}
+
+
+TEST_F(KeyboardInputMapperTest, GetSources) {
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, mapper->getSources());
+}
+
+TEST_F(KeyboardInputMapperTest, Process_SimpleKeyPress) {
+    const int32_t USAGE_A = 0x070004;
+    const int32_t USAGE_UNKNOWN = 0x07ffff;
+    mFakeEventHub->addKey(DEVICE_ID, KEY_HOME, 0, AKEYCODE_HOME, POLICY_FLAG_WAKE);
+    mFakeEventHub->addKey(DEVICE_ID, 0, USAGE_A, AKEYCODE_A, POLICY_FLAG_WAKE);
+
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    // Key down by scan code.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_HOME, 1);
+    NotifyKeyArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(AKEYCODE_HOME, args.keyCode);
+    ASSERT_EQ(KEY_HOME, args.scanCode);
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, args.flags);
+    ASSERT_EQ(POLICY_FLAG_WAKE, args.policyFlags);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Key up by scan code.
+    process(mapper, ARBITRARY_TIME + 1, DEVICE_ID,
+            EV_KEY, KEY_HOME, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(ARBITRARY_TIME + 1, args.eventTime);
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(AKEYCODE_HOME, args.keyCode);
+    ASSERT_EQ(KEY_HOME, args.scanCode);
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, args.flags);
+    ASSERT_EQ(POLICY_FLAG_WAKE, args.policyFlags);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Key down by usage code.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_MSC, MSC_SCAN, USAGE_A);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, 0, 1);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(AKEYCODE_A, args.keyCode);
+    ASSERT_EQ(0, args.scanCode);
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, args.flags);
+    ASSERT_EQ(POLICY_FLAG_WAKE, args.policyFlags);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Key up by usage code.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_MSC, MSC_SCAN, USAGE_A);
+    process(mapper, ARBITRARY_TIME + 1, DEVICE_ID,
+            EV_KEY, 0, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(ARBITRARY_TIME + 1, args.eventTime);
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(AKEYCODE_A, args.keyCode);
+    ASSERT_EQ(0, args.scanCode);
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, args.flags);
+    ASSERT_EQ(POLICY_FLAG_WAKE, args.policyFlags);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Key down with unknown scan code or usage code.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_MSC, MSC_SCAN, USAGE_UNKNOWN);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_UNKNOWN, 1);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(0, args.keyCode);
+    ASSERT_EQ(KEY_UNKNOWN, args.scanCode);
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, args.flags);
+    ASSERT_EQ(0U, args.policyFlags);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Key up with unknown scan code or usage code.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_MSC, MSC_SCAN, USAGE_UNKNOWN);
+    process(mapper, ARBITRARY_TIME + 1, DEVICE_ID,
+            EV_KEY, KEY_UNKNOWN, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(ARBITRARY_TIME + 1, args.eventTime);
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(0, args.keyCode);
+    ASSERT_EQ(KEY_UNKNOWN, args.scanCode);
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, args.flags);
+    ASSERT_EQ(0U, args.policyFlags);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+}
+
+TEST_F(KeyboardInputMapperTest, Process_ShouldUpdateMetaState) {
+    mFakeEventHub->addKey(DEVICE_ID, KEY_LEFTSHIFT, 0, AKEYCODE_SHIFT_LEFT, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_A, 0, AKEYCODE_A, 0);
+
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    // Initial metastate.
+    ASSERT_EQ(AMETA_NONE, mapper->getMetaState());
+
+    // Metakey down.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_LEFTSHIFT, 1);
+    NotifyKeyArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper->getMetaState());
+    ASSERT_NO_FATAL_FAILURE(mFakeContext->assertUpdateGlobalMetaStateWasCalled());
+
+    // Key down.
+    process(mapper, ARBITRARY_TIME + 1, DEVICE_ID,
+            EV_KEY, KEY_A, 1);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper->getMetaState());
+
+    // Key up.
+    process(mapper, ARBITRARY_TIME + 2, DEVICE_ID,
+            EV_KEY, KEY_A, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, mapper->getMetaState());
+
+    // Metakey up.
+    process(mapper, ARBITRARY_TIME + 3, DEVICE_ID,
+            EV_KEY, KEY_LEFTSHIFT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AMETA_NONE, args.metaState);
+    ASSERT_EQ(AMETA_NONE, mapper->getMetaState());
+    ASSERT_NO_FATAL_FAILURE(mFakeContext->assertUpdateGlobalMetaStateWasCalled());
+}
+
+TEST_F(KeyboardInputMapperTest, Process_WhenNotOrientationAware_ShouldNotRotateDPad) {
+    mFakeEventHub->addKey(DEVICE_ID, KEY_UP, 0, AKEYCODE_DPAD_UP, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_RIGHT, 0, AKEYCODE_DPAD_RIGHT, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_DOWN, 0, AKEYCODE_DPAD_DOWN, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_LEFT, 0, AKEYCODE_DPAD_LEFT, 0);
+
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_90);
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_RIGHT, AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_RIGHT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_DOWN, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_DOWN));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_LEFT, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_LEFT));
+}
+
+TEST_F(KeyboardInputMapperTest, Process_WhenOrientationAware_ShouldRotateDPad) {
+    mFakeEventHub->addKey(DEVICE_ID, KEY_UP, 0, AKEYCODE_DPAD_UP, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_RIGHT, 0, AKEYCODE_DPAD_RIGHT, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_DOWN, 0, AKEYCODE_DPAD_DOWN, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_LEFT, 0, AKEYCODE_DPAD_LEFT, 0);
+
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addConfigurationProperty("keyboard.orientationAware", "1");
+    addMapperAndConfigure(mapper);
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_0);
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_UP));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_RIGHT, AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_RIGHT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_DOWN, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_DOWN));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_LEFT, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_LEFT));
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_90);
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_LEFT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_RIGHT, AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_UP));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_DOWN, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_RIGHT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_LEFT, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_DOWN));
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_180);
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_DOWN));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_RIGHT, AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_LEFT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_DOWN, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_UP));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_LEFT, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_RIGHT));
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_270);
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_UP, AKEYCODE_DPAD_UP, AKEYCODE_DPAD_RIGHT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_RIGHT, AKEYCODE_DPAD_RIGHT, AKEYCODE_DPAD_DOWN));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_DOWN, AKEYCODE_DPAD_DOWN, AKEYCODE_DPAD_LEFT));
+    ASSERT_NO_FATAL_FAILURE(testDPadKeyRotation(mapper,
+            KEY_LEFT, AKEYCODE_DPAD_LEFT, AKEYCODE_DPAD_UP));
+
+    // Special case: if orientation changes while key is down, we still emit the same keycode
+    // in the key up as we did in the key down.
+    NotifyKeyArgs args;
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_270);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, KEY_UP, 1);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(KEY_UP, args.scanCode);
+    ASSERT_EQ(AKEYCODE_DPAD_RIGHT, args.keyCode);
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_180);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, KEY_UP, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(KEY_UP, args.scanCode);
+    ASSERT_EQ(AKEYCODE_DPAD_RIGHT, args.keyCode);
+}
+
+TEST_F(KeyboardInputMapperTest, GetKeyCodeState) {
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    mFakeEventHub->setKeyCodeState(DEVICE_ID, AKEYCODE_A, 1);
+    ASSERT_EQ(1, mapper->getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A));
+
+    mFakeEventHub->setKeyCodeState(DEVICE_ID, AKEYCODE_A, 0);
+    ASSERT_EQ(0, mapper->getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A));
+}
+
+TEST_F(KeyboardInputMapperTest, GetScanCodeState) {
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    mFakeEventHub->setScanCodeState(DEVICE_ID, KEY_A, 1);
+    ASSERT_EQ(1, mapper->getScanCodeState(AINPUT_SOURCE_ANY, KEY_A));
+
+    mFakeEventHub->setScanCodeState(DEVICE_ID, KEY_A, 0);
+    ASSERT_EQ(0, mapper->getScanCodeState(AINPUT_SOURCE_ANY, KEY_A));
+}
+
+TEST_F(KeyboardInputMapperTest, MarkSupportedKeyCodes) {
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    mFakeEventHub->addKey(DEVICE_ID, KEY_A, 0, AKEYCODE_A, 0);
+
+    const int32_t keyCodes[2] = { AKEYCODE_A, AKEYCODE_B };
+    uint8_t flags[2] = { 0, 0 };
+    ASSERT_TRUE(mapper->markSupportedKeyCodes(AINPUT_SOURCE_ANY, 1, keyCodes, flags));
+    ASSERT_TRUE(flags[0]);
+    ASSERT_FALSE(flags[1]);
+}
+
+TEST_F(KeyboardInputMapperTest, Process_LockedKeysShouldToggleMetaStateAndLeds) {
+    mFakeEventHub->addLed(DEVICE_ID, LED_CAPSL, true /*initially on*/);
+    mFakeEventHub->addLed(DEVICE_ID, LED_NUML, false /*initially off*/);
+    mFakeEventHub->addLed(DEVICE_ID, LED_SCROLLL, false /*initially off*/);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_CAPSLOCK, 0, AKEYCODE_CAPS_LOCK, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_NUMLOCK, 0, AKEYCODE_NUM_LOCK, 0);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_SCROLLLOCK, 0, AKEYCODE_SCROLL_LOCK, 0);
+
+    KeyboardInputMapper* mapper = new KeyboardInputMapper(mDevice,
+            AINPUT_SOURCE_KEYBOARD, AINPUT_KEYBOARD_TYPE_ALPHABETIC);
+    addMapperAndConfigure(mapper);
+
+    // Initialization should have turned all of the lights off.
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+
+    // Toggle caps lock on.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, 0);
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_CAPS_LOCK_ON, mapper->getMetaState());
+
+    // Toggle num lock on.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, 0);
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_CAPS_LOCK_ON | AMETA_NUM_LOCK_ON, mapper->getMetaState());
+
+    // Toggle caps lock off.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_CAPSLOCK, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_NUM_LOCK_ON, mapper->getMetaState());
+
+    // Toggle scroll lock on.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_NUM_LOCK_ON | AMETA_SCROLL_LOCK_ON, mapper->getMetaState());
+
+    // Toggle num lock off.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_NUMLOCK, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_TRUE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_SCROLL_LOCK_ON, mapper->getMetaState());
+
+    // Toggle scroll lock off.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID,
+            EV_KEY, KEY_SCROLLLOCK, 0);
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_CAPSL));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_NUML));
+    ASSERT_FALSE(mFakeEventHub->getLedState(DEVICE_ID, LED_SCROLLL));
+    ASSERT_EQ(AMETA_NONE, mapper->getMetaState());
+}
+
+
+// --- CursorInputMapperTest ---
+
+class CursorInputMapperTest : public InputMapperTest {
+protected:
+    static const int32_t TRACKBALL_MOVEMENT_THRESHOLD;
+
+    sp<FakePointerController> mFakePointerController;
+
+    virtual void SetUp() {
+        InputMapperTest::SetUp();
+
+        mFakePointerController = new FakePointerController();
+        mFakePolicy->setPointerController(DEVICE_ID, mFakePointerController);
+    }
+
+    void testMotionRotation(CursorInputMapper* mapper,
+            int32_t originalX, int32_t originalY, int32_t rotatedX, int32_t rotatedY);
+};
+
+const int32_t CursorInputMapperTest::TRACKBALL_MOVEMENT_THRESHOLD = 6;
+
+void CursorInputMapperTest::testMotionRotation(CursorInputMapper* mapper,
+        int32_t originalX, int32_t originalY, int32_t rotatedX, int32_t rotatedY) {
+    NotifyMotionArgs args;
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_X, originalX);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_Y, originalY);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            float(rotatedX) / TRACKBALL_MOVEMENT_THRESHOLD,
+            float(rotatedY) / TRACKBALL_MOVEMENT_THRESHOLD,
+            0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+TEST_F(CursorInputMapperTest, WhenModeIsPointer_GetSources_ReturnsMouse) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "pointer");
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper->getSources());
+}
+
+TEST_F(CursorInputMapperTest, WhenModeIsNavigation_GetSources_ReturnsTrackball) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_TRACKBALL, mapper->getSources());
+}
+
+TEST_F(CursorInputMapperTest, WhenModeIsPointer_PopulateDeviceInfo_ReturnsRangeFromPointerController) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "pointer");
+    addMapperAndConfigure(mapper);
+
+    InputDeviceInfo info;
+    mapper->populateDeviceInfo(&info);
+
+    // Initially there may not be a valid motion range.
+    ASSERT_EQ(NULL, info.getMotionRange(AINPUT_MOTION_RANGE_X, AINPUT_SOURCE_MOUSE));
+    ASSERT_EQ(NULL, info.getMotionRange(AINPUT_MOTION_RANGE_Y, AINPUT_SOURCE_MOUSE));
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info,
+            AINPUT_MOTION_RANGE_PRESSURE, AINPUT_SOURCE_MOUSE, 0.0f, 1.0f, 0.0f, 0.0f));
+
+    // When the bounds are set, then there should be a valid motion range.
+    mFakePointerController->setBounds(1, 2, 800 - 1, 480 - 1);
+
+    InputDeviceInfo info2;
+    mapper->populateDeviceInfo(&info2);
+
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info2,
+            AINPUT_MOTION_RANGE_X, AINPUT_SOURCE_MOUSE,
+            1, 800 - 1, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info2,
+            AINPUT_MOTION_RANGE_Y, AINPUT_SOURCE_MOUSE,
+            2, 480 - 1, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info2,
+            AINPUT_MOTION_RANGE_PRESSURE, AINPUT_SOURCE_MOUSE,
+            0.0f, 1.0f, 0.0f, 0.0f));
+}
+
+TEST_F(CursorInputMapperTest, WhenModeIsNavigation_PopulateDeviceInfo_ReturnsScaledRange) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    InputDeviceInfo info;
+    mapper->populateDeviceInfo(&info);
+
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info,
+            AINPUT_MOTION_RANGE_X, AINPUT_SOURCE_TRACKBALL,
+            -1.0f, 1.0f, 0.0f, 1.0f / TRACKBALL_MOVEMENT_THRESHOLD));
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info,
+            AINPUT_MOTION_RANGE_Y, AINPUT_SOURCE_TRACKBALL,
+            -1.0f, 1.0f, 0.0f, 1.0f / TRACKBALL_MOVEMENT_THRESHOLD));
+    ASSERT_NO_FATAL_FAILURE(assertMotionRange(info,
+            AINPUT_MOTION_RANGE_PRESSURE, AINPUT_SOURCE_TRACKBALL,
+            0.0f, 1.0f, 0.0f, 0.0f));
+}
+
+TEST_F(CursorInputMapperTest, Process_ShouldSetAllFieldsAndIncludeGlobalMetaState) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyMotionArgs args;
+
+    // Button press.
+    // Mostly testing non x/y behavior here so we don't need to check again elsewhere.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MOUSE, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TRACKBALL, args.source);
+    ASSERT_EQ(uint32_t(0), args.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(0, args.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_PRIMARY, args.buttonState);
+    ASSERT_EQ(0, args.edgeFlags);
+    ASSERT_EQ(uint32_t(1), args.pointerCount);
+    ASSERT_EQ(0, args.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, args.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_EQ(TRACKBALL_MOVEMENT_THRESHOLD, args.xPrecision);
+    ASSERT_EQ(TRACKBALL_MOVEMENT_THRESHOLD, args.yPrecision);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Button release.  Should have same down time.
+    process(mapper, ARBITRARY_TIME + 1, DEVICE_ID, EV_KEY, BTN_MOUSE, 0);
+    process(mapper, ARBITRARY_TIME + 1, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(ARBITRARY_TIME + 1, args.eventTime);
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TRACKBALL, args.source);
+    ASSERT_EQ(uint32_t(0), args.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(0, args.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(0, args.buttonState);
+    ASSERT_EQ(0, args.edgeFlags);
+    ASSERT_EQ(uint32_t(1), args.pointerCount);
+    ASSERT_EQ(0, args.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, args.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_EQ(TRACKBALL_MOVEMENT_THRESHOLD, args.xPrecision);
+    ASSERT_EQ(TRACKBALL_MOVEMENT_THRESHOLD, args.yPrecision);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+}
+
+TEST_F(CursorInputMapperTest, Process_ShouldHandleIndependentXYUpdates) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs args;
+
+    // Motion in X but not Y.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_X, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            1.0f / TRACKBALL_MOVEMENT_THRESHOLD, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    // Motion in Y but not X.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_Y, -2);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            0.0f, -2.0f / TRACKBALL_MOVEMENT_THRESHOLD, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+TEST_F(CursorInputMapperTest, Process_ShouldHandleIndependentButtonUpdates) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs args;
+
+    // Button press.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MOUSE, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    // Button release.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MOUSE, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+TEST_F(CursorInputMapperTest, Process_ShouldHandleCombinedXYAndButtonUpdates) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs args;
+
+    // Combined X, Y and Button.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_X, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_Y, -2);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MOUSE, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            1.0f / TRACKBALL_MOVEMENT_THRESHOLD, -2.0f / TRACKBALL_MOVEMENT_THRESHOLD,
+            1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    // Move X, Y a bit while pressed.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_X, 2);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_Y, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            2.0f / TRACKBALL_MOVEMENT_THRESHOLD, 1.0f / TRACKBALL_MOVEMENT_THRESHOLD,
+            1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    // Release Button.
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MOUSE, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+}
+
+TEST_F(CursorInputMapperTest, Process_WhenNotOrientationAware_ShouldNotRotateMotions) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addMapperAndConfigure(mapper);
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT,
+            DISPLAY_ORIENTATION_90);
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0,  1,  0,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  1,  1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  0,  1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1, -1,  1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0, -1,  0, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, -1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  0, -1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  1, -1,  1));
+}
+
+TEST_F(CursorInputMapperTest, Process_WhenOrientationAware_ShouldRotateMotions) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "navigation");
+    addConfigurationProperty("cursor.orientationAware", "1");
+    addMapperAndConfigure(mapper);
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_0);
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0,  1,  0,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  1,  1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  0,  1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1, -1,  1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0, -1,  0, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, -1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  0, -1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  1, -1,  1));
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_90);
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0,  1,  1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  1,  1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  0,  0, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1, -1, -1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0, -1, -1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1, -1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  0,  0,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  1,  1,  1));
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_180);
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0,  1,  0, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  1, -1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  0, -1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1, -1, -1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0, -1,  0,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1,  1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  0,  1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  1,  1, -1));
+
+    setDisplayInfoAndReconfigure(DISPLAY_ID,
+            DISPLAY_WIDTH, DISPLAY_HEIGHT, DISPLAY_ORIENTATION_270);
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0,  1, -1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  1, -1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1,  0,  0,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  1, -1,  1,  1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper,  0, -1,  1,  0));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1, -1,  1, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  0,  0, -1));
+    ASSERT_NO_FATAL_FAILURE(testMotionRotation(mapper, -1,  1, -1, -1));
+}
+
+TEST_F(CursorInputMapperTest, Process_ShouldHandleAllButtons) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "pointer");
+    addMapperAndConfigure(mapper);
+
+    mFakePointerController->setBounds(0, 0, 800 - 1, 480 - 1);
+    mFakePointerController->setPosition(100, 200);
+    mFakePointerController->setButtonState(0);
+
+    NotifyMotionArgs motionArgs;
+    NotifyKeyArgs keyArgs;
+
+    // press BTN_LEFT, release BTN_LEFT
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_LEFT, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_PRIMARY, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_PRIMARY, mFakePointerController->getButtonState());
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_LEFT, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    // press BTN_RIGHT + BTN_MIDDLE, release BTN_RIGHT, release BTN_MIDDLE
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_RIGHT, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MIDDLE, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_SECONDARY | AMOTION_EVENT_BUTTON_TERTIARY,
+            motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_SECONDARY | AMOTION_EVENT_BUTTON_TERTIARY,
+            mFakePointerController->getButtonState());
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_RIGHT, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_TERTIARY, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_TERTIARY, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_MIDDLE, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    // press BTN_BACK, release BTN_BACK
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_BACK, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_BACK, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+
+    // press BTN_SIDE, release BTN_SIDE
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_SIDE, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_SIDE, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+
+    // press BTN_FORWARD, release BTN_FORWARD
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_FORWARD, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_FORWARD, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+
+    // press BTN_EXTRA, release BTN_EXTRA
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_EXTRA, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_EXTRA, 0);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, mFakePointerController->getButtonState());
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            100.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+}
+
+TEST_F(CursorInputMapperTest, Process_WhenModeIsPointer_ShouldMoveThePointerAround) {
+    CursorInputMapper* mapper = new CursorInputMapper(mDevice);
+    addConfigurationProperty("cursor.mode", "pointer");
+    addMapperAndConfigure(mapper);
+
+    mFakePointerController->setBounds(0, 0, 800 - 1, 480 - 1);
+    mFakePointerController->setPosition(100, 200);
+    mFakePointerController->setButtonState(0);
+
+    NotifyMotionArgs args;
+
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_X, 10);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_REL, REL_Y, 20);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, args.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            110.0f, 220.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
+    ASSERT_NO_FATAL_FAILURE(assertPosition(mFakePointerController, 110.0f, 220.0f));
+}
+
+
+// --- TouchInputMapperTest ---
+
+class TouchInputMapperTest : public InputMapperTest {
+protected:
+    static const int32_t RAW_X_MIN;
+    static const int32_t RAW_X_MAX;
+    static const int32_t RAW_Y_MIN;
+    static const int32_t RAW_Y_MAX;
+    static const int32_t RAW_TOUCH_MIN;
+    static const int32_t RAW_TOUCH_MAX;
+    static const int32_t RAW_TOOL_MIN;
+    static const int32_t RAW_TOOL_MAX;
+    static const int32_t RAW_PRESSURE_MIN;
+    static const int32_t RAW_PRESSURE_MAX;
+    static const int32_t RAW_ORIENTATION_MIN;
+    static const int32_t RAW_ORIENTATION_MAX;
+    static const int32_t RAW_DISTANCE_MIN;
+    static const int32_t RAW_DISTANCE_MAX;
+    static const int32_t RAW_TILT_MIN;
+    static const int32_t RAW_TILT_MAX;
+    static const int32_t RAW_ID_MIN;
+    static const int32_t RAW_ID_MAX;
+    static const int32_t RAW_SLOT_MIN;
+    static const int32_t RAW_SLOT_MAX;
+    static const float X_PRECISION;
+    static const float Y_PRECISION;
+
+    static const float GEOMETRIC_SCALE;
+    static const TouchAffineTransformation AFFINE_TRANSFORM;
+
+    static const VirtualKeyDefinition VIRTUAL_KEYS[2];
+
+    enum Axes {
+        POSITION = 1 << 0,
+        TOUCH = 1 << 1,
+        TOOL = 1 << 2,
+        PRESSURE = 1 << 3,
+        ORIENTATION = 1 << 4,
+        MINOR = 1 << 5,
+        ID = 1 << 6,
+        DISTANCE = 1 << 7,
+        TILT = 1 << 8,
+        SLOT = 1 << 9,
+        TOOL_TYPE = 1 << 10,
+    };
+
+    void prepareDisplay(int32_t orientation);
+    void prepareVirtualKeys();
+    void prepareLocationCalibration();
+    int32_t toRawX(float displayX);
+    int32_t toRawY(float displayY);
+    float toCookedX(float rawX, float rawY);
+    float toCookedY(float rawX, float rawY);
+    float toDisplayX(int32_t rawX);
+    float toDisplayY(int32_t rawY);
+};
+
+const int32_t TouchInputMapperTest::RAW_X_MIN = 25;
+const int32_t TouchInputMapperTest::RAW_X_MAX = 1019;
+const int32_t TouchInputMapperTest::RAW_Y_MIN = 30;
+const int32_t TouchInputMapperTest::RAW_Y_MAX = 1009;
+const int32_t TouchInputMapperTest::RAW_TOUCH_MIN = 0;
+const int32_t TouchInputMapperTest::RAW_TOUCH_MAX = 31;
+const int32_t TouchInputMapperTest::RAW_TOOL_MIN = 0;
+const int32_t TouchInputMapperTest::RAW_TOOL_MAX = 15;
+const int32_t TouchInputMapperTest::RAW_PRESSURE_MIN = RAW_TOUCH_MIN;
+const int32_t TouchInputMapperTest::RAW_PRESSURE_MAX = RAW_TOUCH_MAX;
+const int32_t TouchInputMapperTest::RAW_ORIENTATION_MIN = -7;
+const int32_t TouchInputMapperTest::RAW_ORIENTATION_MAX = 7;
+const int32_t TouchInputMapperTest::RAW_DISTANCE_MIN = 0;
+const int32_t TouchInputMapperTest::RAW_DISTANCE_MAX = 7;
+const int32_t TouchInputMapperTest::RAW_TILT_MIN = 0;
+const int32_t TouchInputMapperTest::RAW_TILT_MAX = 150;
+const int32_t TouchInputMapperTest::RAW_ID_MIN = 0;
+const int32_t TouchInputMapperTest::RAW_ID_MAX = 9;
+const int32_t TouchInputMapperTest::RAW_SLOT_MIN = 0;
+const int32_t TouchInputMapperTest::RAW_SLOT_MAX = 9;
+const float TouchInputMapperTest::X_PRECISION = float(RAW_X_MAX - RAW_X_MIN + 1) / DISPLAY_WIDTH;
+const float TouchInputMapperTest::Y_PRECISION = float(RAW_Y_MAX - RAW_Y_MIN + 1) / DISPLAY_HEIGHT;
+const TouchAffineTransformation TouchInputMapperTest::AFFINE_TRANSFORM =
+        TouchAffineTransformation(1, -2, 3, -4, 5, -6);
+
+const float TouchInputMapperTest::GEOMETRIC_SCALE =
+        avg(float(DISPLAY_WIDTH) / (RAW_X_MAX - RAW_X_MIN + 1),
+                float(DISPLAY_HEIGHT) / (RAW_Y_MAX - RAW_Y_MIN + 1));
+
+const VirtualKeyDefinition TouchInputMapperTest::VIRTUAL_KEYS[2] = {
+        { KEY_HOME, 60, DISPLAY_HEIGHT + 15, 20, 20 },
+        { KEY_MENU, DISPLAY_HEIGHT - 60, DISPLAY_WIDTH + 15, 20, 20 },
+};
+
+void TouchInputMapperTest::prepareDisplay(int32_t orientation) {
+    setDisplayInfoAndReconfigure(DISPLAY_ID, DISPLAY_WIDTH, DISPLAY_HEIGHT, orientation);
+}
+
+void TouchInputMapperTest::prepareVirtualKeys() {
+    mFakeEventHub->addVirtualKeyDefinition(DEVICE_ID, VIRTUAL_KEYS[0]);
+    mFakeEventHub->addVirtualKeyDefinition(DEVICE_ID, VIRTUAL_KEYS[1]);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_HOME, 0, AKEYCODE_HOME, POLICY_FLAG_WAKE);
+    mFakeEventHub->addKey(DEVICE_ID, KEY_MENU, 0, AKEYCODE_MENU, POLICY_FLAG_WAKE);
+}
+
+void TouchInputMapperTest::prepareLocationCalibration() {
+    mFakePolicy->setTouchAffineTransformation(AFFINE_TRANSFORM);
+}
+
+int32_t TouchInputMapperTest::toRawX(float displayX) {
+    return int32_t(displayX * (RAW_X_MAX - RAW_X_MIN + 1) / DISPLAY_WIDTH + RAW_X_MIN);
+}
+
+int32_t TouchInputMapperTest::toRawY(float displayY) {
+    return int32_t(displayY * (RAW_Y_MAX - RAW_Y_MIN + 1) / DISPLAY_HEIGHT + RAW_Y_MIN);
+}
+
+float TouchInputMapperTest::toCookedX(float rawX, float rawY) {
+    AFFINE_TRANSFORM.applyTo(rawX, rawY);
+    return rawX;
+}
+
+float TouchInputMapperTest::toCookedY(float rawX, float rawY) {
+    AFFINE_TRANSFORM.applyTo(rawX, rawY);
+    return rawY;
+}
+
+float TouchInputMapperTest::toDisplayX(int32_t rawX) {
+    return float(rawX - RAW_X_MIN) * DISPLAY_WIDTH / (RAW_X_MAX - RAW_X_MIN + 1);
+}
+
+float TouchInputMapperTest::toDisplayY(int32_t rawY) {
+    return float(rawY - RAW_Y_MIN) * DISPLAY_HEIGHT / (RAW_Y_MAX - RAW_Y_MIN + 1);
+}
+
+
+// --- SingleTouchInputMapperTest ---
+
+class SingleTouchInputMapperTest : public TouchInputMapperTest {
+protected:
+    void prepareButtons();
+    void prepareAxes(int axes);
+
+    void processDown(SingleTouchInputMapper* mapper, int32_t x, int32_t y);
+    void processMove(SingleTouchInputMapper* mapper, int32_t x, int32_t y);
+    void processUp(SingleTouchInputMapper* mappery);
+    void processPressure(SingleTouchInputMapper* mapper, int32_t pressure);
+    void processToolMajor(SingleTouchInputMapper* mapper, int32_t toolMajor);
+    void processDistance(SingleTouchInputMapper* mapper, int32_t distance);
+    void processTilt(SingleTouchInputMapper* mapper, int32_t tiltX, int32_t tiltY);
+    void processKey(SingleTouchInputMapper* mapper, int32_t code, int32_t value);
+    void processSync(SingleTouchInputMapper* mapper);
+};
+
+void SingleTouchInputMapperTest::prepareButtons() {
+    mFakeEventHub->addKey(DEVICE_ID, BTN_TOUCH, 0, AKEYCODE_UNKNOWN, 0);
+}
+
+void SingleTouchInputMapperTest::prepareAxes(int axes) {
+    if (axes & POSITION) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_X,
+                RAW_X_MIN, RAW_X_MAX, 0, 0);
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_Y,
+                RAW_Y_MIN, RAW_Y_MAX, 0, 0);
+    }
+    if (axes & PRESSURE) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_PRESSURE,
+                RAW_PRESSURE_MIN, RAW_PRESSURE_MAX, 0, 0);
+    }
+    if (axes & TOOL) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_TOOL_WIDTH,
+                RAW_TOOL_MIN, RAW_TOOL_MAX, 0, 0);
+    }
+    if (axes & DISTANCE) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_DISTANCE,
+                RAW_DISTANCE_MIN, RAW_DISTANCE_MAX, 0, 0);
+    }
+    if (axes & TILT) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_TILT_X,
+                RAW_TILT_MIN, RAW_TILT_MAX, 0, 0);
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_TILT_Y,
+                RAW_TILT_MIN, RAW_TILT_MAX, 0, 0);
+    }
+}
+
+void SingleTouchInputMapperTest::processDown(SingleTouchInputMapper* mapper, int32_t x, int32_t y) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_TOUCH, 1);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_X, x);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_Y, y);
+}
+
+void SingleTouchInputMapperTest::processMove(SingleTouchInputMapper* mapper, int32_t x, int32_t y) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_X, x);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_Y, y);
+}
+
+void SingleTouchInputMapperTest::processUp(SingleTouchInputMapper* mapper) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, BTN_TOUCH, 0);
+}
+
+void SingleTouchInputMapperTest::processPressure(
+        SingleTouchInputMapper* mapper, int32_t pressure) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_PRESSURE, pressure);
+}
+
+void SingleTouchInputMapperTest::processToolMajor(
+        SingleTouchInputMapper* mapper, int32_t toolMajor) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_TOOL_WIDTH, toolMajor);
+}
+
+void SingleTouchInputMapperTest::processDistance(
+        SingleTouchInputMapper* mapper, int32_t distance) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_DISTANCE, distance);
+}
+
+void SingleTouchInputMapperTest::processTilt(
+        SingleTouchInputMapper* mapper, int32_t tiltX, int32_t tiltY) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_TILT_X, tiltX);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_TILT_Y, tiltY);
+}
+
+void SingleTouchInputMapperTest::processKey(
+        SingleTouchInputMapper* mapper, int32_t code, int32_t value) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, code, value);
+}
+
+void SingleTouchInputMapperTest::processSync(SingleTouchInputMapper* mapper) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+}
+
+
+TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsNotSpecifiedAndNotACursor_ReturnsPointer) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    prepareButtons();
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_MOUSE, mapper->getSources());
+}
+
+TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsNotSpecifiedAndIsACursor_ReturnsTouchPad) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    mFakeEventHub->addRelativeAxis(DEVICE_ID, REL_X);
+    mFakeEventHub->addRelativeAxis(DEVICE_ID, REL_Y);
+    prepareButtons();
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper->getSources());
+}
+
+TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsTouchPad_ReturnsTouchPad) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    prepareButtons();
+    prepareAxes(POSITION);
+    addConfigurationProperty("touch.deviceType", "touchPad");
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHPAD, mapper->getSources());
+}
+
+TEST_F(SingleTouchInputMapperTest, GetSources_WhenDeviceTypeIsTouchScreen_ReturnsTouchScreen) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    prepareButtons();
+    prepareAxes(POSITION);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    addMapperAndConfigure(mapper);
+
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, mapper->getSources());
+}
+
+TEST_F(SingleTouchInputMapperTest, GetKeyCodeState) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    // Unknown key.
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mapper->getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_A));
+
+    // Virtual key is down.
+    int32_t x = toRawX(VIRTUAL_KEYS[0].centerX);
+    int32_t y = toRawY(VIRTUAL_KEYS[0].centerY);
+    processDown(mapper, x, y);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled());
+
+    ASSERT_EQ(AKEY_STATE_VIRTUAL, mapper->getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_HOME));
+
+    // Virtual key is up.
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled());
+
+    ASSERT_EQ(AKEY_STATE_UP, mapper->getKeyCodeState(AINPUT_SOURCE_ANY, AKEYCODE_HOME));
+}
+
+TEST_F(SingleTouchInputMapperTest, GetScanCodeState) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    // Unknown key.
+    ASSERT_EQ(AKEY_STATE_UNKNOWN, mapper->getScanCodeState(AINPUT_SOURCE_ANY, KEY_A));
+
+    // Virtual key is down.
+    int32_t x = toRawX(VIRTUAL_KEYS[0].centerX);
+    int32_t y = toRawY(VIRTUAL_KEYS[0].centerY);
+    processDown(mapper, x, y);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled());
+
+    ASSERT_EQ(AKEY_STATE_VIRTUAL, mapper->getScanCodeState(AINPUT_SOURCE_ANY, KEY_HOME));
+
+    // Virtual key is up.
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled());
+
+    ASSERT_EQ(AKEY_STATE_UP, mapper->getScanCodeState(AINPUT_SOURCE_ANY, KEY_HOME));
+}
+
+TEST_F(SingleTouchInputMapperTest, MarkSupportedKeyCodes) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    const int32_t keys[2] = { AKEYCODE_HOME, AKEYCODE_A };
+    uint8_t flags[2] = { 0, 0 };
+    ASSERT_TRUE(mapper->markSupportedKeyCodes(AINPUT_SOURCE_ANY, 2, keys, flags));
+    ASSERT_TRUE(flags[0]);
+    ASSERT_FALSE(flags[1]);
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndReleasedNormally_SendsKeyDownAndKeyUp) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyKeyArgs args;
+
+    // Press virtual key.
+    int32_t x = toRawX(VIRTUAL_KEYS[0].centerX);
+    int32_t y = toRawY(VIRTUAL_KEYS[0].centerY);
+    processDown(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(POLICY_FLAG_VIRTUAL, args.policyFlags);
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, args.action);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY, args.flags);
+    ASSERT_EQ(AKEYCODE_HOME, args.keyCode);
+    ASSERT_EQ(KEY_HOME, args.scanCode);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Release virtual key.
+    processUp(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&args));
+    ASSERT_EQ(ARBITRARY_TIME, args.eventTime);
+    ASSERT_EQ(DEVICE_ID, args.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, args.source);
+    ASSERT_EQ(POLICY_FLAG_VIRTUAL, args.policyFlags);
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, args.action);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY, args.flags);
+    ASSERT_EQ(AKEYCODE_HOME, args.keyCode);
+    ASSERT_EQ(KEY_HOME, args.scanCode);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, args.metaState);
+    ASSERT_EQ(ARBITRARY_TIME, args.downTime);
+
+    // Should not have sent any motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenVirtualKeyIsPressedAndMovedOutOfBounds_SendsKeyDownAndKeyCancel) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyKeyArgs keyArgs;
+
+    // Press virtual key.
+    int32_t x = toRawX(VIRTUAL_KEYS[0].centerX);
+    int32_t y = toRawY(VIRTUAL_KEYS[0].centerY);
+    processDown(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(ARBITRARY_TIME, keyArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, keyArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, keyArgs.source);
+    ASSERT_EQ(POLICY_FLAG_VIRTUAL, keyArgs.policyFlags);
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY, keyArgs.flags);
+    ASSERT_EQ(AKEYCODE_HOME, keyArgs.keyCode);
+    ASSERT_EQ(KEY_HOME, keyArgs.scanCode);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, keyArgs.metaState);
+    ASSERT_EQ(ARBITRARY_TIME, keyArgs.downTime);
+
+    // Move out of bounds.  This should generate a cancel and a pointer down since we moved
+    // into the display area.
+    y -= 100;
+    processMove(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(ARBITRARY_TIME, keyArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, keyArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_KEYBOARD, keyArgs.source);
+    ASSERT_EQ(POLICY_FLAG_VIRTUAL, keyArgs.policyFlags);
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM | AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY
+            | AKEY_EVENT_FLAG_CANCELED, keyArgs.flags);
+    ASSERT_EQ(AKEYCODE_HOME, keyArgs.keyCode);
+    ASSERT_EQ(KEY_HOME, keyArgs.scanCode);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, keyArgs.metaState);
+    ASSERT_EQ(ARBITRARY_TIME, keyArgs.downTime);
+
+    NotifyMotionArgs motionArgs;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Keep moving out of bounds.  Should generate a pointer move.
+    y -= 50;
+    processMove(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Release out of bounds.  Should generate a pointer up.
+    processUp(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Should not have sent any more keys or motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenTouchStartsOutsideDisplayAndMovesIn_SendsDownAsTouchEntersDisplay) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyMotionArgs motionArgs;
+
+    // Initially go down out of bounds.
+    int32_t x = -10;
+    int32_t y = -10;
+    processDown(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+
+    // Move into the display area.  Should generate a pointer down.
+    x = 50;
+    y = 75;
+    processMove(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Release.  Should generate a pointer up.
+    processUp(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Should not have sent any more keys or motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_NormalSingleTouchGesture) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyMotionArgs motionArgs;
+
+    // Down.
+    int32_t x = 100;
+    int32_t y = 125;
+    processDown(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Move.
+    x += 50;
+    y += 75;
+    processMove(mapper, x, y);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Up.
+    processUp(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x), toDisplayY(y), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Should not have sent any more keys or motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenNotOrientationAware_DoesNotRotateMotions) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareButtons();
+    prepareAxes(POSITION);
+    addConfigurationProperty("touch.orientationAware", "0");
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs args;
+
+    // Rotation 90.
+    prepareDisplay(DISPLAY_ORIENTATION_90);
+    processDown(mapper, toRawX(50), toRawY(75));
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NEAR(50, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X), 1);
+    ASSERT_NEAR(75, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y), 1);
+
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled());
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenOrientationAware_RotatesMotions) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareButtons();
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs args;
+
+    // Rotation 0.
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    processDown(mapper, toRawX(50), toRawY(75));
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NEAR(50, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X), 1);
+    ASSERT_NEAR(75, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y), 1);
+
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled());
+
+    // Rotation 90.
+    prepareDisplay(DISPLAY_ORIENTATION_90);
+    processDown(mapper, RAW_X_MAX - toRawX(75) + RAW_X_MIN, toRawY(50));
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NEAR(50, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X), 1);
+    ASSERT_NEAR(75, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y), 1);
+
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled());
+
+    // Rotation 180.
+    prepareDisplay(DISPLAY_ORIENTATION_180);
+    processDown(mapper, RAW_X_MAX - toRawX(50) + RAW_X_MIN, RAW_Y_MAX - toRawY(75) + RAW_Y_MIN);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NEAR(50, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X), 1);
+    ASSERT_NEAR(75, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y), 1);
+
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled());
+
+    // Rotation 270.
+    prepareDisplay(DISPLAY_ORIENTATION_270);
+    processDown(mapper, toRawX(75), RAW_Y_MAX - toRawY(50) + RAW_Y_MIN);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NEAR(50, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_X), 1);
+    ASSERT_NEAR(75, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_Y), 1);
+
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled());
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_AllAxes_DefaultCalibration) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION | PRESSURE | TOOL | DISTANCE | TILT);
+    addMapperAndConfigure(mapper);
+
+    // These calculations are based on the input device calibration documentation.
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+    int32_t rawPressure = 10;
+    int32_t rawToolMajor = 12;
+    int32_t rawDistance = 2;
+    int32_t rawTiltX = 30;
+    int32_t rawTiltY = 110;
+
+    float x = toDisplayX(rawX);
+    float y = toDisplayY(rawY);
+    float pressure = float(rawPressure) / RAW_PRESSURE_MAX;
+    float size = float(rawToolMajor) / RAW_TOOL_MAX;
+    float tool = float(rawToolMajor) * GEOMETRIC_SCALE;
+    float distance = float(rawDistance);
+
+    float tiltCenter = (RAW_TILT_MAX + RAW_TILT_MIN) * 0.5f;
+    float tiltScale = M_PI / 180;
+    float tiltXAngle = (rawTiltX - tiltCenter) * tiltScale;
+    float tiltYAngle = (rawTiltY - tiltCenter) * tiltScale;
+    float orientation = atan2f(-sinf(tiltXAngle), sinf(tiltYAngle));
+    float tilt = acosf(cosf(tiltXAngle) * cosf(tiltYAngle));
+
+    processDown(mapper, rawX, rawY);
+    processPressure(mapper, rawPressure);
+    processToolMajor(mapper, rawToolMajor);
+    processDistance(mapper, rawDistance);
+    processTilt(mapper, rawTiltX, rawTiltY);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, pressure, size, tool, tool, tool, tool, orientation, distance));
+    ASSERT_EQ(tilt, args.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_TILT));
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_XYAxes_AffineCalibration) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareLocationCalibration();
+    prepareButtons();
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+
+    float x = toDisplayX(toCookedX(rawX, rawY));
+    float y = toDisplayY(toCookedY(rawX, rawY));
+
+    processDown(mapper, rawX, rawY);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, 1, 0, 0, 0, 0, 0, 0, 0));
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_ShouldHandleAllButtons) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+    NotifyKeyArgs keyArgs;
+
+    processDown(mapper, 100, 200);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.buttonState);
+
+    // press BTN_LEFT, release BTN_LEFT
+    processKey(mapper, BTN_LEFT, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_PRIMARY, motionArgs.buttonState);
+
+    processKey(mapper, BTN_LEFT, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // press BTN_RIGHT + BTN_MIDDLE, release BTN_RIGHT, release BTN_MIDDLE
+    processKey(mapper, BTN_RIGHT, 1);
+    processKey(mapper, BTN_MIDDLE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_SECONDARY | AMOTION_EVENT_BUTTON_TERTIARY,
+            motionArgs.buttonState);
+
+    processKey(mapper, BTN_RIGHT, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_TERTIARY, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_MIDDLE, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // press BTN_BACK, release BTN_BACK
+    processKey(mapper, BTN_BACK, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_BACK, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+
+    // press BTN_SIDE, release BTN_SIDE
+    processKey(mapper, BTN_SIDE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_SIDE, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+
+    // press BTN_FORWARD, release BTN_FORWARD
+    processKey(mapper, BTN_FORWARD, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_FORWARD, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+
+    // press BTN_EXTRA, release BTN_EXTRA
+    processKey(mapper, BTN_EXTRA, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_EXTRA, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+
+    // press BTN_STYLUS, release BTN_STYLUS
+    processKey(mapper, BTN_STYLUS, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_SECONDARY, motionArgs.buttonState);
+
+    processKey(mapper, BTN_STYLUS, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // press BTN_STYLUS2, release BTN_STYLUS2
+    processKey(mapper, BTN_STYLUS2, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_TERTIARY, motionArgs.buttonState);
+
+    processKey(mapper, BTN_STYLUS2, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // release touch
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.buttonState);
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_ShouldHandleAllToolTypes) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+
+    // default tool type is finger
+    processDown(mapper, 100, 200);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // eraser
+    processKey(mapper, BTN_TOOL_RUBBER, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_ERASER, motionArgs.pointerProperties[0].toolType);
+
+    // stylus
+    processKey(mapper, BTN_TOOL_RUBBER, 0);
+    processKey(mapper, BTN_TOOL_PEN, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // brush
+    processKey(mapper, BTN_TOOL_PEN, 0);
+    processKey(mapper, BTN_TOOL_BRUSH, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // pencil
+    processKey(mapper, BTN_TOOL_BRUSH, 0);
+    processKey(mapper, BTN_TOOL_PENCIL, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // airbrush
+    processKey(mapper, BTN_TOOL_PENCIL, 0);
+    processKey(mapper, BTN_TOOL_AIRBRUSH, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // mouse
+    processKey(mapper, BTN_TOOL_AIRBRUSH, 0);
+    processKey(mapper, BTN_TOOL_MOUSE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, motionArgs.pointerProperties[0].toolType);
+
+    // lens
+    processKey(mapper, BTN_TOOL_MOUSE, 0);
+    processKey(mapper, BTN_TOOL_LENS, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, motionArgs.pointerProperties[0].toolType);
+
+    // double-tap
+    processKey(mapper, BTN_TOOL_LENS, 0);
+    processKey(mapper, BTN_TOOL_DOUBLETAP, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // triple-tap
+    processKey(mapper, BTN_TOOL_DOUBLETAP, 0);
+    processKey(mapper, BTN_TOOL_TRIPLETAP, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // quad-tap
+    processKey(mapper, BTN_TOOL_TRIPLETAP, 0);
+    processKey(mapper, BTN_TOOL_QUADTAP, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // finger
+    processKey(mapper, BTN_TOOL_QUADTAP, 0);
+    processKey(mapper, BTN_TOOL_FINGER, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // stylus trumps finger
+    processKey(mapper, BTN_TOOL_PEN, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // eraser trumps stylus
+    processKey(mapper, BTN_TOOL_RUBBER, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_ERASER, motionArgs.pointerProperties[0].toolType);
+
+    // mouse trumps eraser
+    processKey(mapper, BTN_TOOL_MOUSE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, motionArgs.pointerProperties[0].toolType);
+
+    // back to default tool type
+    processKey(mapper, BTN_TOOL_MOUSE, 0);
+    processKey(mapper, BTN_TOOL_RUBBER, 0);
+    processKey(mapper, BTN_TOOL_PEN, 0);
+    processKey(mapper, BTN_TOOL_FINGER, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenBtnTouchPresent_HoversIfItsValueIsZero) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION);
+    mFakeEventHub->addKey(DEVICE_ID, BTN_TOOL_FINGER, 0, AKEYCODE_UNKNOWN, 0);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+
+    // initially hovering because BTN_TOUCH not sent yet, pressure defaults to 0
+    processKey(mapper, BTN_TOOL_FINGER, 1);
+    processMove(mapper, 100, 200);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // move a little
+    processMove(mapper, 150, 250);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // down when BTN_TOUCH is pressed, pressure defaults to 1
+    processKey(mapper, BTN_TOUCH, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // up when BTN_TOUCH is released, hover restored
+    processKey(mapper, BTN_TOUCH, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // exit hover when pointer goes away
+    processKey(mapper, BTN_TOOL_FINGER, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+}
+
+TEST_F(SingleTouchInputMapperTest, Process_WhenAbsPressureIsPresent_HoversIfItsValueIsZero) {
+    SingleTouchInputMapper* mapper = new SingleTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareButtons();
+    prepareAxes(POSITION | PRESSURE);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+
+    // initially hovering because pressure is 0
+    processDown(mapper, 100, 200);
+    processPressure(mapper, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // move a little
+    processMove(mapper, 150, 250);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // down when pressure is non-zero
+    processPressure(mapper, RAW_PRESSURE_MAX);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // up when pressure becomes 0, hover restored
+    processPressure(mapper, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // exit hover when pointer goes away
+    processUp(mapper);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+}
+
+
+// --- MultiTouchInputMapperTest ---
+
+class MultiTouchInputMapperTest : public TouchInputMapperTest {
+protected:
+    void prepareAxes(int axes);
+
+    void processPosition(MultiTouchInputMapper* mapper, int32_t x, int32_t y);
+    void processTouchMajor(MultiTouchInputMapper* mapper, int32_t touchMajor);
+    void processTouchMinor(MultiTouchInputMapper* mapper, int32_t touchMinor);
+    void processToolMajor(MultiTouchInputMapper* mapper, int32_t toolMajor);
+    void processToolMinor(MultiTouchInputMapper* mapper, int32_t toolMinor);
+    void processOrientation(MultiTouchInputMapper* mapper, int32_t orientation);
+    void processPressure(MultiTouchInputMapper* mapper, int32_t pressure);
+    void processDistance(MultiTouchInputMapper* mapper, int32_t distance);
+    void processId(MultiTouchInputMapper* mapper, int32_t id);
+    void processSlot(MultiTouchInputMapper* mapper, int32_t slot);
+    void processToolType(MultiTouchInputMapper* mapper, int32_t toolType);
+    void processKey(MultiTouchInputMapper* mapper, int32_t code, int32_t value);
+    void processMTSync(MultiTouchInputMapper* mapper);
+    void processSync(MultiTouchInputMapper* mapper);
+};
+
+void MultiTouchInputMapperTest::prepareAxes(int axes) {
+    if (axes & POSITION) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_POSITION_X,
+                RAW_X_MIN, RAW_X_MAX, 0, 0);
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_POSITION_Y,
+                RAW_Y_MIN, RAW_Y_MAX, 0, 0);
+    }
+    if (axes & TOUCH) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_TOUCH_MAJOR,
+                RAW_TOUCH_MIN, RAW_TOUCH_MAX, 0, 0);
+        if (axes & MINOR) {
+            mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_TOUCH_MINOR,
+                    RAW_TOUCH_MIN, RAW_TOUCH_MAX, 0, 0);
+        }
+    }
+    if (axes & TOOL) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_WIDTH_MAJOR,
+                RAW_TOOL_MIN, RAW_TOOL_MAX, 0, 0);
+        if (axes & MINOR) {
+            mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_WIDTH_MINOR,
+                    RAW_TOOL_MAX, RAW_TOOL_MAX, 0, 0);
+        }
+    }
+    if (axes & ORIENTATION) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_ORIENTATION,
+                RAW_ORIENTATION_MIN, RAW_ORIENTATION_MAX, 0, 0);
+    }
+    if (axes & PRESSURE) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_PRESSURE,
+                RAW_PRESSURE_MIN, RAW_PRESSURE_MAX, 0, 0);
+    }
+    if (axes & DISTANCE) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_DISTANCE,
+                RAW_DISTANCE_MIN, RAW_DISTANCE_MAX, 0, 0);
+    }
+    if (axes & ID) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_TRACKING_ID,
+                RAW_ID_MIN, RAW_ID_MAX, 0, 0);
+    }
+    if (axes & SLOT) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_SLOT,
+                RAW_SLOT_MIN, RAW_SLOT_MAX, 0, 0);
+        mFakeEventHub->setAbsoluteAxisValue(DEVICE_ID, ABS_MT_SLOT, 0);
+    }
+    if (axes & TOOL_TYPE) {
+        mFakeEventHub->addAbsoluteAxis(DEVICE_ID, ABS_MT_TOOL_TYPE,
+                0, MT_TOOL_MAX, 0, 0);
+    }
+}
+
+void MultiTouchInputMapperTest::processPosition(
+        MultiTouchInputMapper* mapper, int32_t x, int32_t y) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_POSITION_X, x);
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_POSITION_Y, y);
+}
+
+void MultiTouchInputMapperTest::processTouchMajor(
+        MultiTouchInputMapper* mapper, int32_t touchMajor) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_TOUCH_MAJOR, touchMajor);
+}
+
+void MultiTouchInputMapperTest::processTouchMinor(
+        MultiTouchInputMapper* mapper, int32_t touchMinor) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_TOUCH_MINOR, touchMinor);
+}
+
+void MultiTouchInputMapperTest::processToolMajor(
+        MultiTouchInputMapper* mapper, int32_t toolMajor) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_WIDTH_MAJOR, toolMajor);
+}
+
+void MultiTouchInputMapperTest::processToolMinor(
+        MultiTouchInputMapper* mapper, int32_t toolMinor) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_WIDTH_MINOR, toolMinor);
+}
+
+void MultiTouchInputMapperTest::processOrientation(
+        MultiTouchInputMapper* mapper, int32_t orientation) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_ORIENTATION, orientation);
+}
+
+void MultiTouchInputMapperTest::processPressure(
+        MultiTouchInputMapper* mapper, int32_t pressure) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_PRESSURE, pressure);
+}
+
+void MultiTouchInputMapperTest::processDistance(
+        MultiTouchInputMapper* mapper, int32_t distance) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_DISTANCE, distance);
+}
+
+void MultiTouchInputMapperTest::processId(
+        MultiTouchInputMapper* mapper, int32_t id) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_TRACKING_ID, id);
+}
+
+void MultiTouchInputMapperTest::processSlot(
+        MultiTouchInputMapper* mapper, int32_t slot) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_SLOT, slot);
+}
+
+void MultiTouchInputMapperTest::processToolType(
+        MultiTouchInputMapper* mapper, int32_t toolType) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_ABS, ABS_MT_TOOL_TYPE, toolType);
+}
+
+void MultiTouchInputMapperTest::processKey(
+        MultiTouchInputMapper* mapper, int32_t code, int32_t value) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_KEY, code, value);
+}
+
+void MultiTouchInputMapperTest::processMTSync(MultiTouchInputMapper* mapper) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_MT_REPORT, 0);
+}
+
+void MultiTouchInputMapperTest::processSync(MultiTouchInputMapper* mapper) {
+    process(mapper, ARBITRARY_TIME, DEVICE_ID, EV_SYN, SYN_REPORT, 0);
+}
+
+
+TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithoutTrackingIds) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyMotionArgs motionArgs;
+
+    // Two fingers down at once.
+    int32_t x1 = 100, y1 = 125, x2 = 300, y2 = 500;
+    processPosition(mapper, x1, y1);
+    processMTSync(mapper);
+    processPosition(mapper, x2, y2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Move.
+    x1 += 10; y1 += 15; x2 += 5; y2 -= 10;
+    processPosition(mapper, x1, y1);
+    processMTSync(mapper);
+    processPosition(mapper, x2, y2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // First finger up.
+    x2 += 15; y2 -= 20;
+    processPosition(mapper, x2, y2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_UP | (0 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(1, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Move.
+    x2 += 20; y2 -= 25;
+    processPosition(mapper, x2, y2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(1, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // New finger down.
+    int32_t x3 = 700, y3 = 300;
+    processPosition(mapper, x2, y2);
+    processMTSync(mapper);
+    processPosition(mapper, x3, y3);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (0 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Second finger up.
+    x3 += 30; y3 -= 20;
+    processPosition(mapper, x3, y3);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_UP | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Last finger up.
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime);
+    ASSERT_EQ(DEVICE_ID, motionArgs.deviceId);
+    ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source);
+    ASSERT_EQ(uint32_t(0), motionArgs.policyFlags);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.flags);
+    ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState);
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(0, motionArgs.edgeFlags);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NEAR(X_PRECISION, motionArgs.xPrecision, EPSILON);
+    ASSERT_NEAR(Y_PRECISION, motionArgs.yPrecision, EPSILON);
+    ASSERT_EQ(ARBITRARY_TIME, motionArgs.downTime);
+
+    // Should not have sent any more keys or motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithTrackingIds) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | ID);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyMotionArgs motionArgs;
+
+    // Two fingers down at once.
+    int32_t x1 = 100, y1 = 125, x2 = 300, y2 = 500;
+    processPosition(mapper, x1, y1);
+    processId(mapper, 1);
+    processMTSync(mapper);
+    processPosition(mapper, x2, y2);
+    processId(mapper, 2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Move.
+    x1 += 10; y1 += 15; x2 += 5; y2 -= 10;
+    processPosition(mapper, x1, y1);
+    processId(mapper, 1);
+    processMTSync(mapper);
+    processPosition(mapper, x2, y2);
+    processId(mapper, 2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // First finger up.
+    x2 += 15; y2 -= 20;
+    processPosition(mapper, x2, y2);
+    processId(mapper, 2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_UP | (0 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(1, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Move.
+    x2 += 20; y2 -= 25;
+    processPosition(mapper, x2, y2);
+    processId(mapper, 2);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(1, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // New finger down.
+    int32_t x3 = 700, y3 = 300;
+    processPosition(mapper, x2, y2);
+    processId(mapper, 2);
+    processMTSync(mapper);
+    processPosition(mapper, x3, y3);
+    processId(mapper, 3);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (0 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Second finger up.
+    x3 += 30; y3 -= 20;
+    processPosition(mapper, x3, y3);
+    processId(mapper, 3);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_UP | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Last finger up.
+    processMTSync(mapper);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Should not have sent any more keys or motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_NormalMultiTouchGesture_WithSlots) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | ID | SLOT);
+    prepareVirtualKeys();
+    addMapperAndConfigure(mapper);
+
+    mFakeContext->setGlobalMetaState(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON);
+
+    NotifyMotionArgs motionArgs;
+
+    // Two fingers down at once.
+    int32_t x1 = 100, y1 = 125, x2 = 300, y2 = 500;
+    processPosition(mapper, x1, y1);
+    processId(mapper, 1);
+    processSlot(mapper, 1);
+    processPosition(mapper, x2, y2);
+    processId(mapper, 2);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Move.
+    x1 += 10; y1 += 15; x2 += 5; y2 -= 10;
+    processSlot(mapper, 0);
+    processPosition(mapper, x1, y1);
+    processSlot(mapper, 1);
+    processPosition(mapper, x2, y2);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // First finger up.
+    x2 += 15; y2 -= 20;
+    processSlot(mapper, 0);
+    processId(mapper, -1);
+    processSlot(mapper, 1);
+    processPosition(mapper, x2, y2);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_UP | (0 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x1), toDisplayY(y1), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(1, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Move.
+    x2 += 20; y2 -= 25;
+    processPosition(mapper, x2, y2);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(1, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // New finger down.
+    int32_t x3 = 700, y3 = 300;
+    processPosition(mapper, x2, y2);
+    processSlot(mapper, 0);
+    processId(mapper, 3);
+    processPosition(mapper, x3, y3);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (0 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Second finger up.
+    x3 += 30; y3 -= 20;
+    processSlot(mapper, 1);
+    processId(mapper, -1);
+    processSlot(mapper, 0);
+    processPosition(mapper, x3, y3);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_UP | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            motionArgs.action);
+    ASSERT_EQ(size_t(2), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_EQ(1, motionArgs.pointerProperties[1].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[1].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[1],
+            toDisplayX(x2), toDisplayY(y2), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Last finger up.
+    processId(mapper, -1);
+    processSync(mapper);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(size_t(1), motionArgs.pointerCount);
+    ASSERT_EQ(0, motionArgs.pointerProperties[0].id);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(x3), toDisplayY(y3), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // Should not have sent any more keys or motions.
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasNotCalled());
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasNotCalled());
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_AllAxes_WithDefaultCalibration) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | TOUCH | TOOL | PRESSURE | ORIENTATION | ID | MINOR | DISTANCE);
+    addMapperAndConfigure(mapper);
+
+    // These calculations are based on the input device calibration documentation.
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+    int32_t rawTouchMajor = 7;
+    int32_t rawTouchMinor = 6;
+    int32_t rawToolMajor = 9;
+    int32_t rawToolMinor = 8;
+    int32_t rawPressure = 11;
+    int32_t rawDistance = 0;
+    int32_t rawOrientation = 3;
+    int32_t id = 5;
+
+    float x = toDisplayX(rawX);
+    float y = toDisplayY(rawY);
+    float pressure = float(rawPressure) / RAW_PRESSURE_MAX;
+    float size = avg(rawTouchMajor, rawTouchMinor) / RAW_TOUCH_MAX;
+    float toolMajor = float(rawToolMajor) * GEOMETRIC_SCALE;
+    float toolMinor = float(rawToolMinor) * GEOMETRIC_SCALE;
+    float touchMajor = float(rawTouchMajor) * GEOMETRIC_SCALE;
+    float touchMinor = float(rawTouchMinor) * GEOMETRIC_SCALE;
+    float orientation = float(rawOrientation) / RAW_ORIENTATION_MAX * M_PI_2;
+    float distance = float(rawDistance);
+
+    processPosition(mapper, rawX, rawY);
+    processTouchMajor(mapper, rawTouchMajor);
+    processTouchMinor(mapper, rawTouchMinor);
+    processToolMajor(mapper, rawToolMajor);
+    processToolMinor(mapper, rawToolMinor);
+    processPressure(mapper, rawPressure);
+    processOrientation(mapper, rawOrientation);
+    processDistance(mapper, rawDistance);
+    processId(mapper, id);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(0, args.pointerProperties[0].id);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, pressure, size, touchMajor, touchMinor, toolMajor, toolMinor,
+            orientation, distance));
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_TouchAndToolAxes_GeometricCalibration) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | TOUCH | TOOL | MINOR);
+    addConfigurationProperty("touch.size.calibration", "geometric");
+    addMapperAndConfigure(mapper);
+
+    // These calculations are based on the input device calibration documentation.
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+    int32_t rawTouchMajor = 140;
+    int32_t rawTouchMinor = 120;
+    int32_t rawToolMajor = 180;
+    int32_t rawToolMinor = 160;
+
+    float x = toDisplayX(rawX);
+    float y = toDisplayY(rawY);
+    float size = avg(rawTouchMajor, rawTouchMinor) / RAW_TOUCH_MAX;
+    float toolMajor = float(rawToolMajor) * GEOMETRIC_SCALE;
+    float toolMinor = float(rawToolMinor) * GEOMETRIC_SCALE;
+    float touchMajor = float(rawTouchMajor) * GEOMETRIC_SCALE;
+    float touchMinor = float(rawTouchMinor) * GEOMETRIC_SCALE;
+
+    processPosition(mapper, rawX, rawY);
+    processTouchMajor(mapper, rawTouchMajor);
+    processTouchMinor(mapper, rawTouchMinor);
+    processToolMajor(mapper, rawToolMajor);
+    processToolMinor(mapper, rawToolMinor);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, 1.0f, size, touchMajor, touchMinor, toolMajor, toolMinor, 0, 0));
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_TouchAndToolAxes_SummedLinearCalibration) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | TOUCH | TOOL);
+    addConfigurationProperty("touch.size.calibration", "diameter");
+    addConfigurationProperty("touch.size.scale", "10");
+    addConfigurationProperty("touch.size.bias", "160");
+    addConfigurationProperty("touch.size.isSummed", "1");
+    addMapperAndConfigure(mapper);
+
+    // These calculations are based on the input device calibration documentation.
+    // Note: We only provide a single common touch/tool value because the device is assumed
+    //       not to emit separate values for each pointer (isSummed = 1).
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+    int32_t rawX2 = 150;
+    int32_t rawY2 = 250;
+    int32_t rawTouchMajor = 5;
+    int32_t rawToolMajor = 8;
+
+    float x = toDisplayX(rawX);
+    float y = toDisplayY(rawY);
+    float x2 = toDisplayX(rawX2);
+    float y2 = toDisplayY(rawY2);
+    float size = float(rawTouchMajor) / 2 / RAW_TOUCH_MAX;
+    float touch = float(rawTouchMajor) / 2 * 10.0f + 160.0f;
+    float tool = float(rawToolMajor) / 2 * 10.0f + 160.0f;
+
+    processPosition(mapper, rawX, rawY);
+    processTouchMajor(mapper, rawTouchMajor);
+    processToolMajor(mapper, rawToolMajor);
+    processMTSync(mapper);
+    processPosition(mapper, rawX2, rawY2);
+    processTouchMajor(mapper, rawTouchMajor);
+    processToolMajor(mapper, rawToolMajor);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, args.action);
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_POINTER_DOWN | (1 << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT),
+            args.action);
+    ASSERT_EQ(size_t(2), args.pointerCount);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, 1.0f, size, touch, touch, tool, tool, 0, 0));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[1],
+            x2, y2, 1.0f, size, touch, touch, tool, tool, 0, 0));
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_TouchAndToolAxes_AreaCalibration) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | TOUCH | TOOL);
+    addConfigurationProperty("touch.size.calibration", "area");
+    addConfigurationProperty("touch.size.scale", "43");
+    addConfigurationProperty("touch.size.bias", "3");
+    addMapperAndConfigure(mapper);
+
+    // These calculations are based on the input device calibration documentation.
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+    int32_t rawTouchMajor = 5;
+    int32_t rawToolMajor = 8;
+
+    float x = toDisplayX(rawX);
+    float y = toDisplayY(rawY);
+    float size = float(rawTouchMajor) / RAW_TOUCH_MAX;
+    float touch = sqrtf(rawTouchMajor) * 43.0f + 3.0f;
+    float tool = sqrtf(rawToolMajor) * 43.0f + 3.0f;
+
+    processPosition(mapper, rawX, rawY);
+    processTouchMajor(mapper, rawTouchMajor);
+    processToolMajor(mapper, rawToolMajor);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, 1.0f, size, touch, touch, tool, tool, 0, 0));
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_PressureAxis_AmplitudeCalibration) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | PRESSURE);
+    addConfigurationProperty("touch.pressure.calibration", "amplitude");
+    addConfigurationProperty("touch.pressure.scale", "0.01");
+    addMapperAndConfigure(mapper);
+
+    // These calculations are based on the input device calibration documentation.
+    int32_t rawX = 100;
+    int32_t rawY = 200;
+    int32_t rawPressure = 60;
+
+    float x = toDisplayX(rawX);
+    float y = toDisplayY(rawY);
+    float pressure = float(rawPressure) * 0.01f;
+
+    processPosition(mapper, rawX, rawY);
+    processPressure(mapper, rawPressure);
+    processMTSync(mapper);
+    processSync(mapper);
+
+    NotifyMotionArgs args;
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&args));
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(args.pointerCoords[0],
+            x, y, pressure, 0, 0, 0, 0, 0, 0, 0));
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_ShouldHandleAllButtons) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | ID | SLOT);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+    NotifyKeyArgs keyArgs;
+
+    processId(mapper, 1);
+    processPosition(mapper, 100, 200);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.buttonState);
+
+    // press BTN_LEFT, release BTN_LEFT
+    processKey(mapper, BTN_LEFT, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_PRIMARY, motionArgs.buttonState);
+
+    processKey(mapper, BTN_LEFT, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // press BTN_RIGHT + BTN_MIDDLE, release BTN_RIGHT, release BTN_MIDDLE
+    processKey(mapper, BTN_RIGHT, 1);
+    processKey(mapper, BTN_MIDDLE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_SECONDARY | AMOTION_EVENT_BUTTON_TERTIARY,
+            motionArgs.buttonState);
+
+    processKey(mapper, BTN_RIGHT, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_TERTIARY, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_MIDDLE, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // press BTN_BACK, release BTN_BACK
+    processKey(mapper, BTN_BACK, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_BACK, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+
+    // press BTN_SIDE, release BTN_SIDE
+    processKey(mapper, BTN_SIDE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_BACK, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_SIDE, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_BACK, keyArgs.keyCode);
+
+    // press BTN_FORWARD, release BTN_FORWARD
+    processKey(mapper, BTN_FORWARD, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_FORWARD, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+
+    // press BTN_EXTRA, release BTN_EXTRA
+    processKey(mapper, BTN_EXTRA, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_FORWARD, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    processKey(mapper, BTN_EXTRA, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyKeyWasCalled(&keyArgs));
+    ASSERT_EQ(AKEY_EVENT_ACTION_UP, keyArgs.action);
+    ASSERT_EQ(AKEYCODE_FORWARD, keyArgs.keyCode);
+
+    // press BTN_STYLUS, release BTN_STYLUS
+    processKey(mapper, BTN_STYLUS, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_SECONDARY, motionArgs.buttonState);
+
+    processKey(mapper, BTN_STYLUS, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // press BTN_STYLUS2, release BTN_STYLUS2
+    processKey(mapper, BTN_STYLUS2, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_BUTTON_TERTIARY, motionArgs.buttonState);
+
+    processKey(mapper, BTN_STYLUS2, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(0, motionArgs.buttonState);
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+
+    // release touch
+    processId(mapper, -1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_EQ(0, motionArgs.buttonState);
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_ShouldHandleAllToolTypes) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | ID | SLOT | TOOL_TYPE);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+
+    // default tool type is finger
+    processId(mapper, 1);
+    processPosition(mapper, 100, 200);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // eraser
+    processKey(mapper, BTN_TOOL_RUBBER, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_ERASER, motionArgs.pointerProperties[0].toolType);
+
+    // stylus
+    processKey(mapper, BTN_TOOL_RUBBER, 0);
+    processKey(mapper, BTN_TOOL_PEN, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // brush
+    processKey(mapper, BTN_TOOL_PEN, 0);
+    processKey(mapper, BTN_TOOL_BRUSH, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // pencil
+    processKey(mapper, BTN_TOOL_BRUSH, 0);
+    processKey(mapper, BTN_TOOL_PENCIL, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // airbrush
+    processKey(mapper, BTN_TOOL_PENCIL, 0);
+    processKey(mapper, BTN_TOOL_AIRBRUSH, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // mouse
+    processKey(mapper, BTN_TOOL_AIRBRUSH, 0);
+    processKey(mapper, BTN_TOOL_MOUSE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, motionArgs.pointerProperties[0].toolType);
+
+    // lens
+    processKey(mapper, BTN_TOOL_MOUSE, 0);
+    processKey(mapper, BTN_TOOL_LENS, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, motionArgs.pointerProperties[0].toolType);
+
+    // double-tap
+    processKey(mapper, BTN_TOOL_LENS, 0);
+    processKey(mapper, BTN_TOOL_DOUBLETAP, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // triple-tap
+    processKey(mapper, BTN_TOOL_DOUBLETAP, 0);
+    processKey(mapper, BTN_TOOL_TRIPLETAP, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // quad-tap
+    processKey(mapper, BTN_TOOL_TRIPLETAP, 0);
+    processKey(mapper, BTN_TOOL_QUADTAP, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // finger
+    processKey(mapper, BTN_TOOL_QUADTAP, 0);
+    processKey(mapper, BTN_TOOL_FINGER, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // stylus trumps finger
+    processKey(mapper, BTN_TOOL_PEN, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // eraser trumps stylus
+    processKey(mapper, BTN_TOOL_RUBBER, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_ERASER, motionArgs.pointerProperties[0].toolType);
+
+    // mouse trumps eraser
+    processKey(mapper, BTN_TOOL_MOUSE, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_MOUSE, motionArgs.pointerProperties[0].toolType);
+
+    // MT tool type trumps BTN tool types: MT_TOOL_FINGER
+    processToolType(mapper, MT_TOOL_FINGER); // this is the first time we send MT_TOOL_TYPE
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+
+    // MT tool type trumps BTN tool types: MT_TOOL_PEN
+    processToolType(mapper, MT_TOOL_PEN);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_STYLUS, motionArgs.pointerProperties[0].toolType);
+
+    // back to default tool type
+    processToolType(mapper, -1); // use a deliberately undefined tool type, for testing
+    processKey(mapper, BTN_TOOL_MOUSE, 0);
+    processKey(mapper, BTN_TOOL_RUBBER, 0);
+    processKey(mapper, BTN_TOOL_PEN, 0);
+    processKey(mapper, BTN_TOOL_FINGER, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_MOVE, motionArgs.action);
+    ASSERT_EQ(AMOTION_EVENT_TOOL_TYPE_FINGER, motionArgs.pointerProperties[0].toolType);
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_WhenBtnTouchPresent_HoversIfItsValueIsZero) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | ID | SLOT);
+    mFakeEventHub->addKey(DEVICE_ID, BTN_TOUCH, 0, AKEYCODE_UNKNOWN, 0);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+
+    // initially hovering because BTN_TOUCH not sent yet, pressure defaults to 0
+    processId(mapper, 1);
+    processPosition(mapper, 100, 200);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // move a little
+    processPosition(mapper, 150, 250);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // down when BTN_TOUCH is pressed, pressure defaults to 1
+    processKey(mapper, BTN_TOUCH, 1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // up when BTN_TOUCH is released, hover restored
+    processKey(mapper, BTN_TOUCH, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // exit hover when pointer goes away
+    processId(mapper, -1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+}
+
+TEST_F(MultiTouchInputMapperTest, Process_WhenAbsMTPressureIsPresent_HoversIfItsValueIsZero) {
+    MultiTouchInputMapper* mapper = new MultiTouchInputMapper(mDevice);
+    addConfigurationProperty("touch.deviceType", "touchScreen");
+    prepareDisplay(DISPLAY_ORIENTATION_0);
+    prepareAxes(POSITION | ID | SLOT | PRESSURE);
+    addMapperAndConfigure(mapper);
+
+    NotifyMotionArgs motionArgs;
+
+    // initially hovering because pressure is 0
+    processId(mapper, 1);
+    processPosition(mapper, 100, 200);
+    processPressure(mapper, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(100), toDisplayY(200), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // move a little
+    processPosition(mapper, 150, 250);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // down when pressure becomes non-zero
+    processPressure(mapper, RAW_PRESSURE_MAX);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    // up when pressure becomes 0, hover restored
+    processPressure(mapper, 0);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_UP, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 1, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_ENTER, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_MOVE, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+
+    // exit hover when pointer goes away
+    processId(mapper, -1);
+    processSync(mapper);
+    ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs));
+    ASSERT_EQ(AMOTION_EVENT_ACTION_HOVER_EXIT, motionArgs.action);
+    ASSERT_NO_FATAL_FAILURE(assertPointerCoords(motionArgs.pointerCoords[0],
+            toDisplayX(150), toDisplayY(250), 0, 0, 0, 0, 0, 0, 0, 0));
+}
+
+
+} // namespace android
diff --git a/services/powermanager/IPowerManager.cpp b/services/powermanager/IPowerManager.cpp
index 5ecd299..ee730d6 100644
--- a/services/powermanager/IPowerManager.cpp
+++ b/services/powermanager/IPowerManager.cpp
@@ -33,6 +33,7 @@
     ACQUIRE_WAKE_LOCK_UID = IBinder::FIRST_CALL_TRANSACTION + 1,
     RELEASE_WAKE_LOCK = IBinder::FIRST_CALL_TRANSACTION + 2,
     UPDATE_WAKE_LOCK_UIDS = IBinder::FIRST_CALL_TRANSACTION + 3,
+    POWER_HINT = IBinder::FIRST_CALL_TRANSACTION + 4,
 };
 
 class BpPowerManager : public BpInterface<IPowerManager>
@@ -54,6 +55,7 @@
         data.writeString16(tag);
         data.writeString16(packageName);
         data.writeInt32(0); // no WorkSource
+        data.writeString16(NULL, 0); // no history tag
         return remote()->transact(ACQUIRE_WAKE_LOCK, data, &reply);
     }
 
@@ -89,6 +91,15 @@
         // but it should return ASAP
         return remote()->transact(UPDATE_WAKE_LOCK_UIDS, data, &reply, IBinder::FLAG_ONEWAY);
     }
+
+    virtual status_t powerHint(int hintId, int param)
+    {
+        Parcel data, reply;
+        data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor());
+        data.writeInt32(hintId);
+        data.writeInt32(param);
+        return remote()->transact(POWER_HINT, data, &reply, IBinder::FLAG_ONEWAY);
+    }
 };
 
 IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager");
diff --git a/services/sensorservice/BatteryService.cpp b/services/sensorservice/BatteryService.cpp
index 38dc749..cb962a6 100644
--- a/services/sensorservice/BatteryService.cpp
+++ b/services/sensorservice/BatteryService.cpp
@@ -34,32 +34,10 @@
     const sp<IServiceManager> sm(defaultServiceManager());
     if (sm != NULL) {
         const String16 name("batterystats");
-        mBatteryStatService = sm->getService(name);
+        mBatteryStatService = interface_cast<IBatteryStats>(sm->getService(name));
     }
 }
 
-status_t BatteryService::noteStartSensor(int uid, int handle) {
-    Parcel data, reply;
-    data.writeInterfaceToken(DESCRIPTOR);
-    data.writeInt32(uid);
-    data.writeInt32(handle);
-    status_t err = mBatteryStatService->transact(
-            TRANSACTION_noteStartSensor, data, &reply, 0);
-    err = reply.readExceptionCode();
-    return err;
-}
-
-status_t BatteryService::noteStopSensor(int uid, int handle) {
-    Parcel data, reply;
-    data.writeInterfaceToken(DESCRIPTOR);
-    data.writeInt32(uid);
-    data.writeInt32(handle);
-    status_t err = mBatteryStatService->transact(
-            TRANSACTION_noteStopSensor, data, &reply, 0);
-    err = reply.readExceptionCode();
-    return err;
-}
-
 bool BatteryService::addSensor(uid_t uid, int handle) {
     Mutex::Autolock _l(mActivationsLock);
     Info key(uid, handle);
@@ -86,7 +64,7 @@
     if (mBatteryStatService != 0) {
         if (addSensor(uid, handle)) {
             int64_t identity = IPCThreadState::self()->clearCallingIdentity();
-            noteStartSensor(uid, handle);
+            mBatteryStatService->noteStartSensor(uid, handle);
             IPCThreadState::self()->restoreCallingIdentity(identity);
         }
     }
@@ -95,7 +73,7 @@
     if (mBatteryStatService != 0) {
         if (removeSensor(uid, handle)) {
             int64_t identity = IPCThreadState::self()->clearCallingIdentity();
-            noteStopSensor(uid, handle);
+            mBatteryStatService->noteStopSensor(uid, handle);
             IPCThreadState::self()->restoreCallingIdentity(identity);
         }
     }
@@ -108,7 +86,7 @@
         for (ssize_t i=0 ; i<mActivations.size() ; i++) {
             const Info& info(mActivations[i]);
             if (info.uid == uid) {
-                noteStopSensor(info.uid, info.handle);
+                mBatteryStatService->noteStopSensor(info.uid, info.handle);
                 mActivations.removeAt(i);
                 i--;
             }
@@ -117,8 +95,6 @@
     }
 }
 
-const String16 BatteryService::DESCRIPTOR("com.android.internal.app.IBatteryStats");
-
 ANDROID_SINGLETON_STATIC_INSTANCE(BatteryService)
 
 // ---------------------------------------------------------------------------
diff --git a/services/sensorservice/BatteryService.h b/services/sensorservice/BatteryService.h
index 86cc884..08ba857 100644
--- a/services/sensorservice/BatteryService.h
+++ b/services/sensorservice/BatteryService.h
@@ -17,22 +17,18 @@
 #include <stdint.h>
 #include <sys/types.h>
 
+#include <binder/IBatteryStats.h>
 #include <utils/Singleton.h>
 
 namespace android {
 // ---------------------------------------------------------------------------
 
 class BatteryService : public Singleton<BatteryService> {
-    static const int TRANSACTION_noteStartSensor = IBinder::FIRST_CALL_TRANSACTION + 3;
-    static const int TRANSACTION_noteStopSensor = IBinder::FIRST_CALL_TRANSACTION + 4;
-    static const String16 DESCRIPTOR;
 
     friend class Singleton<BatteryService>;
-    sp<IBinder> mBatteryStatService;
+    sp<IBatteryStats> mBatteryStatService;
 
     BatteryService();
-    status_t noteStartSensor(int uid, int handle);
-    status_t noteStopSensor(int uid, int handle);
 
     void enableSensorImpl(uid_t uid, int handle);
     void disableSensorImpl(uid_t uid, int handle);
diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp
index 3b64f0a..01dbdfb 100644
--- a/services/sensorservice/SensorDevice.cpp
+++ b/services/sensorservice/SensorDevice.cpp
@@ -309,7 +309,7 @@
     return mSensorDevice->common.version;
 }
 
-status_t SensorDevice::flush(void* /*ident*/, int handle) {
+status_t SensorDevice::flush(void* ident, int handle) {
     if (getHalDeviceVersion() < SENSORS_DEVICE_API_VERSION_1_1) {
         return INVALID_OPERATION;
     }
diff --git a/services/sensorservice/SensorInterface.cpp b/services/sensorservice/SensorInterface.cpp
index 2bf5e72..970220b 100644
--- a/services/sensorservice/SensorInterface.cpp
+++ b/services/sensorservice/SensorInterface.cpp
@@ -17,8 +17,6 @@
 #include <stdint.h>
 #include <sys/types.h>
 
-#include <cutils/log.h>
-
 #include "SensorInterface.h"
 
 namespace android {
@@ -34,7 +32,6 @@
     : mSensorDevice(SensorDevice::getInstance()),
       mSensor(&sensor, mSensorDevice.getHalDeviceVersion())
 {
-    ALOGI("%s", sensor.name);
 }
 
 HardwareSensor::~HardwareSensor() {
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index 148f404..1bee04f 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -159,11 +159,11 @@
                     mSocketBufferSize = MAX_SOCKET_BUFFER_SIZE_BATCHED;
                 }
             }
-            ALOGD("Max socket buffer size %u", mSocketBufferSize);
             if (fp) {
                 fclose(fp);
             }
 
+            mWakeLockAcquired = false;
             run("SensorService", PRIORITY_URGENT_DISPLAY);
             mInitCheck = NO_ERROR;
         }
@@ -284,6 +284,7 @@
         }
 
         result.appendFormat("%zu Max Socket Buffer size\n", mSocketBufferSize);
+        result.appendFormat("WakeLock Status: %s \n", mWakeLockAcquired ? "acquired" : "not held");
         result.appendFormat("%zd active connections\n", mActiveConnections.size());
 
         for (size_t i=0 ; i < mActiveConnections.size() ; i++) {
@@ -298,7 +299,7 @@
     return NO_ERROR;
 }
 
-void SensorService::cleanupAutoDisabledSensor(const sp<SensorEventConnection>& connection,
+void SensorService::cleanupAutoDisabledSensorLocked(const sp<SensorEventConnection>& connection,
         sensors_event_t const* buffer, const int count) {
     SensorInterface* sensor;
     status_t err = NO_ERROR;
@@ -311,7 +312,7 @@
                 if (sensor != NULL) {
                     sensor->autoDisable(connection.get(), handle);
                 }
-                cleanupWithoutDisable(connection, handle);
+                cleanupWithoutDisableLocked(connection, handle);
             }
         }
     }
@@ -333,7 +334,6 @@
     const size_t vcount = mVirtualSensorList.size();
 
     ssize_t count;
-    bool wakeLockAcquired = false;
     const int halVersion = device.getHalDeviceVersion();
     do {
         count = device.poll(buffer, numEventMax);
@@ -341,26 +341,31 @@
             ALOGE("sensor poll failed (%s)", strerror(-count));
             break;
         }
-
-        // Poll has returned. Hold a wakelock.
-        // Todo(): add a flag to the sensors definitions to indicate
-        // the sensors which can wake up the AP
+        Mutex::Autolock _l(mLock);
+        // Poll has returned. Hold a wakelock if one of the events is from a wake up sensor. The
+        // rest of this loop is under a critical section protected by mLock. Acquiring a wakeLock,
+        // sending events to clients (incrementing SensorEventConnection::mWakeLockRefCount) should
+        // not be interleaved with decrementing SensorEventConnection::mWakeLockRefCount and
+        // releasing the wakelock.
+        bool bufferHasWakeUpEvent = false;
         for (int i = 0; i < count; i++) {
-            if (buffer[i].type == SENSOR_TYPE_SIGNIFICANT_MOTION) {
-                 acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME);
-                 wakeLockAcquired = true;
-                 break;
+            if (isWakeUpSensorEvent(buffer[i])) {
+                bufferHasWakeUpEvent = true;
+                break;
             }
         }
 
-        recordLastValue(buffer, count);
+        if (bufferHasWakeUpEvent && !mWakeLockAcquired) {
+            acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME);
+            mWakeLockAcquired = true;
+            ALOGD_IF(DEBUG_CONNECTIONS, "acquired wakelock %s", WAKE_LOCK_NAME);
+        }
+        recordLastValueLocked(buffer, count);
 
         // handle virtual sensors
         if (count && vcount) {
             sensors_event_t const * const event = buffer;
-            const DefaultKeyedVector<int, SensorInterface*> virtualSensors(
-                    getActiveVirtualSensors());
-            const size_t activeVirtualSensorCount = virtualSensors.size();
+            const size_t activeVirtualSensorCount = mActiveVirtualSensors.size();
             if (activeVirtualSensorCount) {
                 size_t k = 0;
                 SensorFusion& fusion(SensorFusion::getInstance());
@@ -378,7 +383,7 @@
                             break;
                         }
                         sensors_event_t out;
-                        SensorInterface* si = virtualSensors.valueAt(j);
+                        SensorInterface* si = mActiveVirtualSensors.valueAt(j);
                         if (si->process(&out, event[i])) {
                             buffer[count + k] = out;
                             k++;
@@ -387,7 +392,7 @@
                 }
                 if (k) {
                     // record the last synthesized values
-                    recordLastValue(&buffer[count], k);
+                    recordLastValueLocked(&buffer[count], k);
                     count += k;
                     // sort the buffer by time-stamps
                     sortEventBuffer(buffer, count);
@@ -406,22 +411,24 @@
             }
         }
 
-        // send our events to clients...
-        const SortedVector< wp<SensorEventConnection> > activeConnections(
-                getActiveConnections());
-        size_t numConnections = activeConnections.size();
-        for (size_t i=0 ; i<numConnections ; i++) {
-            sp<SensorEventConnection> connection(
-                    activeConnections[i].promote());
+        // Send our events to clients. Check the state of wake lock for each client and release the
+        // lock if none of the clients need it.
+        bool needsWakeLock = false;
+        for (size_t i=0 ; i < mActiveConnections.size(); i++) {
+            sp<SensorEventConnection> connection(mActiveConnections[i].promote());
             if (connection != 0) {
                 connection->sendEvents(buffer, count, scratch);
+                needsWakeLock |= connection->needsWakeLock();
                 // Some sensors need to be auto disabled after the trigger
-                cleanupAutoDisabledSensor(connection, buffer, count);
+                cleanupAutoDisabledSensorLocked(connection, buffer, count);
             }
         }
 
-        // We have read the data, upper layers should hold the wakelock.
-        if (wakeLockAcquired) release_wake_lock(WAKE_LOCK_NAME);
+        if (mWakeLockAcquired && !needsWakeLock) {
+            release_wake_lock(WAKE_LOCK_NAME);
+            mWakeLockAcquired = false;
+            ALOGD_IF(DEBUG_CONNECTIONS, "released wakelock %s", WAKE_LOCK_NAME);
+        }
     } while (count >= 0 || Thread::exitPending());
 
     ALOGW("Exiting SensorService::threadLoop => aborting...");
@@ -429,9 +436,8 @@
     return false;
 }
 
-void SensorService::recordLastValue(
+void SensorService::recordLastValueLocked(
         const sensors_event_t* buffer, size_t count) {
-    Mutex::Autolock _l(mLock);
     const sensors_event_t* last = NULL;
     for (size_t i = 0; i < count; i++) {
         const sensors_event_t* event = &buffer[i];
@@ -459,20 +465,6 @@
     qsort(buffer, count, sizeof(sensors_event_t), compar::cmp);
 }
 
-SortedVector< wp<SensorService::SensorEventConnection> >
-SensorService::getActiveConnections() const
-{
-    Mutex::Autolock _l(mLock);
-    return mActiveConnections;
-}
-
-DefaultKeyedVector<int, SensorInterface*>
-SensorService::getActiveVirtualSensors() const
-{
-    Mutex::Autolock _l(mLock);
-    return mActiveVirtualSensors;
-}
-
 String8 SensorService::getSensorName(int handle) const {
     size_t count = mUserSensorList.size();
     for (size_t i=0 ; i<count ; i++) {
@@ -490,6 +482,11 @@
     return sensor->isVirtual();
 }
 
+bool SensorService::isWakeUpSensorEvent(const sensors_event_t& event) const {
+    SensorInterface* sensor = mSensorMap.valueFor(event.sensor);
+    return sensor->getSensor().isWakeUpSensor();
+}
+
 Vector<Sensor> SensorService::getSensorList()
 {
     char value[PROPERTY_VALUE_MAX];
@@ -554,6 +551,9 @@
     }
     mActiveConnections.remove(connection);
     BatteryService::cleanup(c->getUid());
+    if (c->needsWakeLock()) {
+        checkWakeLockStateLocked();
+    }
 }
 
 Sensor SensorService::getSensorFromHandle(int handle) const {
@@ -585,15 +585,24 @@
         }
     } else {
         if (rec->addConnection(connection)) {
-            // this sensor is already activated, but we are adding a
-            // connection that uses it. Immediately send down the last
-            // known value of the requested sensor if it's not a
+            // this sensor is already activated, but we are adding a connection that uses it.
+            // Immediately send down the last known value of the requested sensor if it's not a
             // "continuous" sensor.
             if (sensor->getSensor().getMinDelay() == 0) {
-                sensors_event_t scratch;
+                // NOTE: The wake_up flag of this event may get set to
+                // WAKE_UP_SENSOR_EVENT_NEEDS_ACK if this is a wake_up event.
                 sensors_event_t& event(mLastEventSeen.editValueFor(handle));
                 if (event.version == sizeof(sensors_event_t)) {
-                    connection->sendEvents(&event, 1);
+                    if (isWakeUpSensorEvent(event) && !mWakeLockAcquired) {
+                        acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME);
+                        mWakeLockAcquired = true;
+                        ALOGD_IF(DEBUG_CONNECTIONS, "acquired wakelock for on_change sensor %s",
+                                                        WAKE_LOCK_NAME);
+                    }
+                    connection->sendEvents(&event, 1, NULL);
+                    if (!connection->needsWakeLock() && mWakeLockAcquired) {
+                        checkWakeLockStateLocked();
+                    }
                 }
             }
         }
@@ -751,6 +760,31 @@
     }
 }
 
+void SensorService::checkWakeLockState() {
+    Mutex::Autolock _l(mLock);
+    checkWakeLockStateLocked();
+}
+
+void SensorService::checkWakeLockStateLocked() {
+    if (!mWakeLockAcquired) {
+        return;
+    }
+    bool releaseLock = true;
+    for (size_t i=0 ; i<mActiveConnections.size() ; i++) {
+        sp<SensorEventConnection> connection(mActiveConnections[i].promote());
+        if (connection != 0) {
+            if (connection->needsWakeLock()) {
+                releaseLock = false;
+                break;
+            }
+        }
+    }
+    if (releaseLock) {
+        ALOGD_IF(DEBUG_CONNECTIONS, "releasing wakelock %s", WAKE_LOCK_NAME);
+        release_wake_lock(WAKE_LOCK_NAME);
+        mWakeLockAcquired = false;
+    }
+}
 // ---------------------------------------------------------------------------
 
 SensorService::SensorRecord::SensorRecord(
@@ -783,7 +817,7 @@
 
 SensorService::SensorEventConnection::SensorEventConnection(
         const sp<SensorService>& service, uid_t uid)
-    : mService(service), mUid(uid)
+    : mService(service), mUid(uid), mWakeLockRefCount(0)
 {
     const SensorDevice& device(SensorDevice::getInstance());
     if (device.getHalDeviceVersion() >= SENSORS_DEVICE_API_VERSION_1_1) {
@@ -804,15 +838,22 @@
 {
 }
 
+bool SensorService::SensorEventConnection::needsWakeLock() {
+    Mutex::Autolock _l(mConnectionLock);
+    return mWakeLockRefCount > 0;
+}
+
 void SensorService::SensorEventConnection::dump(String8& result) {
     Mutex::Autolock _l(mConnectionLock);
+    result.appendFormat("%d WakeLockRefCount\n", mWakeLockRefCount);
     for (size_t i = 0; i < mSensorInfo.size(); ++i) {
         const FlushInfo& flushInfo = mSensorInfo.valueAt(i);
-        result.appendFormat("\t %s | status: %s | pending flush events %d\n",
+        result.appendFormat("\t %s | status: %s | pending flush events %d | uid %d\n",
                             mService->getSensorName(mSensorInfo.keyAt(i)).string(),
                             flushInfo.mFirstFlushPending ? "First flush pending" :
                                                            "active",
-                            flushInfo.mPendingFlushEventsToSend);
+                            flushInfo.mPendingFlushEventsToSend,
+                            mUid);
     }
 }
 
@@ -862,9 +903,8 @@
 {
     // filter out events not for this connection
     size_t count = 0;
-
+    Mutex::Autolock _l(mConnectionLock);
     if (scratch) {
-        Mutex::Autolock _l(mConnectionLock);
         size_t i=0;
         while (i<numEvents) {
             int32_t curr = buffer[i].sensor;
@@ -904,7 +944,6 @@
         ASensorEvent flushCompleteEvent;
         flushCompleteEvent.type = SENSOR_TYPE_META_DATA;
         flushCompleteEvent.sensor = 0;
-        Mutex::Autolock _l(mConnectionLock);
         // Loop through all the sensors for this connection and check if there are any pending
         // flush complete events to be sent.
         for (size_t i = 0; i < mSensorInfo.size(); ++i) {
@@ -929,6 +968,7 @@
         return status_t(NO_ERROR);
     }
 
+    int numWakeUpSensorEvents = countWakeUpSensorEventsLocked(scratch, count);
     // NOTE: ASensorEvent and sensors_event_t are the same type
     ssize_t size = SensorEventQueue::write(mChannel,
             reinterpret_cast<ASensorEvent const*>(scratch), count);
@@ -936,11 +976,10 @@
         // the destination doesn't accept events anymore, it's probably
         // full. For now, we just drop the events on the floor.
         // ALOGW("dropping %d events on the floor", count);
-        Mutex::Autolock _l(mConnectionLock);
         countFlushCompleteEventsLocked(scratch, count);
+        mWakeLockRefCount -= numWakeUpSensorEvents;
         return size;
     }
-
     return size < 0 ? status_t(size) : status_t(NO_ERROR);
 }
 
@@ -960,6 +999,18 @@
     return;
 }
 
+int SensorService::SensorEventConnection::countWakeUpSensorEventsLocked(
+                       sensors_event_t* scratch, const int count) {
+    for (int i = 0; i < count; ++i) {
+        if (mService->isWakeUpSensorEvent(scratch[i])) {
+            scratch[i].flags |= WAKE_UP_SENSOR_EVENT_NEEDS_ACK;
+            ++mWakeLockRefCount;
+            return 1;
+        }
+    }
+    return 0;
+}
+
 sp<BitTube> SensorService::SensorEventConnection::getSensorChannel() const
 {
     return mChannel;
@@ -1009,6 +1060,17 @@
     return err;
 }
 
+void SensorService::SensorEventConnection::decreaseWakeLockRefCount() {
+    {
+        Mutex::Autolock _l(mConnectionLock);
+        --mWakeLockRefCount;
+    }
+    // Release the lock before calling checkWakeLockState which also needs the same connectionLock.
+    if (mWakeLockRefCount == 0) {
+        mService->checkWakeLockState();
+    }
+}
+
 // ---------------------------------------------------------------------------
 }; // namespace android
 
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index e88ffc8..5fd56b8 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -41,6 +41,7 @@
 // Max size is 1 MB which is enough to accept a batch of about 10k events.
 #define MAX_SOCKET_BUFFER_SIZE_BATCHED 1024 * 1024
 #define SOCKET_BUFFER_SIZE_NON_BATCHED 4 * 1024
+#define WAKE_UP_SENSOR_EVENT_NEEDS_ACK (1 << 31)
 
 struct sensors_poll_device_t;
 struct sensors_module_t;
@@ -71,7 +72,6 @@
     virtual sp<ISensorEventConnection> createSensorEventConnection();
     virtual status_t dump(int fd, const Vector<String16>& args);
 
-
     class SensorEventConnection : public BnSensorEventConnection {
         virtual ~SensorEventConnection();
         virtual void onFirstRef();
@@ -80,15 +80,26 @@
                                        nsecs_t maxBatchReportLatencyNs, int reservedFlags);
         virtual status_t setEventRate(int handle, nsecs_t samplingPeriodNs);
         virtual status_t flush();
+        void decreaseWakeLockRefCount();
         // Count the number of flush complete events which are about to be dropped in the buffer.
         // Increment mPendingFlushEventsToSend in mSensorInfo. These flush complete events will be
         // sent separately before the next batch of events.
         void countFlushCompleteEventsLocked(sensors_event_t* scratch, int numEventsDropped);
 
+        // Check if there are any wake up events in the buffer. If yes, increment the ref count.
+        // Increment it by exactly one unit for each packet sent on the socket. SOCK_SEQPACKET for
+        // the socket ensures that either the entire packet is read or dropped.
+        // Return 1 if mWakeLockRefCount has been incremented, zero if not.
+        int countWakeUpSensorEventsLocked(sensors_event_t* scratch, const int count);
+
         sp<SensorService> const mService;
         sp<BitTube> mChannel;
         uid_t mUid;
         mutable Mutex mConnectionLock;
+        // Number of events from wake up sensors which are still pending and haven't been delivered
+        // to the corresponding application. It is incremented by one unit for each write to the
+        // socket.
+        int mWakeLockRefCount;
 
         struct FlushInfo {
             // The number of flush complete events dropped for this sensor is stored here.
@@ -106,13 +117,14 @@
         SensorEventConnection(const sp<SensorService>& service, uid_t uid);
 
         status_t sendEvents(sensors_event_t const* buffer, size_t count,
-                sensors_event_t* scratch = NULL);
+                sensors_event_t* scratch);
         bool hasSensor(int32_t handle) const;
         bool hasAnySensor() const;
         bool addSensor(int32_t handle);
         bool removeSensor(int32_t handle);
         void setFirstFlushPending(int32_t handle, bool value);
         void dump(String8& result);
+        bool needsWakeLock();
 
         uid_t getUid() const { return mUid; }
     };
@@ -126,13 +138,11 @@
         size_t getNumConnections() const { return mConnections.size(); }
     };
 
-    SortedVector< wp<SensorEventConnection> > getActiveConnections() const;
-    DefaultKeyedVector<int, SensorInterface*> getActiveVirtualSensors() const;
-
     String8 getSensorName(int handle) const;
     bool isVirtualSensor(int handle) const;
     Sensor getSensorFromHandle(int handle) const;
-    void recordLastValue(const sensors_event_t* buffer, size_t count);
+    bool isWakeUpSensor(int type) const;
+    void recordLastValueLocked(const sensors_event_t* buffer, size_t count);
     static void sortEventBuffer(sensors_event_t* buffer, size_t count);
     Sensor registerSensor(SensorInterface* sensor);
     Sensor registerVirtualSensor(SensorInterface* sensor);
@@ -140,10 +150,16 @@
             const sp<SensorEventConnection>& connection, int handle);
     status_t cleanupWithoutDisableLocked(
             const sp<SensorEventConnection>& connection, int handle);
-    void cleanupAutoDisabledSensor(const sp<SensorEventConnection>& connection,
+    void cleanupAutoDisabledSensorLocked(const sp<SensorEventConnection>& connection,
             sensors_event_t const* buffer, const int count);
     static bool canAccessSensor(const Sensor& sensor);
     static bool verifyCanAccessSensor(const Sensor& sensor, const char* operation);
+    // SensorService acquires a partial wakelock for delivering events from wake up sensors. This
+    // method checks whether all the events from these wake up sensors have been delivered to the
+    // corresponding applications, if yes the wakelock is released.
+    void checkWakeLockState();
+    void checkWakeLockStateLocked();
+    bool isWakeUpSensorEvent(const sensors_event_t& event) const;
     // constants
     Vector<Sensor> mSensorList;
     Vector<Sensor> mUserSensorListDebug;
@@ -158,6 +174,7 @@
     DefaultKeyedVector<int, SensorRecord*> mActiveSensors;
     DefaultKeyedVector<int, SensorInterface*> mActiveVirtualSensors;
     SortedVector< wp<SensorEventConnection> > mActiveConnections;
+    bool mWakeLockAcquired;
 
     // The size of this vector is constant, only the items are mutable
     KeyedVector<int32_t, sensors_event_t> mLastEventSeen;
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 5a8efeb..56c539f 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -11,9 +11,9 @@
     Layer.cpp \
     LayerDim.cpp \
     MessageQueue.cpp \
+    MonitoredProducer.cpp \
     SurfaceFlinger.cpp \
     SurfaceFlingerConsumer.cpp \
-    SurfaceTextureLayer.cpp \
     Transform.cpp \
     DisplayHardware/FramebufferSurface.cpp \
     DisplayHardware/HWComposer.cpp \
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 975631c..f7d32d0 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -155,5 +155,23 @@
     return mFlinger->onLayerRemoved(this, handle);
 }
 
+status_t Client::clearLayerFrameStats(const sp<IBinder>& handle) const {
+    sp<Layer> layer = getLayerUser(handle);
+    if (layer == NULL) {
+        return NAME_NOT_FOUND;
+    }
+    layer->clearFrameStats();
+    return NO_ERROR;
+}
+
+status_t Client::getLayerFrameStats(const sp<IBinder>& handle, FrameStats* outStats) const {
+    sp<Layer> layer = getLayerUser(handle);
+    if (layer == NULL) {
+        return NAME_NOT_FOUND;
+    }
+    layer->getFrameStats(outStats);
+    return NO_ERROR;
+}
+
 // ---------------------------------------------------------------------------
 }; // namespace android
diff --git a/services/surfaceflinger/Client.h b/services/surfaceflinger/Client.h
index 84e649f..b6d7381 100644
--- a/services/surfaceflinger/Client.h
+++ b/services/surfaceflinger/Client.h
@@ -60,6 +60,10 @@
 
     virtual status_t destroySurface(const sp<IBinder>& handle);
 
+    virtual status_t clearLayerFrameStats(const sp<IBinder>& handle) const;
+
+    virtual status_t getLayerFrameStats(const sp<IBinder>& handle, FrameStats* outStats) const;
+
     virtual status_t onTransact(
         uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
 
diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp
index 95839b7..12da9a5 100644
--- a/services/surfaceflinger/DispSync.cpp
+++ b/services/surfaceflinger/DispSync.cpp
@@ -20,7 +20,6 @@
 #define __STDC_LIMIT_MACROS
 
 #include <math.h>
-#include <inttypes.h>
 
 #include <cutils/log.h>
 
@@ -38,25 +37,17 @@
 
 // Setting this to true enables verbose tracing that can be used to debug
 // vsync event model or phase issues.
-static const bool traceDetailedInfo = false;
+static const bool kTraceDetailedInfo = false;
 
 // This is the threshold used to determine when hardware vsync events are
 // needed to re-synchronize the software vsync model with the hardware.  The
 // error metric used is the mean of the squared difference between each
 // present time and the nearest software-predicted vsync.
-static const nsecs_t errorThreshold = 160000000000;
-
-// This works around the lack of support for the sync framework on some
-// devices.
-#ifdef RUNNING_WITHOUT_SYNC_FRAMEWORK
-static const bool runningWithoutSyncFramework = true;
-#else
-static const bool runningWithoutSyncFramework = false;
-#endif
+static const nsecs_t kErrorThreshold = 160000000000;    // 400 usec squared
 
 // This is the offset from the present fence timestamps to the corresponding
 // vsync event.
-static const int64_t presentTimeOffset = PRESENT_TIME_OFFSET_FROM_VSYNC_NS;
+static const int64_t kPresentTimeOffset = PRESENT_TIME_OFFSET_FROM_VSYNC_NS;
 
 class DispSyncThread: public Thread {
 public:
@@ -136,7 +127,7 @@
                         // Don't correct by more than 500 us
                         mWakeupLatency = 500000;
                     }
-                    if (traceDetailedInfo) {
+                    if (kTraceDetailedInfo) {
                         ATRACE_INT64("DispSync:WakeupLat", now - nextEventTime);
                         ATRACE_INT64("DispSync:AvgWakeupLat", mWakeupLatency);
                     }
@@ -194,8 +185,7 @@
         return BAD_VALUE;
     }
 
-    // This method is only here to handle the runningWithoutSyncFramework
-    // case.
+    // This method is only here to handle the kIgnorePresentFences case.
     bool hasAnyEventListeners() {
         Mutex::Autolock lock(mMutex);
         return !mEventListeners.empty();
@@ -297,19 +287,22 @@
     bool mParity;
 };
 
-DispSync::DispSync() {
-    mThread = new DispSyncThread();
+DispSync::DispSync() :
+        mRefreshSkipCount(0),
+        mThread(new DispSyncThread()) {
+
     mThread->run("DispSync", PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
 
     reset();
     beginResync();
 
-    if (traceDetailedInfo) {
-        // If runningWithoutSyncFramework is true then the ZeroPhaseTracer
+    if (kTraceDetailedInfo) {
+        // If we're not getting present fences then the ZeroPhaseTracer
         // would prevent HW vsync event from ever being turned off.
-        // Furthermore the zero-phase tracing is not needed because any time
-        // there is an event registered we will turn on the HW vsync events.
-        if (!runningWithoutSyncFramework) {
+        // Even if we're just ignoring the fences, the zero-phase tracing is
+        // not needed because any time there is an event registered we will
+        // turn on the HW vsync events.
+        if (!kIgnorePresentFences) {
             addEventListener(0, new ZeroPhaseTracer());
         }
     }
@@ -340,14 +333,14 @@
             nsecs_t t = f->getSignalTime();
             if (t < INT64_MAX) {
                 mPresentFences[i].clear();
-                mPresentTimes[i] = t + presentTimeOffset;
+                mPresentTimes[i] = t + kPresentTimeOffset;
             }
         }
     }
 
     updateErrorLocked();
 
-    return mPeriod == 0 || mError > errorThreshold;
+    return mPeriod == 0 || mError > kErrorThreshold;
 }
 
 void DispSync::beginResync() {
@@ -374,7 +367,7 @@
         resetErrorLocked();
     }
 
-    if (runningWithoutSyncFramework) {
+    if (kIgnorePresentFences) {
         // If we don't have the sync framework we will never have
         // addPresentFence called.  This means we have no way to know whether
         // or not we're synchronized with the HW vsyncs, so we just request
@@ -383,7 +376,7 @@
         return mThread->hasAnyEventListeners();
     }
 
-    return mPeriod == 0 || mError > errorThreshold;
+    return mPeriod == 0 || mError > kErrorThreshold;
 }
 
 void DispSync::endResync() {
@@ -396,6 +389,13 @@
     return mThread->addEventListener(phase, callback);
 }
 
+void DispSync::setRefreshSkipCount(int count) {
+    Mutex::Autolock lock(mMutex);
+    ALOGD("setRefreshSkipCount(%d)", count);
+    mRefreshSkipCount = count;
+    updateModelLocked();
+}
+
 status_t DispSync::removeEventListener(const sp<Callback>& callback) {
     Mutex::Autolock lock(mMutex);
     return mThread->removeEventListener(callback);
@@ -439,11 +439,14 @@
             mPhase += mPeriod;
         }
 
-        if (traceDetailedInfo) {
+        if (kTraceDetailedInfo) {
             ATRACE_INT64("DispSync:Period", mPeriod);
             ATRACE_INT64("DispSync:Phase", mPhase);
         }
 
+        // Artificially inflate the period if requested.
+        mPeriod += mPeriod * mRefreshSkipCount;
+
         mThread->updateModel(mPeriod, mPhase);
     }
 }
@@ -453,15 +456,19 @@
         return;
     }
 
+    // Need to compare present fences against the un-adjusted refresh period,
+    // since they might arrive between two events.
+    nsecs_t period = mPeriod / (1 + mRefreshSkipCount);
+
     int numErrSamples = 0;
     nsecs_t sqErrSum = 0;
 
     for (size_t i = 0; i < NUM_PRESENT_SAMPLES; i++) {
         nsecs_t sample = mPresentTimes[i];
         if (sample > mPhase) {
-            nsecs_t sampleErr = (sample - mPhase) % mPeriod;
-            if (sampleErr > mPeriod / 2) {
-                sampleErr -= mPeriod;
+            nsecs_t sampleErr = (sample - mPhase) % period;
+            if (sampleErr > period / 2) {
+                sampleErr -= period;
             }
             sqErrSum += sampleErr * sampleErr;
             numErrSamples++;
@@ -474,7 +481,7 @@
         mError = 0;
     }
 
-    if (traceDetailedInfo) {
+    if (kTraceDetailedInfo) {
         ATRACE_INT64("DispSync:Error", mError);
     }
 }
@@ -488,15 +495,24 @@
     }
 }
 
+nsecs_t DispSync::computeNextRefresh(int periodOffset) const {
+    Mutex::Autolock lock(mMutex);
+    nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
+    return (((now - mPhase) / mPeriod) + periodOffset + 1) * mPeriod + mPhase;
+}
+
 void DispSync::dump(String8& result) const {
     Mutex::Autolock lock(mMutex);
-    result.appendFormat("mPeriod: %"PRId64" ns\n", mPeriod);
-    result.appendFormat("mPhase: %"PRId64" ns\n", mPhase);
-    result.appendFormat("mError: %"PRId64" ns (sqrt: %.1f)\n",
+    result.appendFormat("present fences are %s\n",
+            kIgnorePresentFences ? "ignored" : "used");
+    result.appendFormat("mPeriod: %" PRId64 " ns (%.3f fps; skipCount=%d)\n",
+            mPeriod, 1000000000.0 / mPeriod, mRefreshSkipCount);
+    result.appendFormat("mPhase: %" PRId64 " ns\n", mPhase);
+    result.appendFormat("mError: %" PRId64 " ns (sqrt=%.1f)\n",
             mError, sqrt(mError));
-    result.appendFormat("mNumResyncSamplesSincePresent: %d (max %d)\n",
+    result.appendFormat("mNumResyncSamplesSincePresent: %d (limit %d)\n",
             mNumResyncSamplesSincePresent, MAX_RESYNC_SAMPLES_WITHOUT_PRESENT);
-    result.appendFormat("mNumResyncSamples: %d (max %d)\n",
+    result.appendFormat("mNumResyncSamples: %zd (max %d)\n",
             mNumResyncSamples, MAX_RESYNC_SAMPLES);
 
     result.appendFormat("mResyncSamples:\n");
@@ -505,9 +521,9 @@
         size_t idx = (mFirstResyncSample + i) % MAX_RESYNC_SAMPLES;
         nsecs_t sampleTime = mResyncSamples[idx];
         if (i == 0) {
-            result.appendFormat("  %"PRId64"\n", sampleTime);
+            result.appendFormat("  %" PRId64 "\n", sampleTime);
         } else {
-            result.appendFormat("  %"PRId64" (+%"PRId64")\n",
+            result.appendFormat("  %" PRId64 " (+%" PRId64 ")\n",
                     sampleTime, sampleTime - previous);
         }
         previous = sampleTime;
@@ -515,6 +531,7 @@
 
     result.appendFormat("mPresentFences / mPresentTimes [%d]:\n",
             NUM_PRESENT_SAMPLES);
+    nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
     previous = 0;
     for (size_t i = 0; i < NUM_PRESENT_SAMPLES; i++) {
         size_t idx = (i + mPresentSampleOffset) % NUM_PRESENT_SAMPLES;
@@ -522,15 +539,21 @@
         nsecs_t presentTime = mPresentTimes[idx];
         if (!signaled) {
             result.appendFormat("  [unsignaled fence]\n");
+        } else if (presentTime == 0) {
+            result.appendFormat("  0\n");
         } else if (previous == 0) {
-            result.appendFormat("  %"PRId64"\n", presentTime);
+            result.appendFormat("  %" PRId64 "  (%.3f ms ago)\n", presentTime,
+                    (now - presentTime) / 1000000.0);
         } else {
-            result.appendFormat("  %"PRId64" (+%"PRId64" / %.3f)\n",
+            result.appendFormat("  %" PRId64 " (+%" PRId64 " / %.3f)  (%.3f ms ago)\n",
                     presentTime, presentTime - previous,
-                    (presentTime - previous) / (double) mPeriod);
+                    (presentTime - previous) / (double) mPeriod,
+                    (now - presentTime) / 1000000.0);
         }
         previous = presentTime;
     }
+
+    result.appendFormat("current monotonic time: %" PRId64 "\n", now);
 }
 
 } // namespace android
diff --git a/services/surfaceflinger/DispSync.h b/services/surfaceflinger/DispSync.h
index 19eb3e5..7a26df3 100644
--- a/services/surfaceflinger/DispSync.h
+++ b/services/surfaceflinger/DispSync.h
@@ -25,6 +25,18 @@
 
 namespace android {
 
+// Ignore present (retire) fences if the device doesn't have support for the
+// sync framework, or if all phase offsets are zero.  The latter is useful
+// because it allows us to avoid resync bursts on devices that don't need
+// phase-offset VSYNC events.
+#if defined(RUNNING_WITHOUT_SYNC_FRAMEWORK) || \
+        (VSYNC_EVENT_PHASE_OFFSET_NS == 0 && SF_VSYNC_EVENT_PHASE_OFFSET_NS == 0)
+static const bool kIgnorePresentFences = true;
+#else
+static const bool kIgnorePresentFences = false;
+#endif
+
+
 class String8;
 class Fence;
 class DispSyncThread;
@@ -55,6 +67,7 @@
     DispSync();
     ~DispSync();
 
+    // reset clears the resync samples and error value.
     void reset();
 
     // addPresentFence adds a fence for use in validating the current vsync
@@ -83,11 +96,17 @@
     bool addResyncSample(nsecs_t timestamp);
     void endResync();
 
-    // The setPreiod method sets the vsync event model's period to a specific
+    // The setPeriod method sets the vsync event model's period to a specific
     // value.  This should be used to prime the model when a display is first
     // turned on.  It should NOT be used after that.
     void setPeriod(nsecs_t period);
 
+    // setRefreshSkipCount specifies an additional number of refresh
+    // cycles to skip.  For example, on a 60Hz display, a skip count of 1
+    // will result in events happening at 30Hz.  Default is zero.  The idea
+    // is to sacrifice smoothness for battery life.
+    void setRefreshSkipCount(int count);
+
     // addEventListener registers a callback to be called repeatedly at the
     // given phase offset from the hardware vsync events.  The callback is
     // called from a separate thread and it should return reasonably quickly
@@ -99,6 +118,12 @@
     // DispSync object.
     status_t removeEventListener(const sp<Callback>& callback);
 
+    // computeNextRefresh computes when the next refresh is expected to begin.
+    // The periodOffset value can be used to move forward or backward; an
+    // offset of zero is the next refresh, -1 is the previous refresh, 1 is
+    // the refresh after next. etc.
+    nsecs_t computeNextRefresh(int periodOffset) const;
+
     // dump appends human-readable debug info to the result string.
     void dump(String8& result) const;
 
@@ -140,6 +165,8 @@
     nsecs_t mPresentTimes[NUM_PRESENT_SAMPLES];
     size_t mPresentSampleOffset;
 
+    int mRefreshSkipCount;
+
     // mThread is the thread from which all the callbacks are called.
     sp<DispSyncThread> mThread;
 
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index f9034a6..4ebe291 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -194,6 +194,8 @@
         eglSetSwapRectangleANDROID(dpy, surface,
                 b.left, b.top, b.width(), b.height());
     }
+#else
+    (void) dirty; // Eliminate unused parameter warning
 #endif
 
     mPageFlipCount++;
@@ -281,7 +283,8 @@
 void DisplayDevice::setViewportAndProjection() const {
     size_t w = mDisplayWidth;
     size_t h = mDisplayHeight;
-    mFlinger->getRenderEngine().setViewportAndProjection(w, h, w, h, false);
+    Rect sourceCrop(0, 0, w, h);
+    mFlinger->getRenderEngine().setViewportAndProjection(w, h, sourceCrop, h, false);
 }
 
 // ----------------------------------------------------------------------------
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index a48582e..c3b2159 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -24,9 +24,9 @@
 #include <string.h>
 #include <sys/types.h>
 
-#include <utils/CallStack.h>
 #include <utils/Errors.h>
 #include <utils/misc.h>
+#include <utils/NativeHandle.h>
 #include <utils/String8.h>
 #include <utils/Thread.h>
 #include <utils/Trace.h>
@@ -170,20 +170,15 @@
 
         DisplayData& disp(mDisplayData[HWC_DISPLAY_PRIMARY]);
         disp.connected = true;
-        disp.width = mFbDev->width;
-        disp.height = mFbDev->height;
         disp.format = mFbDev->format;
-        disp.xdpi = mFbDev->xdpi;
-        disp.ydpi = mFbDev->ydpi;
-        if (disp.refresh == 0) {
-            disp.refresh = nsecs_t(1e9 / mFbDev->fps);
-            ALOGW("getting VSYNC period from fb HAL: %lld", disp.refresh);
-        }
-        if (disp.refresh == 0) {
-            disp.refresh = nsecs_t(1e9 / 60.0);
-            ALOGW("getting VSYNC period from thin air: %lld",
-                    mDisplayData[HWC_DISPLAY_PRIMARY].refresh);
-        }
+        DisplayConfig config = DisplayConfig();
+        config.width = mFbDev->width;
+        config.height = mFbDev->height;
+        config.xdpi = mFbDev->xdpi;
+        config.ydpi = mFbDev->ydpi;
+        config.refresh = nsecs_t(1e9 / mFbDev->fps);
+        disp.configs.push_back(config);
+        disp.currentConfig = 0;
     } else if (mHwc) {
         // here we're guaranteed to have at least HWC 1.1
         for (size_t i =0 ; i<NUM_BUILTIN_DISPLAYS ; i++) {
@@ -342,55 +337,63 @@
     int32_t values[NUM_DISPLAY_ATTRIBUTES - 1];
     memset(values, 0, sizeof(values));
 
-    uint32_t config;
-    size_t numConfigs = 1;
-    status_t err = mHwc->getDisplayConfigs(mHwc, disp, &config, &numConfigs);
+    const size_t MAX_NUM_CONFIGS = 128;
+    uint32_t configs[MAX_NUM_CONFIGS] = {0};
+    size_t numConfigs = MAX_NUM_CONFIGS;
+    status_t err = mHwc->getDisplayConfigs(mHwc, disp, configs, &numConfigs);
     if (err != NO_ERROR) {
         // this can happen if an unpluggable display is not connected
         mDisplayData[disp].connected = false;
         return err;
     }
 
-    err = mHwc->getDisplayAttributes(mHwc, disp, config, DISPLAY_ATTRIBUTES, values);
-    if (err != NO_ERROR) {
-        // we can't get this display's info. turn it off.
-        mDisplayData[disp].connected = false;
-        return err;
-    }
-
-    int32_t w = 0, h = 0;
-    for (size_t i = 0; i < NUM_DISPLAY_ATTRIBUTES - 1; i++) {
-        switch (DISPLAY_ATTRIBUTES[i]) {
-        case HWC_DISPLAY_VSYNC_PERIOD:
-            mDisplayData[disp].refresh = nsecs_t(values[i]);
-            break;
-        case HWC_DISPLAY_WIDTH:
-            mDisplayData[disp].width = values[i];
-            break;
-        case HWC_DISPLAY_HEIGHT:
-            mDisplayData[disp].height = values[i];
-            break;
-        case HWC_DISPLAY_DPI_X:
-            mDisplayData[disp].xdpi = values[i] / 1000.0f;
-            break;
-        case HWC_DISPLAY_DPI_Y:
-            mDisplayData[disp].ydpi = values[i] / 1000.0f;
-            break;
-        default:
-            ALOG_ASSERT(false, "unknown display attribute[%d] %#x",
-                    i, DISPLAY_ATTRIBUTES[i]);
-            break;
+    mDisplayData[disp].currentConfig = 0;
+    for (size_t c = 0; c < numConfigs; ++c) {
+        err = mHwc->getDisplayAttributes(mHwc, disp, configs[c],
+                DISPLAY_ATTRIBUTES, values);
+        if (err != NO_ERROR) {
+            // we can't get this display's info. turn it off.
+            mDisplayData[disp].connected = false;
+            return err;
         }
+
+        DisplayConfig config = DisplayConfig();
+        for (size_t i = 0; i < NUM_DISPLAY_ATTRIBUTES - 1; i++) {
+            switch (DISPLAY_ATTRIBUTES[i]) {
+                case HWC_DISPLAY_VSYNC_PERIOD:
+                    config.refresh = nsecs_t(values[i]);
+                    break;
+                case HWC_DISPLAY_WIDTH:
+                    config.width = values[i];
+                    break;
+                case HWC_DISPLAY_HEIGHT:
+                    config.height = values[i];
+                    break;
+                case HWC_DISPLAY_DPI_X:
+                    config.xdpi = values[i] / 1000.0f;
+                    break;
+                case HWC_DISPLAY_DPI_Y:
+                    config.ydpi = values[i] / 1000.0f;
+                    break;
+                default:
+                    ALOG_ASSERT(false, "unknown display attribute[%d] %#x",
+                            i, DISPLAY_ATTRIBUTES[i]);
+                    break;
+            }
+        }
+
+        if (config.xdpi == 0.0f || config.ydpi == 0.0f) {
+            float dpi = getDefaultDensity(config.height);
+            config.xdpi = dpi;
+            config.ydpi = dpi;
+        }
+
+        mDisplayData[disp].configs.push_back(config);
     }
 
     // FIXME: what should we set the format to?
     mDisplayData[disp].format = HAL_PIXEL_FORMAT_RGBA_8888;
     mDisplayData[disp].connected = true;
-    if (mDisplayData[disp].xdpi == 0.0f || mDisplayData[disp].ydpi == 0.0f) {
-        float dpi = getDefaultDensity(h);
-        mDisplayData[disp].xdpi = dpi;
-        mDisplayData[disp].ydpi = dpi;
-    }
     return NO_ERROR;
 }
 
@@ -400,10 +403,12 @@
             !mAllocatedDisplayIDs.hasBit(id)) {
         return BAD_INDEX;
     }
-    mDisplayData[id].width = w;
-    mDisplayData[id].height = h;
+    size_t configId = mDisplayData[id].currentConfig;
     mDisplayData[id].format = format;
-    mDisplayData[id].xdpi = mDisplayData[id].ydpi = getDefaultDensity(h);
+    DisplayConfig& config = mDisplayData[id].configs.editItemAt(configId);
+    config.width = w;
+    config.height = h;
+    config.xdpi = config.ydpi = getDefaultDensity(h);
     return NO_ERROR;
 }
 
@@ -414,6 +419,8 @@
     int32_t id = mAllocatedDisplayIDs.firstUnmarkedBit();
     mAllocatedDisplayIDs.markBit(id);
     mDisplayData[id].connected = true;
+    mDisplayData[id].configs.resize(1);
+    mDisplayData[id].currentConfig = 0;
     return id;
 }
 
@@ -430,31 +437,21 @@
     return NO_ERROR;
 }
 
-nsecs_t HWComposer::getRefreshPeriod(int disp) const {
-    return mDisplayData[disp].refresh;
-}
-
 nsecs_t HWComposer::getRefreshTimestamp(int disp) const {
     // this returns the last refresh timestamp.
     // if the last one is not available, we estimate it based on
     // the refresh period and whatever closest timestamp we have.
     Mutex::Autolock _l(mLock);
     nsecs_t now = systemTime(CLOCK_MONOTONIC);
-    return now - ((now - mLastHwVSync[disp]) %  mDisplayData[disp].refresh);
+    size_t configId = mDisplayData[disp].currentConfig;
+    return now - ((now - mLastHwVSync[disp]) %
+            mDisplayData[disp].configs[configId].refresh);
 }
 
 sp<Fence> HWComposer::getDisplayFence(int disp) const {
     return mDisplayData[disp].lastDisplayFence;
 }
 
-uint32_t HWComposer::getWidth(int disp) const {
-    return mDisplayData[disp].width;
-}
-
-uint32_t HWComposer::getHeight(int disp) const {
-    return mDisplayData[disp].height;
-}
-
 uint32_t HWComposer::getFormat(int disp) const {
     if (uint32_t(disp)>31 || !mAllocatedDisplayIDs.hasBit(disp)) {
         return HAL_PIXEL_FORMAT_RGBA_8888;
@@ -463,16 +460,41 @@
     }
 }
 
+bool HWComposer::isConnected(int disp) const {
+    return mDisplayData[disp].connected;
+}
+
+uint32_t HWComposer::getWidth(int disp) const {
+    size_t currentConfig = mDisplayData[disp].currentConfig;
+    return mDisplayData[disp].configs[currentConfig].width;
+}
+
+uint32_t HWComposer::getHeight(int disp) const {
+    size_t currentConfig = mDisplayData[disp].currentConfig;
+    return mDisplayData[disp].configs[currentConfig].height;
+}
+
 float HWComposer::getDpiX(int disp) const {
-    return mDisplayData[disp].xdpi;
+    size_t currentConfig = mDisplayData[disp].currentConfig;
+    return mDisplayData[disp].configs[currentConfig].xdpi;
 }
 
 float HWComposer::getDpiY(int disp) const {
-    return mDisplayData[disp].ydpi;
+    size_t currentConfig = mDisplayData[disp].currentConfig;
+    return mDisplayData[disp].configs[currentConfig].ydpi;
 }
 
-bool HWComposer::isConnected(int disp) const {
-    return mDisplayData[disp].connected;
+nsecs_t HWComposer::getRefreshPeriod(int disp) const {
+    size_t currentConfig = mDisplayData[disp].currentConfig;
+    return mDisplayData[disp].configs[currentConfig].refresh;
+}
+
+const Vector<HWComposer::DisplayConfig>& HWComposer::getConfigs(int disp) const {
+    return mDisplayData[disp].configs;
+}
+
+size_t HWComposer::getCurrentConfig(int disp) const {
+    return mDisplayData[disp].currentConfig;
 }
 
 void HWComposer::eventControl(int disp, int event, int enabled) {
@@ -536,7 +558,10 @@
         if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) {
             disp.framebufferTarget = &disp.list->hwLayers[numLayers - 1];
             memset(disp.framebufferTarget, 0, sizeof(hwc_layer_1_t));
-            const hwc_rect_t r = { 0, 0, (int) disp.width, (int) disp.height };
+            const DisplayConfig& currentConfig =
+                    disp.configs[disp.currentConfig];
+            const hwc_rect_t r = { 0, 0,
+                    (int) currentConfig.width, (int) currentConfig.height };
             disp.framebufferTarget->compositionType = HWC_FRAMEBUFFER_TARGET;
             disp.framebufferTarget->hints = 0;
             disp.framebufferTarget->flags = 0;
@@ -546,8 +571,10 @@
             if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_3)) {
                 disp.framebufferTarget->sourceCropf.left = 0;
                 disp.framebufferTarget->sourceCropf.top = 0;
-                disp.framebufferTarget->sourceCropf.right = disp.width;
-                disp.framebufferTarget->sourceCropf.bottom = disp.height;
+                disp.framebufferTarget->sourceCropf.right =
+                        currentConfig.width;
+                disp.framebufferTarget->sourceCropf.bottom =
+                        currentConfig.height;
             } else {
                 disp.framebufferTarget->sourceCrop = r;
             }
@@ -821,7 +848,7 @@
     return NO_ERROR;
 }
 
-sp<Fence> HWComposer::getLastRetireFence(int32_t id) {
+sp<Fence> HWComposer::getLastRetireFence(int32_t id) const {
     if (uint32_t(id)>31 || !mAllocatedDisplayIDs.hasBit(id))
         return Fence::NO_FENCE;
     return mDisplayData[id].lastRetireFence;
@@ -944,12 +971,22 @@
         SharedBuffer const* sb = reg.getSharedBuffer(&visibleRegion.numRects);
         visibleRegion.rects = reinterpret_cast<hwc_rect_t const *>(sb->data());
     }
+    virtual void setSidebandStream(const sp<NativeHandle>& stream) {
+        ALOG_ASSERT(stream->handle() != NULL);
+        getLayer()->compositionType = HWC_SIDEBAND;
+        getLayer()->sidebandStream = stream->handle();
+    }
     virtual void setBuffer(const sp<GraphicBuffer>& buffer) {
         if (buffer == 0 || buffer->handle == 0) {
             getLayer()->compositionType = HWC_FRAMEBUFFER;
             getLayer()->flags |= HWC_SKIP_LAYER;
             getLayer()->handle = 0;
         } else {
+            if (getLayer()->compositionType == HWC_SIDEBAND) {
+                // If this was a sideband layer but the stream was removed, reset
+                // it to FRAMEBUFFER. The HWC can change it to OVERLAY in prepare.
+                getLayer()->compositionType = HWC_FRAMEBUFFER;
+            }
             getLayer()->handle = buffer->handle;
         }
     }
@@ -1010,9 +1047,29 @@
     return getLayerIterator(id, numLayers);
 }
 
+// Converts a PixelFormat to a human-readable string.  Max 11 chars.
+// (Could use a table of prefab String8 objects.)
+static String8 getFormatStr(PixelFormat format) {
+    switch (format) {
+    case PIXEL_FORMAT_RGBA_8888:    return String8("RGBA_8888");
+    case PIXEL_FORMAT_RGBX_8888:    return String8("RGBx_8888");
+    case PIXEL_FORMAT_RGB_888:      return String8("RGB_888");
+    case PIXEL_FORMAT_RGB_565:      return String8("RGB_565");
+    case PIXEL_FORMAT_BGRA_8888:    return String8("BGRA_8888");
+    case PIXEL_FORMAT_sRGB_A_8888:  return String8("sRGB_A_8888");
+    case PIXEL_FORMAT_sRGB_X_8888:  return String8("sRGB_x_8888");
+    case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
+                                    return String8("ImplDef");
+    default:
+        String8 result;
+        result.appendFormat("? %08x", format);
+        return result;
+    }
+}
+
 void HWComposer::dump(String8& result) const {
     if (mHwc) {
-        result.appendFormat("Hardware Composer state (version %8x):\n", hwcApiVersion(mHwc));
+        result.appendFormat("Hardware Composer state (version %08x):\n", hwcApiVersion(mHwc));
         result.appendFormat("  mDebugForceFakeVSync=%d\n", mDebugForceFakeVSync);
         for (size_t i=0 ; i<mNumDisplays ; i++) {
             const DisplayData& disp(mDisplayData[i]);
@@ -1022,9 +1079,14 @@
             const Vector< sp<Layer> >& visibleLayersSortedByZ =
                     mFlinger->getLayerSortedByZForHwcDisplay(i);
 
-            result.appendFormat(
-                    "  Display[%zd] : %ux%u, xdpi=%f, ydpi=%f, refresh=%" PRId64 "\n",
-                    i, disp.width, disp.height, disp.xdpi, disp.ydpi, disp.refresh);
+
+            result.appendFormat("  Display[%zd] configurations (* current):\n", i);
+            for (size_t c = 0; c < disp.configs.size(); ++c) {
+                const DisplayConfig& config(disp.configs[c]);
+                result.appendFormat("    %s%zd: %ux%u, xdpi=%f, ydpi=%f, refresh=%" PRId64 "\n",
+                        c == disp.currentConfig ? "* " : "", c, config.width, config.height,
+                        config.xdpi, config.ydpi, config.refresh);
+            }
 
             if (disp.list) {
                 result.appendFormat(
@@ -1032,9 +1094,9 @@
                         disp.list->numHwLayers, disp.list->flags);
 
                 result.append(
-                        "    type    |  handle  |   hints  |   flags  | tr | blend |  format  |          source crop            |           frame           name \n"
-                        "------------+----------+----------+----------+----+-------+----------+---------------------------------+--------------------------------\n");
-                //      " __________ | ________ | ________ | ________ | __ | _____ | ________ | [_____._,_____._,_____._,_____._] | [_____,_____,_____,_____]
+                        "    type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name \n"
+                        "-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------\n");
+                //      " _________ | ________ | ____ | ____ | __ | ____ | ___________ |_____._,_____._,_____._,_____._ |_____,_____,_____,_____ | ___...
                 for (size_t i=0 ; i<disp.list->numHwLayers ; i++) {
                     const hwc_layer_1_t&l = disp.list->hwLayers[i];
                     int32_t format = -1;
@@ -1059,25 +1121,26 @@
                     static char const* compositionTypeName[] = {
                             "GLES",
                             "HWC",
-                            "BACKGROUND",
+                            "BKGND",
                             "FB TARGET",
                             "UNKNOWN"};
                     if (type >= NELEM(compositionTypeName))
                         type = NELEM(compositionTypeName) - 1;
 
+                    String8 formatStr = getFormatStr(format);
                     if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_3)) {
                         result.appendFormat(
-                                " %10s | %08" PRIxPTR " | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] %s\n",
+                                " %9s | %08" PRIxPTR " | %04x | %04x | %02x | %04x | %-11s |%7.1f,%7.1f,%7.1f,%7.1f |%5d,%5d,%5d,%5d | %s\n",
                                         compositionTypeName[type],
-                                        intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
+                                        intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, formatStr.string(),
                                         l.sourceCropf.left, l.sourceCropf.top, l.sourceCropf.right, l.sourceCropf.bottom,
                                         l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom,
                                         name.string());
                     } else {
                         result.appendFormat(
-                                " %10s | %08" PRIxPTR " | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] %s\n",
+                                " %9s | %08" PRIxPTR " | %04x | %04x | %02x | %04x | %-11s |%7d,%7d,%7d,%7d |%5d,%5d,%5d,%5d | %s\n",
                                         compositionTypeName[type],
-                                        intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
+                                        intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, formatStr.string(),
                                         l.sourceCrop.left, l.sourceCrop.top, l.sourceCrop.right, l.sourceCrop.bottom,
                                         l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom,
                                         name.string());
@@ -1152,9 +1215,9 @@
 }
 
 HWComposer::DisplayData::DisplayData()
-:   width(0), height(0), format(HAL_PIXEL_FORMAT_RGBA_8888),
-    xdpi(0.0f), ydpi(0.0f),
-    refresh(0),
+:   configs(),
+    currentConfig(0),
+    format(HAL_PIXEL_FORMAT_RGBA_8888),
     connected(false),
     hasFbComp(false), hasOvComp(false),
     capacity(0), list(NULL),
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index 9f96113..2f92672 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -45,9 +45,10 @@
 namespace android {
 // ---------------------------------------------------------------------------
 
-class GraphicBuffer;
 class Fence;
 class FloatRect;
+class GraphicBuffer;
+class NativeHandle;
 class Region;
 class String8;
 class SurfaceFlinger;
@@ -141,7 +142,7 @@
     // signal when the h/w composer is completely finished with the frame.
     // For physical displays, it is no longer being displayed. For virtual
     // displays, writes to the output buffer are complete.
-    sp<Fence> getLastRetireFence(int32_t id);
+    sp<Fence> getLastRetireFence(int32_t id) const;
 
     /*
      * Interface to hardware composer's layers functionality.
@@ -164,6 +165,7 @@
         virtual void setFrame(const Rect& frame) = 0;
         virtual void setCrop(const FloatRect& crop) = 0;
         virtual void setVisibleRegionScreen(const Region& reg) = 0;
+        virtual void setSidebandStream(const sp<NativeHandle>& stream) = 0;
         virtual void setBuffer(const sp<GraphicBuffer>& buffer) = 0;
         virtual void setAcquireFenceFd(int fenceFd) = 0;
         virtual void setPlaneAlpha(uint8_t alpha) = 0;
@@ -245,17 +247,31 @@
 
     void eventControl(int disp, int event, int enabled);
 
+    struct DisplayConfig {
+        uint32_t width;
+        uint32_t height;
+        float xdpi;
+        float ydpi;
+        nsecs_t refresh;
+    };
+
     // Query display parameters.  Pass in a display index (e.g.
     // HWC_DISPLAY_PRIMARY).
-    nsecs_t getRefreshPeriod(int disp) const;
     nsecs_t getRefreshTimestamp(int disp) const;
     sp<Fence> getDisplayFence(int disp) const;
+    uint32_t getFormat(int disp) const;
+    bool isConnected(int disp) const;
+
+    // These return the values for the current config of a given display index.
+    // To get the values for all configs, use getConfigs below.
     uint32_t getWidth(int disp) const;
     uint32_t getHeight(int disp) const;
-    uint32_t getFormat(int disp) const;
     float getDpiX(int disp) const;
     float getDpiY(int disp) const;
-    bool isConnected(int disp) const;
+    nsecs_t getRefreshPeriod(int disp) const;
+
+    const Vector<DisplayConfig>& getConfigs(int disp) const;
+    size_t getCurrentConfig(int disp) const;
 
     status_t setVirtualDisplayProperties(int32_t id, uint32_t w, uint32_t h,
             uint32_t format);
@@ -304,16 +320,12 @@
     status_t setFramebufferTarget(int32_t id,
             const sp<Fence>& acquireFence, const sp<GraphicBuffer>& buf);
 
-
     struct DisplayData {
         DisplayData();
         ~DisplayData();
-        uint32_t width;
-        uint32_t height;
+        Vector<DisplayConfig> configs;
+        size_t currentConfig;
         uint32_t format;    // pixel format from FB hal, for pre-hwc-1.1
-        float xdpi;
-        float ydpi;
-        nsecs_t refresh;
         bool connected;
         bool hasFbComp;
         bool hasOvComp;
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
index a1820ab..c415560 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
@@ -47,9 +47,10 @@
 
 VirtualDisplaySurface::VirtualDisplaySurface(HWComposer& hwc, int32_t dispId,
         const sp<IGraphicBufferProducer>& sink,
-        const sp<BufferQueue>& bq,
+        const sp<IGraphicBufferProducer>& bqProducer,
+        const sp<IGraphicBufferConsumer>& bqConsumer,
         const String8& name)
-:   ConsumerBase(bq),
+:   ConsumerBase(bqConsumer),
     mHwc(hwc),
     mDisplayId(dispId),
     mDisplayName(name),
@@ -60,7 +61,7 @@
     mMustRecompose(false)
 {
     mSource[SOURCE_SINK] = sink;
-    mSource[SOURCE_SCRATCH] = bq;
+    mSource[SOURCE_SCRATCH] = bqProducer;
 
     resetPerFrameState();
 
@@ -255,7 +256,7 @@
     resetPerFrameState();
 }
 
-void VirtualDisplaySurface::dump(String8& result) const {
+void VirtualDisplaySurface::dump(String8& /* result */) const {
 }
 
 status_t VirtualDisplaySurface::requestBuffer(int pslot,
@@ -284,24 +285,29 @@
     int pslot = mapSource2ProducerSlot(source, *sslot);
     VDS_LOGV("dequeueBuffer(%s): sslot=%d pslot=%d result=%d",
             dbgSourceStr(source), *sslot, pslot, result);
-    uint32_t sourceBit = static_cast<uint32_t>(source) << pslot;
+    uint64_t sourceBit = static_cast<uint64_t>(source) << pslot;
 
-    if ((mProducerSlotSource & (1u << pslot)) != sourceBit) {
+    if ((mProducerSlotSource & (1ULL << pslot)) != sourceBit) {
         // This slot was previously dequeued from the other source; must
         // re-request the buffer.
         result |= BUFFER_NEEDS_REALLOCATION;
-        mProducerSlotSource &= ~(1u << pslot);
+        mProducerSlotSource &= ~(1ULL << pslot);
         mProducerSlotSource |= sourceBit;
     }
 
     if (result & RELEASE_ALL_BUFFERS) {
         for (uint32_t i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) {
-            if ((mProducerSlotSource & (1u << i)) == sourceBit)
+            if ((mProducerSlotSource & (1ULL << i)) == sourceBit)
                 mProducerBuffers[i].clear();
         }
     }
     if (result & BUFFER_NEEDS_REALLOCATION) {
-        mSource[source]->requestBuffer(*sslot, &mProducerBuffers[pslot]);
+        result = mSource[source]->requestBuffer(*sslot, &mProducerBuffers[pslot]);
+        if (result < 0) {
+            mProducerBuffers[pslot].clear();
+            mSource[source]->cancelBuffer(*sslot, *fence);
+            return result;
+        }
         VDS_LOGV("dequeueBuffer(%s): buffers[%d]=%p fmt=%d usage=%#x",
                 dbgSourceStr(source), pslot, mProducerBuffers[pslot].get(),
                 mProducerBuffers[pslot]->getPixelFormat(),
@@ -374,6 +380,23 @@
     return result;
 }
 
+status_t VirtualDisplaySurface::detachBuffer(int /* slot */) {
+    VDS_LOGE("detachBuffer is not available for VirtualDisplaySurface");
+    return INVALID_OPERATION;
+}
+
+status_t VirtualDisplaySurface::detachNextBuffer(
+        sp<GraphicBuffer>* /* outBuffer */, sp<Fence>* /* outFence */) {
+    VDS_LOGE("detachNextBuffer is not available for VirtualDisplaySurface");
+    return INVALID_OPERATION;
+}
+
+status_t VirtualDisplaySurface::attachBuffer(int* /* outSlot */,
+        const sp<GraphicBuffer>& /* buffer */) {
+    VDS_LOGE("attachBuffer is not available for VirtualDisplaySurface");
+    return INVALID_OPERATION;
+}
+
 status_t VirtualDisplaySurface::queueBuffer(int pslot,
         const QueueBufferInput& input, QueueBufferOutput* output) {
     VDS_LOGW_IF(mDbgState != DBG_STATE_GLES,
@@ -442,11 +465,12 @@
     return mSource[SOURCE_SINK]->query(what, value);
 }
 
-status_t VirtualDisplaySurface::connect(const sp<IBinder>& token,
+status_t VirtualDisplaySurface::connect(const sp<IProducerListener>& listener,
         int api, bool producerControlledByApp,
         QueueBufferOutput* output) {
     QueueBufferOutput qbo;
-    status_t result = mSource[SOURCE_SINK]->connect(token, api, producerControlledByApp, &qbo);
+    status_t result = mSource[SOURCE_SINK]->connect(listener, api,
+            producerControlledByApp, &qbo);
     if (result == NO_ERROR) {
         updateQueueBufferOutput(qbo);
         *output = mQueueBufferOutput;
@@ -458,6 +482,10 @@
     return mSource[SOURCE_SINK]->disconnect(api);
 }
 
+status_t VirtualDisplaySurface::setSidebandStream(const sp<NativeHandle>& /*stream*/) {
+    return INVALID_OPERATION;
+}
+
 void VirtualDisplaySurface::updateQueueBufferOutput(
         const QueueBufferOutput& qbo) {
     uint32_t w, h, transformHint, numPendingBuffers;
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
index 6899904..0ae9804 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h
@@ -27,6 +27,7 @@
 // ---------------------------------------------------------------------------
 
 class HWComposer;
+class IProducerListener;
 
 /* This DisplaySurface implementation supports virtual displays, where GLES
  * and/or HWC compose into a buffer that is then passed to an arbitrary
@@ -73,7 +74,8 @@
 public:
     VirtualDisplaySurface(HWComposer& hwc, int32_t dispId,
             const sp<IGraphicBufferProducer>& sink,
-            const sp<BufferQueue>& bq,
+            const sp<IGraphicBufferProducer>& bqProducer,
+            const sp<IGraphicBufferConsumer>& bqConsumer,
             const String8& name);
 
     //
@@ -98,13 +100,18 @@
     virtual status_t setBufferCount(int bufferCount);
     virtual status_t dequeueBuffer(int* pslot, sp<Fence>* fence, bool async,
             uint32_t w, uint32_t h, uint32_t format, uint32_t usage);
+    virtual status_t detachBuffer(int slot);
+    virtual status_t detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+            sp<Fence>* outFence);
+    virtual status_t attachBuffer(int* slot, const sp<GraphicBuffer>& buffer);
     virtual status_t queueBuffer(int pslot,
             const QueueBufferInput& input, QueueBufferOutput* output);
     virtual void cancelBuffer(int pslot, const sp<Fence>& fence);
     virtual int query(int what, int* value);
-    virtual status_t connect(const sp<IBinder>& token,
+    virtual status_t connect(const sp<IProducerListener>& listener,
             int api, bool producerControlledByApp, QueueBufferOutput* output);
     virtual status_t disconnect(int api);
+    virtual status_t setSidebandStream(const sp<NativeHandle>& stream);
 
     //
     // Utility methods
@@ -148,10 +155,10 @@
     // Since we present a single producer interface to the GLES driver, but
     // are internally muxing between the sink and scratch producers, we have
     // to keep track of which source last returned each producer slot from
-    // dequeueBuffer. Each bit in mLastSlotSource corresponds to a producer
+    // dequeueBuffer. Each bit in mProducerSlotSource corresponds to a producer
     // slot. Both mProducerSlotSource and mProducerBuffers are indexed by a
     // "producer slot"; see the mapSlot*() functions.
-    uint32_t mProducerSlotSource;
+    uint64_t mProducerSlotSource;
     sp<GraphicBuffer> mProducerBuffers[BufferQueue::NUM_BUFFER_SLOTS];
 
     // The QueueBufferOutput with the latest info from the sink, and with the
diff --git a/services/surfaceflinger/Effects/Daltonizer.cpp b/services/surfaceflinger/Effects/Daltonizer.cpp
index f384ba4..feb8936 100644
--- a/services/surfaceflinger/Effects/Daltonizer.cpp
+++ b/services/surfaceflinger/Effects/Daltonizer.cpp
@@ -148,9 +148,6 @@
     // set to identity, errp, errd, errt ([0] for simulation only)
     mat4 correction(0);
 
-    // control: simulation post-correction (used for debugging):
-    // set to identity or lms2lmsp, lms2lmsd, lms2lmst
-    mat4 control;
     switch (mType) {
         case protanopia:
         case protanomaly:
@@ -172,12 +169,8 @@
             break;
     }
 
-    if (true) {
-        control = simulation;
-    }
-
-    mColorTransform = lms2rgb * control *
-            (simulation * rgb2lms + correction * (rgb2lms - simulation * rgb2lms));
+    mColorTransform = lms2rgb *
+        (simulation * rgb2lms + correction * (rgb2lms - simulation * rgb2lms));
 }
 
 } /* namespace android */
diff --git a/services/surfaceflinger/FrameTracker.cpp b/services/surfaceflinger/FrameTracker.cpp
index 2fb665e..c09bbe4 100644
--- a/services/surfaceflinger/FrameTracker.cpp
+++ b/services/surfaceflinger/FrameTracker.cpp
@@ -22,6 +22,7 @@
 #include <cutils/log.h>
 
 #include <ui/Fence.h>
+#include <ui/FrameStats.h>
 
 #include <utils/String8.h>
 
@@ -100,7 +101,7 @@
     processFencesLocked();
 }
 
-void FrameTracker::clear() {
+void FrameTracker::clearStats() {
     Mutex::Autolock lock(mMutex);
     for (size_t i = 0; i < NUM_FRAME_RECORDS; i++) {
         mFrameRecords[i].desiredPresentTime = 0;
@@ -115,6 +116,32 @@
     mFrameRecords[mOffset].actualPresentTime = INT64_MAX;
 }
 
+void FrameTracker::getStats(FrameStats* outStats) const {
+    Mutex::Autolock lock(mMutex);
+    processFencesLocked();
+
+    outStats->refreshPeriodNano = mDisplayPeriod;
+
+    const size_t offset = mOffset;
+    for (size_t i = 1; i < NUM_FRAME_RECORDS; i++) {
+        const size_t index = (offset + i) % NUM_FRAME_RECORDS;
+
+        // Skip frame records with no data (if buffer not yet full).
+        if (mFrameRecords[index].desiredPresentTime == 0) {
+            continue;
+        }
+
+        nsecs_t desiredPresentTimeNano = mFrameRecords[index].desiredPresentTime;
+        outStats->desiredPresentTimesNano.push_back(desiredPresentTimeNano);
+
+        nsecs_t actualPresentTimeNano = mFrameRecords[index].actualPresentTime;
+        outStats->actualPresentTimesNano.push_back(actualPresentTimeNano);
+
+        nsecs_t frameReadyTimeNano = mFrameRecords[index].frameReadyTime;
+        outStats->frameReadyTimesNano.push_back(frameReadyTimeNano);
+    }
+}
+
 void FrameTracker::logAndResetStats(const String8& name) {
     Mutex::Autolock lock(mMutex);
     logStatsLocked(name);
@@ -206,7 +233,7 @@
             mFrameRecords[idx].actualPresentTime < INT64_MAX;
 }
 
-void FrameTracker::dump(String8& result) const {
+void FrameTracker::dumpStats(String8& result) const {
     Mutex::Autolock lock(mMutex);
     processFencesLocked();
 
diff --git a/services/surfaceflinger/FrameTracker.h b/services/surfaceflinger/FrameTracker.h
index 9233247..cd5e3f3 100644
--- a/services/surfaceflinger/FrameTracker.h
+++ b/services/surfaceflinger/FrameTracker.h
@@ -78,15 +78,18 @@
     // advanceFrame advances the frame tracker to the next frame.
     void advanceFrame();
 
-    // clear resets all the tracked frame data to zero.
-    void clear();
+    // clearStats clears the tracked frame stats.
+    void clearStats();
+
+    // getStats gets the tracked frame stats.
+    void getStats(FrameStats* outStats) const;
 
     // logAndResetStats dumps the current statistics to the binary event log
     // and then resets the accumulated statistics to their initial values.
     void logAndResetStats(const String8& name);
 
-    // dump appends the current frame display time history to the result string.
-    void dump(String8& result) const;
+    // dumpStats dump appends the current frame display time history to the result string.
+    void dumpStats(String8& result) const;
 
 private:
     struct FrameRecord {
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index fcc9d78..63bc257 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -27,6 +27,7 @@
 
 #include <utils/Errors.h>
 #include <utils/Log.h>
+#include <utils/NativeHandle.h>
 #include <utils/StopWatch.h>
 #include <utils/Trace.h>
 
@@ -39,8 +40,8 @@
 #include "Colorizer.h"
 #include "DisplayDevice.h"
 #include "Layer.h"
+#include "MonitoredProducer.h"
 #include "SurfaceFlinger.h"
-#include "SurfaceTextureLayer.h"
 
 #include "DisplayHardware/HWComposer.h"
 
@@ -66,6 +67,7 @@
         mFormat(PIXEL_FORMAT_NONE),
         mTransactionFlags(0),
         mQueuedFrames(0),
+        mSidebandStreamChanged(false),
         mCurrentTransform(0),
         mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
         mCurrentOpacity(true),
@@ -115,10 +117,13 @@
 
 void Layer::onFirstRef() {
     // Creates a custom BufferQueue for SurfaceFlingerConsumer to use
-    mBufferQueue = new SurfaceTextureLayer(mFlinger);
-    mSurfaceFlingerConsumer = new SurfaceFlingerConsumer(mBufferQueue, mTextureName);
+    sp<IGraphicBufferProducer> producer;
+    sp<IGraphicBufferConsumer> consumer;
+    BufferQueue::createBufferQueue(&producer, &consumer);
+    mProducer = new MonitoredProducer(producer, mFlinger);
+    mSurfaceFlingerConsumer = new SurfaceFlingerConsumer(consumer, mTextureName);
     mSurfaceFlingerConsumer->setConsumerUsageBits(getEffectiveUsage(0));
-    mSurfaceFlingerConsumer->setFrameAvailableListener(this);
+    mSurfaceFlingerConsumer->setContentsChangedListener(this);
     mSurfaceFlingerConsumer->setName(mName);
 
 #ifdef TARGET_DISABLE_TRIPLE_BUFFERING
@@ -145,7 +150,7 @@
 // callbacks
 // ---------------------------------------------------------------------------
 
-void Layer::onLayerDisplayed(const sp<const DisplayDevice>& hw,
+void Layer::onLayerDisplayed(const sp<const DisplayDevice>& /* hw */,
         HWComposer::HWCLayerInterface* layer) {
     if (layer) {
         layer->onDisplayed();
@@ -158,6 +163,13 @@
     mFlinger->signalLayerUpdate();
 }
 
+void Layer::onSidebandStreamChanged() {
+    if (android_atomic_release_cas(false, true, &mSidebandStreamChanged) == 0) {
+        // mSidebandStreamChanged was false
+        mFlinger->signalLayerUpdate();
+    }
+}
+
 // called with SurfaceFlinger::mStateLock from the drawing thread after
 // the layer has been remove from the current state list (and just before
 // it's removed from the drawing state list)
@@ -227,8 +239,8 @@
     return new Handle(mFlinger, this);
 }
 
-sp<IGraphicBufferProducer> Layer::getBufferQueue() const {
-    return mBufferQueue;
+sp<IGraphicBufferProducer> Layer::getProducer() const {
+    return mProducer;
 }
 
 // ---------------------------------------------------------------------------
@@ -413,12 +425,16 @@
     Region visible = tr.transform(visibleRegion.intersect(hw->getViewport()));
     layer.setVisibleRegionScreen(visible);
 
-    // NOTE: buffer can be NULL if the client never drew into this
-    // layer yet, or if we ran out of memory
-    layer.setBuffer(mActiveBuffer);
+    if (mSidebandStream.get()) {
+        layer.setSidebandStream(mSidebandStream);
+    } else {
+        // NOTE: buffer can be NULL if the client never drew into this
+        // layer yet, or if we ran out of memory
+        layer.setBuffer(mActiveBuffer);
+    }
 }
 
-void Layer::setAcquireFence(const sp<const DisplayDevice>& hw,
+void Layer::setAcquireFence(const sp<const DisplayDevice>& /* hw */,
         HWComposer::HWCLayerInterface& layer) {
     int fenceFd = -1;
 
@@ -442,14 +458,20 @@
 // ---------------------------------------------------------------------------
 
 void Layer::draw(const sp<const DisplayDevice>& hw, const Region& clip) const {
-    onDraw(hw, clip);
+    onDraw(hw, clip, false);
 }
 
-void Layer::draw(const sp<const DisplayDevice>& hw) {
-    onDraw( hw, Region(hw->bounds()) );
+void Layer::draw(const sp<const DisplayDevice>& hw,
+        bool useIdentityTransform) const {
+    onDraw(hw, Region(hw->bounds()), useIdentityTransform);
 }
 
-void Layer::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const
+void Layer::draw(const sp<const DisplayDevice>& hw) const {
+    onDraw(hw, Region(hw->bounds()), false);
+}
+
+void Layer::onDraw(const sp<const DisplayDevice>& hw, const Region& clip,
+        bool useIdentityTransform) const
 {
     ATRACE_CALL();
 
@@ -540,16 +562,17 @@
     } else {
         engine.setupLayerBlackedOut();
     }
-    drawWithOpenGL(hw, clip);
+    drawWithOpenGL(hw, clip, useIdentityTransform);
     engine.disableTexturing();
 }
 
 
-void Layer::clearWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip,
-        float red, float green, float blue, float alpha) const
+void Layer::clearWithOpenGL(const sp<const DisplayDevice>& hw,
+        const Region& /* clip */, float red, float green, float blue,
+        float alpha) const
 {
     RenderEngine& engine(mFlinger->getRenderEngine());
-    computeGeometry(hw, mMesh);
+    computeGeometry(hw, mMesh, false);
     engine.setupFillWithColor(red, green, blue, alpha);
     engine.drawMesh(mMesh);
 }
@@ -559,12 +582,12 @@
     clearWithOpenGL(hw, clip, 0,0,0,0);
 }
 
-void Layer::drawWithOpenGL(
-        const sp<const DisplayDevice>& hw, const Region& clip) const {
+void Layer::drawWithOpenGL(const sp<const DisplayDevice>& hw,
+        const Region& /* clip */, bool useIdentityTransform) const {
     const uint32_t fbHeight = hw->getHeight();
     const State& s(getDrawingState());
 
-    computeGeometry(hw, mMesh);
+    computeGeometry(hw, mMesh, useIdentityTransform);
 
     /*
      * NOTE: the way we compute the texture coordinates here produces
@@ -634,10 +657,12 @@
 // local state
 // ----------------------------------------------------------------------------
 
-void Layer::computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh) const
+void Layer::computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh,
+        bool useIdentityTransform) const
 {
     const Layer::State& s(getDrawingState());
-    const Transform tr(hw->getTransform() * s.transform);
+    const Transform tr(useIdentityTransform ?
+            hw->getTransform() : hw->getTransform() * s.transform);
     const uint32_t hw_h = hw->getHeight();
     Rect win(s.active.w, s.active.h);
     if (!s.active.crop.isEmpty()) {
@@ -898,7 +923,7 @@
 
 bool Layer::onPreComposition() {
     mRefreshPending = false;
-    return mQueuedFrames > 0;
+    return mQueuedFrames > 0 || mSidebandStreamChanged;
 }
 
 void Layer::onPostComposition() {
@@ -934,13 +959,18 @@
 bool Layer::isVisible() const {
     const Layer::State& s(mDrawingState);
     return !(s.flags & layer_state_t::eLayerHidden) && s.alpha
-            && (mActiveBuffer != NULL);
+            && (mActiveBuffer != NULL || mSidebandStream != NULL);
 }
 
 Region Layer::latchBuffer(bool& recomputeVisibleRegions)
 {
     ATRACE_CALL();
 
+    if (android_atomic_acquire_cas(true, false, &mSidebandStreamChanged) == 0) {
+        // mSidebandStreamChanged was true
+        mSidebandStream = mSurfaceFlingerConsumer->getSidebandStream();
+    }
+
     Region outDirtyRegion;
     if (mQueuedFrames > 0) {
 
@@ -1065,7 +1095,8 @@
 
         Reject r(mDrawingState, getCurrentState(), recomputeVisibleRegions);
 
-        status_t updateResult = mSurfaceFlingerConsumer->updateTexImage(&r);
+        status_t updateResult = mSurfaceFlingerConsumer->updateTexImage(&r,
+                mFlinger->mPrimaryDispSync);
         if (updateResult == BufferQueue::PRESENT_LATER) {
             // Producer doesn't want buffer to be displayed yet.  Signal a
             // layer update so we check again at the next opportunity.
@@ -1214,18 +1245,22 @@
     }
 }
 
-void Layer::dumpStats(String8& result) const {
-    mFrameTracker.dump(result);
+void Layer::dumpFrameStats(String8& result) const {
+    mFrameTracker.dumpStats(result);
 }
 
-void Layer::clearStats() {
-    mFrameTracker.clear();
+void Layer::clearFrameStats() {
+    mFrameTracker.clearStats();
 }
 
 void Layer::logFrameStats() {
     mFrameTracker.logAndResetStats(mName);
 }
 
+void Layer::getFrameStats(FrameStats* outStats) const {
+    mFrameTracker.getStats(outStats);
+}
+
 // ---------------------------------------------------------------------------
 
 Layer::LayerCleaner::LayerCleaner(const sp<SurfaceFlinger>& flinger,
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index ea65ded..ee9f8a0 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -27,6 +27,7 @@
 #include <utils/String8.h>
 #include <utils/Timers.h>
 
+#include <ui/FrameStats.h>
 #include <ui/GraphicBuffer.h>
 #include <ui/PixelFormat.h>
 #include <ui/Region.h>
@@ -37,9 +38,9 @@
 
 #include "FrameTracker.h"
 #include "Client.h"
+#include "MonitoredProducer.h"
 #include "SurfaceFlinger.h"
 #include "SurfaceFlingerConsumer.h"
-#include "SurfaceTextureLayer.h"
 #include "Transform.h"
 
 #include "DisplayHardware/HWComposer.h"
@@ -66,7 +67,7 @@
  * This also implements onFrameAvailable(), which notifies SurfaceFlinger
  * that new data has arrived.
  */
-class Layer : public SurfaceFlingerConsumer::FrameAvailableListener {
+class Layer : public SurfaceFlingerConsumer::ContentsChangedListener {
     static int32_t sSequence;
 
 public:
@@ -75,6 +76,10 @@
     Region visibleRegion;
     Region coveredRegion;
     Region visibleNonTransparentRegion;
+
+    // Layer serial number.  This gives layers an explicit ordering, so we
+    // have a stable sort order when their layer stack and Z-order are
+    // the same.
     int32_t sequence;
 
     enum { // flags for doTransaction()
@@ -135,11 +140,12 @@
     uint32_t getTransactionFlags(uint32_t flags);
     uint32_t setTransactionFlags(uint32_t flags);
 
-    void computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh) const;
+    void computeGeometry(const sp<const DisplayDevice>& hw, Mesh& mesh,
+            bool useIdentityTransform) const;
     Rect computeBounds() const;
 
     sp<IBinder> getHandle();
-    sp<IGraphicBufferProducer> getBufferQueue() const;
+    sp<IGraphicBufferProducer> getProducer() const;
     const String8& getName() const;
 
     // -----------------------------------------------------------------------
@@ -182,7 +188,8 @@
     /*
      * onDraw - draws the surface.
      */
-    virtual void onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const;
+    virtual void onDraw(const sp<const DisplayDevice>& hw, const Region& clip,
+            bool useIdentityTransform) const;
 
 public:
     // -----------------------------------------------------------------------
@@ -216,7 +223,8 @@
      * and calls onDraw().
      */
     void draw(const sp<const DisplayDevice>& hw, const Region& clip) const;
-    void draw(const sp<const DisplayDevice>& hw);
+    void draw(const sp<const DisplayDevice>& hw, bool useIdentityTransform) const;
+    void draw(const sp<const DisplayDevice>& hw) const;
 
     /*
      * doTransaction - process the transaction. This is a good place to figure
@@ -285,9 +293,10 @@
 
     /* always call base class first */
     void dump(String8& result, Colorizer& colorizer) const;
-    void dumpStats(String8& result) const;
-    void clearStats();
+    void dumpFrameStats(String8& result) const;
+    void clearFrameStats();
     void logFrameStats();
+    void getFrameStats(FrameStats* outStats) const;
 
 protected:
     // constant
@@ -310,8 +319,9 @@
 
 
 private:
-    // Interface implementation for SurfaceFlingerConsumer::FrameAvailableListener
+    // Interface implementation for SurfaceFlingerConsumer::ContentsChangedListener
     virtual void onFrameAvailable();
+    virtual void onSidebandStreamChanged();
 
     void commitTransaction();
 
@@ -326,15 +336,16 @@
     // drawing
     void clearWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip,
             float r, float g, float b, float alpha) const;
-    void drawWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip) const;
+    void drawWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip,
+            bool useIdentityTransform) const;
 
 
     // -----------------------------------------------------------------------
 
     // constants
     sp<SurfaceFlingerConsumer> mSurfaceFlingerConsumer;
-    sp<BufferQueue> mBufferQueue;
-    uint32_t mTextureName;
+    sp<IGraphicBufferProducer> mProducer;
+    uint32_t mTextureName;      // from GLES
     bool mPremultipliedAlpha;
     String8 mName;
     mutable bool mDebug;
@@ -347,10 +358,12 @@
 
     // thread-safe
     volatile int32_t mQueuedFrames;
+    volatile int32_t mSidebandStreamChanged; // used like an atomic boolean
     FrameTracker mFrameTracker;
 
     // main thread
     sp<GraphicBuffer> mActiveBuffer;
+    sp<NativeHandle> mSidebandStream;
     Rect mCurrentCrop;
     uint32_t mCurrentTransform;
     uint32_t mCurrentScalingMode;
@@ -363,7 +376,7 @@
     bool mNeedsFiltering;
     // The mesh used to draw the layer in GLES composition mode
     mutable Mesh mMesh;
-    // The mesh used to draw the layer in GLES composition mode
+    // The texture used to draw the layer in GLES composition mode
     mutable Texture mTexture;
 
     // page-flip thread (currently main thread)
diff --git a/services/surfaceflinger/LayerDim.cpp b/services/surfaceflinger/LayerDim.cpp
index 4e82bab..14aa328 100644
--- a/services/surfaceflinger/LayerDim.cpp
+++ b/services/surfaceflinger/LayerDim.cpp
@@ -39,12 +39,13 @@
 LayerDim::~LayerDim() {
 }
 
-void LayerDim::onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const
+void LayerDim::onDraw(const sp<const DisplayDevice>& hw,
+        const Region& /* clip */, bool useIdentityTransform) const
 {
     const State& s(getDrawingState());
     if (s.alpha>0) {
         Mesh mesh(Mesh::TRIANGLE_FAN, 4, 2);
-        computeGeometry(hw, mesh);
+        computeGeometry(hw, mesh, useIdentityTransform);
         RenderEngine& engine(mFlinger->getRenderEngine());
         engine.setupDimLayerBlending(s.alpha);
         engine.drawMesh(mesh);
diff --git a/services/surfaceflinger/LayerDim.h b/services/surfaceflinger/LayerDim.h
index 6561d7f..4de0ddc 100644
--- a/services/surfaceflinger/LayerDim.h
+++ b/services/surfaceflinger/LayerDim.h
@@ -34,7 +34,8 @@
         virtual ~LayerDim();
 
     virtual const char* getTypeId() const { return "LayerDim"; }
-    virtual void onDraw(const sp<const DisplayDevice>& hw, const Region& clip) const;
+    virtual void onDraw(const sp<const DisplayDevice>& hw, const Region& clip,
+            bool useIdentityTransform) const;
     virtual bool isOpaque() const         { return false; }
     virtual bool isSecure() const         { return false; }
     virtual bool isFixedSize() const      { return true; }
diff --git a/services/surfaceflinger/MonitoredProducer.cpp b/services/surfaceflinger/MonitoredProducer.cpp
new file mode 100644
index 0000000..d0e81bc
--- /dev/null
+++ b/services/surfaceflinger/MonitoredProducer.cpp
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "MessageQueue.h"
+#include "MonitoredProducer.h"
+#include "SurfaceFlinger.h"
+
+namespace android {
+
+MonitoredProducer::MonitoredProducer(const sp<IGraphicBufferProducer>& producer,
+        const sp<SurfaceFlinger>& flinger) :
+    mProducer(producer),
+    mFlinger(flinger) {}
+
+MonitoredProducer::~MonitoredProducer() {
+    // Remove ourselves from SurfaceFlinger's list. We do this asynchronously
+    // because we don't know where this destructor is called from. It could be
+    // called with the mStateLock held, leading to a dead-lock (it actually
+    // happens).
+    class MessageCleanUpList : public MessageBase {
+    public:
+        MessageCleanUpList(const sp<SurfaceFlinger>& flinger,
+                const wp<IBinder>& producer)
+            : mFlinger(flinger), mProducer(producer) {}
+
+        virtual ~MessageCleanUpList() {}
+
+        virtual bool handler() {
+            Mutex::Autolock _l(mFlinger->mStateLock);
+            mFlinger->mGraphicBufferProducerList.remove(mProducer);
+            return true;
+        }
+
+    private:
+        sp<SurfaceFlinger> mFlinger;
+        wp<IBinder> mProducer;
+    };
+
+    mFlinger->postMessageAsync(new MessageCleanUpList(mFlinger, asBinder()));
+}
+
+status_t MonitoredProducer::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
+    return mProducer->requestBuffer(slot, buf);
+}
+
+status_t MonitoredProducer::setBufferCount(int bufferCount) {
+    return mProducer->setBufferCount(bufferCount);
+}
+
+status_t MonitoredProducer::dequeueBuffer(int* slot, sp<Fence>* fence,
+        bool async, uint32_t w, uint32_t h, uint32_t format, uint32_t usage) {
+    return mProducer->dequeueBuffer(slot, fence, async, w, h, format, usage);
+}
+
+status_t MonitoredProducer::detachBuffer(int slot) {
+    return mProducer->detachBuffer(slot);
+}
+
+status_t MonitoredProducer::detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+        sp<Fence>* outFence) {
+    return mProducer->detachNextBuffer(outBuffer, outFence);
+}
+
+status_t MonitoredProducer::attachBuffer(int* outSlot,
+        const sp<GraphicBuffer>& buffer) {
+    return mProducer->attachBuffer(outSlot, buffer);
+}
+
+status_t MonitoredProducer::queueBuffer(int slot, const QueueBufferInput& input,
+        QueueBufferOutput* output) {
+    return mProducer->queueBuffer(slot, input, output);
+}
+
+void MonitoredProducer::cancelBuffer(int slot, const sp<Fence>& fence) {
+    mProducer->cancelBuffer(slot, fence);
+}
+
+int MonitoredProducer::query(int what, int* value) {
+    return mProducer->query(what, value);
+}
+
+status_t MonitoredProducer::connect(const sp<IProducerListener>& listener,
+        int api, bool producerControlledByApp, QueueBufferOutput* output) {
+    return mProducer->connect(listener, api, producerControlledByApp, output);
+}
+
+status_t MonitoredProducer::disconnect(int api) {
+    return mProducer->disconnect(api);
+}
+
+status_t MonitoredProducer::setSidebandStream(const sp<NativeHandle>& stream) {
+    return mProducer->setSidebandStream(stream);
+}
+
+IBinder* MonitoredProducer::onAsBinder() {
+    return mProducer->asBinder().get();
+}
+
+// ---------------------------------------------------------------------------
+}; // namespace android
diff --git a/services/surfaceflinger/MonitoredProducer.h b/services/surfaceflinger/MonitoredProducer.h
new file mode 100644
index 0000000..f034e39
--- /dev/null
+++ b/services/surfaceflinger/MonitoredProducer.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_MONITORED_PRODUCER_H
+#define ANDROID_MONITORED_PRODUCER_H
+
+#include <gui/IGraphicBufferProducer.h>
+
+namespace android {
+
+class IProducerListener;
+class NativeHandle;
+class SurfaceFlinger;
+
+// MonitoredProducer wraps an IGraphicBufferProducer so that SurfaceFlinger will
+// be notified upon its destruction
+class MonitoredProducer : public IGraphicBufferProducer {
+public:
+    MonitoredProducer(const sp<IGraphicBufferProducer>& producer,
+            const sp<SurfaceFlinger>& flinger);
+    virtual ~MonitoredProducer();
+
+    // From IGraphicBufferProducer
+    virtual status_t requestBuffer(int slot, sp<GraphicBuffer>* buf);
+    virtual status_t setBufferCount(int bufferCount);
+    virtual status_t dequeueBuffer(int* slot, sp<Fence>* fence, bool async,
+            uint32_t w, uint32_t h, uint32_t format, uint32_t usage);
+    virtual status_t detachBuffer(int slot);
+    virtual status_t detachNextBuffer(sp<GraphicBuffer>* outBuffer,
+            sp<Fence>* outFence);
+    virtual status_t attachBuffer(int* outSlot,
+            const sp<GraphicBuffer>& buffer);
+    virtual status_t queueBuffer(int slot, const QueueBufferInput& input,
+            QueueBufferOutput* output);
+    virtual void cancelBuffer(int slot, const sp<Fence>& fence);
+    virtual int query(int what, int* value);
+    virtual status_t connect(const sp<IProducerListener>& token, int api,
+            bool producerControlledByApp, QueueBufferOutput* output);
+    virtual status_t disconnect(int api);
+    virtual status_t setSidebandStream(const sp<NativeHandle>& stream);
+    virtual IBinder* onAsBinder();
+
+private:
+    sp<IGraphicBufferProducer> mProducer;
+    sp<SurfaceFlinger> mFlinger;
+};
+
+}; // namespace android
+
+#endif // ANDROID_MONITORED_PRODUCER_H
diff --git a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
index cbff320..d1e324c 100644
--- a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
@@ -17,6 +17,8 @@
 #include <GLES/gl.h>
 #include <GLES/glext.h>
 
+#include <ui/Rect.h>
+
 #include <utils/String8.h>
 #include <cutils/compiler.h>
 
@@ -72,13 +74,23 @@
 }
 
 void GLES11RenderEngine::setViewportAndProjection(
-        size_t vpw, size_t vph, size_t w, size_t h, bool yswap) {
+        size_t vpw, size_t vph, Rect sourceCrop, size_t hwh, bool yswap) {
     glViewport(0, 0, vpw, vph);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
-    // put the origin in the left-bottom corner
-    if (yswap)  glOrthof(0, w, h, 0, 0, 1);
-    else        glOrthof(0, w, 0, h, 0, 1);
+
+    size_t l = sourceCrop.left;
+    size_t r = sourceCrop.right;
+
+    // In GL, (0, 0) is the bottom-left corner, so flip y coordinates
+    size_t t = hwh - sourceCrop.top;
+    size_t b = hwh - sourceCrop.bottom;
+
+    if (yswap) {
+        glOrthof(l, r, t, b, 0, 1);
+    } else {
+        glOrthof(l, r, b, t, 0, 1);
+    }
     glMatrixMode(GL_MODELVIEW);
 }
 
diff --git a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.h b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.h
index cd53aab..1a94592 100644
--- a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.h
+++ b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.h
@@ -49,7 +49,8 @@
     virtual ~GLES11RenderEngine();
 
     virtual void dump(String8& result);
-    virtual void setViewportAndProjection(size_t vpw, size_t vph, size_t w, size_t h, bool yswap);
+    virtual void setViewportAndProjection(size_t vpw, size_t vph,
+            Rect sourceCrop, size_t hwh, bool yswap);
     virtual void setupLayerBlending(bool premultipliedAlpha, bool opaque, int alpha);
     virtual void setupDimLayerBlending(int alpha);
     virtual void setupLayerTexturing(const Texture& texture);
diff --git a/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp b/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp
index a2a6270..8c1f04e 100644
--- a/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp
@@ -19,6 +19,8 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
+#include <ui/Rect.h>
+
 #include <utils/String8.h>
 #include <utils/Trace.h>
 
@@ -78,10 +80,21 @@
 }
 
 void GLES20RenderEngine::setViewportAndProjection(
-        size_t vpw, size_t vph, size_t w, size_t h, bool yswap) {
+        size_t vpw, size_t vph, Rect sourceCrop, size_t hwh, bool yswap) {
+
+    size_t l = sourceCrop.left;
+    size_t r = sourceCrop.right;
+
+    // In GL, (0, 0) is the bottom-left corner, so flip y coordinates
+    size_t t = hwh - sourceCrop.top;
+    size_t b = hwh - sourceCrop.bottom;
+
     mat4 m;
-    if (yswap)  m = mat4::ortho(0, w, h, 0, 0, 1);
-    else        m = mat4::ortho(0, w, 0, h, 0, 1);
+    if (yswap) {
+        m = mat4::ortho(l, r, t, b, 0, 1);
+    } else {
+        m = mat4::ortho(l, r, b, t, 0, 1);
+    }
 
     glViewport(0, 0, vpw, vph);
     mState.setProjectionMatrix(m);
diff --git a/services/surfaceflinger/RenderEngine/GLES20RenderEngine.h b/services/surfaceflinger/RenderEngine/GLES20RenderEngine.h
index 8b67fcc..b6d32fc 100644
--- a/services/surfaceflinger/RenderEngine/GLES20RenderEngine.h
+++ b/services/surfaceflinger/RenderEngine/GLES20RenderEngine.h
@@ -64,7 +64,8 @@
     virtual ~GLES20RenderEngine();
 
     virtual void dump(String8& result);
-    virtual void setViewportAndProjection(size_t vpw, size_t vph, size_t w, size_t h, bool yswap);
+    virtual void setViewportAndProjection(size_t vpw, size_t vph,
+            Rect sourceCrop, size_t hwh, bool yswap);
     virtual void setupLayerBlending(bool premultipliedAlpha, bool opaque, int alpha);
     virtual void setupDimLayerBlending(int alpha);
     virtual void setupLayerTexturing(const Texture& texture);
diff --git a/services/surfaceflinger/RenderEngine/ProgramCache.cpp b/services/surfaceflinger/RenderEngine/ProgramCache.cpp
index 09b0ddc..d130506 100644
--- a/services/surfaceflinger/RenderEngine/ProgramCache.cpp
+++ b/services/surfaceflinger/RenderEngine/ProgramCache.cpp
@@ -169,7 +169,8 @@
             fs << "gl_FragColor.rgb = gl_FragColor.rgb/gl_FragColor.a;";
         }
         fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(2.2));";
-        fs << "gl_FragColor     = colorMatrix*gl_FragColor;";
+        fs << "vec4 transformed = colorMatrix * vec4(gl_FragColor.rgb, 1);";
+        fs << "gl_FragColor.rgb = transformed.rgb/transformed.a;";
         fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0 / 2.2));";
         if (!needs.isOpaque() && needs.isPremultiplied()) {
             // and re-premultiply if needed after gamma correction
diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.h b/services/surfaceflinger/RenderEngine/RenderEngine.h
index 577dc0a..a2d8242 100644
--- a/services/surfaceflinger/RenderEngine/RenderEngine.h
+++ b/services/surfaceflinger/RenderEngine/RenderEngine.h
@@ -89,7 +89,8 @@
 
     // set-up
     virtual void checkErrors() const;
-    virtual void setViewportAndProjection(size_t vpw, size_t vph, size_t w, size_t h, bool yswap) = 0;
+    virtual void setViewportAndProjection(size_t vpw, size_t vph,
+            Rect sourceCrop, size_t hwh, bool yswap) = 0;
     virtual void setupLayerBlending(bool premultipliedAlpha, bool opaque, int alpha) = 0;
     virtual void setupDimLayerBlending(int alpha) = 0;
     virtual void setupLayerTexturing(const Texture& texture) = 0;
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 3c447db..9111dbb 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -88,14 +88,6 @@
 
 namespace android {
 
-// This works around the lack of support for the sync framework on some
-// devices.
-#ifdef RUNNING_WITHOUT_SYNC_FRAMEWORK
-static const bool runningWithoutSyncFramework = true;
-#else
-static const bool runningWithoutSyncFramework = false;
-#endif
-
 // This is the phase offset in nanoseconds of the software vsync event
 // relative to the vsync event reported by HWComposer.  The software vsync
 // event is when SurfaceFlinger and Choreographer-based applications run each
@@ -153,7 +145,8 @@
         mBootFinished(false),
         mPrimaryHWVsyncEnabled(false),
         mHWVsyncAvailable(false),
-        mDaltonize(false)
+        mDaltonize(false),
+        mHasColorMatrix(false)
 {
     ALOGI("SurfaceFlinger is starting");
 
@@ -190,7 +183,7 @@
     eglTerminate(display);
 }
 
-void SurfaceFlinger::binderDied(const wp<IBinder>& who)
+void SurfaceFlinger::binderDied(const wp<IBinder>& /* who */)
 {
     // the window manager died on us. prepare its eulogy.
 
@@ -321,10 +314,13 @@
 
 class DispSyncSource : public VSyncSource, private DispSync::Callback {
 public:
-    DispSyncSource(DispSync* dispSync, nsecs_t phaseOffset, bool traceVsync) :
+    DispSyncSource(DispSync* dispSync, nsecs_t phaseOffset, bool traceVsync,
+        const char* label) :
             mValue(0),
             mPhaseOffset(phaseOffset),
             mTraceVsync(traceVsync),
+            mVsyncOnLabel(String8::format("VsyncOn-%s", label)),
+            mVsyncEventLabel(String8::format("VSYNC-%s", label)),
             mDispSync(dispSync) {}
 
     virtual ~DispSyncSource() {}
@@ -339,7 +335,7 @@
                 ALOGE("error registering vsync callback: %s (%d)",
                         strerror(-err), err);
             }
-            ATRACE_INT("VsyncOn", 1);
+            //ATRACE_INT(mVsyncOnLabel.string(), 1);
         } else {
             status_t err = mDispSync->removeEventListener(
                     static_cast<DispSync::Callback*>(this));
@@ -347,7 +343,7 @@
                 ALOGE("error unregistering vsync callback: %s (%d)",
                         strerror(-err), err);
             }
-            ATRACE_INT("VsyncOn", 0);
+            //ATRACE_INT(mVsyncOnLabel.string(), 0);
         }
     }
 
@@ -365,7 +361,7 @@
 
             if (mTraceVsync) {
                 mValue = (mValue + 1) % 2;
-                ATRACE_INT("VSYNC", mValue);
+                ATRACE_INT(mVsyncEventLabel.string(), mValue);
             }
         }
 
@@ -378,6 +374,8 @@
 
     const nsecs_t mPhaseOffset;
     const bool mTraceVsync;
+    const String8 mVsyncOnLabel;
+    const String8 mVsyncEventLabel;
 
     DispSync* mDispSync;
     sp<VSyncSource::Callback> mCallback;
@@ -419,12 +417,17 @@
             createBuiltinDisplayLocked(type);
             wp<IBinder> token = mBuiltinDisplays[i];
 
-            sp<BufferQueue> bq = new BufferQueue(new GraphicBufferAlloc());
-            sp<FramebufferSurface> fbs = new FramebufferSurface(*mHwc, i, bq);
+            sp<IGraphicBufferProducer> producer;
+            sp<IGraphicBufferConsumer> consumer;
+            BufferQueue::createBufferQueue(&producer, &consumer,
+                    new GraphicBufferAlloc());
+
+            sp<FramebufferSurface> fbs = new FramebufferSurface(*mHwc, i,
+                    consumer);
             int32_t hwcId = allocateHwcDisplayId(type);
             sp<DisplayDevice> hw = new DisplayDevice(this,
                     type, hwcId, mHwc->getFormat(hwcId), isSecure, token,
-                    fbs, bq,
+                    fbs, producer,
                     mRenderEngine->getEGLConfig());
             if (i > DisplayDevice::DISPLAY_PRIMARY) {
                 // FIXME: currently we don't get blank/unblank requests
@@ -443,10 +446,10 @@
 
     // start the EventThread
     sp<VSyncSource> vsyncSrc = new DispSyncSource(&mPrimaryDispSync,
-            vsyncPhaseOffsetNs, true);
+            vsyncPhaseOffsetNs, true, "app");
     mEventThread = new EventThread(vsyncSrc);
     sp<VSyncSource> sfVsyncSrc = new DispSyncSource(&mPrimaryDispSync,
-            sfVsyncPhaseOffsetNs, false);
+            sfVsyncPhaseOffsetNs, true, "sf");
     mSFEventThread = new EventThread(sfVsyncSrc);
     mEventQueue.setEventThread(mSFEventThread);
 
@@ -496,7 +499,12 @@
     return mGraphicBufferProducerList.indexOf(surfaceTextureBinder) >= 0;
 }
 
-status_t SurfaceFlinger::getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) {
+status_t SurfaceFlinger::getDisplayConfigs(const sp<IBinder>& display,
+        Vector<DisplayInfo>* configs) {
+    if (configs == NULL) {
+        return BAD_VALUE;
+    }
+
     int32_t type = NAME_NOT_FOUND;
     for (int i=0 ; i<DisplayDevice::NUM_BUILTIN_DISPLAY_TYPES ; i++) {
         if (display == mBuiltinDisplays[i]) {
@@ -509,10 +517,6 @@
         return type;
     }
 
-    const HWComposer& hwc(getHwComposer());
-    float xdpi = hwc.getDpiX(type);
-    float ydpi = hwc.getDpiY(type);
-
     // TODO: Not sure if display density should handled by SF any longer
     class Density {
         static int getDensityFromProperty(char const* propName) {
@@ -530,41 +534,75 @@
             return getDensityFromProperty("ro.sf.lcd_density"); }
     };
 
-    if (type == DisplayDevice::DISPLAY_PRIMARY) {
-        // The density of the device is provided by a build property
-        float density = Density::getBuildDensity() / 160.0f;
-        if (density == 0) {
-            // the build doesn't provide a density -- this is wrong!
-            // use xdpi instead
-            ALOGE("ro.sf.lcd_density must be defined as a build property");
-            density = xdpi / 160.0f;
-        }
-        if (Density::getEmuDensity()) {
-            // if "qemu.sf.lcd_density" is specified, it overrides everything
-            xdpi = ydpi = density = Density::getEmuDensity();
-            density /= 160.0f;
-        }
-        info->density = density;
+    configs->clear();
 
-        // TODO: this needs to go away (currently needed only by webkit)
-        sp<const DisplayDevice> hw(getDefaultDisplayDevice());
-        info->orientation = hw->getOrientation();
-    } else {
-        // TODO: where should this value come from?
-        static const int TV_DENSITY = 213;
-        info->density = TV_DENSITY / 160.0f;
-        info->orientation = 0;
+    const Vector<HWComposer::DisplayConfig>& hwConfigs =
+            getHwComposer().getConfigs(type);
+    for (size_t c = 0; c < hwConfigs.size(); ++c) {
+        const HWComposer::DisplayConfig& hwConfig = hwConfigs[c];
+        DisplayInfo info = DisplayInfo();
+
+        float xdpi = hwConfig.xdpi;
+        float ydpi = hwConfig.ydpi;
+
+        if (type == DisplayDevice::DISPLAY_PRIMARY) {
+            // The density of the device is provided by a build property
+            float density = Density::getBuildDensity() / 160.0f;
+            if (density == 0) {
+                // the build doesn't provide a density -- this is wrong!
+                // use xdpi instead
+                ALOGE("ro.sf.lcd_density must be defined as a build property");
+                density = xdpi / 160.0f;
+            }
+            if (Density::getEmuDensity()) {
+                // if "qemu.sf.lcd_density" is specified, it overrides everything
+                xdpi = ydpi = density = Density::getEmuDensity();
+                density /= 160.0f;
+            }
+            info.density = density;
+
+            // TODO: this needs to go away (currently needed only by webkit)
+            sp<const DisplayDevice> hw(getDefaultDisplayDevice());
+            info.orientation = hw->getOrientation();
+        } else {
+            // TODO: where should this value come from?
+            static const int TV_DENSITY = 213;
+            info.density = TV_DENSITY / 160.0f;
+            info.orientation = 0;
+        }
+
+        info.w = hwConfig.width;
+        info.h = hwConfig.height;
+        info.xdpi = xdpi;
+        info.ydpi = ydpi;
+        info.fps = float(1e9 / hwConfig.refresh);
+
+        // All non-virtual displays are currently considered secure.
+        info.secure = true;
+
+        configs->push_back(info);
     }
 
-    info->w = hwc.getWidth(type);
-    info->h = hwc.getHeight(type);
-    info->xdpi = xdpi;
-    info->ydpi = ydpi;
-    info->fps = float(1e9 / hwc.getRefreshPeriod(type));
+    return NO_ERROR;
+}
 
-    // All non-virtual displays are currently considered secure.
-    info->secure = true;
+int SurfaceFlinger::getActiveConfig(const sp<IBinder>& display) {
+    return 0;
+}
 
+status_t SurfaceFlinger::setActiveConfig(const sp<IBinder>& display, int id) {
+    return NO_ERROR;
+}
+
+status_t SurfaceFlinger::clearAnimationFrameStats() {
+    Mutex::Autolock _l(mStateLock);
+    mAnimFrameTracker.clearStats();
+    return NO_ERROR;
+}
+
+status_t SurfaceFlinger::getAnimationFrameStats(FrameStats* outStats) const {
+    Mutex::Autolock _l(mStateLock);
+    mAnimFrameTracker.getStats(outStats);
     return NO_ERROR;
 }
 
@@ -593,12 +631,12 @@
 }
 
 status_t SurfaceFlinger::postMessageAsync(const sp<MessageBase>& msg,
-        nsecs_t reltime, uint32_t flags) {
+        nsecs_t reltime, uint32_t /* flags */) {
     return mEventQueue.postMessage(msg, reltime);
 }
 
 status_t SurfaceFlinger::postMessageSync(const sp<MessageBase>& msg,
-        nsecs_t reltime, uint32_t flags) {
+        nsecs_t reltime, uint32_t /* flags */) {
     status_t res = mEventQueue.postMessage(msg, reltime);
     if (res == NO_ERROR) {
         msg->wait();
@@ -817,7 +855,7 @@
         }
     }
 
-    if (runningWithoutSyncFramework) {
+    if (kIgnorePresentFences) {
         const sp<const DisplayDevice> hw(getDefaultDisplayDevice());
         if (hw->isScreenAcquired()) {
             enableHardwareVsync();
@@ -905,7 +943,7 @@
                         for (size_t i=0 ; cur!=end && i<count ; ++i, ++cur) {
                             const sp<Layer>& layer(currentLayers[i]);
                             layer->setGeometry(hw, *cur);
-                            if (mDebugDisableHWC || mDebugRegion || mDaltonize) {
+                            if (mDebugDisableHWC || mDebugRegion || mDaltonize || mHasColorMatrix) {
                                 cur->setSkip(true);
                             }
                         }
@@ -1151,7 +1189,10 @@
 
                     sp<DisplaySurface> dispSurface;
                     sp<IGraphicBufferProducer> producer;
-                    sp<BufferQueue> bq = new BufferQueue(new GraphicBufferAlloc());
+                    sp<IGraphicBufferProducer> bqProducer;
+                    sp<IGraphicBufferConsumer> bqConsumer;
+                    BufferQueue::createBufferQueue(&bqProducer, &bqConsumer,
+                            new GraphicBufferAlloc());
 
                     int32_t hwcDisplayId = -1;
                     if (state.isVirtualDisplay()) {
@@ -1162,8 +1203,8 @@
 
                             hwcDisplayId = allocateHwcDisplayId(state.type);
                             sp<VirtualDisplaySurface> vds = new VirtualDisplaySurface(
-                                    *mHwc, hwcDisplayId, state.surface, bq,
-                                    state.displayName);
+                                    *mHwc, hwcDisplayId, state.surface,
+                                    bqProducer, bqConsumer, state.displayName);
 
                             dispSurface = vds;
                             if (hwcDisplayId >= 0) {
@@ -1182,8 +1223,9 @@
                         hwcDisplayId = allocateHwcDisplayId(state.type);
                         // for supported (by hwc) displays we provide our
                         // own rendering surface
-                        dispSurface = new FramebufferSurface(*mHwc, state.type, bq);
-                        producer = bq;
+                        dispSurface = new FramebufferSurface(*mHwc, state.type,
+                                bqConsumer);
+                        producer = bqProducer;
                     }
 
                     const wp<IBinder>& display(curr.keyAt(i));
@@ -1536,11 +1578,15 @@
         }
     }
 
-    if (CC_LIKELY(!mDaltonize)) {
+    if (CC_LIKELY(!mDaltonize && !mHasColorMatrix)) {
         doComposeSurfaces(hw, dirtyRegion);
     } else {
         RenderEngine& engine(getRenderEngine());
-        engine.beginGroup(mDaltonizer());
+        mat4 colorMatrix = mColorMatrix;
+        if (mDaltonize) {
+            colorMatrix = colorMatrix * mDaltonizer();
+        }
+        engine.beginGroup(colorMatrix);
         doComposeSurfaces(hw, dirtyRegion);
         engine.endGroup();
     }
@@ -1706,7 +1752,7 @@
     return status_t(index);
 }
 
-uint32_t SurfaceFlinger::peekTransactionFlags(uint32_t flags) {
+uint32_t SurfaceFlinger::peekTransactionFlags(uint32_t /* flags */) {
     return android_atomic_release_load(&mTransactionFlags);
 }
 
@@ -1964,7 +2010,7 @@
     status_t err = (*outLayer)->setBuffers(w, h, format, flags);
     if (err == NO_ERROR) {
         *handle = (*outLayer)->getHandle();
-        *gbp = (*outLayer)->getBufferQueue();
+        *gbp = (*outLayer)->getProducer();
     }
 
     ALOGE_IF(err, "createNormalLayer() failed (%s)", strerror(-err));
@@ -1977,7 +2023,7 @@
 {
     *outLayer = new LayerDim(this, client, name, w, h, flags);
     *handle = (*outLayer)->getHandle();
-    *gbp = (*outLayer)->getBufferQueue();
+    *gbp = (*outLayer)->getProducer();
     return NO_ERROR;
 }
 
@@ -2214,8 +2260,8 @@
     return NO_ERROR;
 }
 
-void SurfaceFlinger::listLayersLocked(const Vector<String16>& args, size_t& index,
-        String8& result) const
+void SurfaceFlinger::listLayersLocked(const Vector<String16>& /* args */,
+        size_t& /* index */, String8& result) const
 {
     const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
     const size_t count = currentLayers.size();
@@ -2239,21 +2285,21 @@
     result.appendFormat("%" PRId64 "\n", period);
 
     if (name.isEmpty()) {
-        mAnimFrameTracker.dump(result);
+        mAnimFrameTracker.dumpStats(result);
     } else {
         const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
         const size_t count = currentLayers.size();
         for (size_t i=0 ; i<count ; i++) {
             const sp<Layer>& layer(currentLayers[i]);
             if (name == layer->getName()) {
-                layer->dumpStats(result);
+                layer->dumpFrameStats(result);
             }
         }
     }
 }
 
 void SurfaceFlinger::clearStatsLocked(const Vector<String16>& args, size_t& index,
-        String8& result)
+        String8& /* result */)
 {
     String8 name;
     if (index < args.size()) {
@@ -2266,11 +2312,11 @@
     for (size_t i=0 ; i<count ; i++) {
         const sp<Layer>& layer(currentLayers[i]);
         if (name.isEmpty() || (name == layer->getName())) {
-            layer->clearStats();
+            layer->clearFrameStats();
         }
     }
 
-    mAnimFrameTracker.clear();
+    mAnimFrameTracker.clearStats();
 }
 
 // This should only be called from the main thread.  Otherwise it would need
@@ -2340,6 +2386,15 @@
     result.append(SyncFeatures::getInstance().toString());
     result.append("\n");
 
+    colorizer.bold(result);
+    result.append("DispSync configuration: ");
+    colorizer.reset(result);
+    result.appendFormat("app phase %"PRId64" ns, sf phase %"PRId64" ns, "
+            "present offset %d ns (refresh %"PRId64" ns)",
+        vsyncPhaseOffsetNs, sfVsyncPhaseOffsetNs, PRESENT_TIME_OFFSET_FROM_VSYNC_NS,
+        mHwc->getRefreshPeriod(HWC_DISPLAY_PRIMARY));
+    result.append("\n");
+
     /*
      * Dump the visible layer list
      */
@@ -2424,7 +2479,8 @@
     colorizer.reset(result);
     result.appendFormat("  h/w composer %s and %s\n",
             hwc.initCheck()==NO_ERROR ? "present" : "not present",
-                    (mDebugDisableHWC || mDebugRegion || mDaltonize) ? "disabled" : "enabled");
+                    (mDebugDisableHWC || mDebugRegion || mDaltonize
+                            || mHasColorMatrix) ? "disabled" : "enabled");
     hwc.dump(result);
 
     /*
@@ -2480,6 +2536,8 @@
         case BOOT_FINISHED:
         case BLANK:
         case UNBLANK:
+        case CLEAR_ANIMATION_FRAME_STATS:
+        case GET_ANIMATION_FRAME_STATS:
         {
             // codes that require permission check
             IPCThreadState* ipc = IPCThreadState::self();
@@ -2587,8 +2645,35 @@
                 mDaltonize = n > 0;
                 invalidateHwcGeometry();
                 repaintEverything();
+                return NO_ERROR;
             }
-            return NO_ERROR;
+            case 1015: {
+                // apply a color matrix
+                n = data.readInt32();
+                mHasColorMatrix = n ? 1 : 0;
+                if (n) {
+                    // color matrix is sent as mat3 matrix followed by vec3
+                    // offset, then packed into a mat4 where the last row is
+                    // the offset and extra values are 0
+                    for (size_t i = 0 ; i < 4; i++) {
+                      for (size_t j = 0; j < 4; j++) {
+                          mColorMatrix[i][j] = data.readFloat();
+                      }
+                    }
+                } else {
+                    mColorMatrix = mat4();
+                }
+                invalidateHwcGeometry();
+                repaintEverything();
+                return NO_ERROR;
+            }
+            // This is an experimental interface
+            // Needs to be shifted to proper binder interface when we productize
+            case 1016: {
+                n = data.readInt32();
+                mPrimaryDispSync.setRefreshSkipCount(n);
+                return NO_ERROR;
+            }
         }
     }
     return err;
@@ -2634,7 +2719,7 @@
      * data and reply Parcel and forward them to the calling thread.
      */
     virtual status_t transact(uint32_t code,
-            const Parcel& data, Parcel* reply, uint32_t flags) {
+            const Parcel& data, Parcel* reply, uint32_t /* flags */) {
         this->code = code;
         this->data = &data;
         this->reply = reply;
@@ -2687,8 +2772,9 @@
 
 status_t SurfaceFlinger::captureScreen(const sp<IBinder>& display,
         const sp<IGraphicBufferProducer>& producer,
-        uint32_t reqWidth, uint32_t reqHeight,
-        uint32_t minLayerZ, uint32_t maxLayerZ) {
+        Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+        uint32_t minLayerZ, uint32_t maxLayerZ,
+        bool useIdentityTransform) {
 
     if (CC_UNLIKELY(display == 0))
         return BAD_VALUE;
@@ -2712,18 +2798,22 @@
         SurfaceFlinger* flinger;
         sp<IBinder> display;
         sp<IGraphicBufferProducer> producer;
+        Rect sourceCrop;
         uint32_t reqWidth, reqHeight;
         uint32_t minLayerZ,maxLayerZ;
+        bool useIdentityTransform;
         status_t result;
     public:
         MessageCaptureScreen(SurfaceFlinger* flinger,
                 const sp<IBinder>& display,
                 const sp<IGraphicBufferProducer>& producer,
-                uint32_t reqWidth, uint32_t reqHeight,
-                uint32_t minLayerZ, uint32_t maxLayerZ)
+                Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+                uint32_t minLayerZ, uint32_t maxLayerZ,
+                bool useIdentityTransform)
             : flinger(flinger), display(display), producer(producer),
-              reqWidth(reqWidth), reqHeight(reqHeight),
+              sourceCrop(sourceCrop), reqWidth(reqWidth), reqHeight(reqHeight),
               minLayerZ(minLayerZ), maxLayerZ(maxLayerZ),
+              useIdentityTransform(useIdentityTransform),
               result(PERMISSION_DENIED)
         {
         }
@@ -2733,8 +2823,9 @@
         virtual bool handler() {
             Mutex::Autolock _l(flinger->mStateLock);
             sp<const DisplayDevice> hw(flinger->getDisplayDevice(display));
-            result = flinger->captureScreenImplLocked(hw,
-                    producer, reqWidth, reqHeight, minLayerZ, maxLayerZ);
+            result = flinger->captureScreenImplLocked(hw, producer,
+                    sourceCrop, reqWidth, reqHeight, minLayerZ, maxLayerZ,
+                    useIdentityTransform);
             static_cast<GraphicProducerWrapper*>(producer->asBinder().get())->exit(result);
             return true;
         }
@@ -2756,7 +2847,8 @@
     // which does the marshaling work forwards to our "fake remote" above.
     sp<MessageBase> msg = new MessageCaptureScreen(this,
             display, IGraphicBufferProducer::asInterface( wrapper ),
-            reqWidth, reqHeight, minLayerZ, maxLayerZ);
+            sourceCrop, reqWidth, reqHeight, minLayerZ, maxLayerZ,
+            useIdentityTransform);
 
     status_t res = postMessageAsync(msg);
     if (res == NO_ERROR) {
@@ -2768,9 +2860,9 @@
 
 void SurfaceFlinger::renderScreenImplLocked(
         const sp<const DisplayDevice>& hw,
-        uint32_t reqWidth, uint32_t reqHeight,
+        Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
         uint32_t minLayerZ, uint32_t maxLayerZ,
-        bool yswap)
+        bool yswap, bool useIdentityTransform)
 {
     ATRACE_CALL();
     RenderEngine& engine(getRenderEngine());
@@ -2780,11 +2872,32 @@
     const uint32_t hw_h = hw->getHeight();
     const bool filtering = reqWidth != hw_w || reqWidth != hw_h;
 
+    // if a default or invalid sourceCrop is passed in, set reasonable values
+    if (sourceCrop.width() == 0 || sourceCrop.height() == 0 ||
+            !sourceCrop.isValid()) {
+        sourceCrop.setLeftTop(Point(0, 0));
+        sourceCrop.setRightBottom(Point(hw_w, hw_h));
+    }
+
+    // ensure that sourceCrop is inside screen
+    if (sourceCrop.left < 0) {
+        ALOGE("Invalid crop rect: l = %d (< 0)", sourceCrop.left);
+    }
+    if (sourceCrop.right >= hw_w) {
+        ALOGE("Invalid crop rect: r = %d (>= %d)", sourceCrop.right, hw_w);
+    }
+    if (sourceCrop.top < 0) {
+        ALOGE("Invalid crop rect: t = %d (< 0)", sourceCrop.top);
+    }
+    if (sourceCrop.bottom >= hw_h) {
+        ALOGE("Invalid crop rect: b = %d (>= %d)", sourceCrop.bottom, hw_h);
+    }
+
     // make sure to clear all GL error flags
     engine.checkErrors();
 
     // set-up our viewport
-    engine.setViewportAndProjection(reqWidth, reqHeight, hw_w, hw_h, yswap);
+    engine.setViewportAndProjection(reqWidth, reqHeight, sourceCrop, hw_h, yswap);
     engine.disableTexturing();
 
     // redraw the screen entirely...
@@ -2799,7 +2912,7 @@
             if (state.z >= minLayerZ && state.z <= maxLayerZ) {
                 if (layer->isVisible()) {
                     if (filtering) layer->setFiltering(true);
-                    layer->draw(hw);
+                    layer->draw(hw, useIdentityTransform);
                     if (filtering) layer->setFiltering(false);
                 }
             }
@@ -2815,8 +2928,9 @@
 status_t SurfaceFlinger::captureScreenImplLocked(
         const sp<const DisplayDevice>& hw,
         const sp<IGraphicBufferProducer>& producer,
-        uint32_t reqWidth, uint32_t reqHeight,
-        uint32_t minLayerZ, uint32_t maxLayerZ)
+        Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+        uint32_t minLayerZ, uint32_t maxLayerZ,
+        bool useIdentityTransform)
 {
     ATRACE_CALL();
 
@@ -2869,8 +2983,8 @@
                         // via an FBO, which means we didn't have to create
                         // an EGLSurface and therefore we're not
                         // dependent on the context's EGLConfig.
-                        renderScreenImplLocked(hw, reqWidth, reqHeight,
-                                minLayerZ, maxLayerZ, true);
+                        renderScreenImplLocked(hw, sourceCrop, reqWidth, reqHeight,
+                                minLayerZ, maxLayerZ, true, useIdentityTransform);
 
                         // Create a sync point and wait on it, so we know the buffer is
                         // ready before we pass it along.  We can't trivially call glFlush(),
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 80bb619..cc01eb3 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -38,6 +38,7 @@
 #include <binder/IMemory.h>
 
 #include <ui/PixelFormat.h>
+#include <ui/mat4.h>
 
 #include <gui/ISurfaceComposer.h>
 #include <gui/ISurfaceComposerClient.h>
@@ -137,7 +138,7 @@
     friend class Client;
     friend class DisplayEventConnection;
     friend class Layer;
-    friend class SurfaceTextureLayer;
+    friend class MonitoredProducer;
 
     // This value is specified in number of frames.  Log frame stats at most
     // every half hour.
@@ -201,13 +202,19 @@
     virtual sp<IDisplayEventConnection> createDisplayEventConnection();
     virtual status_t captureScreen(const sp<IBinder>& display,
             const sp<IGraphicBufferProducer>& producer,
-            uint32_t reqWidth, uint32_t reqHeight,
-            uint32_t minLayerZ, uint32_t maxLayerZ);
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            uint32_t minLayerZ, uint32_t maxLayerZ,
+            bool useIdentityTransform);
     // called when screen needs to turn off
     virtual void blank(const sp<IBinder>& display);
     // called when screen is turning back on
     virtual void unblank(const sp<IBinder>& display);
-    virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info);
+    virtual status_t getDisplayConfigs(const sp<IBinder>& display,
+            Vector<DisplayInfo>* configs);
+    virtual int getActiveConfig(const sp<IBinder>& display);
+    virtual status_t setActiveConfig(const sp<IBinder>& display, int id);
+    virtual status_t clearAnimationFrameStats();
+    virtual status_t getAnimationFrameStats(FrameStats* outStats) const;
 
     /* ------------------------------------------------------------------------
      * DeathRecipient interface
@@ -304,15 +311,16 @@
 
     void renderScreenImplLocked(
             const sp<const DisplayDevice>& hw,
-            uint32_t reqWidth, uint32_t reqHeight,
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
             uint32_t minLayerZ, uint32_t maxLayerZ,
-            bool yswap);
+            bool yswap, bool useIdentityTransform);
 
     status_t captureScreenImplLocked(
             const sp<const DisplayDevice>& hw,
             const sp<IGraphicBufferProducer>& producer,
-            uint32_t reqWidth, uint32_t reqHeight,
-            uint32_t minLayerZ, uint32_t maxLayerZ);
+            Rect sourceCrop, uint32_t reqWidth, uint32_t reqHeight,
+            uint32_t minLayerZ, uint32_t maxLayerZ,
+            bool useIdentityTransform);
 
     /* ------------------------------------------------------------------------
      * EGL
@@ -472,6 +480,9 @@
 
     Daltonizer mDaltonizer;
     bool mDaltonize;
+
+    mat4 mColorMatrix;
+    bool mHasColorMatrix;
 };
 
 }; // namespace android
diff --git a/services/surfaceflinger/SurfaceFlingerConsumer.cpp b/services/surfaceflinger/SurfaceFlingerConsumer.cpp
index 6dc093e..7de6ac4 100644
--- a/services/surfaceflinger/SurfaceFlingerConsumer.cpp
+++ b/services/surfaceflinger/SurfaceFlingerConsumer.cpp
@@ -21,14 +21,16 @@
 
 #include <private/gui/SyncFeatures.h>
 
-#include <utils/Trace.h>
 #include <utils/Errors.h>
+#include <utils/NativeHandle.h>
+#include <utils/Trace.h>
 
 namespace android {
 
 // ---------------------------------------------------------------------------
 
-status_t SurfaceFlingerConsumer::updateTexImage(BufferRejecter* rejecter)
+status_t SurfaceFlingerConsumer::updateTexImage(BufferRejecter* rejecter,
+        const DispSync& dispSync)
 {
     ATRACE_CALL();
     ALOGV("updateTexImage");
@@ -50,7 +52,7 @@
     // Acquire the next buffer.
     // In asynchronous mode the list is guaranteed to be one buffer
     // deep, while in synchronous mode we use the oldest buffer.
-    err = acquireBufferLocked(&item, computeExpectedPresent());
+    err = acquireBufferLocked(&item, computeExpectedPresent(dispSync));
     if (err != NO_ERROR) {
         if (err == BufferQueue::NO_BUFFER_AVAILABLE) {
             err = NO_ERROR;
@@ -112,6 +114,10 @@
     return mTransformToDisplayInverse;
 }
 
+sp<NativeHandle> SurfaceFlingerConsumer::getSidebandStream() const {
+    return mConsumer->getSidebandStream();
+}
+
 // We need to determine the time when a buffer acquired now will be
 // displayed.  This can be calculated:
 //   time when previous buffer's actual-present fence was signaled
@@ -123,35 +129,61 @@
 // will be slightly later then the actual-present timing.  If we get a
 // desired-present time that is unintentionally a hair after the next
 // vsync, we'll hold the frame when we really want to display it.  We
-// want to use an expected-presentation time that is slightly late to
-// avoid this sort of edge case.
-nsecs_t SurfaceFlingerConsumer::computeExpectedPresent()
+// need to take the offset between actual-present and reported-vsync
+// into account.
+//
+// If the system is configured without a DispSync phase offset for the app,
+// we also want to throw in a bit of padding to avoid edge cases where we
+// just barely miss.  We want to do it here, not in every app.  A major
+// source of trouble is the app's use of the display's ideal refresh time
+// (via Display.getRefreshRate()), which could be off of the actual refresh
+// by a few percent, with the error multiplied by the number of frames
+// between now and when the buffer should be displayed.
+//
+// If the refresh reported to the app has a phase offset, we shouldn't need
+// to tweak anything here.
+nsecs_t SurfaceFlingerConsumer::computeExpectedPresent(const DispSync& dispSync)
 {
-    // Don't yet have an easy way to get actual buffer flip time for
-    // the specific display, so use the current time.  This is typically
-    // 1.3ms past the vsync event time.
-    const nsecs_t prevVsync = systemTime(CLOCK_MONOTONIC);
-
-    // Given a SurfaceFlinger reference, and information about what display
-    // we're destined for, we could query the HWC for the refresh rate.  This
-    // could change over time, e.g. we could switch to 24fps for a movie.
-    // For now, assume 60fps.
-    //const nsecs_t vsyncPeriod =
-    //        getHwComposer().getRefreshPeriod(HWC_DISPLAY_PRIMARY);
-    const nsecs_t vsyncPeriod = 16700000;
-
     // The HWC doesn't currently have a way to report additional latency.
-    // Assume that whatever we submit now will appear on the next flip,
-    // i.e. 1 frame of latency w.r.t. the previous flip.
-    const uint32_t hwcLatency = 1;
+    // Assume that whatever we submit now will appear right after the flip.
+    // For a smart panel this might be 1.  This is expressed in frames,
+    // rather than time, because we expect to have a constant frame delay
+    // regardless of the refresh rate.
+    const uint32_t hwcLatency = 0;
 
-    // A little extra padding to compensate for slack between actual vsync
-    // time and vsync event receipt.  Currently not needed since we're
-    // using "now" instead of a vsync time.
-    const nsecs_t extraPadding = 0;
+    // Ask DispSync when the next refresh will be (CLOCK_MONOTONIC).
+    const nsecs_t nextRefresh = dispSync.computeNextRefresh(hwcLatency);
 
-    // Total it up.
-    return prevVsync + hwcLatency * vsyncPeriod + extraPadding;
+    // The DispSync time is already adjusted for the difference between
+    // vsync and reported-vsync (PRESENT_TIME_OFFSET_FROM_VSYNC_NS), so
+    // we don't need to factor that in here.  Pad a little to avoid
+    // weird effects if apps might be requesting times right on the edge.
+    nsecs_t extraPadding = 0;
+    if (VSYNC_EVENT_PHASE_OFFSET_NS == 0) {
+        extraPadding = 1000000;        // 1ms (6% of 60Hz)
+    }
+
+    return nextRefresh + extraPadding;
+}
+
+void SurfaceFlingerConsumer::setContentsChangedListener(
+        const wp<ContentsChangedListener>& listener) {
+    setFrameAvailableListener(listener);
+    Mutex::Autolock lock(mMutex);
+    mContentsChangedListener = listener;
+}
+
+void SurfaceFlingerConsumer::onSidebandStreamChanged() {
+    sp<ContentsChangedListener> listener;
+    {   // scope for the lock
+        Mutex::Autolock lock(mMutex);
+        ALOG_ASSERT(mFrameAvailableListener.unsafe_get() == mContentsChangedListener.unsafe_get());
+        listener = mContentsChangedListener.promote();
+    }
+
+    if (listener != NULL) {
+        listener->onSidebandStreamChanged();
+    }
 }
 
 // ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/SurfaceFlingerConsumer.h b/services/surfaceflinger/SurfaceFlingerConsumer.h
index 688ad32..ed307c2 100644
--- a/services/surfaceflinger/SurfaceFlingerConsumer.h
+++ b/services/surfaceflinger/SurfaceFlingerConsumer.h
@@ -17,6 +17,7 @@
 #ifndef ANDROID_SURFACEFLINGERCONSUMER_H
 #define ANDROID_SURFACEFLINGERCONSUMER_H
 
+#include "DispSync.h"
 #include <gui/GLConsumer.h>
 
 namespace android {
@@ -27,8 +28,14 @@
  */
 class SurfaceFlingerConsumer : public GLConsumer {
 public:
-    SurfaceFlingerConsumer(const sp<BufferQueue>& bq, uint32_t tex)
-        : GLConsumer(bq, tex, GLConsumer::TEXTURE_EXTERNAL, false)
+    struct ContentsChangedListener: public FrameAvailableListener {
+        virtual void onSidebandStreamChanged() = 0;
+    };
+
+    SurfaceFlingerConsumer(const sp<IGraphicBufferConsumer>& consumer,
+            uint32_t tex)
+        : GLConsumer(consumer, tex, GLConsumer::TEXTURE_EXTERNAL, false),
+          mTransformToDisplayInverse(false)
     {}
 
     class BufferRejecter {
@@ -46,7 +53,7 @@
     // reject the newly acquired buffer.  Unlike the GLConsumer version,
     // this does not guarantee that the buffer has been bound to the GL
     // texture.
-    status_t updateTexImage(BufferRejecter* rejecter);
+    status_t updateTexImage(BufferRejecter* rejecter, const DispSync& dispSync);
 
     // See GLConsumer::bindTextureImageLocked().
     status_t bindTextureImage();
@@ -54,8 +61,18 @@
     // must be called from SF main thread
     bool getTransformToDisplayInverse() const;
 
+    // Sets the contents changed listener. This should be used instead of
+    // ConsumerBase::setFrameAvailableListener().
+    void setContentsChangedListener(const wp<ContentsChangedListener>& listener);
+
+    sp<NativeHandle> getSidebandStream() const;
+
 private:
-    nsecs_t computeExpectedPresent();
+    nsecs_t computeExpectedPresent(const DispSync& dispSync);
+
+    virtual void onSidebandStreamChanged();
+
+    wp<ContentsChangedListener> mContentsChangedListener;
 
     // Indicates this buffer must be transformed by the inverse transform of the screen
     // it is displayed onto. This is applied after GLConsumer::mCurrentTransform.
diff --git a/services/surfaceflinger/SurfaceTextureLayer.cpp b/services/surfaceflinger/SurfaceTextureLayer.cpp
deleted file mode 100644
index 9d79ce2..0000000
--- a/services/surfaceflinger/SurfaceTextureLayer.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-
-#include "SurfaceFlinger.h"
-#include "SurfaceTextureLayer.h"
-
-namespace android {
-// ---------------------------------------------------------------------------
-
-
-SurfaceTextureLayer::SurfaceTextureLayer(const sp<SurfaceFlinger>& flinger)
-    : BufferQueue(), flinger(flinger) {
-}
-
-SurfaceTextureLayer::~SurfaceTextureLayer() {
-    // remove ourselves from SurfaceFlinger's list. We do this asynchronously
-    // because we don't know where this dtor is called from, it could be
-    // called with the mStateLock held, leading to a dead-lock (it actually
-    // happens).
-    class MessageCleanUpList : public MessageBase {
-        sp<SurfaceFlinger> flinger;
-        wp<IBinder> gbp;
-    public:
-        MessageCleanUpList(const sp<SurfaceFlinger>& flinger, const wp<IBinder>& gbp)
-            : flinger(flinger), gbp(gbp) { }
-        virtual bool handler() {
-            Mutex::Autolock _l(flinger->mStateLock);
-            flinger->mGraphicBufferProducerList.remove(gbp);
-            return true;
-        }
-    };
-    flinger->postMessageAsync(
-            new MessageCleanUpList(flinger, static_cast<BnGraphicBufferProducer*>(this)) );
-}
-
-// ---------------------------------------------------------------------------
-}; // namespace android
diff --git a/services/surfaceflinger/SurfaceTextureLayer.h b/services/surfaceflinger/SurfaceTextureLayer.h
deleted file mode 100644
index 5f5e4ef..0000000
--- a/services/surfaceflinger/SurfaceTextureLayer.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_SURFACE_TEXTURE_LAYER_H
-#define ANDROID_SURFACE_TEXTURE_LAYER_H
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#include <utils/Errors.h>
-#include <gui/BufferQueue.h>
-
-namespace android {
-// ---------------------------------------------------------------------------
-
-class Layer;
-class SurfaceFlinger;
-
-/*
- * This is a thin wrapper around BufferQueue, used by the Layer class.
- */
-class SurfaceTextureLayer : public BufferQueue {
-    sp<SurfaceFlinger> flinger;
-public:
-    SurfaceTextureLayer(const sp<SurfaceFlinger>& flinger);
-    virtual ~SurfaceTextureLayer();
-};
-
-// ---------------------------------------------------------------------------
-}; // namespace android
-
-#endif // ANDROID_SURFACE_TEXTURE_LAYER_H